mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Compare commits
59 Commits
v1.7.0beta
...
v1.5.10bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0054bee2a6 | ||
|
|
454e05a63a | ||
|
|
caae038b69 | ||
|
|
c11a25973c | ||
|
|
b40411882a | ||
|
|
755c39725e | ||
|
|
d9c4484b3e | ||
|
|
b7b42de05f | ||
|
|
65de519c4a | ||
|
|
b27c862b14 | ||
|
|
f97ed91ead | ||
|
|
97b6ad1c06 | ||
|
|
7746299fbe | ||
|
|
8d69281998 | ||
|
|
4d3d2d9472 | ||
|
|
8ae616fa97 | ||
|
|
d57dc304c4 | ||
|
|
8a2033d77f | ||
|
|
932d7ac5e9 | ||
|
|
f9accb9df2 | ||
|
|
7a4e497b62 | ||
|
|
0207529f27 | ||
|
|
a08f60352c | ||
|
|
0bddb27e75 | ||
|
|
a67ddd4b9f | ||
|
|
a7e9d7bfc2 | ||
|
|
28c3a2f9f9 | ||
|
|
df0773c1b9 | ||
|
|
902dbe619e | ||
|
|
0f59bbb5b6 | ||
|
|
9ca5f1bdc8 | ||
|
|
9f01d0d665 | ||
|
|
da544d7d3e | ||
|
|
ea8d0b9408 | ||
|
|
9287447cef | ||
|
|
d35a3a826e | ||
|
|
e23fedc9de | ||
|
|
cd3f5bb507 | ||
|
|
b0270a9e47 | ||
|
|
52cbf46f30 | ||
|
|
d61b42c81d | ||
|
|
8fd9c16642 | ||
|
|
e22ea758e4 | ||
|
|
f22c0ac2a5 | ||
|
|
4f547b7177 | ||
|
|
c4fe32016c | ||
|
|
1be5c22e5c | ||
|
|
956c0599e6 | ||
|
|
97c8fbb949 | ||
|
|
a50ce74850 | ||
|
|
8973ee17bb | ||
|
|
2e31b96a5a | ||
|
|
0222124801 | ||
|
|
61b23d59b1 | ||
|
|
cc1fa5df3a | ||
|
|
cc5664ddad | ||
|
|
e209df47c4 | ||
|
|
585f8b49b5 | ||
|
|
4491fa237f |
117
ANNOUNCE
117
ANNOUNCE
@@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.5.7beta05 - November 22, 2011
|
||||
Libpng 1.5.10beta03 - March 5, 2012
|
||||
|
||||
This is not intended to be a public release. It will be replaced
|
||||
within a few weeks by a public version or by another test version.
|
||||
@@ -9,103 +9,46 @@ Files available for download:
|
||||
Source files with LF line endings (for Unix/Linux) and with a
|
||||
"configure" script
|
||||
|
||||
1.5.7beta05.tar.xz (LZMA-compressed, recommended)
|
||||
1.5.7beta05.tar.gz
|
||||
1.5.7beta05.tar.bz2
|
||||
1.5.10beta03.tar.xz (LZMA-compressed, recommended)
|
||||
1.5.10beta03.tar.gz
|
||||
1.5.10beta03.tar.bz2
|
||||
|
||||
Source files with CRLF line endings (for Windows), without the
|
||||
"configure" script
|
||||
|
||||
lp157b05.7z (LZMA-compressed, recommended)
|
||||
lp157b05.zip
|
||||
lp1510b03.7z (LZMA-compressed, recommended)
|
||||
lp1510b03.zip
|
||||
|
||||
Other information:
|
||||
|
||||
1.5.7beta05-README.txt
|
||||
1.5.7beta05-LICENSE.txt
|
||||
1.5.10beta03-README.txt
|
||||
1.5.10beta03-LICENSE.txt
|
||||
|
||||
Changes since the last public release (1.5.6):
|
||||
Changes since the last public release (1.5.9):
|
||||
|
||||
Version 1.5.7beta01 [November 4, 2011]
|
||||
Added support for ARM processor (Mans Rullgard)
|
||||
Fixed bug in pngvalid on early allocation failure; fixed type cast in
|
||||
pngmem.c; pngvalid would attempt to call png_error() if the allocation
|
||||
of a png_struct or png_info failed. This would probably have led to a
|
||||
crash. The pngmem.c implementation of png_malloc() included a cast
|
||||
to png_size_t which would fail on large allocations on 16-bit systems.
|
||||
Fix for the preprocessor of the Intel C compiler. The preprocessor
|
||||
splits adjacent @ signs with a space; this changes the concatentation
|
||||
token from @-@-@ to PNG_JOIN; that should work with all compiler
|
||||
preprocessors.
|
||||
Paeth filter speed improvements from work by Siarhei Siamashka. This
|
||||
changes the 'Paeth' reconstruction function to improve the GCC code
|
||||
generation on x86. The changes are only part of the suggested ones;
|
||||
just the changes that definitely improve speed and remain simple.
|
||||
The changes also slightly increase the clarity of the code.
|
||||
Version 1.5.10beta01 [February 24, 2012]
|
||||
Removed two useless #ifdef directives from pngread.c and one from pngrutil.c
|
||||
Always put the CMAKE_LIBRARY in "lib" (removed special WIN32 case).
|
||||
Removed empty vstudio/pngstest directory (Clifford Yapp).
|
||||
Eliminated redundant png_push_read_tEXt|zTXt|iTXt|unknown code from
|
||||
pngpread.c and use the sequential png_handle_tEXt, etc., in pngrutil.c;
|
||||
now that png_ptr->buffer is inaccessible to applications, the special
|
||||
handling is no longer useful.
|
||||
Fixed bug with png_handle_hIST with odd chunk length (Frank Busse).
|
||||
Added PNG_SAFE_LIMITS feature to pnglibconf.dfa and code in pngconf.h
|
||||
to reset the user limits to safe ones if PNG_SAFE_LIMITS is defined.
|
||||
To enable, use "CPPFLAGS=-DPNG_SAFE_LIMITS_SUPPORTED" on the configure
|
||||
command or put "#define PNG_SAFE_LIMITS_SUPPORTED" in pnglibconf.h.
|
||||
Revised the SAFE_LIMITS feature to be the same as the feature in libpng16.
|
||||
Added information about the new limits in the manual.
|
||||
|
||||
Version 1.5.7beta02 [November 11, 2011]
|
||||
Check compression_type parameter in png_get_iCCP and remove spurious
|
||||
casts. The compression_type parameter is always assigned to, so must
|
||||
be non-NULL. The cast of the profile length potentially truncated the
|
||||
value unnecessarily on a 16-bit int system, so the cast of the (byte)
|
||||
compression type to (int) is specified by ANSI-C anyway.
|
||||
Fixed FP division by zero in pngvalid.c; the 'test_pixel' code left
|
||||
the sBIT fields in the test pixel as 0, which resulted in a floating
|
||||
point division by zero which was irrelevant but causes systems where
|
||||
FP exceptions cause a crash. Added code to pngvalid to turn on FP
|
||||
exceptions if the appropriate glibc support is there to ensure this is
|
||||
tested in the future.
|
||||
Updated scripts/pnglibconf.mak and scripts/makefile.std to handle the
|
||||
new PNG_JOIN macro.
|
||||
Added versioning to pnglibconf.h comments.
|
||||
Simplified read/write API initial version; basic read/write tested on
|
||||
a variety of images, limited documentation (in the header file.)
|
||||
Installed more accurate linear to sRGB conversion tables. The slightly
|
||||
modified tables reduce the number of 16-bit values that
|
||||
convert to an off-by-one 8-bit value. The "makesRGB.c" code that was used
|
||||
to generate the tables is now in a contrib/sRGBtables sub-directory.
|
||||
Version 1.5.10beta02 [February 27, 2012]
|
||||
Updated Makefile.in
|
||||
|
||||
Version 1.5.7beta03 [November 17, 2011]
|
||||
Removed PNG_CONST from the sRGB table declarations in pngpriv.h and png.c
|
||||
Added run-time detection of NEON support.
|
||||
Added contrib/libtests; includes simplified API test and timing test and
|
||||
a color conversion utility for rapid checking of failed 'pngstest' results.
|
||||
Multiple transform bug fixes plus a work-round for double gamma correction.
|
||||
libpng does not support more than one transform that requires linear data
|
||||
at once - if this is tried typically the results is double gamma
|
||||
correction. Since the simplified APIs can need rgb to gray combined with
|
||||
a compose operation it is necessary to do one of these outside the main
|
||||
libpng transform code. This check-in also contains fixes to various bugs
|
||||
in the simplified APIs themselves and to some bugs in compose and rgb to
|
||||
gray (on palette) itself.
|
||||
Fixes for C++ compilation using g++ When libpng source is compiled
|
||||
using g++. The compiler imposes C++ rules on the C source; thus it
|
||||
is desireable to make the source work with either C or C++ rules
|
||||
without throwing away useful error information. This change adds
|
||||
png_voidcast to allow C semantic (void*) cases or the corresponding
|
||||
C++ static_cast operation, as appropriate.
|
||||
Added --noexecstack to assembler file compilation. GCC does not set
|
||||
this on assembler compilation, even though it does on C compilation.
|
||||
This creates security issues if assembler code is enabled; the
|
||||
work-around is to set it by default in the flags for $(CCAS)
|
||||
Work around compilers that don't support declaration of const data. Some
|
||||
compilers fault 'extern const' data declarations (because the data is
|
||||
not initialized); this turns on const-ness only for compilers where
|
||||
this is known to work.
|
||||
|
||||
Version 1.5.7beta04 [November 17, 2011]
|
||||
Since the gcc driver does not recognize the --noexecstack flag, we must
|
||||
use the -Wa prefix to have it passed through to the assembler.
|
||||
Also removed a duplicate setting of this flag.
|
||||
Added files that were omitted from the libpng-1.5.7beta03 zip distribution.
|
||||
|
||||
Version 1.5.7beta05 [November 22, 2011]
|
||||
Removed "zTXt" from warning in generic chunk decompression function.
|
||||
Validate time settings passed to pngset() and png_convert_to_rfc1123()
|
||||
(Frank Busse).
|
||||
Allow row_stride==0 to indicate default stride in simplified API.
|
||||
Added MINGW support to CMakeLists.txt
|
||||
Reject invalid compression flag or method when reading the iTXt chunk.
|
||||
Version 1.5.10beta03 [March 5, 2012]
|
||||
Removed unused "current_text" members of png_struct and the png_free()
|
||||
of png_ptr->current_text from pngread.c
|
||||
Added palette-index checking.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
|
||||
(subscription required; visit
|
||||
|
||||
87
CHANGES
87
CHANGES
@@ -3744,13 +3744,96 @@ Version 1.5.7beta04 [November 17, 2011]
|
||||
Also removed a duplicate setting of this flag.
|
||||
Added files that were omitted from the libpng-1.5.7beta03 zip distribution.
|
||||
|
||||
Version 1.5.7beta05 [November 22, 2011]
|
||||
Version 1.5.7beta05 [November 25, 2011]
|
||||
Removed "zTXt" from warning in generic chunk decompression function.
|
||||
Validate time settings passed to pngset() and png_convert_to_rfc1123()
|
||||
(Frank Busse).
|
||||
Allow row_stride==0 to indicate default stride in simplified API.
|
||||
Added MINGW support to CMakeLists.txt
|
||||
Reject invalid compression flag or method when reading the iTXt chunk.
|
||||
Backed out 'simplified' API changes. The API seems too complex and there
|
||||
is a lack of consensus or enthusiasm for the proposals. The API also
|
||||
reveals significant bugs inside libpng (double gamma correction and the
|
||||
known bug of being unable to retrieve a corrected palette). It seems
|
||||
better to wait until the bugs, at least, are corrected.
|
||||
Moved pngvalid.c into contrib/libtests
|
||||
Rebuilt Makefile.in, configure, etc., with autoconf-2.68
|
||||
|
||||
Version 1.5.7rc01 [December 1, 2011]
|
||||
Replaced an "#if" with "#ifdef" in pngrtran.c
|
||||
Revised #if PNG_DO_BC block in png.c (use #ifdef and add #else)
|
||||
|
||||
Version 1.5.7rc02 [December 5, 2011]
|
||||
Revised project files and contrib/pngvalid/pngvalid.c to account for
|
||||
the relocation of pngvalid into contrib/libtests.
|
||||
Revised pngconf.h to use " __declspec(restrict)" only when MSC_VER >= 1400,
|
||||
as in libpng-1.5.4.
|
||||
Put CRLF line endings in the owatcom project files.
|
||||
|
||||
Version 1.5.7rc03 [December 7, 2011]
|
||||
Updated CMakeLists.txt to account for the relocation of pngvalid.c
|
||||
|
||||
Version 1.5.7 [December 15, 2011]
|
||||
Minor fixes to pngvalid.c for gcc 4.6.2 compatibility to remove warnings
|
||||
reported by earlier versions.
|
||||
|
||||
Version 1.5.8beta01 [January 15, 2011]
|
||||
Removed '#include config.h"' from contrib/libtests/pngvalid.c. It's not
|
||||
needed and causes trouble for VPATH building.
|
||||
Moved AC_MSG_CHECKING([if libraries can be versioned]) later to the proper
|
||||
location in configure.ac (Gilles Espinasse).
|
||||
Fix bug in pngerror.c: some long warnings were being improperly truncated
|
||||
(CVE-2011-3464, bug introduced in libpng-1.5.3beta05).
|
||||
|
||||
Version 1.5.8rc01 [January 21, 2012]
|
||||
No changes.
|
||||
|
||||
Version 1.5.8rc02 [January 25, 2012]
|
||||
Fixed Min/GW uninstall to remove libpng.dll.a
|
||||
Conditionalize the install rules for MINGW and CYGWIN in CMakeLists.txt
|
||||
|
||||
Version 1.5.8 [February 1, 2012]
|
||||
No changes.
|
||||
|
||||
Version 1.5.9beta01 [February 3, 2012]
|
||||
Rebuilt configure scripts in the tar distributions.
|
||||
|
||||
Version 1.5.9beta02 [February 16, 2012]
|
||||
Removed two unused definitions from scripts/pnglibconf.h.prebuilt
|
||||
Removed some unused arrays (with #ifdef) from png_read_push_finish_row().
|
||||
Removed tests for no-longer-used *_EMPTY_PLTE_SUPPORTED from pngstruct.h
|
||||
|
||||
Version 1.5.9rc01 [February 17, 2012]
|
||||
Fixed CVE-2011-3026 buffer overrun bug. This bug was introduced when
|
||||
iCCP chunk support was added at libpng-1.0.6. Deal more correctly with the
|
||||
test on iCCP chunk length. Also removed spurious casts that may hide
|
||||
problems on 16-bit systems.
|
||||
|
||||
Version 1.5.9 [February 18, 2012]
|
||||
No changes.
|
||||
|
||||
Version 1.5.10beta01 [February 24, 2012]
|
||||
Removed two useless #ifdef directives from pngread.c and one from pngrutil.c
|
||||
Always put the CMAKE_LIBRARY in "lib" (removed special WIN32 case).
|
||||
Removed empty vstudio/pngstest directory (Clifford Yapp).
|
||||
Eliminated redundant png_push_read_tEXt|zTXt|iTXt|unknown code from
|
||||
pngpread.c and use the sequential png_handle_tEXt, etc., in pngrutil.c;
|
||||
now that png_ptr->buffer is inaccessible to applications, the special
|
||||
handling is no longer useful.
|
||||
Fixed bug with png_handle_hIST with odd chunk length (Frank Busse).
|
||||
Added PNG_SAFE_LIMITS feature to pnglibconf.dfa and code in pngconf.h
|
||||
to reset the user limits to safe ones if PNG_SAFE_LIMITS is defined.
|
||||
To enable, use "CPPFLAGS=-DPNG_SAFE_LIMITS_SUPPORTED" on the configure
|
||||
command or put "#define PNG_SAFE_LIMITS_SUPPORTED" in pnglibconf.h.
|
||||
Revised the SAFE_LIMITS feature to be the same as the feature in libpng16.
|
||||
Added information about the new limits in the manual.
|
||||
|
||||
Version 1.5.10beta02 [February 27, 2012]
|
||||
Updated Makefile.in
|
||||
|
||||
Version 1.5.10beta03 [March 5, 2012]
|
||||
Removed unused "current_text" members of png_struct and the png_free()
|
||||
of png_ptr->current_text from pngread.c
|
||||
Added palette-index checking.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
||||
@@ -35,7 +35,7 @@ enable_testing()
|
||||
|
||||
set(PNGLIB_MAJOR 1)
|
||||
set(PNGLIB_MINOR 5)
|
||||
set(PNGLIB_RELEASE 7)
|
||||
set(PNGLIB_RELEASE 10)
|
||||
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
||||
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
|
||||
|
||||
@@ -121,7 +121,7 @@ set(pngtest_sources
|
||||
pngtest.c
|
||||
)
|
||||
set(pngvalid_sources
|
||||
pngvalid.c
|
||||
contrib/libtests/pngvalid.c
|
||||
)
|
||||
# SOME NEEDED DEFINITIONS
|
||||
|
||||
@@ -176,11 +176,7 @@ endif()
|
||||
|
||||
# Ensure the CMAKE_LIBRARY_OUTPUT_DIRECTORY is set
|
||||
IF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
|
||||
IF(WIN32)
|
||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "bin")
|
||||
ELSE(WIN32)
|
||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "lib")
|
||||
ENDIF(WIN32)
|
||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "lib")
|
||||
ENDIF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
|
||||
|
||||
# Set a variable with CMake code which:
|
||||
@@ -212,24 +208,24 @@ endif(NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
# Only do this on Windows for Cygwin - the files don't make much sense outside
|
||||
# a UNIX look alike
|
||||
if(NOT WIN32 OR CYGWIN OR MINGW)
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
|
||||
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
|
||||
set(LIBS "-lz -lm")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY)
|
||||
CREATE_SYMLINK(${PNGLIB_NAME}.pc libpng.pc)
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
|
||||
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
|
||||
set(LIBS "-lz -lm")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY)
|
||||
CREATE_SYMLINK(${PNGLIB_NAME}.pc libpng.pc)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY)
|
||||
CREATE_SYMLINK(${PNGLIB_NAME}-config libpng-config)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY)
|
||||
CREATE_SYMLINK(${PNGLIB_NAME}-config libpng-config)
|
||||
endif(NOT WIN32 OR CYGWIN OR MINGW)
|
||||
|
||||
# SET UP LINKS
|
||||
if(PNG_SHARED)
|
||||
set_target_properties(${PNG_LIB_NAME} PROPERTIES
|
||||
# VERSION 15.${PNGLIB_RELEASE}.1.5.7beta05
|
||||
# VERSION 15.${PNGLIB_RELEASE}.1.5.10beta03
|
||||
VERSION 15.${PNGLIB_RELEASE}.0
|
||||
SOVERSION 15
|
||||
CLEAN_DIRECT_OUTPUT 1)
|
||||
@@ -301,10 +297,13 @@ if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
|
||||
install(FILES ${libpng_public_hdrs} DESTINATION include/${PNGLIB_NAME})
|
||||
endif()
|
||||
if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL )
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
|
||||
DESTINATION bin)
|
||||
if(NOT WIN32 OR CYGWIN OR MINGW)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
|
||||
DESTINATION bin)
|
||||
endif(NOT WIN32 OR CYGWIN OR MINGW)
|
||||
endif()
|
||||
|
||||
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
|
||||
# Install man pages
|
||||
if(NOT PNG_MAN_DIR)
|
||||
@@ -313,14 +312,16 @@ if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
|
||||
install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3)
|
||||
install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5)
|
||||
# Install pkg-config files
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config
|
||||
DESTINATION bin)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
|
||||
DESTINATION bin)
|
||||
if(NOT WIN32 OR CYGWIN OR MINGW)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config
|
||||
DESTINATION bin)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
|
||||
DESTINATION bin)
|
||||
endif(NOT WIN32 OR CYGWIN OR MINGW)
|
||||
endif()
|
||||
|
||||
# On versions of CMake that support it, create an export file CMake
|
||||
|
||||
4
LICENSE
4
LICENSE
@@ -10,7 +10,7 @@ this sentence.
|
||||
|
||||
This code is released under the libpng license.
|
||||
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.5.7beta05, November 18, 2011, are
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.5.10beta03, March 5, 2012, are
|
||||
Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
|
||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||
with the following individual added to the list of Contributing Authors
|
||||
@@ -108,4 +108,4 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
glennrp at users.sourceforge.net
|
||||
November 18, 2011
|
||||
March 5, 2012
|
||||
|
||||
19
Makefile.am
19
Makefile.am
@@ -18,13 +18,11 @@ pngtest_SOURCES = pngtest.c
|
||||
pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||
TESTS = test-pngtest.sh
|
||||
|
||||
# Do the following only if the contrib directory is present.
|
||||
check_PROGRAMS+= pngvalid pngstest
|
||||
pngvalid_SOURCES = pngvalid.c
|
||||
pngstest_SOURCES = contrib/libtests/pngstest.c
|
||||
# Only do the following if the contrib directory is present.
|
||||
check_PROGRAMS+= pngvalid
|
||||
pngvalid_SOURCES = contrib/libtests/pngvalid.c
|
||||
pngvalid_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||
pngstest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||
TESTS += test-pngvalid-simple.sh test-pngvalid-full.sh test-pngstest.sh
|
||||
TESTS += test-pngvalid-simple.sh test-pngvalid-full.sh
|
||||
|
||||
# man pages
|
||||
dist_man_MANS= libpng.3 libpngpf.3 png.5
|
||||
@@ -40,7 +38,7 @@ lib_LTLIBRARIES=libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c\
|
||||
pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c pngrutil.c\
|
||||
pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c\
|
||||
png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h
|
||||
png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h pngusr.dfa
|
||||
|
||||
if PNG_ARM_NEON
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += arm/filter_neon.S
|
||||
@@ -132,7 +130,7 @@ $(srcdir)/scripts/pnglibconf.h.prebuilt:
|
||||
# The following is necessary to ensure that the local pnglibconf.h is used, not
|
||||
# an installed one (this can happen immediately after on a clean system if
|
||||
# 'make test' is the first thing the user does.)
|
||||
contrib/libtests/pngstest.o pngvalid.o pngtest.o: pnglibconf.h
|
||||
contrib/libtests/pngvalid.o pngtest.o: pnglibconf.h
|
||||
|
||||
# We must use -DPNG_NO_USE_READ_MACROS here even when the library may actually
|
||||
# be built with PNG_USE_READ_MACROS; this prevents the read macros from
|
||||
@@ -155,11 +153,11 @@ SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0'\
|
||||
mv dfn3.out $@
|
||||
|
||||
# The .dfn file for pnglibconf.h is machine generated
|
||||
pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
|
||||
pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA)
|
||||
rm -f $@ dfn?.out
|
||||
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn1.out version=search\
|
||||
${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
|
||||
$(DFA_XTRA) 1>&2
|
||||
${srcdir}/pngusr.dfa $(DFA_XTRA) 1>&2
|
||||
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn2.out dfn1.out 1>&2
|
||||
rm dfn1.out
|
||||
mv dfn2.out $@
|
||||
@@ -227,3 +225,4 @@ uninstall-hook:
|
||||
rm -f $(DESTDIR)$(bindir)/libpng-config
|
||||
rm -f $(DESTDIR)$(libdir)/libpng.a
|
||||
rm -f $(DESTDIR)$(libdir)/libpng.la
|
||||
rm -f $(DESTDIR)$(libdir)/libpng.dll.a
|
||||
|
||||
146
Makefile.in
146
Makefile.in
@@ -1,9 +1,9 @@
|
||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.11.2 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -40,7 +40,7 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
check_PROGRAMS = pngtest$(EXEEXT) pngvalid$(EXEEXT) pngstest$(EXEEXT)
|
||||
check_PROGRAMS = pngtest$(EXEEXT) pngvalid$(EXEEXT)
|
||||
@PNG_ARM_NEON_TRUE@am__append_1 = arm/filter_neon.S
|
||||
|
||||
# Versioned symbols and restricted exports
|
||||
@@ -86,6 +86,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
|
||||
"$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" \
|
||||
"$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)" \
|
||||
@@ -96,7 +102,7 @@ am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES_DIST = png.c \
|
||||
pngerror.c pngget.c pngmem.c pngpread.c pngread.c pngrio.c \
|
||||
pngrtran.c pngrutil.c pngset.c pngtrans.c pngwio.c pngwrite.c \
|
||||
pngwtran.c pngwutil.c png.h pngconf.h pngdebug.h pnginfo.h \
|
||||
pngpriv.h pngstruct.h arm/filter_neon.S
|
||||
pngpriv.h pngstruct.h arm/filter_neon.S pngusr.dfa
|
||||
@PNG_ARM_NEON_TRUE@am__objects_1 = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo
|
||||
am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = \
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-png.lo \
|
||||
@@ -124,9 +130,6 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LINK = $(LIBTOOL) --tag=CC \
|
||||
$(AM_CFLAGS) $(CFLAGS) \
|
||||
$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS) $(LDFLAGS) -o \
|
||||
$@
|
||||
am_pngstest_OBJECTS = pngstest.$(OBJEXT)
|
||||
pngstest_OBJECTS = $(am_pngstest_OBJECTS)
|
||||
pngstest_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||
am_pngtest_OBJECTS = pngtest.$(OBJEXT)
|
||||
pngtest_OBJECTS = $(am_pngtest_OBJECTS)
|
||||
pngtest_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||
@@ -154,10 +157,10 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
SOURCES = $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \
|
||||
$(nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \
|
||||
$(pngstest_SOURCES) $(pngtest_SOURCES) $(pngvalid_SOURCES)
|
||||
$(pngtest_SOURCES) $(pngvalid_SOURCES)
|
||||
DIST_SOURCES = \
|
||||
$(am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES_DIST) \
|
||||
$(pngstest_SOURCES) $(pngtest_SOURCES) $(pngvalid_SOURCES)
|
||||
$(pngtest_SOURCES) $(pngvalid_SOURCES)
|
||||
man3dir = $(mandir)/man3
|
||||
man5dir = $(mandir)/man5
|
||||
NROFF = nroff
|
||||
@@ -178,12 +181,15 @@ am__remove_distdir = \
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
|
||||
#distribute headers in /usr/include/libpng/*
|
||||
pkgincludedir = $(includedir)/$(PNGLIB_BASENAME)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CCASFLAGS = @AM_CCASFLAGS@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
@@ -329,16 +335,14 @@ PNGLIB_BASENAME = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
|
||||
# to get red "FAIL" and green "PASS" notations during tests.
|
||||
# AUTOMAKE_OPTIONS = foreign color-tests
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
# test programs - run on make check, make distcheck
|
||||
TESTS_ENVIRONMENT = srcdir=$(srcdir)
|
||||
pngtest_SOURCES = pngtest.c
|
||||
pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||
pngvalid_SOURCES = pngvalid.c
|
||||
TESTS = test-pngtest.sh test-pngvalid-simple.sh test-pngvalid-full.sh
|
||||
pngvalid_SOURCES = contrib/libtests/pngvalid.c
|
||||
pngvalid_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||
pngstest_SOURCES = contrib/libtests/pngstest.c
|
||||
pngstest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||
TESTS = test-pngtest.sh test-pngvalid-simple.sh test-pngvalid-full.sh \
|
||||
test-pngstest.sh
|
||||
|
||||
TESTS_ENVIRONMENT = srcdir=$(srcdir)
|
||||
|
||||
# man pages
|
||||
dist_man_MANS = libpng.3 libpngpf.3 png.5
|
||||
@@ -352,7 +356,7 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c \
|
||||
pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c \
|
||||
pngrutil.c pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c \
|
||||
pngwutil.c png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h \
|
||||
pngstruct.h $(am__append_1)
|
||||
pngstruct.h pngusr.dfa $(am__append_1)
|
||||
nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS = @LIBPNG_DEFINES@
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined \
|
||||
@@ -397,7 +401,7 @@ all: config.h
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .chk .dfn .out .S .c .lo .o .obj
|
||||
am--refresh:
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
@@ -433,10 +437,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
|
||||
else :; fi
|
||||
@if test ! -f $@; then rm -f stamp-h1; else :; fi
|
||||
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
@@ -494,9 +496,6 @@ clean-checkPROGRAMS:
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
pngstest$(EXEEXT): $(pngstest_OBJECTS) $(pngstest_DEPENDENCIES)
|
||||
@rm -f pngstest$(EXEEXT)
|
||||
$(LINK) $(pngstest_OBJECTS) $(pngstest_LDADD) $(LIBS)
|
||||
pngtest$(EXEEXT): $(pngtest_OBJECTS) $(pngtest_DEPENDENCIES)
|
||||
@rm -f pngtest$(EXEEXT)
|
||||
$(LINK) $(pngtest_OBJECTS) $(pngtest_LDADD) $(LIBS)
|
||||
@@ -534,9 +533,7 @@ uninstall-binSCRIPTS:
|
||||
@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 's,.*/,,;$(transform)'`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(bindir)" && rm -f $$files
|
||||
dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
@@ -560,7 +557,6 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwrite.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwtran.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngstest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngtest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngvalid.Po@am__quote@
|
||||
|
||||
@@ -718,19 +714,19 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.lo: pngwutil.c
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.lo `test -f 'pngwutil.c' || echo '$(srcdir)/'`pngwutil.c
|
||||
|
||||
pngstest.o: contrib/libtests/pngstest.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pngstest.o -MD -MP -MF $(DEPDIR)/pngstest.Tpo -c -o pngstest.o `test -f 'contrib/libtests/pngstest.c' || echo '$(srcdir)/'`contrib/libtests/pngstest.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pngstest.Tpo $(DEPDIR)/pngstest.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='contrib/libtests/pngstest.c' object='pngstest.o' libtool=no @AMDEPBACKSLASH@
|
||||
pngvalid.o: contrib/libtests/pngvalid.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pngvalid.o -MD -MP -MF $(DEPDIR)/pngvalid.Tpo -c -o pngvalid.o `test -f 'contrib/libtests/pngvalid.c' || echo '$(srcdir)/'`contrib/libtests/pngvalid.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pngvalid.Tpo $(DEPDIR)/pngvalid.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='contrib/libtests/pngvalid.c' object='pngvalid.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pngstest.o `test -f 'contrib/libtests/pngstest.c' || echo '$(srcdir)/'`contrib/libtests/pngstest.c
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pngvalid.o `test -f 'contrib/libtests/pngvalid.c' || echo '$(srcdir)/'`contrib/libtests/pngvalid.c
|
||||
|
||||
pngstest.obj: contrib/libtests/pngstest.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pngstest.obj -MD -MP -MF $(DEPDIR)/pngstest.Tpo -c -o pngstest.obj `if test -f 'contrib/libtests/pngstest.c'; then $(CYGPATH_W) 'contrib/libtests/pngstest.c'; else $(CYGPATH_W) '$(srcdir)/contrib/libtests/pngstest.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pngstest.Tpo $(DEPDIR)/pngstest.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='contrib/libtests/pngstest.c' object='pngstest.obj' libtool=no @AMDEPBACKSLASH@
|
||||
pngvalid.obj: contrib/libtests/pngvalid.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pngvalid.obj -MD -MP -MF $(DEPDIR)/pngvalid.Tpo -c -o pngvalid.obj `if test -f 'contrib/libtests/pngvalid.c'; then $(CYGPATH_W) 'contrib/libtests/pngvalid.c'; else $(CYGPATH_W) '$(srcdir)/contrib/libtests/pngvalid.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pngvalid.Tpo $(DEPDIR)/pngvalid.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='contrib/libtests/pngvalid.c' object='pngvalid.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pngstest.obj `if test -f 'contrib/libtests/pngstest.c'; then $(CYGPATH_W) 'contrib/libtests/pngstest.c'; else $(CYGPATH_W) '$(srcdir)/contrib/libtests/pngstest.c'; fi`
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pngvalid.obj `if test -f 'contrib/libtests/pngvalid.c'; then $(CYGPATH_W) 'contrib/libtests/pngvalid.c'; else $(CYGPATH_W) '$(srcdir)/contrib/libtests/pngvalid.c'; fi`
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
@@ -775,9 +771,7 @@ uninstall-man3:
|
||||
sed -n '/\.3[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
test -z "$$files" || { \
|
||||
echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(man3dir)" && rm -f $$files; }
|
||||
dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir)
|
||||
install-man5: $(dist_man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)"
|
||||
@@ -813,9 +807,7 @@ uninstall-man5:
|
||||
sed -n '/\.5[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
test -z "$$files" || { \
|
||||
echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(man5dir)" && rm -f $$files; }
|
||||
dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir)
|
||||
install-pkgconfigDATA: $(pkgconfig_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
|
||||
@@ -833,9 +825,7 @@ uninstall-pkgconfigDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
|
||||
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
|
||||
install-nodist_pkgincludeHEADERS: $(nodist_pkginclude_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
|
||||
@@ -853,9 +843,7 @@ uninstall-nodist_pkgincludeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files
|
||||
dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir)
|
||||
install-pkgincludeHEADERS: $(pkginclude_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
|
||||
@@ -873,9 +861,7 @@ uninstall-pkgincludeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files
|
||||
dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir)
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
@@ -1010,14 +996,15 @@ check-TESTS: $(TESTS)
|
||||
fi; \
|
||||
dashes=`echo "$$dashes" | sed s/./=/g`; \
|
||||
if test "$$failed" -eq 0; then \
|
||||
echo "$$grn$$dashes"; \
|
||||
col="$$grn"; \
|
||||
else \
|
||||
echo "$$red$$dashes"; \
|
||||
col="$$red"; \
|
||||
fi; \
|
||||
echo "$$banner"; \
|
||||
test -z "$$skipped" || echo "$$skipped"; \
|
||||
test -z "$$report" || echo "$$report"; \
|
||||
echo "$$dashes$$std"; \
|
||||
echo "$${col}$$dashes$${std}"; \
|
||||
echo "$${col}$$banner$${std}"; \
|
||||
test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
|
||||
test -z "$$report" || echo "$${col}$$report$${std}"; \
|
||||
echo "$${col}$$dashes$${std}"; \
|
||||
test "$$failed" -eq 0; \
|
||||
else :; fi
|
||||
|
||||
@@ -1081,7 +1068,7 @@ dist-gzip: distdir
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-lzma: distdir
|
||||
@@ -1089,7 +1076,7 @@ dist-lzma: distdir
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
|
||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
@@ -1139,6 +1126,7 @@ distcheck: dist
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
@@ -1167,8 +1155,16 @@ distcheck: dist
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@$(am__cd) '$(distuninstallcheck_dir)' \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
@test -n '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: trying to run $@ with an empty' \
|
||||
'$$(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
$(am__cd) '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
@@ -1204,10 +1200,15 @@ install-am: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
@@ -1357,7 +1358,7 @@ $(srcdir)/scripts/pnglibconf.h.prebuilt:
|
||||
# The following is necessary to ensure that the local pnglibconf.h is used, not
|
||||
# an installed one (this can happen immediately after on a clean system if
|
||||
# 'make test' is the first thing the user does.)
|
||||
contrib/libtests/pngstest.o pngvalid.o pngtest.o: pnglibconf.h
|
||||
contrib/libtests/pngvalid.o pngtest.o: pnglibconf.h
|
||||
|
||||
.dfn.out:
|
||||
rm -f $@ dfn.c dfn?.out
|
||||
@@ -1372,11 +1373,11 @@ contrib/libtests/pngstest.o pngvalid.o pngtest.o: pnglibconf.h
|
||||
mv dfn3.out $@
|
||||
|
||||
# The .dfn file for pnglibconf.h is machine generated
|
||||
pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
|
||||
pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA)
|
||||
rm -f $@ dfn?.out
|
||||
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn1.out version=search\
|
||||
${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
|
||||
$(DFA_XTRA) 1>&2
|
||||
${srcdir}/pngusr.dfa $(DFA_XTRA) 1>&2
|
||||
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn2.out dfn1.out 1>&2
|
||||
rm dfn1.out
|
||||
mv dfn2.out $@
|
||||
@@ -1444,6 +1445,7 @@ uninstall-hook:
|
||||
rm -f $(DESTDIR)$(bindir)/libpng-config
|
||||
rm -f $(DESTDIR)$(libdir)/libpng.a
|
||||
rm -f $(DESTDIR)$(libdir)/libpng.la
|
||||
rm -f $(DESTDIR)$(libdir)/libpng.dll.a
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
||||
2
README
2
README
@@ -1,4 +1,4 @@
|
||||
README for libpng version 1.5.7beta05 - November 18, 2011 (shared library 15.0)
|
||||
README for libpng version 1.5.10beta03 - March 5, 2012 (shared library 15.0)
|
||||
See the note about version numbers near the top of png.h
|
||||
|
||||
See INSTALL for instructions on how to install libpng.
|
||||
|
||||
368
aclocal.m4
vendored
368
aclocal.m4
vendored
@@ -1,7 +1,8 @@
|
||||
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
|
||||
# generated automatically by aclocal 1.11.2 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
|
||||
# Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -22,8 +23,8 @@ To do so, use the procedure documented by the package, typically `autoreconf'.])
|
||||
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
||||
# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
|
||||
# Inc.
|
||||
# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gordon Matzigkeit, 1996
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
@@ -32,8 +33,8 @@ To do so, use the procedure documented by the package, typically `autoreconf'.])
|
||||
|
||||
m4_define([_LT_COPYING], [dnl
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
||||
# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
|
||||
# Inc.
|
||||
# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gordon Matzigkeit, 1996
|
||||
#
|
||||
# This file is part of GNU Libtool.
|
||||
@@ -167,6 +168,8 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
|
||||
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
|
||||
|
||||
_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
|
||||
dnl
|
||||
_LT_DECL([], [host_alias], [0], [The host system])dnl
|
||||
_LT_DECL([], [host], [0])dnl
|
||||
_LT_DECL([], [host_os], [0])dnl
|
||||
@@ -652,7 +655,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
|
||||
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
|
||||
configured by $[0], generated by m4_PACKAGE_STRING.
|
||||
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
This config.lt script is free software; the Free Software Foundation
|
||||
gives unlimited permision to copy, distribute and modify it."
|
||||
|
||||
@@ -816,6 +819,7 @@ AC_DEFUN([LT_LANG],
|
||||
m4_case([$1],
|
||||
[C], [_LT_LANG(C)],
|
||||
[C++], [_LT_LANG(CXX)],
|
||||
[Go], [_LT_LANG(GO)],
|
||||
[Java], [_LT_LANG(GCJ)],
|
||||
[Fortran 77], [_LT_LANG(F77)],
|
||||
[Fortran], [_LT_LANG(FC)],
|
||||
@@ -837,6 +841,29 @@ m4_defun([_LT_LANG],
|
||||
])# _LT_LANG
|
||||
|
||||
|
||||
m4_ifndef([AC_PROG_GO], [
|
||||
# NOTE: This macro has been submitted for inclusion into #
|
||||
# GNU Autoconf as AC_PROG_GO. When it is available in #
|
||||
# a released version of Autoconf we should remove this #
|
||||
# macro and use it instead. #
|
||||
m4_defun([AC_PROG_GO],
|
||||
[AC_LANG_PUSH(Go)dnl
|
||||
AC_ARG_VAR([GOC], [Go compiler command])dnl
|
||||
AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
|
||||
_AC_ARG_VAR_LDFLAGS()dnl
|
||||
AC_CHECK_TOOL(GOC, gccgo)
|
||||
if test -z "$GOC"; then
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
|
||||
fi
|
||||
fi
|
||||
if test -z "$GOC"; then
|
||||
AC_CHECK_PROG(GOC, gccgo, gccgo, false)
|
||||
fi
|
||||
])#m4_defun
|
||||
])#m4_ifndef
|
||||
|
||||
|
||||
# _LT_LANG_DEFAULT_CONFIG
|
||||
# -----------------------
|
||||
m4_defun([_LT_LANG_DEFAULT_CONFIG],
|
||||
@@ -867,6 +894,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ],
|
||||
m4_ifdef([LT_PROG_GCJ],
|
||||
[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
|
||||
|
||||
AC_PROVIDE_IFELSE([AC_PROG_GO],
|
||||
[LT_LANG(GO)],
|
||||
[m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
|
||||
|
||||
AC_PROVIDE_IFELSE([LT_PROG_RC],
|
||||
[LT_LANG(RC)],
|
||||
[m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
|
||||
@@ -969,7 +1000,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
|
||||
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
|
||||
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
|
||||
_lt_result=$?
|
||||
if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
|
||||
# If there is a non-empty error log, and "single_module"
|
||||
# appears in it, assume the flag caused a linker warning
|
||||
if test -s conftest.err && $GREP single_module conftest.err; then
|
||||
cat conftest.err >&AS_MESSAGE_LOG_FD
|
||||
# Otherwise, if the output was created with a 0 exit code from
|
||||
# the compiler, it worked.
|
||||
elif test -f libconftest.dylib && test $_lt_result -eq 0; then
|
||||
lt_cv_apple_cc_single_mod=yes
|
||||
else
|
||||
cat conftest.err >&AS_MESSAGE_LOG_FD
|
||||
@@ -977,6 +1014,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
|
||||
rm -rf libconftest.dylib*
|
||||
rm -f conftest.*
|
||||
fi])
|
||||
|
||||
AC_CACHE_CHECK([for -exported_symbols_list linker flag],
|
||||
[lt_cv_ld_exported_symbols_list],
|
||||
[lt_cv_ld_exported_symbols_list=no
|
||||
@@ -988,6 +1026,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
|
||||
[lt_cv_ld_exported_symbols_list=no])
|
||||
LDFLAGS="$save_LDFLAGS"
|
||||
])
|
||||
|
||||
AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
|
||||
[lt_cv_ld_force_load=no
|
||||
cat > conftest.c << _LT_EOF
|
||||
@@ -1005,7 +1044,9 @@ _LT_EOF
|
||||
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
|
||||
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
|
||||
_lt_result=$?
|
||||
if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
|
||||
if test -s conftest.err && $GREP force_load conftest.err; then
|
||||
cat conftest.err >&AS_MESSAGE_LOG_FD
|
||||
elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
|
||||
lt_cv_ld_force_load=yes
|
||||
else
|
||||
cat conftest.err >&AS_MESSAGE_LOG_FD
|
||||
@@ -1050,8 +1091,8 @@ _LT_EOF
|
||||
])
|
||||
|
||||
|
||||
# _LT_DARWIN_LINKER_FEATURES
|
||||
# --------------------------
|
||||
# _LT_DARWIN_LINKER_FEATURES([TAG])
|
||||
# ---------------------------------
|
||||
# Checks for linker and compiler features on darwin
|
||||
m4_defun([_LT_DARWIN_LINKER_FEATURES],
|
||||
[
|
||||
@@ -1062,6 +1103,8 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
|
||||
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
|
||||
if test "$lt_cv_ld_force_load" = "yes"; then
|
||||
_LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
|
||||
m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
|
||||
[FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
|
||||
else
|
||||
_LT_TAGVAR(whole_archive_flag_spec, $1)=''
|
||||
fi
|
||||
@@ -1345,14 +1388,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
CFLAGS="$SAVE_CFLAGS"
|
||||
fi
|
||||
;;
|
||||
sparc*-*solaris*)
|
||||
*-*solaris*)
|
||||
# Find out which ABI we are using.
|
||||
echo 'int i;' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case `/usr/bin/file conftest.o` in
|
||||
*64-bit*)
|
||||
case $lt_cv_prog_gnu_ld in
|
||||
yes*) LD="${LD-ld} -m elf64_sparc" ;;
|
||||
yes*)
|
||||
case $host in
|
||||
i?86-*-solaris*)
|
||||
LD="${LD-ld} -m elf_x86_64"
|
||||
;;
|
||||
sparc*-*-solaris*)
|
||||
LD="${LD-ld} -m elf64_sparc"
|
||||
;;
|
||||
esac
|
||||
# GNU ld 2.21 introduced _sol2 emulations. Use them if available.
|
||||
if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
|
||||
LD="${LD-ld}_sol2"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
|
||||
LD="${LD-ld} -64"
|
||||
@@ -1429,13 +1485,13 @@ old_postuninstall_cmds=
|
||||
if test -n "$RANLIB"; then
|
||||
case $host_os in
|
||||
openbsd*)
|
||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
|
||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
|
||||
;;
|
||||
*)
|
||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
|
||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
|
||||
;;
|
||||
esac
|
||||
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
|
||||
old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
|
||||
fi
|
||||
|
||||
case $host_os in
|
||||
@@ -1615,6 +1671,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
||||
lt_cv_sys_max_cmd_len=196608
|
||||
;;
|
||||
|
||||
os2*)
|
||||
# The test takes a long time on OS/2.
|
||||
lt_cv_sys_max_cmd_len=8192
|
||||
;;
|
||||
|
||||
osf*)
|
||||
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
|
||||
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
|
||||
@@ -1654,7 +1715,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
||||
# If test is not a shell built-in, we'll probably end up computing a
|
||||
# maximum length that is only half of the actual maximum length, but
|
||||
# we can't tell.
|
||||
while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
|
||||
while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
|
||||
= "X$teststring$teststring"; } >/dev/null 2>&1 &&
|
||||
test $i != 17 # 1/2 MB should be enough
|
||||
do
|
||||
@@ -2200,7 +2261,7 @@ need_version=unknown
|
||||
|
||||
case $host_os in
|
||||
aix3*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
|
||||
shlibpath_var=LIBPATH
|
||||
|
||||
@@ -2209,7 +2270,7 @@ aix3*)
|
||||
;;
|
||||
|
||||
aix[[4-9]]*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
hardcode_into_libs=yes
|
||||
@@ -2274,7 +2335,7 @@ beos*)
|
||||
;;
|
||||
|
||||
bsdi[[45]]*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
soname_spec='${libname}${release}${shared_ext}$major'
|
||||
@@ -2413,7 +2474,7 @@ m4_if([$1], [],[
|
||||
;;
|
||||
|
||||
dgux*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
|
||||
@@ -2421,10 +2482,6 @@ dgux*)
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
;;
|
||||
|
||||
freebsd1*)
|
||||
dynamic_linker=no
|
||||
;;
|
||||
|
||||
freebsd* | dragonfly*)
|
||||
# DragonFly does not have aout. When/if they implement a new
|
||||
# versioning mechanism, adjust this.
|
||||
@@ -2432,18 +2489,11 @@ freebsd* | dragonfly*)
|
||||
objformat=`/usr/bin/objformat`
|
||||
else
|
||||
case $host_os in
|
||||
freebsd[[123]]*) objformat=aout ;;
|
||||
freebsd[[23]].*) objformat=aout ;;
|
||||
*) objformat=elf ;;
|
||||
esac
|
||||
fi
|
||||
# Handle Gentoo/FreeBSD as it was Linux
|
||||
case $host_vendor in
|
||||
gentoo)
|
||||
version_type=linux ;;
|
||||
*)
|
||||
version_type=freebsd-$objformat ;;
|
||||
esac
|
||||
|
||||
version_type=freebsd-$objformat
|
||||
case $version_type in
|
||||
freebsd-elf*)
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
|
||||
@@ -2454,16 +2504,10 @@ freebsd* | dragonfly*)
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
|
||||
need_version=yes
|
||||
;;
|
||||
linux)
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
|
||||
soname_spec='${libname}${release}${shared_ext}$major'
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
;;
|
||||
esac
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
case $host_os in
|
||||
freebsd2*)
|
||||
freebsd2.*)
|
||||
shlibpath_overrides_runpath=yes
|
||||
;;
|
||||
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
|
||||
@@ -2483,17 +2527,18 @@ freebsd* | dragonfly*)
|
||||
;;
|
||||
|
||||
gnu*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
|
||||
soname_spec='${libname}${release}${shared_ext}$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
shlibpath_overrides_runpath=no
|
||||
hardcode_into_libs=yes
|
||||
;;
|
||||
|
||||
haiku*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
dynamic_linker="$host_os runtime_loader"
|
||||
@@ -2554,7 +2599,7 @@ hpux9* | hpux10* | hpux11*)
|
||||
;;
|
||||
|
||||
interix[[3-9]]*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
|
||||
@@ -2570,7 +2615,7 @@ irix5* | irix6* | nonstopux*)
|
||||
nonstopux*) version_type=nonstopux ;;
|
||||
*)
|
||||
if test "$lt_cv_prog_gnu_ld" = yes; then
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
else
|
||||
version_type=irix
|
||||
fi ;;
|
||||
@@ -2607,9 +2652,9 @@ linux*oldld* | linux*aout* | linux*coff*)
|
||||
dynamic_linker=no
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
# This must be glibc/ELF.
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
@@ -2672,7 +2717,7 @@ netbsd*)
|
||||
;;
|
||||
|
||||
newsos6)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
shlibpath_overrides_runpath=yes
|
||||
@@ -2741,7 +2786,7 @@ rdos*)
|
||||
;;
|
||||
|
||||
solaris*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
@@ -2766,7 +2811,7 @@ sunos4*)
|
||||
;;
|
||||
|
||||
sysv4 | sysv4.3*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
soname_spec='${libname}${release}${shared_ext}$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
@@ -2790,7 +2835,7 @@ sysv4 | sysv4.3*)
|
||||
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec ;then
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
|
||||
soname_spec='$libname${shared_ext}.$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
@@ -2821,7 +2866,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
|
||||
|
||||
tpf*)
|
||||
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
@@ -2831,7 +2876,7 @@ tpf*)
|
||||
;;
|
||||
|
||||
uts4*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
soname_spec='${libname}${release}${shared_ext}$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
@@ -3253,7 +3298,7 @@ irix5* | irix6* | nonstopux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
# This must be glibc/ELF.
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
@@ -3673,6 +3718,7 @@ for ac_symprfx in "" "_"; do
|
||||
# which start with @ or ?.
|
||||
lt_cv_sys_global_symbol_pipe="$AWK ['"\
|
||||
" {last_section=section; section=\$ 3};"\
|
||||
" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
|
||||
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
|
||||
" \$ 0!~/External *\|/{next};"\
|
||||
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
|
||||
@@ -4257,7 +4303,9 @@ m4_if([$1], [CXX], [
|
||||
case $cc_basename in
|
||||
nvcc*) # Cuda Compiler Driver 2.2
|
||||
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
|
||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
|
||||
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
|
||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
@@ -4349,18 +4397,33 @@ m4_if([$1], [CXX], [
|
||||
;;
|
||||
*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
*Sun\ F* | *Sun*Fortran*)
|
||||
*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
|
||||
# Sun Fortran 8.3 passes all unrecognized flags to the linker
|
||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
||||
_LT_TAGVAR(lt_prog_compiler_wl, $1)=''
|
||||
;;
|
||||
*Sun\ F* | *Sun*Fortran*)
|
||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
||||
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
|
||||
;;
|
||||
*Sun\ C*)
|
||||
# Sun C 5.9
|
||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
||||
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||
;;
|
||||
*Intel*\ [[CF]]*Compiler*)
|
||||
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
|
||||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
|
||||
;;
|
||||
*Portland\ Group*)
|
||||
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
|
||||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
@@ -4520,7 +4583,9 @@ m4_if([$1], [CXX], [
|
||||
;;
|
||||
cygwin* | mingw* | cegcc*)
|
||||
case $cc_basename in
|
||||
cl*) ;;
|
||||
cl*)
|
||||
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
|
||||
;;
|
||||
*)
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
|
||||
_LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
|
||||
@@ -4545,7 +4610,6 @@ m4_if([$1], [CXX], [
|
||||
_LT_TAGVAR(hardcode_direct, $1)=no
|
||||
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
|
||||
_LT_TAGVAR(hardcode_libdir_separator, $1)=
|
||||
_LT_TAGVAR(hardcode_minus_L, $1)=no
|
||||
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
|
||||
@@ -4796,8 +4860,7 @@ _LT_EOF
|
||||
xlf* | bgf* | bgxlf* | mpixlf*)
|
||||
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
|
||||
_LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
|
||||
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
|
||||
if test "x$supports_anon_versioning" = xyes; then
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
|
||||
@@ -5092,6 +5155,7 @@ _LT_EOF
|
||||
# The linker will not automatically build a static lib if we build a DLL.
|
||||
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
|
||||
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
|
||||
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
|
||||
# Don't use ranlib
|
||||
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
|
||||
@@ -5138,10 +5202,6 @@ _LT_EOF
|
||||
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
|
||||
;;
|
||||
|
||||
freebsd1*)
|
||||
_LT_TAGVAR(ld_shlibs, $1)=no
|
||||
;;
|
||||
|
||||
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
|
||||
# support. Future versions do this automatically, but an explicit c++rt0.o
|
||||
# does not break anything, and helps significantly (at the cost of a little
|
||||
@@ -5154,7 +5214,7 @@ _LT_EOF
|
||||
;;
|
||||
|
||||
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
|
||||
freebsd2*)
|
||||
freebsd2.*)
|
||||
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
|
||||
_LT_TAGVAR(hardcode_direct, $1)=yes
|
||||
_LT_TAGVAR(hardcode_minus_L, $1)=yes
|
||||
@@ -5193,7 +5253,6 @@ _LT_EOF
|
||||
fi
|
||||
if test "$with_gnu_ld" = no; then
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
|
||||
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
|
||||
_LT_TAGVAR(hardcode_direct, $1)=yes
|
||||
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
|
||||
@@ -5635,9 +5694,6 @@ _LT_TAGDECL([], [no_undefined_flag], [1],
|
||||
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
|
||||
[Flag to hardcode $libdir into a binary during linking.
|
||||
This must work even if $libdir does not exist])
|
||||
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
|
||||
[[If ld is used when linking, flag to hardcode $libdir into a binary
|
||||
during linking. This must work even if $libdir does not exist]])
|
||||
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
|
||||
[Whether we need a single "-rpath" flag with a separated argument])
|
||||
_LT_TAGDECL([], [hardcode_direct], [0],
|
||||
@@ -5791,7 +5847,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
|
||||
_LT_TAGVAR(hardcode_direct, $1)=no
|
||||
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
|
||||
_LT_TAGVAR(hardcode_libdir_separator, $1)=
|
||||
_LT_TAGVAR(hardcode_minus_L, $1)=no
|
||||
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
|
||||
@@ -6161,7 +6216,7 @@ if test "$_lt_caught_CXX_error" != yes; then
|
||||
esac
|
||||
;;
|
||||
|
||||
freebsd[[12]]*)
|
||||
freebsd2.*)
|
||||
# C++ shared libraries reported to be fairly broken before
|
||||
# switch to ELF
|
||||
_LT_TAGVAR(ld_shlibs, $1)=no
|
||||
@@ -6922,12 +6977,18 @@ public class foo {
|
||||
}
|
||||
};
|
||||
_LT_EOF
|
||||
], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
|
||||
package foo
|
||||
func foo() {
|
||||
}
|
||||
_LT_EOF
|
||||
])
|
||||
|
||||
_lt_libdeps_save_CFLAGS=$CFLAGS
|
||||
case "$CC $CFLAGS " in #(
|
||||
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
|
||||
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
|
||||
*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
|
||||
esac
|
||||
|
||||
dnl Parse the compiler output and extract the necessary
|
||||
@@ -7124,7 +7185,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
|
||||
_LT_TAGVAR(hardcode_direct, $1)=no
|
||||
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
|
||||
_LT_TAGVAR(hardcode_libdir_separator, $1)=
|
||||
_LT_TAGVAR(hardcode_minus_L, $1)=no
|
||||
_LT_TAGVAR(hardcode_automatic, $1)=no
|
||||
@@ -7257,7 +7317,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
|
||||
_LT_TAGVAR(hardcode_direct, $1)=no
|
||||
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
|
||||
_LT_TAGVAR(hardcode_libdir_separator, $1)=
|
||||
_LT_TAGVAR(hardcode_minus_L, $1)=no
|
||||
_LT_TAGVAR(hardcode_automatic, $1)=no
|
||||
@@ -7440,6 +7499,73 @@ CFLAGS=$lt_save_CFLAGS
|
||||
])# _LT_LANG_GCJ_CONFIG
|
||||
|
||||
|
||||
# _LT_LANG_GO_CONFIG([TAG])
|
||||
# --------------------------
|
||||
# Ensure that the configuration variables for the GNU Go compiler
|
||||
# are suitably defined. These variables are subsequently used by _LT_CONFIG
|
||||
# to write the compiler configuration to `libtool'.
|
||||
m4_defun([_LT_LANG_GO_CONFIG],
|
||||
[AC_REQUIRE([LT_PROG_GO])dnl
|
||||
AC_LANG_SAVE
|
||||
|
||||
# Source file extension for Go test sources.
|
||||
ac_ext=go
|
||||
|
||||
# Object file extension for compiled Go test sources.
|
||||
objext=o
|
||||
_LT_TAGVAR(objext, $1)=$objext
|
||||
|
||||
# Code to be used in simple compile tests
|
||||
lt_simple_compile_test_code="package main; func main() { }"
|
||||
|
||||
# Code to be used in simple link tests
|
||||
lt_simple_link_test_code='package main; func main() { }'
|
||||
|
||||
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
|
||||
_LT_TAG_COMPILER
|
||||
|
||||
# save warnings/boilerplate of simple test code
|
||||
_LT_COMPILER_BOILERPLATE
|
||||
_LT_LINKER_BOILERPLATE
|
||||
|
||||
# Allow CC to be a program name with arguments.
|
||||
lt_save_CC=$CC
|
||||
lt_save_CFLAGS=$CFLAGS
|
||||
lt_save_GCC=$GCC
|
||||
GCC=yes
|
||||
CC=${GOC-"gccgo"}
|
||||
CFLAGS=$GOFLAGS
|
||||
compiler=$CC
|
||||
_LT_TAGVAR(compiler, $1)=$CC
|
||||
_LT_TAGVAR(LD, $1)="$LD"
|
||||
_LT_CC_BASENAME([$compiler])
|
||||
|
||||
# Go did not exist at the time GCC didn't implicitly link libc in.
|
||||
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
|
||||
|
||||
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
|
||||
_LT_TAGVAR(reload_flag, $1)=$reload_flag
|
||||
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
|
||||
|
||||
if test -n "$compiler"; then
|
||||
_LT_COMPILER_NO_RTTI($1)
|
||||
_LT_COMPILER_PIC($1)
|
||||
_LT_COMPILER_C_O($1)
|
||||
_LT_COMPILER_FILE_LOCKS($1)
|
||||
_LT_LINKER_SHLIBS($1)
|
||||
_LT_LINKER_HARDCODE_LIBPATH($1)
|
||||
|
||||
_LT_CONFIG($1)
|
||||
fi
|
||||
|
||||
AC_LANG_RESTORE
|
||||
|
||||
GCC=$lt_save_GCC
|
||||
CC=$lt_save_CC
|
||||
CFLAGS=$lt_save_CFLAGS
|
||||
])# _LT_LANG_GO_CONFIG
|
||||
|
||||
|
||||
# _LT_LANG_RC_CONFIG([TAG])
|
||||
# -------------------------
|
||||
# Ensure that the configuration variables for the Windows resource compiler
|
||||
@@ -7509,6 +7635,13 @@ dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
|
||||
|
||||
|
||||
# LT_PROG_GO
|
||||
# ----------
|
||||
AC_DEFUN([LT_PROG_GO],
|
||||
[AC_CHECK_TOOL(GOC, gccgo,)
|
||||
])
|
||||
|
||||
|
||||
# LT_PROG_RC
|
||||
# ----------
|
||||
AC_DEFUN([LT_PROG_RC],
|
||||
@@ -8173,9 +8306,24 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
|
||||
m4_define([_LT_WITH_PIC],
|
||||
[AC_ARG_WITH([pic],
|
||||
[AS_HELP_STRING([--with-pic],
|
||||
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
||||
[pic_mode="$withval"],
|
||||
[lt_p=${PACKAGE-default}
|
||||
case $withval in
|
||||
yes|no) pic_mode=$withval ;;
|
||||
*)
|
||||
pic_mode=default
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for lt_pkg in $withval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$lt_pkg" = "X$lt_p"; then
|
||||
pic_mode=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
[pic_mode=default])
|
||||
|
||||
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
|
||||
@@ -8347,15 +8495,15 @@ m4_define([lt_dict_filter],
|
||||
|
||||
# @configure_input@
|
||||
|
||||
# serial 3293 ltversion.m4
|
||||
# serial 3337 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4])
|
||||
m4_define([LT_PACKAGE_REVISION], [1.3293])
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.2])
|
||||
m4_define([LT_PACKAGE_REVISION], [1.3337])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4'
|
||||
macro_revision='1.3293'
|
||||
[macro_version='2.4.2'
|
||||
macro_revision='1.3337'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
||||
@@ -8459,12 +8607,15 @@ m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
||||
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
||||
|
||||
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 1
|
||||
|
||||
# AM_AUTOMAKE_VERSION(VERSION)
|
||||
# ----------------------------
|
||||
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
||||
@@ -8474,7 +8625,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
|
||||
[am__api_version='1.11'
|
||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
||||
dnl require some minimum version. Point them to the right macro.
|
||||
m4_if([$1], [1.11.1], [],
|
||||
m4_if([$1], [1.11.2], [],
|
||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||
])
|
||||
|
||||
@@ -8490,7 +8641,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
|
||||
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||
[AM_AUTOMAKE_VERSION([1.11.1])dnl
|
||||
[AM_AUTOMAKE_VERSION([1.11.2])dnl
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||
@@ -8519,12 +8670,14 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
|
||||
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 1
|
||||
|
||||
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
||||
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
|
||||
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
|
||||
@@ -8606,14 +8759,14 @@ AC_CONFIG_COMMANDS_PRE(
|
||||
Usually this means the macro was only invoked conditionally.]])
|
||||
fi])])
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
|
||||
# 2010, 2011 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 10
|
||||
# serial 12
|
||||
|
||||
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
||||
# written in clear, in which case automake, when reading aclocal.m4,
|
||||
@@ -8653,6 +8806,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
|
||||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
@@ -8717,7 +8871,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
|
||||
break
|
||||
fi
|
||||
;;
|
||||
msvisualcpp | msvcmsys)
|
||||
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
|
||||
# This compiler won't grok `-c -o', but also, the minuso test has
|
||||
# not run yet. These depmodes are late enough in the game, and
|
||||
# so weak that their functioning should not be impacted.
|
||||
@@ -8782,10 +8936,13 @@ AC_DEFUN([AM_DEP_TRACK],
|
||||
if test "x$enable_dependency_tracking" != xno; then
|
||||
am_depcomp="$ac_aux_dir/depcomp"
|
||||
AMDEPBACKSLASH='\'
|
||||
am__nodep='_no'
|
||||
fi
|
||||
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
AC_SUBST([AMDEPBACKSLASH])dnl
|
||||
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
|
||||
AC_SUBST([am__nodep])dnl
|
||||
_AM_SUBST_NOTMAKE([am__nodep])dnl
|
||||
])
|
||||
|
||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||
@@ -9019,12 +9176,15 @@ for _am_header in $config_headers :; do
|
||||
done
|
||||
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
|
||||
# Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 1
|
||||
|
||||
# AM_PROG_INSTALL_SH
|
||||
# ------------------
|
||||
# Define $install_sh.
|
||||
@@ -9064,8 +9224,8 @@ AC_SUBST([am__leading_dot])])
|
||||
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
||||
# From Jim Meyering
|
||||
|
||||
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
|
||||
# 2011 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@@ -9085,7 +9245,7 @@ AC_DEFUN([AM_MAINTAINER_MODE],
|
||||
[disable], [m4_define([am_maintainer_other], [enable])],
|
||||
[m4_define([am_maintainer_other], [enable])
|
||||
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
|
||||
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
|
||||
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
|
||||
AC_ARG_ENABLE([maintainer-mode],
|
||||
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
|
||||
@@ -9196,12 +9356,15 @@ else
|
||||
fi
|
||||
])
|
||||
|
||||
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
|
||||
# Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 1
|
||||
|
||||
# AM_PROG_MKDIR_P
|
||||
# ---------------
|
||||
# Check for `mkdir -p'.
|
||||
@@ -9224,13 +9387,14 @@ esac
|
||||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
|
||||
# Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
# serial 5
|
||||
|
||||
# _AM_MANGLE_OPTION(NAME)
|
||||
# -----------------------
|
||||
@@ -9238,13 +9402,13 @@ AC_DEFUN([_AM_MANGLE_OPTION],
|
||||
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
# _AM_SET_OPTION(NAME)
|
||||
# ------------------------------
|
||||
# --------------------
|
||||
# Set option NAME. Presently that only means defining a flag for this option.
|
||||
AC_DEFUN([_AM_SET_OPTION],
|
||||
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
||||
|
||||
# _AM_SET_OPTIONS(OPTIONS)
|
||||
# ----------------------------------
|
||||
# ------------------------
|
||||
# OPTIONS is a space-separated list of Automake options.
|
||||
AC_DEFUN([_AM_SET_OPTIONS],
|
||||
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
||||
@@ -9320,12 +9484,14 @@ Check your system clock])
|
||||
fi
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 1
|
||||
|
||||
# AM_PROG_INSTALL_STRIP
|
||||
# ---------------------
|
||||
# One issue with vendor `install' (even GNU) is that you can't
|
||||
@@ -9348,13 +9514,13 @@ fi
|
||||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||
|
||||
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
# serial 3
|
||||
|
||||
# _AM_SUBST_NOTMAKE(VARIABLE)
|
||||
# ---------------------------
|
||||
@@ -9363,7 +9529,7 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||
AC_DEFUN([_AM_SUBST_NOTMAKE])
|
||||
|
||||
# AM_SUBST_NOTMAKE(VARIABLE)
|
||||
# ---------------------------
|
||||
# --------------------------
|
||||
# Public sister of _AM_SUBST_NOTMAKE.
|
||||
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
||||
|
||||
|
||||
112
config.guess
vendored
112
config.guess
vendored
@@ -4,7 +4,7 @@
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
# 2011 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2011-02-02'
|
||||
timestamp='2011-11-11'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -140,29 +140,6 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
||||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||
|
||||
case "${UNAME_SYSTEM}" in
|
||||
Linux|GNU/*)
|
||||
eval $set_cc_for_build
|
||||
cat <<-EOF > $dummy.c
|
||||
#include <features.h>
|
||||
#ifdef __UCLIBC__
|
||||
# ifdef __UCLIBC_CONFIG_VERSION__
|
||||
LIBC=uclibc __UCLIBC_CONFIG_VERSION__
|
||||
# else
|
||||
LIBC=uclibc
|
||||
# endif
|
||||
#else
|
||||
# ifdef __dietlibc__
|
||||
LIBC=dietlibc
|
||||
# else
|
||||
LIBC=gnu
|
||||
# endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
|
||||
;;
|
||||
esac
|
||||
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
@@ -815,13 +792,12 @@ EOF
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:FreeBSD:*:*)
|
||||
case ${UNAME_MACHINE} in
|
||||
pc98)
|
||||
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
case ${UNAME_PROCESSOR} in
|
||||
amd64)
|
||||
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
esac
|
||||
exit ;;
|
||||
i*:CYGWIN*:*)
|
||||
@@ -830,6 +806,9 @@ EOF
|
||||
*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit ;;
|
||||
i*:MSYS*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msys
|
||||
exit ;;
|
||||
i*:windows32*:*)
|
||||
# uname -m includes "-pc" on this system.
|
||||
echo ${UNAME_MACHINE}-mingw32
|
||||
@@ -875,11 +854,11 @@ EOF
|
||||
exit ;;
|
||||
*:GNU:*:*)
|
||||
# the GNU system
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
exit ;;
|
||||
*:GNU/*:*:*)
|
||||
# other systems with GNU libc and userland
|
||||
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
|
||||
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
|
||||
exit ;;
|
||||
i*86:Minix:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-minix
|
||||
@@ -895,42 +874,59 @@ EOF
|
||||
EV68*) UNAME_MACHINE=alphaev68 ;;
|
||||
esac
|
||||
objdump --private-headers /bin/sh | grep -q ld.so.1
|
||||
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
|
||||
exit ;;
|
||||
arm*:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_EABI__
|
||||
then
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
|
||||
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_PCS_VFP
|
||||
then
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
|
||||
fi
|
||||
fi
|
||||
exit ;;
|
||||
avr32*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
cris:Linux:*:*)
|
||||
echo cris-axis-linux-${LIBC}
|
||||
echo cris-axis-linux-gnu
|
||||
exit ;;
|
||||
crisv32:Linux:*:*)
|
||||
echo crisv32-axis-linux-${LIBC}
|
||||
echo crisv32-axis-linux-gnu
|
||||
exit ;;
|
||||
frv:Linux:*:*)
|
||||
echo frv-unknown-linux-${LIBC}
|
||||
echo frv-unknown-linux-gnu
|
||||
exit ;;
|
||||
hexagon:Linux:*:*)
|
||||
echo hexagon-unknown-linux-gnu
|
||||
exit ;;
|
||||
i*86:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
|
||||
LIBC=gnu
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#ifdef __dietlibc__
|
||||
LIBC=dietlibc
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
|
||||
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
|
||||
exit ;;
|
||||
ia64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
m32r*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
m68*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
mips:Linux:*:* | mips64:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
@@ -949,54 +945,54 @@ EOF
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
||||
;;
|
||||
or32:Linux:*:*)
|
||||
echo or32-unknown-linux-${LIBC}
|
||||
echo or32-unknown-linux-gnu
|
||||
exit ;;
|
||||
padre:Linux:*:*)
|
||||
echo sparc-unknown-linux-${LIBC}
|
||||
echo sparc-unknown-linux-gnu
|
||||
exit ;;
|
||||
parisc64:Linux:*:* | hppa64:Linux:*:*)
|
||||
echo hppa64-unknown-linux-${LIBC}
|
||||
echo hppa64-unknown-linux-gnu
|
||||
exit ;;
|
||||
parisc:Linux:*:* | hppa:Linux:*:*)
|
||||
# Look for CPU level
|
||||
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
|
||||
PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
|
||||
PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
|
||||
*) echo hppa-unknown-linux-${LIBC} ;;
|
||||
PA7*) echo hppa1.1-unknown-linux-gnu ;;
|
||||
PA8*) echo hppa2.0-unknown-linux-gnu ;;
|
||||
*) echo hppa-unknown-linux-gnu ;;
|
||||
esac
|
||||
exit ;;
|
||||
ppc64:Linux:*:*)
|
||||
echo powerpc64-unknown-linux-${LIBC}
|
||||
echo powerpc64-unknown-linux-gnu
|
||||
exit ;;
|
||||
ppc:Linux:*:*)
|
||||
echo powerpc-unknown-linux-${LIBC}
|
||||
echo powerpc-unknown-linux-gnu
|
||||
exit ;;
|
||||
s390:Linux:*:* | s390x:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-ibm-linux
|
||||
exit ;;
|
||||
sh64*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
sh*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
sparc:Linux:*:* | sparc64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
tile*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-tilera-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
vax:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
|
||||
echo ${UNAME_MACHINE}-dec-linux-gnu
|
||||
exit ;;
|
||||
x86_64:Linux:*:*)
|
||||
echo x86_64-unknown-linux-${LIBC}
|
||||
echo x86_64-unknown-linux-gnu
|
||||
exit ;;
|
||||
xtensa*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
i*86:DYNIX/ptx:4*:*)
|
||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
/* Align row buffers */
|
||||
#undef PNG_ALIGNED_MEMORY_SUPPORTED
|
||||
|
||||
/* Enable ARM NEON optmizations */
|
||||
/* Enable ARM NEON optimizations */
|
||||
#undef PNG_ARM_NEON
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
|
||||
102
config.sub
vendored
102
config.sub
vendored
@@ -4,7 +4,7 @@
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
# 2011 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2011-02-02'
|
||||
timestamp='2011-11-11'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
@@ -76,7 +76,7 @@ version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
@@ -251,13 +251,17 @@ case $basic_machine in
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| am33_2.0 \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
|
||||
| be32 | be64 \
|
||||
| bfin \
|
||||
| c4x | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx | dvp \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| epiphany \
|
||||
| fido | fr30 | frv \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| hexagon \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| ip2k | iq2000 \
|
||||
| le32 | le64 \
|
||||
| lm32 \
|
||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||
| maxq | mb | microblaze | mcore | mep | metag \
|
||||
@@ -286,22 +290,23 @@ case $basic_machine in
|
||||
| nds32 | nds32le | nds32be \
|
||||
| nios | nios2 \
|
||||
| ns16k | ns32k \
|
||||
| open8 \
|
||||
| or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle \
|
||||
| pyramid \
|
||||
| rx \
|
||||
| rl78 | rx \
|
||||
| score \
|
||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||
| spu | strongarm \
|
||||
| tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
|
||||
| spu \
|
||||
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
|
||||
| ubicom32 \
|
||||
| v850 | v850e \
|
||||
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
|
||||
| we32k \
|
||||
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
|
||||
| x86 | xc16x | xstormy16 | xtensa \
|
||||
| z8k | z80)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
@@ -325,6 +330,18 @@ case $basic_machine in
|
||||
basic_machine=mt-unknown
|
||||
;;
|
||||
|
||||
strongarm | thumb | xscale)
|
||||
basic_machine=arm-unknown
|
||||
;;
|
||||
|
||||
xscaleeb)
|
||||
basic_machine=armeb-unknown
|
||||
;;
|
||||
|
||||
xscaleel)
|
||||
basic_machine=armel-unknown
|
||||
;;
|
||||
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
# (2) the word "unknown" tends to confuse beginning users.
|
||||
@@ -344,6 +361,7 @@ case $basic_machine in
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* | avr32-* \
|
||||
| be32-* | be64-* \
|
||||
| bfin-* | bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
||||
| clipper-* | craynv-* | cydra-* \
|
||||
@@ -352,8 +370,10 @@ case $basic_machine in
|
||||
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
||||
| h8300-* | h8500-* \
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| hexagon-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| ip2k-* | iq2000-* \
|
||||
| le32-* | le64-* \
|
||||
| lm32-* \
|
||||
| m32c-* | m32r-* | m32rle-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
@@ -382,24 +402,26 @@ case $basic_machine in
|
||||
| nds32-* | nds32le-* | nds32be-* \
|
||||
| nios-* | nios2-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| open8-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* | rx-* \
|
||||
| rl78-* | romp-* | rs6000-* | rx-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
|
||||
| tahoe-* | thumb-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
|
||||
| tahoe-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tile-* | tilegx-* \
|
||||
| tile*-* \
|
||||
| tron-* \
|
||||
| ubicom32-* \
|
||||
| v850-* | v850e-* | vax-* \
|
||||
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
|
||||
| vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* \
|
||||
| xstormy16-* | xtensa*-* \
|
||||
| ymp-* \
|
||||
| z8k-* | z80-*)
|
||||
@@ -773,24 +795,6 @@ case $basic_machine in
|
||||
basic_machine=m68k-atari
|
||||
os=-mint
|
||||
;;
|
||||
mipsEE* | ee | ps2)
|
||||
basic_machine=mips64r5900el-scei
|
||||
case $os in
|
||||
-linux*)
|
||||
;;
|
||||
*)
|
||||
os=-elf
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
iop)
|
||||
basic_machine=mipsel-scei
|
||||
os=-irx
|
||||
;;
|
||||
dvp)
|
||||
basic_machine=dvp-scei
|
||||
os=-elf
|
||||
;;
|
||||
mips3*-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||
;;
|
||||
@@ -812,10 +816,18 @@ case $basic_machine in
|
||||
ms1-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
||||
;;
|
||||
msys)
|
||||
basic_machine=i386-pc
|
||||
os=-msys
|
||||
;;
|
||||
mvs)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
;;
|
||||
nacl)
|
||||
basic_machine=le32-unknown
|
||||
os=-nacl
|
||||
;;
|
||||
ncr3000)
|
||||
basic_machine=i486-ncr
|
||||
os=-sysv4
|
||||
@@ -968,9 +980,10 @@ case $basic_machine in
|
||||
;;
|
||||
power) basic_machine=power-ibm
|
||||
;;
|
||||
ppc) basic_machine=powerpc-unknown
|
||||
ppc | ppcbe) basic_machine=powerpc-unknown
|
||||
;;
|
||||
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
ppc-* | ppcbe-*)
|
||||
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppcle | powerpclittle | ppc-le | powerpc-little)
|
||||
basic_machine=powerpcle-unknown
|
||||
@@ -1064,6 +1077,9 @@ case $basic_machine in
|
||||
basic_machine=i860-stratus
|
||||
os=-sysv4
|
||||
;;
|
||||
strongarm-* | thumb-*)
|
||||
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
sun2)
|
||||
basic_machine=m68000-sun
|
||||
;;
|
||||
@@ -1120,13 +1136,8 @@ case $basic_machine in
|
||||
basic_machine=t90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
# This must be matched before tile*.
|
||||
tilegx*)
|
||||
basic_machine=tilegx-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
tile*)
|
||||
basic_machine=tile-unknown
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
tx39)
|
||||
@@ -1196,6 +1207,9 @@ case $basic_machine in
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
xscale-* | xscalee[bl]-*)
|
||||
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
|
||||
;;
|
||||
ymp)
|
||||
basic_machine=ymp-cray
|
||||
os=-unicos
|
||||
@@ -1333,13 +1347,13 @@ case $os in
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -chorusos* | -chorusrdb* | -cegcc* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -linux-android* \
|
||||
| -linux-newlib* | -linux-uclibc* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -irx* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||
|
||||
233
configure
vendored
233
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.68 for libpng 1.5.7beta05.
|
||||
# Generated by GNU Autoconf 2.68 for libpng 1.5.10beta03.
|
||||
#
|
||||
# Report bugs to <png-mng-implement@lists.sourceforge.net>.
|
||||
#
|
||||
@@ -570,8 +570,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='libpng'
|
||||
PACKAGE_TARNAME='libpng'
|
||||
PACKAGE_VERSION='1.5.7beta05'
|
||||
PACKAGE_STRING='libpng 1.5.7beta05'
|
||||
PACKAGE_VERSION='1.5.10beta03'
|
||||
PACKAGE_STRING='libpng 1.5.10beta03'
|
||||
PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -617,6 +617,7 @@ am__EXEEXT_TRUE
|
||||
LTLIBOBJS
|
||||
PNG_ARM_NEON_FALSE
|
||||
PNG_ARM_NEON_TRUE
|
||||
AM_CCASFLAGS
|
||||
binconfigs
|
||||
pkgconfigdir
|
||||
PNGLIB_RELEASE
|
||||
@@ -671,6 +672,7 @@ CCAS
|
||||
am__fastdepCC_FALSE
|
||||
am__fastdepCC_TRUE
|
||||
CCDEPMODE
|
||||
am__nodep
|
||||
AMDEPBACKSLASH
|
||||
AMDEP_FALSE
|
||||
AMDEP_TRUE
|
||||
@@ -775,7 +777,8 @@ LIBS
|
||||
CPPFLAGS
|
||||
CCAS
|
||||
CCASFLAGS
|
||||
CPP'
|
||||
CPP
|
||||
CPPFLAGS'
|
||||
|
||||
|
||||
# Initialize some variables set by options.
|
||||
@@ -1318,7 +1321,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures libpng 1.5.7beta05 to adapt to many kinds of systems.
|
||||
\`configure' configures libpng 1.5.10beta03 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1388,7 +1391,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of libpng 1.5.7beta05:";;
|
||||
short | recursive ) echo "Configuration of libpng 1.5.10beta03:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1411,7 +1414,7 @@ Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
|
||||
--with-pic try to use only PIC/non-PIC objects [default=use
|
||||
--with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
|
||||
both]
|
||||
--with-sysroot=DIR Search for dependent libraries within DIR
|
||||
(or the compiler's sysroot if not specified).
|
||||
@@ -1499,7 +1502,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
libpng configure 1.5.7beta05
|
||||
libpng configure 1.5.10beta03
|
||||
generated by GNU Autoconf 2.68
|
||||
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
@@ -1922,7 +1925,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by libpng $as_me 1.5.7beta05, which was
|
||||
It was created by libpng $as_me 1.5.10beta03, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -2737,7 +2740,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='libpng'
|
||||
VERSION='1.5.7beta05'
|
||||
VERSION='1.5.10beta03'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -2801,10 +2804,10 @@ fi
|
||||
|
||||
|
||||
|
||||
PNGLIB_VERSION=1.5.7beta05
|
||||
PNGLIB_VERSION=1.5.10beta03
|
||||
PNGLIB_MAJOR=1
|
||||
PNGLIB_MINOR=5
|
||||
PNGLIB_RELEASE=7
|
||||
PNGLIB_RELEASE=10
|
||||
|
||||
|
||||
|
||||
@@ -3659,6 +3662,7 @@ fi
|
||||
if test "x$enable_dependency_tracking" != xno; then
|
||||
am_depcomp="$ac_aux_dir/depcomp"
|
||||
AMDEPBACKSLASH='\'
|
||||
am__nodep='_no'
|
||||
fi
|
||||
if test "x$enable_dependency_tracking" != xno; then
|
||||
AMDEP_TRUE=
|
||||
@@ -3683,6 +3687,7 @@ else
|
||||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
@@ -3742,7 +3747,7 @@ else
|
||||
break
|
||||
fi
|
||||
;;
|
||||
msvisualcpp | msvcmsys)
|
||||
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
|
||||
# This compiler won't grok `-c -o', but also, the minuso test has
|
||||
# not run yet. These depmodes are late enough in the game, and
|
||||
# so weak that their functioning should not be impacted.
|
||||
@@ -3817,6 +3822,7 @@ else
|
||||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
@@ -3874,7 +3880,7 @@ else
|
||||
break
|
||||
fi
|
||||
;;
|
||||
msvisualcpp | msvcmsys)
|
||||
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
|
||||
# This compiler won't grok `-c -o', but also, the minuso test has
|
||||
# not run yet. These depmodes are late enough in the game, and
|
||||
# so weak that their functioning should not be impacted.
|
||||
@@ -4834,8 +4840,8 @@ esac
|
||||
|
||||
|
||||
|
||||
macro_version='2.4'
|
||||
macro_revision='1.3293'
|
||||
macro_version='2.4.2'
|
||||
macro_revision='1.3337'
|
||||
|
||||
|
||||
|
||||
@@ -5136,6 +5142,11 @@ else
|
||||
lt_cv_sys_max_cmd_len=196608
|
||||
;;
|
||||
|
||||
os2*)
|
||||
# The test takes a long time on OS/2.
|
||||
lt_cv_sys_max_cmd_len=8192
|
||||
;;
|
||||
|
||||
osf*)
|
||||
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
|
||||
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
|
||||
@@ -5175,7 +5186,7 @@ else
|
||||
# If test is not a shell built-in, we'll probably end up computing a
|
||||
# maximum length that is only half of the actual maximum length, but
|
||||
# we can't tell.
|
||||
while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
|
||||
while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
|
||||
= "X$teststring$teststring"; } >/dev/null 2>&1 &&
|
||||
test $i != 17 # 1/2 MB should be enough
|
||||
do
|
||||
@@ -5601,7 +5612,7 @@ irix5* | irix6* | nonstopux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
# This must be glibc/ELF.
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
@@ -6239,13 +6250,13 @@ old_postuninstall_cmds=
|
||||
if test -n "$RANLIB"; then
|
||||
case $host_os in
|
||||
openbsd*)
|
||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
|
||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
|
||||
;;
|
||||
*)
|
||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
|
||||
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
|
||||
;;
|
||||
esac
|
||||
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
|
||||
old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
|
||||
fi
|
||||
|
||||
case $host_os in
|
||||
@@ -6392,6 +6403,7 @@ for ac_symprfx in "" "_"; do
|
||||
# which start with @ or ?.
|
||||
lt_cv_sys_global_symbol_pipe="$AWK '"\
|
||||
" {last_section=section; section=\$ 3};"\
|
||||
" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
|
||||
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
|
||||
" \$ 0!~/External *\|/{next};"\
|
||||
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
|
||||
@@ -6780,7 +6792,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
|
||||
CFLAGS="$SAVE_CFLAGS"
|
||||
fi
|
||||
;;
|
||||
sparc*-*solaris*)
|
||||
*-*solaris*)
|
||||
# Find out which ABI we are using.
|
||||
echo 'int i;' > conftest.$ac_ext
|
||||
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
|
||||
@@ -6791,7 +6803,20 @@ sparc*-*solaris*)
|
||||
case `/usr/bin/file conftest.o` in
|
||||
*64-bit*)
|
||||
case $lt_cv_prog_gnu_ld in
|
||||
yes*) LD="${LD-ld} -m elf64_sparc" ;;
|
||||
yes*)
|
||||
case $host in
|
||||
i?86-*-solaris*)
|
||||
LD="${LD-ld} -m elf_x86_64"
|
||||
;;
|
||||
sparc*-*-solaris*)
|
||||
LD="${LD-ld} -m elf64_sparc"
|
||||
;;
|
||||
esac
|
||||
# GNU ld 2.21 introduced _sol2 emulations. Use them if available.
|
||||
if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
|
||||
LD="${LD-ld}_sol2"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
|
||||
LD="${LD-ld} -64"
|
||||
@@ -7431,7 +7456,13 @@ else
|
||||
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
|
||||
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
|
||||
_lt_result=$?
|
||||
if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
|
||||
# If there is a non-empty error log, and "single_module"
|
||||
# appears in it, assume the flag caused a linker warning
|
||||
if test -s conftest.err && $GREP single_module conftest.err; then
|
||||
cat conftest.err >&5
|
||||
# Otherwise, if the output was created with a 0 exit code from
|
||||
# the compiler, it worked.
|
||||
elif test -f libconftest.dylib && test $_lt_result -eq 0; then
|
||||
lt_cv_apple_cc_single_mod=yes
|
||||
else
|
||||
cat conftest.err >&5
|
||||
@@ -7442,6 +7473,7 @@ else
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
|
||||
$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
|
||||
$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
|
||||
if ${lt_cv_ld_exported_symbols_list+:} false; then :
|
||||
@@ -7474,6 +7506,7 @@ rm -f core conftest.err conftest.$ac_objext \
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
|
||||
$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
|
||||
$as_echo_n "checking for -force_load linker flag... " >&6; }
|
||||
if ${lt_cv_ld_force_load+:} false; then :
|
||||
@@ -7495,7 +7528,9 @@ _LT_EOF
|
||||
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
|
||||
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
|
||||
_lt_result=$?
|
||||
if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
|
||||
if test -s conftest.err && $GREP force_load conftest.err; then
|
||||
cat conftest.err >&5
|
||||
elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
|
||||
lt_cv_ld_force_load=yes
|
||||
else
|
||||
cat conftest.err >&5
|
||||
@@ -8061,7 +8096,22 @@ fi
|
||||
|
||||
# Check whether --with-pic was given.
|
||||
if test "${with_pic+set}" = set; then :
|
||||
withval=$with_pic; pic_mode="$withval"
|
||||
withval=$with_pic; lt_p=${PACKAGE-default}
|
||||
case $withval in
|
||||
yes|no) pic_mode=$withval ;;
|
||||
*)
|
||||
pic_mode=default
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for lt_pkg in $withval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$lt_pkg" = "X$lt_p"; then
|
||||
pic_mode=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
pic_mode=default
|
||||
fi
|
||||
@@ -8134,6 +8184,10 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8594,7 +8648,9 @@ lt_prog_compiler_static=
|
||||
case $cc_basename in
|
||||
nvcc*) # Cuda Compiler Driver 2.2
|
||||
lt_prog_compiler_wl='-Xlinker '
|
||||
lt_prog_compiler_pic='-Xcompiler -fPIC'
|
||||
if test -n "$lt_prog_compiler_pic"; then
|
||||
lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
@@ -8685,18 +8741,33 @@ lt_prog_compiler_static=
|
||||
;;
|
||||
*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
*Sun\ F* | *Sun*Fortran*)
|
||||
*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
|
||||
# Sun Fortran 8.3 passes all unrecognized flags to the linker
|
||||
lt_prog_compiler_pic='-KPIC'
|
||||
lt_prog_compiler_static='-Bstatic'
|
||||
lt_prog_compiler_wl=''
|
||||
;;
|
||||
*Sun\ F* | *Sun*Fortran*)
|
||||
lt_prog_compiler_pic='-KPIC'
|
||||
lt_prog_compiler_static='-Bstatic'
|
||||
lt_prog_compiler_wl='-Qoption ld '
|
||||
;;
|
||||
*Sun\ C*)
|
||||
# Sun C 5.9
|
||||
lt_prog_compiler_pic='-KPIC'
|
||||
lt_prog_compiler_static='-Bstatic'
|
||||
lt_prog_compiler_wl='-Wl,'
|
||||
;;
|
||||
*Intel*\ [CF]*Compiler*)
|
||||
lt_prog_compiler_wl='-Wl,'
|
||||
lt_prog_compiler_pic='-fPIC'
|
||||
lt_prog_compiler_static='-static'
|
||||
;;
|
||||
*Portland\ Group*)
|
||||
lt_prog_compiler_wl='-Wl,'
|
||||
lt_prog_compiler_pic='-fpic'
|
||||
lt_prog_compiler_static='-Bstatic'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
@@ -9058,7 +9129,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
|
||||
hardcode_direct=no
|
||||
hardcode_direct_absolute=no
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_libdir_flag_spec_ld=
|
||||
hardcode_libdir_separator=
|
||||
hardcode_minus_L=no
|
||||
hardcode_shlibpath_var=unsupported
|
||||
@@ -9308,8 +9378,7 @@ _LT_EOF
|
||||
xlf* | bgf* | bgxlf* | mpixlf*)
|
||||
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
|
||||
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_libdir_flag_spec_ld='-rpath $libdir'
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
|
||||
if test "x$supports_anon_versioning" = xyes; then
|
||||
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
|
||||
@@ -9688,6 +9757,7 @@ fi
|
||||
# The linker will not automatically build a static lib if we build a DLL.
|
||||
# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
|
||||
enable_shared_with_static_runtimes=yes
|
||||
exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
|
||||
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
|
||||
# Don't use ranlib
|
||||
old_postinstall_cmds='chmod 644 $oldlib'
|
||||
@@ -9733,6 +9803,7 @@ fi
|
||||
hardcode_shlibpath_var=unsupported
|
||||
if test "$lt_cv_ld_force_load" = "yes"; then
|
||||
whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
|
||||
|
||||
else
|
||||
whole_archive_flag_spec=''
|
||||
fi
|
||||
@@ -9761,10 +9832,6 @@ fi
|
||||
hardcode_shlibpath_var=no
|
||||
;;
|
||||
|
||||
freebsd1*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
|
||||
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
|
||||
# support. Future versions do this automatically, but an explicit c++rt0.o
|
||||
# does not break anything, and helps significantly (at the cost of a little
|
||||
@@ -9777,7 +9844,7 @@ fi
|
||||
;;
|
||||
|
||||
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
|
||||
freebsd2*)
|
||||
freebsd2.*)
|
||||
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
@@ -9816,7 +9883,6 @@ fi
|
||||
fi
|
||||
if test "$with_gnu_ld" = no; then
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_flag_spec_ld='+b $libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
hardcode_direct_absolute=yes
|
||||
@@ -10434,11 +10500,6 @@ esac
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10534,7 +10595,7 @@ need_version=unknown
|
||||
|
||||
case $host_os in
|
||||
aix3*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
|
||||
shlibpath_var=LIBPATH
|
||||
|
||||
@@ -10543,7 +10604,7 @@ aix3*)
|
||||
;;
|
||||
|
||||
aix[4-9]*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
hardcode_into_libs=yes
|
||||
@@ -10608,7 +10669,7 @@ beos*)
|
||||
;;
|
||||
|
||||
bsdi[45]*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
soname_spec='${libname}${release}${shared_ext}$major'
|
||||
@@ -10747,7 +10808,7 @@ darwin* | rhapsody*)
|
||||
;;
|
||||
|
||||
dgux*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
|
||||
@@ -10755,10 +10816,6 @@ dgux*)
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
;;
|
||||
|
||||
freebsd1*)
|
||||
dynamic_linker=no
|
||||
;;
|
||||
|
||||
freebsd* | dragonfly*)
|
||||
# DragonFly does not have aout. When/if they implement a new
|
||||
# versioning mechanism, adjust this.
|
||||
@@ -10766,18 +10823,11 @@ freebsd* | dragonfly*)
|
||||
objformat=`/usr/bin/objformat`
|
||||
else
|
||||
case $host_os in
|
||||
freebsd[123]*) objformat=aout ;;
|
||||
freebsd[23].*) objformat=aout ;;
|
||||
*) objformat=elf ;;
|
||||
esac
|
||||
fi
|
||||
# Handle Gentoo/FreeBSD as it was Linux
|
||||
case $host_vendor in
|
||||
gentoo)
|
||||
version_type=linux ;;
|
||||
*)
|
||||
version_type=freebsd-$objformat ;;
|
||||
esac
|
||||
|
||||
version_type=freebsd-$objformat
|
||||
case $version_type in
|
||||
freebsd-elf*)
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
|
||||
@@ -10788,16 +10838,10 @@ freebsd* | dragonfly*)
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
|
||||
need_version=yes
|
||||
;;
|
||||
linux)
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
|
||||
soname_spec='${libname}${release}${shared_ext}$major'
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
;;
|
||||
esac
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
case $host_os in
|
||||
freebsd2*)
|
||||
freebsd2.*)
|
||||
shlibpath_overrides_runpath=yes
|
||||
;;
|
||||
freebsd3.[01]* | freebsdelf3.[01]*)
|
||||
@@ -10817,17 +10861,18 @@ freebsd* | dragonfly*)
|
||||
;;
|
||||
|
||||
gnu*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
|
||||
soname_spec='${libname}${release}${shared_ext}$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
shlibpath_overrides_runpath=no
|
||||
hardcode_into_libs=yes
|
||||
;;
|
||||
|
||||
haiku*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
dynamic_linker="$host_os runtime_loader"
|
||||
@@ -10888,7 +10933,7 @@ hpux9* | hpux10* | hpux11*)
|
||||
;;
|
||||
|
||||
interix[3-9]*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
|
||||
@@ -10904,7 +10949,7 @@ irix5* | irix6* | nonstopux*)
|
||||
nonstopux*) version_type=nonstopux ;;
|
||||
*)
|
||||
if test "$lt_cv_prog_gnu_ld" = yes; then
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
else
|
||||
version_type=irix
|
||||
fi ;;
|
||||
@@ -10941,9 +10986,9 @@ linux*oldld* | linux*aout* | linux*coff*)
|
||||
dynamic_linker=no
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
# This must be glibc/ELF.
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
@@ -11025,7 +11070,7 @@ netbsd*)
|
||||
;;
|
||||
|
||||
newsos6)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
shlibpath_overrides_runpath=yes
|
||||
@@ -11094,7 +11139,7 @@ rdos*)
|
||||
;;
|
||||
|
||||
solaris*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
@@ -11119,7 +11164,7 @@ sunos4*)
|
||||
;;
|
||||
|
||||
sysv4 | sysv4.3*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
soname_spec='${libname}${release}${shared_ext}$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
@@ -11143,7 +11188,7 @@ sysv4 | sysv4.3*)
|
||||
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec ;then
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
|
||||
soname_spec='$libname${shared_ext}.$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
@@ -11174,7 +11219,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
|
||||
|
||||
tpf*)
|
||||
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
@@ -11184,7 +11229,7 @@ tpf*)
|
||||
;;
|
||||
|
||||
uts4*)
|
||||
version_type=linux
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
soname_spec='${libname}${release}${shared_ext}$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
@@ -11966,6 +12011,8 @@ CC="$lt_save_CC"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ac_config_commands="$ac_config_commands libtool"
|
||||
|
||||
|
||||
@@ -12670,9 +12717,6 @@ LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
|
||||
LIBPNG_DEFINES=$LIBPNG_DEFINES
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libraries can be versioned" >&5
|
||||
$as_echo_n "checking if libraries can be versioned... " >&6; }
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if using Solaris linker" >&5
|
||||
$as_echo_n "checking if using Solaris linker... " >&6; }
|
||||
SLD=`$LD --version 2>&1 | grep Solaris`
|
||||
@@ -12694,6 +12738,8 @@ else
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libraries can be versioned" >&5
|
||||
$as_echo_n "checking if libraries can be versioned... " >&6; }
|
||||
# Special case for PE/COFF platforms: ld reports
|
||||
# support for version-script, but doesn't actually
|
||||
# DO anything with it.
|
||||
@@ -12784,6 +12830,12 @@ fi
|
||||
|
||||
|
||||
|
||||
# Because GCC by default assembles code with an executable stack, even though it
|
||||
# compiles C code with a non-executable stack, it is necessary to do a fixup
|
||||
# here (this may by GCC specific)
|
||||
AM_CCASFLAGS=-Wa,--noexecstack
|
||||
|
||||
|
||||
# Check whether --enable-arm-neon was given.
|
||||
if test "${enable_arm_neon+set}" = set; then :
|
||||
enableval=$enable_arm_neon; if test "${enableval}" = yes; then
|
||||
@@ -13365,7 +13417,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by libpng $as_me 1.5.7beta05, which was
|
||||
This file was extended by libpng $as_me 1.5.10beta03, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -13431,7 +13483,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
libpng config.status 1.5.7beta05
|
||||
libpng config.status 1.5.10beta03
|
||||
configured by $0, generated by GNU Autoconf 2.68,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
@@ -13577,6 +13629,7 @@ enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
|
||||
enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
|
||||
pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
|
||||
enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
|
||||
PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
|
||||
host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
|
||||
host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
|
||||
host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
|
||||
@@ -13651,7 +13704,6 @@ with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
|
||||
allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
|
||||
no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
|
||||
hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
|
||||
hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
|
||||
hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
|
||||
hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
|
||||
hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
|
||||
@@ -13715,6 +13767,7 @@ LD \
|
||||
AS \
|
||||
DLLTOOL \
|
||||
OBJDUMP \
|
||||
PATH_SEPARATOR \
|
||||
NM \
|
||||
LN_S \
|
||||
lt_SP2NL \
|
||||
@@ -13758,7 +13811,6 @@ with_gnu_ld \
|
||||
allow_undefined_flag \
|
||||
no_undefined_flag \
|
||||
hardcode_libdir_flag_spec \
|
||||
hardcode_libdir_flag_spec_ld \
|
||||
hardcode_libdir_separator \
|
||||
exclude_expsyms \
|
||||
include_expsyms \
|
||||
@@ -14556,8 +14608,8 @@ $as_echo X"$file" |
|
||||
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
||||
#
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
||||
# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
|
||||
# Inc.
|
||||
# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gordon Matzigkeit, 1996
|
||||
#
|
||||
# This file is part of GNU Libtool.
|
||||
@@ -14635,6 +14687,9 @@ pic_mode=$pic_mode
|
||||
# Whether or not to optimize for fast installation.
|
||||
fast_install=$enable_fast_install
|
||||
|
||||
# The PATH separator for the build system.
|
||||
PATH_SEPARATOR=$lt_PATH_SEPARATOR
|
||||
|
||||
# The host system.
|
||||
host_alias=$host_alias
|
||||
host=$host
|
||||
@@ -14915,10 +14970,6 @@ no_undefined_flag=$lt_no_undefined_flag
|
||||
# This must work even if \$libdir does not exist
|
||||
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
|
||||
|
||||
# If ld is used when linking, flag to hardcode \$libdir into a binary
|
||||
# during linking. This must work even if \$libdir does not exist.
|
||||
hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
|
||||
|
||||
# Whether we need a single "-rpath" flag with a separated argument.
|
||||
hardcode_libdir_separator=$lt_hardcode_libdir_separator
|
||||
|
||||
|
||||
@@ -18,15 +18,15 @@ AC_PREREQ(2.59)
|
||||
|
||||
dnl Version number stuff here:
|
||||
|
||||
AC_INIT([libpng], [1.5.7beta05], [png-mng-implement@lists.sourceforge.net])
|
||||
AC_INIT([libpng], [1.5.10beta03], [png-mng-implement@lists.sourceforge.net])
|
||||
AM_INIT_AUTOMAKE
|
||||
dnl stop configure from automagically running automake
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
PNGLIB_VERSION=1.5.7beta05
|
||||
PNGLIB_VERSION=1.5.10beta03
|
||||
PNGLIB_MAJOR=1
|
||||
PNGLIB_MINOR=5
|
||||
PNGLIB_RELEASE=7
|
||||
PNGLIB_RELEASE=10
|
||||
|
||||
dnl End of version number stuff
|
||||
|
||||
@@ -101,8 +101,6 @@ LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
|
||||
LIBPNG_DEFINES=$LIBPNG_DEFINES
|
||||
AC_SUBST(LIBPNG_DEFINES)
|
||||
|
||||
AC_MSG_CHECKING([if libraries can be versioned])
|
||||
|
||||
AC_MSG_CHECKING([if using Solaris linker])
|
||||
SLD=`$LD --version 2>&1 | grep Solaris`
|
||||
if test "$SLD"; then
|
||||
@@ -114,6 +112,7 @@ else
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_SOLARIS_LD, test "$have_solaris_ld" = "yes")
|
||||
|
||||
AC_MSG_CHECKING([if libraries can be versioned])
|
||||
# Special case for PE/COFF platforms: ld reports
|
||||
# support for version-script, but doesn't actually
|
||||
# DO anything with it.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
|
||||
/* pngvalid.c - validate libpng by constructing then reading png files.
|
||||
*
|
||||
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||
* Copyright (c) 2011 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.5.8 [%RDATE%]
|
||||
* Copyright (c) 2012 Glenn Randers-Pehrson
|
||||
* Written by John Cunningham Bowler
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
@@ -25,18 +25,21 @@
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FEENABLEEXCEPT
|
||||
# include <fenv.h>
|
||||
#endif
|
||||
|
||||
#include "png.h"
|
||||
/* Define the following to use this test against your installed libpng, rather
|
||||
* than the one being built here:
|
||||
*/
|
||||
#ifdef PNG_FREESTANDING_TESTS
|
||||
# include <png.h>
|
||||
#else
|
||||
# include "../../png.h"
|
||||
#endif
|
||||
|
||||
#if PNG_LIBPNG_VER < 10500
|
||||
/* This delibarately lacks the PNG_CONST. */
|
||||
/* This deliberately lacks the PNG_CONST. */
|
||||
typedef png_byte *png_const_bytep;
|
||||
|
||||
/* This is copied from 1.5.1 png.h: */
|
||||
@@ -90,7 +93,7 @@ typedef png_byte *png_const_bytep;
|
||||
#endif
|
||||
|
||||
/***************************** EXCEPTION HANDLING *****************************/
|
||||
#include "contrib/visupng/cexcept.h"
|
||||
#include "../visupng/cexcept.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
# define this not_the_cpp_this
|
||||
@@ -4091,7 +4094,7 @@ read_palette(store_palette palette, int *npalette, png_structp pp, png_infop pi)
|
||||
png_error(pp, "validate: invalid PLTE result");
|
||||
/* But there is no palette, so record this: */
|
||||
*npalette = 0;
|
||||
memset(palette, 113, sizeof palette);
|
||||
memset(palette, 113, sizeof (store_palette));
|
||||
}
|
||||
|
||||
trans_alpha = 0;
|
||||
@@ -5277,7 +5280,7 @@ static void
|
||||
transform_display_init(transform_display *dp, png_modifier *pm, png_uint_32 id,
|
||||
PNG_CONST image_transform *transform_list)
|
||||
{
|
||||
memset(dp, 0, sizeof dp);
|
||||
memset(dp, 0, sizeof *dp);
|
||||
|
||||
/* Standard fields */
|
||||
standard_display_init(&dp->this, &pm->this, id, 0/*do_interlace*/,
|
||||
@@ -9388,7 +9391,7 @@ int main(int argc, PNG_CONST char **argv)
|
||||
size_t cp = 0;
|
||||
char command[1024];
|
||||
|
||||
context(&pm.this, fault);
|
||||
anon_context(&pm.this);
|
||||
|
||||
/* Add appropriate signal handlers, just the ANSI specified ones: */
|
||||
signal(SIGABRT, signal_handler);
|
||||
@@ -9750,7 +9753,7 @@ int main(int argc, PNG_CONST char **argv)
|
||||
#endif
|
||||
}
|
||||
|
||||
Catch(fault)
|
||||
Catch_anonymous
|
||||
{
|
||||
fprintf(stderr, "pngvalid: test aborted (probably failed in cleanup)\n");
|
||||
if (!pm.this.verbose)
|
||||
@@ -1,289 +0,0 @@
|
||||
/* timepng.c
|
||||
*
|
||||
* Copyright (c) 2011 John Cunningham Bowler
|
||||
*
|
||||
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
* and license in png.h
|
||||
*
|
||||
* Load an arbitrary number of PNG files (from the command line, or, if there
|
||||
* are no arguments on the command line, from stdin) then run a time test by
|
||||
* reading each file by row. The test does nothing with the read result and
|
||||
* does no transforms. The only output is a time as a floating point number of
|
||||
* seconds with 9 decimal digits.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include "png.h"
|
||||
|
||||
static int read_png(FILE *fp)
|
||||
{
|
||||
png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,0,0,0);
|
||||
png_infop info_ptr = NULL;
|
||||
png_bytep row = NULL, display = NULL;
|
||||
|
||||
if (png_ptr == NULL)
|
||||
return 0;
|
||||
|
||||
if (setjmp(png_jmpbuf(png_ptr)))
|
||||
{
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
|
||||
if (row != NULL) free(row);
|
||||
if (display != NULL) free(display);
|
||||
return 0;
|
||||
}
|
||||
|
||||
png_init_io(png_ptr, fp);
|
||||
|
||||
info_ptr = png_create_info_struct(png_ptr);
|
||||
if (info_ptr == NULL)
|
||||
png_error(png_ptr, "OOM allocating info structure");
|
||||
|
||||
png_read_info(png_ptr, info_ptr);
|
||||
|
||||
{
|
||||
png_size_t rowbytes = png_get_rowbytes(png_ptr, info_ptr);
|
||||
|
||||
row = malloc(rowbytes);
|
||||
display = malloc(rowbytes);
|
||||
|
||||
if (row == NULL || display == NULL)
|
||||
png_error(png_ptr, "OOM allocating row buffers");
|
||||
|
||||
{
|
||||
png_uint_32 height = png_get_image_height(png_ptr, info_ptr);
|
||||
int passes = png_set_interlace_handling(png_ptr);
|
||||
int pass;
|
||||
|
||||
png_start_read_image(png_ptr);
|
||||
|
||||
for (pass = 0; pass < passes; ++pass)
|
||||
{
|
||||
png_uint_32 y = height;
|
||||
|
||||
/* NOTE: this trashes the row each time; interlace handling won't
|
||||
* work, but this avoids memory thrashing for speed testing.
|
||||
*/
|
||||
while (y-- > 0)
|
||||
png_read_row(png_ptr, row, display);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Make sure to read to the end of the file: */
|
||||
png_read_end(png_ptr, info_ptr);
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
|
||||
free(row);
|
||||
free(display);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int mytime(struct timespec *t)
|
||||
{
|
||||
/* Do the timing using clock_gettime and the per-process timer. */
|
||||
if (!clock_gettime(CLOCK_PROCESS_CPUTIME_ID, t))
|
||||
return 1;
|
||||
|
||||
perror("CLOCK_PROCESS_CPUTIME_ID");
|
||||
fprintf(stderr, "timepng: could not get the time\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int perform_one_test(FILE *fp, int nfiles)
|
||||
{
|
||||
int i;
|
||||
struct timespec before, after;
|
||||
|
||||
/* Clear out all errors: */
|
||||
rewind(fp);
|
||||
|
||||
if (mytime(&before))
|
||||
{
|
||||
for (i=0; i<nfiles; ++i)
|
||||
{
|
||||
if (read_png(fp))
|
||||
{
|
||||
if (ferror(fp))
|
||||
{
|
||||
perror("temporary file");
|
||||
fprintf(stderr, "file %d: error reading PNG data\n", i);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
perror("temporary file");
|
||||
fprintf(stderr, "file %d: error from libpng\n", i);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
return 0;
|
||||
|
||||
if (mytime(&after))
|
||||
{
|
||||
/* Work out the time difference and print it - this is the only output,
|
||||
* so flush it immediately.
|
||||
*/
|
||||
unsigned long s = after.tv_sec - before.tv_sec;
|
||||
long ns = after.tv_nsec - before.tv_nsec;
|
||||
|
||||
if (ns < 0)
|
||||
{
|
||||
--s;
|
||||
ns += 1000000000;
|
||||
|
||||
if (ns < 0)
|
||||
{
|
||||
fprintf(stderr, "timepng: bad clock from kernel\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
printf("%lu.%.9ld\n", s, ns);
|
||||
fflush(stdout);
|
||||
if (ferror(stdout))
|
||||
{
|
||||
fprintf(stderr, "timepng: error writing output\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Successful return */
|
||||
return 1;
|
||||
}
|
||||
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int add_one_file(FILE *fp, char *name)
|
||||
{
|
||||
FILE *ip = fopen(name, "rb");
|
||||
|
||||
if (ip != NULL)
|
||||
{
|
||||
int ch;
|
||||
for (;;)
|
||||
{
|
||||
ch = getc(ip);
|
||||
if (ch == EOF) break;
|
||||
putc(ch, fp);
|
||||
}
|
||||
|
||||
if (ferror(ip))
|
||||
{
|
||||
perror(name);
|
||||
fprintf(stderr, "%s: read error\n", name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
(void)fclose(ip);
|
||||
|
||||
if (ferror(fp))
|
||||
{
|
||||
perror("temporary file");
|
||||
fprintf(stderr, "temporary file write error\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
perror(name);
|
||||
fprintf(stderr, "%s: open failed\n", name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int ok = 0;
|
||||
FILE *fp = tmpfile();
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
int err = 0;
|
||||
int nfiles = 0;
|
||||
|
||||
if (argc > 1)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=1; i<argc; ++i)
|
||||
{
|
||||
if (add_one_file(fp, argv[i]))
|
||||
++nfiles;
|
||||
|
||||
else
|
||||
{
|
||||
err = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
char filename[FILENAME_MAX+1];
|
||||
|
||||
while (fgets(filename, FILENAME_MAX+1, stdin))
|
||||
{
|
||||
int len = strlen(filename);
|
||||
|
||||
if (filename[len-1] == '\n')
|
||||
{
|
||||
filename[len-1] = 0;
|
||||
if (add_one_file(fp, filename))
|
||||
++nfiles;
|
||||
|
||||
else
|
||||
{
|
||||
err = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "timepng: truncated file name ...%s\n",
|
||||
filename+len-32);
|
||||
err = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (ferror(stdin))
|
||||
{
|
||||
fprintf(stderr, "timepng: stdin: read error\n");
|
||||
err = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!err)
|
||||
{
|
||||
if (nfiles > 0)
|
||||
ok = perform_one_test(fp, nfiles);
|
||||
|
||||
else
|
||||
fprintf(stderr, "usage: timepng {files} or ls files | timepng\n");
|
||||
}
|
||||
|
||||
(void)fclose(fp);
|
||||
}
|
||||
|
||||
else
|
||||
fprintf(stderr, "timepng: could not open temporary file\n");
|
||||
|
||||
/* Exit code 0 on success. */
|
||||
return ok == 0;
|
||||
}
|
||||
@@ -1,188 +0,0 @@
|
||||
/*-
|
||||
* convert.c
|
||||
*
|
||||
* Convert 8-bit sRGB or 16-bit linear values to another format.
|
||||
*
|
||||
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||
* Copyright (c) 2011 Written by John Cunningham Bowler
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
* and license in png.h
|
||||
*/
|
||||
#define _ISOC99_SOURCE 1
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <fenv.h>
|
||||
|
||||
#include "sRGB.h"
|
||||
|
||||
static void
|
||||
usage(const char *prog)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"%s: usage: %s [-linear|-sRGB] [-gray|-color] component{1,4}\n",
|
||||
prog, prog);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
unsigned long
|
||||
component(const char *prog, const char *arg, int issRGB)
|
||||
{
|
||||
char *ep;
|
||||
unsigned long c = strtoul(arg, &ep, 0);
|
||||
|
||||
if (ep <= arg || *ep || c > 65535 || (issRGB && c > 255))
|
||||
{
|
||||
fprintf(stderr, "%s: %s: invalid component value (%lu)\n", prog, arg, c);
|
||||
usage(prog);
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, const char **argv)
|
||||
{
|
||||
const char *prog = *argv++;
|
||||
int to_linear = 0, to_gray = 0, to_color = 0;
|
||||
int channels = 0;
|
||||
double c[4];
|
||||
|
||||
/* FE_TONEAREST is the IEEE754 round to nearest, preferring even, mode; i.e.
|
||||
* everything rounds to the nearest value except that '.5' rounds to the
|
||||
* nearest even value.
|
||||
*/
|
||||
fesetround(FE_TONEAREST);
|
||||
|
||||
c[3] = c[2] = c[1] = c[0] = 0;
|
||||
|
||||
while (--argc > 0 && **argv == '-')
|
||||
{
|
||||
const char *arg = 1+*argv++;
|
||||
|
||||
if (strcmp(arg, "sRGB") == 0)
|
||||
to_linear = 0;
|
||||
|
||||
else if (strcmp(arg, "linear") == 0)
|
||||
to_linear = 1;
|
||||
|
||||
else if (strcmp(arg, "gray") == 0)
|
||||
to_gray = 1, to_color = 0;
|
||||
|
||||
else if (strcmp(arg, "color") == 0)
|
||||
to_gray = 0, to_color = 1;
|
||||
|
||||
else
|
||||
usage(prog);
|
||||
}
|
||||
|
||||
switch (argc)
|
||||
{
|
||||
default:
|
||||
usage(prog);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
c[3] = component(prog, argv[3], to_linear);
|
||||
++channels;
|
||||
case 3:
|
||||
c[2] = component(prog, argv[2], to_linear);
|
||||
++channels;
|
||||
case 2:
|
||||
c[1] = component(prog, argv[1], to_linear);
|
||||
++channels;
|
||||
case 1:
|
||||
c[0] = component(prog, argv[0], to_linear);
|
||||
++channels;
|
||||
break;
|
||||
}
|
||||
|
||||
if (to_linear)
|
||||
{
|
||||
int i;
|
||||
int components = channels;
|
||||
|
||||
if ((components & 1) == 0)
|
||||
--components;
|
||||
|
||||
for (i=0; i<components; ++i) c[i] = linear_from_sRGB(c[i] / 255);
|
||||
if (components < channels)
|
||||
c[components] = c[components] / 255;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<4; ++i) c[i] /= 65535;
|
||||
|
||||
if ((channels & 1) == 0)
|
||||
{
|
||||
double alpha = c[channels-1];
|
||||
|
||||
if (alpha > 0)
|
||||
for (i=0; i<channels-1; ++i) c[i] /= alpha;
|
||||
else
|
||||
for (i=0; i<channels-1; ++i) c[i] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (to_gray)
|
||||
{
|
||||
if (channels < 3)
|
||||
{
|
||||
fprintf(stderr, "%s: too few channels (%d) for -gray\n",
|
||||
prog, channels);
|
||||
usage(prog);
|
||||
}
|
||||
|
||||
c[0] = YfromRGB(c[0], c[1], c[2]);
|
||||
channels -= 2;
|
||||
}
|
||||
|
||||
if (to_color)
|
||||
{
|
||||
if (channels > 2)
|
||||
{
|
||||
fprintf(stderr, "%s: too many channels (%d) for -color\n",
|
||||
prog, channels);
|
||||
usage(prog);
|
||||
}
|
||||
|
||||
c[3] = c[1]; /* alpha, if present */
|
||||
c[2] = c[1] = c[0];
|
||||
}
|
||||
|
||||
if (to_linear)
|
||||
{
|
||||
int i;
|
||||
if ((channels & 1) == 0)
|
||||
{
|
||||
double alpha = c[channels-1];
|
||||
for (i=0; i<channels-1; ++i) c[i] *= alpha;
|
||||
}
|
||||
|
||||
for (i=0; i<channels; ++i) c[i] = nearbyint(c[i] * 65535);
|
||||
}
|
||||
|
||||
else /* to sRGB */
|
||||
{
|
||||
int i = (channels+1)&~1;
|
||||
while (--i >= 0)
|
||||
c[i] = sRGB_from_linear(c[i]);
|
||||
|
||||
for (i=0; i<channels; ++i) c[i] = nearbyint(c[i] * 255);
|
||||
}
|
||||
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<channels; ++i) printf(" %g", c[i]);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,430 +0,0 @@
|
||||
/* makesRGB.c -- build sRGB-to-linear and linear-to-sRGB conversion tables
|
||||
*
|
||||
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||
* Copyright (c) 2011 John Cunningham Bowler
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
* and license in png.h
|
||||
*
|
||||
* Make a table to convert 8-bit sRGB encoding values into the closest 16-bit
|
||||
* linear value.
|
||||
*
|
||||
* Make two tables to take a linear value scaled to 255*65535 and return an
|
||||
* approximation to the 8-bit sRGB encoded value. Calculate the error in these
|
||||
* tables and display it.
|
||||
*/
|
||||
#define _C99_SOURCE 1
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* pngpriv.h includes the definition of 'PNG_sRGB_FROM_LINEAR' which is required
|
||||
* to verify the actual code.
|
||||
*/
|
||||
#include "../../pngpriv.h"
|
||||
|
||||
#include "sRGB.h"
|
||||
|
||||
/* The tables are declared 'const' in pngpriv.h, so this redefines the tables to
|
||||
* be used.
|
||||
*/
|
||||
#define png_sRGB_table sRGB_table
|
||||
#define png_sRGB_base sRGB_base
|
||||
#define png_sRGB_delta sRGB_delta
|
||||
|
||||
static png_uint_16 png_sRGB_table[256];
|
||||
static png_uint_16 png_sRGB_base[512];
|
||||
static png_byte png_sRGB_delta[512];
|
||||
|
||||
static const unsigned int max_input = 255*65535;
|
||||
|
||||
double
|
||||
fsRGB(double l)
|
||||
{
|
||||
return sRGB_from_linear(l/max_input);
|
||||
}
|
||||
|
||||
double
|
||||
sRGB(unsigned int i)
|
||||
{
|
||||
return fsRGB(i);
|
||||
}
|
||||
|
||||
double
|
||||
finvsRGB(unsigned int i)
|
||||
{
|
||||
return 65535 * linear_from_sRGB(i/255.);
|
||||
}
|
||||
|
||||
png_uint_16
|
||||
invsRGB(unsigned int i)
|
||||
{
|
||||
unsigned int x = nearbyint(finvsRGB(i));
|
||||
|
||||
if (x > 65535)
|
||||
{
|
||||
fprintf(stderr, "invsRGB(%u) overflows to %u\n", i, x);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return (png_uint_16)x;
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
unsigned int i, i16, ibase;
|
||||
double min_error = 0;
|
||||
double max_error = 0;
|
||||
double min_error16 = 0;
|
||||
double max_error16 = 0;
|
||||
double adjust;
|
||||
double adjust_lo = 0.4, adjust_hi = 0.6, adjust_mid = 0.5;
|
||||
unsigned int ec_lo = 0, ec_hi = 0, ec_mid = 0;
|
||||
unsigned int error_count = 0;
|
||||
unsigned int error_count16 = 0;
|
||||
int test_only = 0;
|
||||
|
||||
if (argc > 1)
|
||||
test_only = strcmp("--test", argv[1]) == 0;
|
||||
|
||||
/* Initialize the encoding table first. */
|
||||
for (i=0; i<256; ++i)
|
||||
{
|
||||
png_sRGB_table[i] = invsRGB(i);
|
||||
}
|
||||
|
||||
/* Now work out the decoding tables (this is where the error comes in because
|
||||
* there are 512 set points and 512 straight lines between them.)
|
||||
*/
|
||||
for (;;)
|
||||
{
|
||||
if (ec_lo == 0)
|
||||
adjust = adjust_lo;
|
||||
|
||||
else if (ec_hi == 0)
|
||||
adjust = adjust_hi;
|
||||
|
||||
else if (ec_mid == 0)
|
||||
adjust = adjust_mid;
|
||||
|
||||
else if (ec_mid < ec_hi)
|
||||
adjust = (adjust_mid + adjust_hi)/2;
|
||||
|
||||
else if (ec_mid < ec_lo)
|
||||
adjust = (adjust_mid + adjust_lo)/2;
|
||||
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "not reached: %u .. %u .. %u\n", ec_lo, ec_mid, ec_hi);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Calculate the table using the current 'adjust' */
|
||||
for (i=0; i<=511; ++i)
|
||||
{
|
||||
double lo = 255 * sRGB(i << 15);
|
||||
double hi = 255 * sRGB((i+1) << 15);
|
||||
unsigned int calc;
|
||||
|
||||
calc = nearbyint((lo+adjust) * 256);
|
||||
if (calc > 65535)
|
||||
{
|
||||
fprintf(stderr, "table[%d][0]: overflow %08x (%d)\n", i, calc,
|
||||
calc);
|
||||
exit(1);
|
||||
}
|
||||
png_sRGB_base[i] = calc;
|
||||
|
||||
calc = nearbyint((hi-lo) * 32);
|
||||
if (calc > 255)
|
||||
{
|
||||
fprintf(stderr, "table[%d][1]: overflow %08x (%d)\n", i, calc,
|
||||
calc);
|
||||
exit(1);
|
||||
}
|
||||
png_sRGB_delta[i] = calc;
|
||||
}
|
||||
|
||||
/* Check the 16-bit linear values alone: */
|
||||
error_count16 = 0;
|
||||
for (i16=0; i16 <= 65535; ++i16)
|
||||
{
|
||||
unsigned int i = 255*i16;
|
||||
unsigned int iexact = nearbyint(255*sRGB(i));
|
||||
unsigned int icalc = PNG_sRGB_FROM_LINEAR(i);
|
||||
|
||||
if (icalc != iexact)
|
||||
++error_count16;
|
||||
}
|
||||
|
||||
/* Now try changing the adjustment. */
|
||||
if (ec_lo == 0)
|
||||
ec_lo = error_count16;
|
||||
|
||||
else if (ec_hi == 0)
|
||||
ec_hi = error_count16;
|
||||
|
||||
else if (ec_mid == 0)
|
||||
{
|
||||
ec_mid = error_count16;
|
||||
printf("/* initial error counts: %u .. %u .. %u */\n", ec_lo, ec_mid,
|
||||
ec_hi);
|
||||
}
|
||||
|
||||
else if (error_count16 < ec_mid)
|
||||
{
|
||||
printf("/* adjust (mid ): %f: %u -> %u */\n", adjust, ec_mid,
|
||||
error_count16);
|
||||
ec_mid = error_count16;
|
||||
adjust_mid = adjust;
|
||||
}
|
||||
|
||||
else if (adjust < adjust_mid && error_count16 < ec_lo)
|
||||
{
|
||||
printf("/* adjust (low ): %f: %u -> %u */\n", adjust, ec_lo,
|
||||
error_count16);
|
||||
ec_lo = error_count16;
|
||||
adjust_lo = adjust;
|
||||
}
|
||||
|
||||
else if (adjust > adjust_mid && error_count16 < ec_hi)
|
||||
{
|
||||
printf("/* adjust (high): %f: %u -> %u */\n", adjust, ec_hi,
|
||||
error_count16);
|
||||
ec_hi = error_count16;
|
||||
adjust_hi = adjust;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
adjust = adjust_mid;
|
||||
printf("/* adjust: %f: %u */\n", adjust, ec_mid);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* For each entry in the table try to adjust it to minimize the error count
|
||||
* in that entry. Each entry corresponds to 128 input values.
|
||||
*/
|
||||
for (ibase=0; ibase<65536; ibase+=128)
|
||||
{
|
||||
png_uint_16 base = png_sRGB_base[ibase >> 7], trybase = base, ob=base;
|
||||
png_byte delta = png_sRGB_delta[ibase >> 7], trydelta = delta, od=delta;
|
||||
unsigned int ecbase = 0, eco;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
png_sRGB_base[ibase >> 7] = trybase;
|
||||
png_sRGB_delta[ibase >> 7] = trydelta;
|
||||
|
||||
/* Check the 16-bit linear values alone: */
|
||||
error_count16 = 0;
|
||||
for (i16=ibase; i16 < ibase+128; ++i16)
|
||||
{
|
||||
unsigned int i = 255*i16;
|
||||
unsigned int iexact = nearbyint(255*sRGB(i));
|
||||
unsigned int icalc = PNG_sRGB_FROM_LINEAR(i);
|
||||
|
||||
if (icalc != iexact)
|
||||
++error_count16;
|
||||
}
|
||||
|
||||
if (error_count16 == 0)
|
||||
break;
|
||||
|
||||
if (ecbase == 0)
|
||||
{
|
||||
eco = ecbase = error_count16;
|
||||
++trybase; /* First test */
|
||||
}
|
||||
|
||||
else if (error_count16 < ecbase)
|
||||
{
|
||||
if (trybase > base)
|
||||
{
|
||||
base = trybase;
|
||||
++trybase;
|
||||
}
|
||||
else if (trybase < base)
|
||||
{
|
||||
base = trybase;
|
||||
--trybase;
|
||||
}
|
||||
else if (trydelta > delta)
|
||||
{
|
||||
delta = trydelta;
|
||||
++trydelta;
|
||||
}
|
||||
else if (trydelta < delta)
|
||||
{
|
||||
delta = trydelta;
|
||||
--trydelta;
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "makesRGB: impossible\n");
|
||||
exit(1);
|
||||
}
|
||||
ecbase = error_count16;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (trybase > base)
|
||||
trybase = base-1;
|
||||
else if (trybase < base)
|
||||
{
|
||||
trybase = base;
|
||||
++trydelta;
|
||||
}
|
||||
else if (trydelta > delta)
|
||||
trydelta = delta-1;
|
||||
else if (trydelta < delta)
|
||||
break; /* end of tests */
|
||||
}
|
||||
}
|
||||
|
||||
png_sRGB_base[ibase >> 7] = base;
|
||||
png_sRGB_delta[ibase >> 7] = delta;
|
||||
if (base != ob || delta != od)
|
||||
{
|
||||
printf("/* table[%u]={%u,%u} -> {%u,%u} %u -> %u errors */\n",
|
||||
ibase>>7, ob, od, base, delta, eco, ecbase);
|
||||
}
|
||||
else if (0)
|
||||
printf("/* table[%u]={%u,%u} %u errors */\n", ibase>>7, ob, od,
|
||||
ecbase);
|
||||
}
|
||||
|
||||
/* Only do the full (slow) test at the end: */
|
||||
min_error = -.4999;
|
||||
max_error = .4999;
|
||||
error_count = 0;
|
||||
|
||||
for (i=0; i <= max_input; ++i)
|
||||
{
|
||||
unsigned int iexact = nearbyint(255*sRGB(i));
|
||||
unsigned int icalc = PNG_sRGB_FROM_LINEAR(i);
|
||||
|
||||
if (icalc != iexact)
|
||||
{
|
||||
double err = 255*sRGB(i) - icalc;
|
||||
|
||||
if (err > (max_error+.001) || err < (min_error-.001))
|
||||
{
|
||||
printf(
|
||||
"/* 0x%08x: exact: %3d, got: %3d [tables: %08x, %08x] (%f) */\n",
|
||||
i, iexact, icalc, png_sRGB_base[i>>15],
|
||||
png_sRGB_delta[i>>15], err);
|
||||
}
|
||||
|
||||
++error_count;
|
||||
if (err > max_error)
|
||||
max_error = err;
|
||||
else if (err < min_error)
|
||||
min_error = err;
|
||||
}
|
||||
}
|
||||
|
||||
/* Re-check the 16-bit cases too, including the warning if there is an error
|
||||
* bigger than 1.
|
||||
*/
|
||||
error_count16 = 0;
|
||||
max_error16 = 0;
|
||||
min_error16 = 0;
|
||||
for (i16=0; i16 <= 65535; ++i16)
|
||||
{
|
||||
unsigned int i = 255*i16;
|
||||
unsigned int iexact = nearbyint(255*sRGB(i));
|
||||
unsigned int icalc = PNG_sRGB_FROM_LINEAR(i);
|
||||
|
||||
if (icalc != iexact)
|
||||
{
|
||||
double err = 255*sRGB(i) - icalc;
|
||||
|
||||
++error_count16;
|
||||
if (err > max_error16)
|
||||
max_error16 = err;
|
||||
else if (err < min_error16)
|
||||
min_error16 = err;
|
||||
|
||||
if (abs(icalc - iexact) > 1)
|
||||
printf(
|
||||
"/* 0x%04x: exact: %3d, got: %3d [tables: %08x, %08x] (%f) */\n",
|
||||
i16, iexact, icalc, png_sRGB_base[i>>15],
|
||||
png_sRGB_delta[i>>15], err);
|
||||
}
|
||||
}
|
||||
|
||||
/* Check the round trip for each 8-bit sRGB value. */
|
||||
for (i16=0; i16 <= 255; ++i16)
|
||||
{
|
||||
unsigned int i = 255 * png_sRGB_table[i16];
|
||||
unsigned int iexact = nearbyint(255*sRGB(i));
|
||||
unsigned int icalc = PNG_sRGB_FROM_LINEAR(i);
|
||||
|
||||
if (i16 != iexact)
|
||||
{
|
||||
fprintf(stderr, "8-bit rounding error: %d -> %d\n", i16, iexact);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (icalc != i16)
|
||||
{
|
||||
double finv = finvsRGB(i16);
|
||||
|
||||
printf("/* 8-bit roundtrip error: %d -> %f -> %d(%f) */\n",
|
||||
i16, finv, icalc, fsRGB(255*finv));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
printf("/* error: %g - %g, %u (%g%%) of readings inexact */\n",
|
||||
min_error, max_error, error_count, (100.*error_count)/max_input);
|
||||
printf("/* 16-bit error: %g - %g, %u (%g%%) of readings inexact */\n",
|
||||
min_error16, max_error16, error_count16, (100.*error_count16)/65535);
|
||||
|
||||
if (!test_only)
|
||||
{
|
||||
printf("PNG_CONST png_uint_16 png_sRGB_table[256] =\n{\n ");
|
||||
for (i=0; i<255; )
|
||||
{
|
||||
do
|
||||
{
|
||||
printf("%d,", png_sRGB_table[i++]);
|
||||
}
|
||||
while ((i & 0x7) != 0 && i<255);
|
||||
if (i<255) printf("\n ");
|
||||
}
|
||||
printf("%d\n};\n\n", png_sRGB_table[i]);
|
||||
|
||||
|
||||
printf("PNG_CONST png_uint_16 png_sRGB_base[512] =\n{\n ");
|
||||
for (i=0; i<511; )
|
||||
{
|
||||
do
|
||||
{
|
||||
printf("%d,", png_sRGB_base[i++]);
|
||||
}
|
||||
while ((i & 0x7) != 0 && i<511);
|
||||
if (i<511) printf("\n ");
|
||||
}
|
||||
printf("%d\n};\n\n", png_sRGB_base[i]);
|
||||
|
||||
printf("PNG_CONST png_byte png_sRGB_delta[512] =\n{\n ");
|
||||
for (i=0; i<511; )
|
||||
{
|
||||
do
|
||||
{
|
||||
printf("%d,", png_sRGB_delta[i++]);
|
||||
}
|
||||
while ((i & 0xf) != 0 && i<511);
|
||||
if (i<511) printf("\n ");
|
||||
}
|
||||
printf("%d\n};\n\n", png_sRGB_delta[i]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
/*-
|
||||
* sRGB.h
|
||||
*
|
||||
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||
* Copyright (c) 2011 John Cunningham Bowler
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
* and license in png.h
|
||||
*
|
||||
* Utility file; not actually a header, this contains definitions of sRGB
|
||||
* calculation functions for inclusion in those test programs that need them.
|
||||
*
|
||||
* All routines take and return a floating point value in the range
|
||||
* 0 to 1.0, doing a calculation according to the sRGB specification
|
||||
* (in fact the source of the numbers is the wikipedia article at
|
||||
* http://en.wikipedia.org/wiki/SRGB).
|
||||
*/
|
||||
static double
|
||||
sRGB_from_linear(double l)
|
||||
{
|
||||
if (l <= 0.0031308)
|
||||
l *= 12.92;
|
||||
|
||||
else
|
||||
l = 1.055 * pow(l, 1/2.4) - 0.055;
|
||||
|
||||
return l;
|
||||
}
|
||||
|
||||
static double
|
||||
linear_from_sRGB(double s)
|
||||
{
|
||||
if (s <= 0.04045)
|
||||
return s / 12.92;
|
||||
|
||||
else
|
||||
return pow((s+0.055)/1.055, 2.4);
|
||||
}
|
||||
|
||||
static double
|
||||
YfromRGB(double r, double g, double b)
|
||||
{
|
||||
/* Use the sRGB (rounded) coefficients for Rlinear, Glinear, Blinear to get
|
||||
* the CIE Y value (also linear).
|
||||
*/
|
||||
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
||||
}
|
||||
74
depcomp
74
depcomp
@@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
scriptversion=2011-12-04.11; # UTC
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
|
||||
# Software Foundation, Inc.
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
|
||||
# 2011 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -44,7 +44,7 @@ Environment variables:
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputing dependencies.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
@@ -90,10 +90,18 @@ if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u="sed s,\\\\\\\\,/,g"
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
@@ -158,10 +166,12 @@ gcc)
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
@@ -405,6 +415,52 @@ tru64)
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test "$stat" = 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/ \1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/ /
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
@@ -503,7 +559,9 @@ makedepend)
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
#if 0 /* in case someone actually tries to compile this */
|
||||
|
||||
/* example.c - an example of using libpng
|
||||
* Last changed in libpng 1.5.6 [November 3, 2011]
|
||||
* This file has been placed in the public domain by the authors.
|
||||
* Last changed in libpng 1.5.7 [December 15, 2011]
|
||||
* Maintained 1998-2011 Glenn Randers-Pehrson
|
||||
* Maintained 1996, 1997 Andreas Dilger)
|
||||
* Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
* Maintained 1996, 1997 Andreas Dilger
|
||||
* Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
*/
|
||||
|
||||
/* This is an example of how to use libpng to read and write PNG files.
|
||||
@@ -14,6 +13,8 @@
|
||||
* read it, do so first. This was designed to be a starting point of an
|
||||
* implementation. This is not officially part of libpng, is hereby placed
|
||||
* in the public domain, and therefore does not require a copyright notice.
|
||||
* To the extent possible under law, the authors have waived all copyright and
|
||||
* related or neighboring rights to this file.
|
||||
*
|
||||
* This file does not currently compile, because it is missing certain
|
||||
* parts, like allocating memory to hold an image. You will have to
|
||||
|
||||
29
install-sh
29
install-sh
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
scriptversion=2011-01-19.21; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
@@ -156,6 +156,10 @@ while test $# -ne 0; do
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for `test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
@@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for `test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -200,7 +208,11 @@ if test $# -eq 0; then
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
@@ -228,9 +240,9 @@ fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
# Protect names problematic for `test' and other utilities.
|
||||
case $src in
|
||||
-*) src=./$src;;
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
@@ -252,12 +264,7 @@ do
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dst_arg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst;;
|
||||
esac
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
@@ -385,7 +392,7 @@ do
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
-*) prefix='./';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
@@ -403,7 +410,7 @@ do
|
||||
|
||||
for d
|
||||
do
|
||||
test -z "$d" && continue
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
libpng-manual.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.5.7beta05 - November 21, 2011
|
||||
libpng version 1.5.10beta03 - March 5, 2012
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<glennrp at users.sourceforge.net>
|
||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
@@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng
|
||||
|
||||
Based on:
|
||||
|
||||
libpng versions 0.97, January 1998, through 1.5.7beta05 - November 21, 2011
|
||||
libpng versions 0.97, January 1998, through 1.5.10beta03 - March 5, 2012
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
|
||||
@@ -4142,6 +4142,15 @@ X. Changes to Libpng from version 1.4.x to 1.5.x
|
||||
From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
|
||||
function) incorrectly returned a value of type png_uint_32.
|
||||
|
||||
Checking for invalid palette index on read or write was added at libpng
|
||||
1.5.10. This is enabled by default but can be disabled in each png_ptr with
|
||||
|
||||
png_set_check_for_invalid_index(png_ptr, allowed);
|
||||
|
||||
allowed - one of
|
||||
0: disable
|
||||
1: enable
|
||||
|
||||
A. Changes that affect users of libpng
|
||||
|
||||
There are no substantial API changes between the non-deprecated parts of
|
||||
@@ -4260,6 +4269,20 @@ PNG_USER_WIDTH_MAX and PNG_USER_HEIGHT_MAX, although this document said
|
||||
that it could be used to override them. Now this function will reduce or
|
||||
increase the limits.
|
||||
|
||||
Starting in libpng-1.5.10, the user limits can be set en masse with the
|
||||
configuration option PNG_SAFE_LIMITS_SUPPORTED. If this option is enabled,
|
||||
a set of "safe" limits is applied in pngpriv.h. These can be overridden by
|
||||
application calls to png_set_user_limits(), png_set_user_chunk_cache_max(),
|
||||
and/or png_set_user_malloc_max() that increase or decrease the limits. Also,
|
||||
in libpng-1.5.10 the default width and height limits were increased
|
||||
from 1,000,000 to 0x7ffffff (i.e., made unlimited). Therefore, the
|
||||
limits are now
|
||||
default safe
|
||||
png_user_width_max 0x7fffffff 1,000,000
|
||||
png_user_height_max 0x7fffffff 1,000,000
|
||||
png_user_chunk_cache_max 0 (unlimited) 128
|
||||
png_user_chunk_malloc_max 0 (unlimited) 8,000,000
|
||||
|
||||
B. Changes to the build and configuration of libpng
|
||||
|
||||
Details of internal changes to the library code can be found in the CHANGES
|
||||
@@ -4573,13 +4596,13 @@ Other rules can be inferred by inspecting the libpng source.
|
||||
|
||||
XIV. Y2K Compliance in libpng
|
||||
|
||||
November 21, 2011
|
||||
March 5, 2012
|
||||
|
||||
Since the PNG Development group is an ad-hoc body, we can't make
|
||||
an official declaration.
|
||||
|
||||
This is your unofficial assurance that libpng from version 0.71 and
|
||||
upward through 1.5.7beta05 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.5.10beta03 are Y2K compliant. It is my belief that earlier
|
||||
versions were also Y2K compliant.
|
||||
|
||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
||||
|
||||
114
libpng.3
114
libpng.3
@@ -1,6 +1,6 @@
|
||||
.TH LIBPNG 3 "November 21, 2011"
|
||||
.TH LIBPNG 3 "March 5, 2012"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.7beta05
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.10beta03
|
||||
.SH SYNOPSIS
|
||||
\fI\fB
|
||||
|
||||
@@ -8,36 +8,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.5.7beta05
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBint \fP\fIpng_image_begin_read_from_file\fP\fB, (png_imagep \fIimage,
|
||||
|
||||
\fBconst char \fI*file_name)\fP\fB);\fP
|
||||
|
||||
\fBint \fP\fIpng_image_begin_read_from_stdio\fP\fB, (png_imagep \fIimage,
|
||||
|
||||
\fBFILE* \fIfile)\fP\fB);\fP
|
||||
|
||||
\fBint, \fP\fIpng_image_begin_read_from_memory\fP\fB, (png_imagep \fIimage,
|
||||
|
||||
\fBpng_const_voidp \fP\fImemory\fP\fB, png_size_t \fIsize)\fP\fB);\fP
|
||||
|
||||
\fBint \fP\fIpng_image_finish_read\fP\fB, (png_imagep \fIimage,
|
||||
|
||||
\fBpng_colorp \fP\fIbackground\fP\fB, void \fP\fI*buffer\fP\fB, png_int_32 \fIrow_stride)\fP\fB);\fP
|
||||
|
||||
\fBvoid \fP\fIpng_image_free\fP\fB, (png_imagep \fIimage)\fP\fB);\fP
|
||||
|
||||
\fBint \fP\fIpng_image_write_to_file\fP\fB, (png_imagep \fIimage,
|
||||
|
||||
\fBconst char \fP\fI*file\fP\fB, int \fP\fIconvert_to_8bit\fP\fB, const void \fI*buffer,
|
||||
|
||||
\fBpng_int_32 \fIrow_stride)\fP\fB);\fP
|
||||
|
||||
\fBint \fP\fIpng_image_write_to_stdio\fP\fB, (png_imagep \fP\fIimage\fP\fB, FILE \fI*file,
|
||||
|
||||
\fBint \fP\fIconvert_to_8_bit\fP\fB, const void \fP\fI*buffer\fP\fB, png_int_32 \fIrow_stride)\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBpng_uint_32 png_access_version_number \fI(void\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
@@ -462,36 +432,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.5.7beta05
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBint png_image_begin_read_from_file (png_imagep \fP\fIimage\fP\fB, const char \fI*file_name\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBint png_image_begin_read_from_stdio (png_imagep \fP\fIimage\fP\fB, FILE* \fIfile\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBint, png_image_begin_read_from_memory (png_imagep \fP\fIimage\fP\fB, png_const_voidp \fP\fImemory\fP\fB, png_size_t \fIsize\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBint png_image_finish_read (png_imagep \fP\fIimage\fP\fB, png_colorp \fP\fIbackground\fP\fB, void \fP\fI*buffer\fP\fB, png_int_32 \fIrow_stride\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_image_free (png_imagep \fIimage\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBint png_image_write_to_file (png_imagep \fP\fIimage\fP\fB, const char \fP\fI*file\fP\fB, int \fP\fIconvert_to_8bit\fP\fB, const void \fI*buffer,
|
||||
|
||||
\fBpng_int_32 \fIrow_stride\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBint png_image_write_to_stdio (png_imagep \fP\fIimage\fP\fB, FILE \fP\fI*file\fP\fB, int \fP\fIconvert_to_8_bit\fP\fB, const void \fP\fI*buffer\fP\fB, png_int_32 \fIrow_stride)\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_info_init_3 (png_infopp \fP\fIinfo_ptr\fP\fB, png_size_t \fIpng_info_struct_size\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
@@ -612,6 +552,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.5.7beta05
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_set_check_for_invalid_index(png_structrp \fP\fIpng_ptr\fP\fB, int \fIallowed\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_set_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fP\fIwhite_x\fP\fB, double \fP\fIwhite_y\fP\fB, double \fP\fIred_x\fP\fB, double \fP\fIred_y\fP\fB, double \fP\fIgreen_x\fP\fB, double \fP\fIgreen_y\fP\fB, double \fP\fIblue_x\fP\fB, double \fIblue_y\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
@@ -1037,7 +981,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
|
||||
.SH LIBPNG.TXT
|
||||
libpng-manual.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.5.7beta05 - November 21, 2011
|
||||
libpng version 1.5.10beta03 - March 5, 2012
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<glennrp at users.sourceforge.net>
|
||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
@@ -1048,7 +992,7 @@ libpng-manual.txt - A description on how to use and modify libpng
|
||||
|
||||
Based on:
|
||||
|
||||
libpng versions 0.97, January 1998, through 1.5.7beta05 - November 21, 2011
|
||||
libpng versions 0.97, January 1998, through 1.5.10beta03 - March 5, 2012
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
|
||||
@@ -5180,6 +5124,15 @@ We removed the trailing '.' from the warning and error messages.
|
||||
From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
|
||||
function) incorrectly returned a value of type png_uint_32.
|
||||
|
||||
Checking for invalid palette index on read or write was added at libpng
|
||||
1.5.10. This is enabled by default but can be disabled in each png_ptr with
|
||||
|
||||
png_set_check_for_invalid_index(png_ptr, allowed);
|
||||
|
||||
allowed - one of
|
||||
0: disable
|
||||
1: enable
|
||||
|
||||
A. Changes that affect users of libpng
|
||||
|
||||
There are no substantial API changes between the non-deprecated parts of
|
||||
@@ -5298,6 +5251,20 @@ PNG_USER_WIDTH_MAX and PNG_USER_HEIGHT_MAX, although this document said
|
||||
that it could be used to override them. Now this function will reduce or
|
||||
increase the limits.
|
||||
|
||||
Starting in libpng-1.5.10, the user limits can be set en masse with the
|
||||
configuration option PNG_SAFE_LIMITS_SUPPORTED. If this option is enabled,
|
||||
a set of "safe" limits is applied in pngpriv.h. These can be overridden by
|
||||
application calls to png_set_user_limits(), png_set_user_chunk_cache_max(),
|
||||
and/or png_set_user_malloc_max() that increase or decrease the limits. Also,
|
||||
in libpng-1.5.10 the default width and height limits were increased
|
||||
from 1,000,000 to 0x7ffffff (i.e., made unlimited). Therefore, the
|
||||
limits are now
|
||||
default safe
|
||||
png_user_width_max 0x7fffffff 1,000,000
|
||||
png_user_height_max 0x7fffffff 1,000,000
|
||||
png_user_chunk_cache_max 0 (unlimited) 128
|
||||
png_user_chunk_malloc_max 0 (unlimited) 8,000,000
|
||||
|
||||
B. Changes to the build and configuration of libpng
|
||||
|
||||
Details of internal changes to the library code can be found in the CHANGES
|
||||
@@ -5611,13 +5578,13 @@ Other rules can be inferred by inspecting the libpng source.
|
||||
|
||||
.SH XIV. Y2K Compliance in libpng
|
||||
|
||||
November 21, 2011
|
||||
March 5, 2012
|
||||
|
||||
Since the PNG Development group is an ad-hoc body, we can't make
|
||||
an official declaration.
|
||||
|
||||
This is your unofficial assurance that libpng from version 0.71 and
|
||||
upward through 1.5.7beta05 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.5.10beta03 are Y2K compliant. It is my belief that earlier
|
||||
versions were also Y2K compliant.
|
||||
|
||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
||||
@@ -5820,6 +5787,15 @@ the first widely used release:
|
||||
1.5.6rc01-03 15 10506 15.so.15.6[.0]
|
||||
1.5.6 15 10506 15.so.15.6[.0]
|
||||
1.5.7beta01-05 15 10507 15.so.15.7[.0]
|
||||
1.5.7rc01-03 15 10507 15.so.15.7[.0]
|
||||
1.5.7 15 10507 15.so.15.7[.0]
|
||||
1.5.8beta01 15 10508 15.so.15.8[.0]
|
||||
1.5.8rc01 15 10508 15.so.15.8[.0]
|
||||
1.5.8 15 10508 15.so.15.8[.0]
|
||||
1.5.9beta01-02 15 10509 15.so.15.9[.0]
|
||||
1.5.9rc01 15 10509 15.so.15.9[.0]
|
||||
1.5.9 15 10509 15.so.15.9[.0]
|
||||
1.5.10beta01-03 15 10510 15.so.15.10[.0]
|
||||
|
||||
Henceforth the source version will match the shared-library minor
|
||||
and patch numbers; the shared-library major version number will be
|
||||
@@ -5876,7 +5852,7 @@ possible without all of you.
|
||||
|
||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||
|
||||
Libpng version 1.5.7beta05 - November 21, 2011:
|
||||
Libpng version 1.5.10beta03 - March 5, 2012:
|
||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
||||
|
||||
@@ -5899,7 +5875,7 @@ this sentence.
|
||||
|
||||
This code is released under the libpng license.
|
||||
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.5.7beta05, November 21, 2011, are
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.5.10beta03, March 5, 2012, are
|
||||
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
|
||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||
with the following individual added to the list of Contributing Authors
|
||||
@@ -5998,7 +5974,7 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
glennrp at users.sourceforge.net
|
||||
November 21, 2011
|
||||
March 5, 2012
|
||||
|
||||
.\" end of man page
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.TH LIBPNGPF 3 "November 18, 2011"
|
||||
.TH LIBPNGPF 3 "March 5, 2012"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.7beta05
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.10beta03
|
||||
(private functions)
|
||||
.SH SYNOPSIS
|
||||
\fB#include \fI"pngpriv.h"
|
||||
|
||||
95
ltmain.sh
95
ltmain.sh
@@ -1,9 +1,9 @@
|
||||
|
||||
# libtool (GNU libtool) 2.4
|
||||
# libtool (GNU libtool) 2.4.2
|
||||
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
|
||||
# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
# This is free software; see the source for copying conditions. There is NO
|
||||
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
# --quiet, --silent don't print informational messages
|
||||
# --no-quiet, --no-silent
|
||||
# print informational messages (default)
|
||||
# --no-warn don't display warning messages
|
||||
# --tag=TAG use configuration variables from tag TAG
|
||||
# -v, --verbose print more informational messages than default
|
||||
# --no-verbose don't print the extra informational messages
|
||||
@@ -69,7 +70,7 @@
|
||||
# compiler: $LTCC
|
||||
# compiler flags: $LTCFLAGS
|
||||
# linker: $LD (gnu? $with_gnu_ld)
|
||||
# $progname: (GNU libtool) 2.4
|
||||
# $progname: (GNU libtool) 2.4.2
|
||||
# automake: $automake_version
|
||||
# autoconf: $autoconf_version
|
||||
#
|
||||
@@ -79,9 +80,9 @@
|
||||
|
||||
PROGRAM=libtool
|
||||
PACKAGE=libtool
|
||||
VERSION=2.4
|
||||
VERSION=2.4.2
|
||||
TIMESTAMP=""
|
||||
package_revision=1.3293
|
||||
package_revision=1.3337
|
||||
|
||||
# Be Bourne compatible
|
||||
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
||||
@@ -136,15 +137,10 @@ progpath="$0"
|
||||
|
||||
: ${CP="cp -f"}
|
||||
test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
|
||||
: ${EGREP="grep -E"}
|
||||
: ${FGREP="grep -F"}
|
||||
: ${GREP="grep"}
|
||||
: ${LN_S="ln -s"}
|
||||
: ${MAKE="make"}
|
||||
: ${MKDIR="mkdir"}
|
||||
: ${MV="mv -f"}
|
||||
: ${RM="rm -f"}
|
||||
: ${SED="sed"}
|
||||
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
|
||||
: ${Xsed="$SED -e 1s/^X//"}
|
||||
|
||||
@@ -387,7 +383,7 @@ case $progpath in
|
||||
;;
|
||||
*)
|
||||
save_IFS="$IFS"
|
||||
IFS=:
|
||||
IFS=${PATH_SEPARATOR-:}
|
||||
for progdir in $PATH; do
|
||||
IFS="$save_IFS"
|
||||
test -x "$progdir/$progname" && break
|
||||
@@ -771,8 +767,8 @@ func_help ()
|
||||
s*\$LTCFLAGS*'"$LTCFLAGS"'*
|
||||
s*\$LD*'"$LD"'*
|
||||
s/\$with_gnu_ld/'"$with_gnu_ld"'/
|
||||
s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
|
||||
s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
|
||||
s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
|
||||
s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
|
||||
p
|
||||
d
|
||||
}
|
||||
@@ -1052,6 +1048,7 @@ opt_finish=false
|
||||
opt_help=false
|
||||
opt_help_all=false
|
||||
opt_silent=:
|
||||
opt_warning=:
|
||||
opt_verbose=:
|
||||
opt_silent=false
|
||||
opt_verbose=false
|
||||
@@ -1118,6 +1115,10 @@ esac
|
||||
;;
|
||||
--no-silent|--no-quiet)
|
||||
opt_silent=false
|
||||
func_append preserve_args " $opt"
|
||||
;;
|
||||
--no-warning|--no-warn)
|
||||
opt_warning=false
|
||||
func_append preserve_args " $opt"
|
||||
;;
|
||||
--no-verbose)
|
||||
@@ -2059,7 +2060,7 @@ func_mode_compile ()
|
||||
*.[cCFSifmso] | \
|
||||
*.ada | *.adb | *.ads | *.asm | \
|
||||
*.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
|
||||
*.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
|
||||
*.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
|
||||
func_xform "$libobj"
|
||||
libobj=$func_xform_result
|
||||
;;
|
||||
@@ -3201,11 +3202,13 @@ func_mode_install ()
|
||||
|
||||
# Set up the ranlib parameters.
|
||||
oldlib="$destdir/$name"
|
||||
func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
|
||||
tool_oldlib=$func_to_tool_file_result
|
||||
|
||||
func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
|
||||
|
||||
if test -n "$stripme" && test -n "$old_striplib"; then
|
||||
func_show_eval "$old_striplib $oldlib" 'exit $?'
|
||||
func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
|
||||
fi
|
||||
|
||||
# Do each command in the postinstall commands.
|
||||
@@ -3470,7 +3473,7 @@ static const void *lt_preloaded_setup() {
|
||||
# linked before any other PIC object. But we must not use
|
||||
# pic_flag when linking with -static. The problem exists in
|
||||
# FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
|
||||
*-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
|
||||
*-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
|
||||
pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
|
||||
*-*-hpux*)
|
||||
pic_flag_for_symtable=" $pic_flag" ;;
|
||||
@@ -3982,14 +3985,17 @@ func_exec_program_core ()
|
||||
# launches target application with the remaining arguments.
|
||||
func_exec_program ()
|
||||
{
|
||||
for lt_wr_arg
|
||||
do
|
||||
case \$lt_wr_arg in
|
||||
--lt-*) ;;
|
||||
*) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
case \" \$* \" in
|
||||
*\\ --lt-*)
|
||||
for lt_wr_arg
|
||||
do
|
||||
case \$lt_wr_arg in
|
||||
--lt-*) ;;
|
||||
*) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
|
||||
esac
|
||||
shift
|
||||
done ;;
|
||||
esac
|
||||
func_exec_program_core \${1+\"\$@\"}
|
||||
}
|
||||
|
||||
@@ -5057,9 +5063,15 @@ void lt_dump_script (FILE* f)
|
||||
{
|
||||
EOF
|
||||
func_emit_wrapper yes |
|
||||
$SED -e 's/\([\\"]\)/\\\1/g' \
|
||||
-e 's/^/ fputs ("/' -e 's/$/\\n", f);/'
|
||||
|
||||
$SED -n -e '
|
||||
s/^\(.\{79\}\)\(..*\)/\1\
|
||||
\2/
|
||||
h
|
||||
s/\([\\"]\)/\\\1/g
|
||||
s/$/\\n/
|
||||
s/\([^\n]*\).*/ fputs ("\1", f);/p
|
||||
g
|
||||
D'
|
||||
cat <<"EOF"
|
||||
}
|
||||
EOF
|
||||
@@ -5643,7 +5655,8 @@ func_mode_link ()
|
||||
continue
|
||||
;;
|
||||
|
||||
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
|
||||
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
|
||||
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
|
||||
func_append compiler_flags " $arg"
|
||||
func_append compile_command " $arg"
|
||||
func_append finalize_command " $arg"
|
||||
@@ -6147,7 +6160,8 @@ func_mode_link ()
|
||||
lib=
|
||||
found=no
|
||||
case $deplib in
|
||||
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
|
||||
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
|
||||
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
|
||||
if test "$linkmode,$pass" = "prog,link"; then
|
||||
compile_deplibs="$deplib $compile_deplibs"
|
||||
finalize_deplibs="$deplib $finalize_deplibs"
|
||||
@@ -6831,7 +6845,7 @@ func_mode_link ()
|
||||
test "$hardcode_direct_absolute" = no; then
|
||||
add="$dir/$linklib"
|
||||
elif test "$hardcode_minus_L" = yes; then
|
||||
add_dir="-L$dir"
|
||||
add_dir="-L$absdir"
|
||||
# Try looking first in the location we're being installed to.
|
||||
if test -n "$inst_prefix_dir"; then
|
||||
case $libdir in
|
||||
@@ -7316,6 +7330,7 @@ func_mode_link ()
|
||||
# which has an extra 1 added just for fun
|
||||
#
|
||||
case $version_type in
|
||||
# correct linux to gnu/linux during the next big refactor
|
||||
darwin|linux|osf|windows|none)
|
||||
func_arith $number_major + $number_minor
|
||||
current=$func_arith_result
|
||||
@@ -7432,7 +7447,7 @@ func_mode_link ()
|
||||
versuffix="$major.$revision"
|
||||
;;
|
||||
|
||||
linux)
|
||||
linux) # correct to gnu/linux during the next big refactor
|
||||
func_arith $current - $age
|
||||
major=.$func_arith_result
|
||||
versuffix="$major.$age.$revision"
|
||||
@@ -8020,6 +8035,11 @@ EOF
|
||||
|
||||
# Test again, we may have decided not to build it any more
|
||||
if test "$build_libtool_libs" = yes; then
|
||||
# Remove ${wl} instances when linking with ld.
|
||||
# FIXME: should test the right _cmds variable.
|
||||
case $archive_cmds in
|
||||
*\$LD\ *) wl= ;;
|
||||
esac
|
||||
if test "$hardcode_into_libs" = yes; then
|
||||
# Hardcode the library paths
|
||||
hardcode_libdirs=
|
||||
@@ -8050,7 +8070,7 @@ EOF
|
||||
elif test -n "$runpath_var"; then
|
||||
case "$perm_rpath " in
|
||||
*" $libdir "*) ;;
|
||||
*) func_apped perm_rpath " $libdir" ;;
|
||||
*) func_append perm_rpath " $libdir" ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
@@ -8058,11 +8078,7 @@ EOF
|
||||
if test -n "$hardcode_libdir_separator" &&
|
||||
test -n "$hardcode_libdirs"; then
|
||||
libdir="$hardcode_libdirs"
|
||||
if test -n "$hardcode_libdir_flag_spec_ld"; then
|
||||
eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
|
||||
else
|
||||
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
|
||||
fi
|
||||
eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
|
||||
fi
|
||||
if test -n "$runpath_var" && test -n "$perm_rpath"; then
|
||||
# We should set the runpath_var.
|
||||
@@ -9152,6 +9168,8 @@ EOF
|
||||
esac
|
||||
done
|
||||
fi
|
||||
func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
|
||||
tool_oldlib=$func_to_tool_file_result
|
||||
eval cmds=\"$old_archive_cmds\"
|
||||
|
||||
func_len " $cmds"
|
||||
@@ -9261,7 +9279,8 @@ EOF
|
||||
*.la)
|
||||
func_basename "$deplib"
|
||||
name="$func_basename_result"
|
||||
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
|
||||
func_resolve_sysroot "$deplib"
|
||||
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
|
||||
test -z "$libdir" && \
|
||||
func_fatal_error "\`$deplib' is not a valid libtool archive"
|
||||
func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
|
||||
|
||||
2
png.5
2
png.5
@@ -1,4 +1,4 @@
|
||||
.TH PNG 5 "November 18, 2011"
|
||||
.TH PNG 5 "March 5, 2012"
|
||||
.SH NAME
|
||||
png \- Portable Network Graphics (PNG) format
|
||||
.SH DESCRIPTION
|
||||
|
||||
315
png.c
315
png.c
@@ -1,8 +1,8 @@
|
||||
|
||||
/* png.c - location for general purpose libpng functions
|
||||
*
|
||||
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.5.10 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "pngpriv.h"
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef png_libpng_version_1_5_7beta05 Your_png_h_is_not_version_1_5_7beta05;
|
||||
typedef png_libpng_version_1_5_10beta03 Your_png_h_is_not_version_1_5_10beta03;
|
||||
|
||||
/* Tells libpng that we have already handled the first "num_bytes" bytes
|
||||
* of the PNG file signature. If the PNG data is embedded into another
|
||||
@@ -655,13 +655,13 @@ png_get_copyright(png_const_structp png_ptr)
|
||||
#else
|
||||
# ifdef __STDC__
|
||||
return PNG_STRING_NEWLINE \
|
||||
"libpng version 1.5.7beta05 - November 19, 2011" PNG_STRING_NEWLINE \
|
||||
"libpng version 1.5.10beta03 - March 5, 2012" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1998-2011 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
||||
PNG_STRING_NEWLINE;
|
||||
# else
|
||||
return "libpng version 1.5.7beta05 - November 19, 2011\
|
||||
return "libpng version 1.5.10beta03 - March 5, 2012\
|
||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson\
|
||||
Copyright (c) 1996-1997 Andreas Dilger\
|
||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
||||
@@ -1467,7 +1467,7 @@ static double
|
||||
png_pow10(int power)
|
||||
{
|
||||
int recip = 0;
|
||||
double d = 1;
|
||||
double d = 1.0;
|
||||
|
||||
/* Handle negative exponent with a reciprocal at the end because
|
||||
* 10 is exact whereas .1 is inexact in base 2
|
||||
@@ -1481,7 +1481,7 @@ png_pow10(int power)
|
||||
if (power > 0)
|
||||
{
|
||||
/* Decompose power bitwise. */
|
||||
double mult = 10;
|
||||
double mult = 10.0;
|
||||
do
|
||||
{
|
||||
if (power & 1) d *= mult;
|
||||
@@ -1600,7 +1600,8 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
|
||||
{
|
||||
double d;
|
||||
|
||||
fp *= 10;
|
||||
fp *= 10.0;
|
||||
|
||||
/* Use modf here, not floor and subtract, so that
|
||||
* the separation is done in one step. At the end
|
||||
* of the loop don't break the number into parts so
|
||||
@@ -1613,7 +1614,7 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
|
||||
{
|
||||
d = floor(fp + .5);
|
||||
|
||||
if (d > 9)
|
||||
if (d > 9.0)
|
||||
{
|
||||
/* Rounding up to 10, handle that here. */
|
||||
if (czero > 0)
|
||||
@@ -1621,9 +1622,10 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
|
||||
--czero, d = 1;
|
||||
if (cdigits == 0) --clead;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
while (cdigits > 0 && d > 9)
|
||||
while (cdigits > 0 && d > 9.0)
|
||||
{
|
||||
int ch = *--ascii;
|
||||
|
||||
@@ -1648,7 +1650,7 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
|
||||
* exponent but take into account the leading
|
||||
* decimal point.
|
||||
*/
|
||||
if (d > 9) /* cdigits == 0 */
|
||||
if (d > 9.0) /* cdigits == 0 */
|
||||
{
|
||||
if (exp_b10 == (-1))
|
||||
{
|
||||
@@ -1669,18 +1671,19 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
|
||||
++exp_b10;
|
||||
|
||||
/* In all cases we output a '1' */
|
||||
d = 1;
|
||||
d = 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
fp = 0; /* Guarantees termination below. */
|
||||
}
|
||||
|
||||
if (d == 0)
|
||||
if (d == 0.0)
|
||||
{
|
||||
++czero;
|
||||
if (cdigits == 0) ++clead;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
/* Included embedded zeros in the digit count. */
|
||||
@@ -1708,6 +1711,7 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
|
||||
above */
|
||||
--exp_b10;
|
||||
}
|
||||
|
||||
*ascii++ = (char)(48 + (int)d), ++cdigits;
|
||||
}
|
||||
}
|
||||
@@ -2174,9 +2178,9 @@ png_64bit_product (long v1, long v2, unsigned long *hi_product,
|
||||
static png_uint_32
|
||||
png_8bit_l2[128] =
|
||||
{
|
||||
# if PNG_DO_BC
|
||||
# ifdef PNG_DO_BC
|
||||
for (i=128;i<256;++i) { .5 - l(i/255)/l(2)*65536*65536; }
|
||||
# endif
|
||||
# else
|
||||
4270715492U, 4222494797U, 4174646467U, 4127164793U, 4080044201U, 4033279239U,
|
||||
3986864580U, 3940795015U, 3895065449U, 3849670902U, 3804606499U, 3759867474U,
|
||||
3715449162U, 3671346997U, 3627556511U, 3584073329U, 3540893168U, 3498011834U,
|
||||
@@ -2199,6 +2203,8 @@ png_8bit_l2[128] =
|
||||
324227938U, 298676034U, 273229066U, 247886176U, 222646516U, 197509248U,
|
||||
172473545U, 147538590U, 122703574U, 97967701U, 73330182U, 48790236U,
|
||||
24347096U, 0U
|
||||
# endif
|
||||
|
||||
#if 0
|
||||
/* The following are the values for 16-bit tables - these work fine for the
|
||||
* 8-bit conversions but produce very slightly larger errors in the 16-bit
|
||||
@@ -2333,7 +2339,7 @@ png_log16bit(png_uint_32 x)
|
||||
* integer bits (the top 4) simply determine a shift.
|
||||
*
|
||||
* The worst case is the 16-bit distinction between 65535 and 65534, this
|
||||
* requires perhaps spurious accuracty in the decoding of the logarithm to
|
||||
* requires perhaps spurious accuracy in the decoding of the logarithm to
|
||||
* distinguish log2(65535/65534.5) - 10^-5 or 17 bits. There is little chance
|
||||
* of getting this accuracy in practice.
|
||||
*
|
||||
@@ -2344,17 +2350,18 @@ png_log16bit(png_uint_32 x)
|
||||
static png_uint_32
|
||||
png_32bit_exp[16] =
|
||||
{
|
||||
# if PNG_DO_BC
|
||||
# ifdef PNG_DO_BC
|
||||
for (i=0;i<16;++i) { .5 + e(-i/16*l(2))*2^32; }
|
||||
# endif
|
||||
# else
|
||||
/* NOTE: the first entry is deliberately set to the maximum 32-bit value. */
|
||||
4294967295U, 4112874773U, 3938502376U, 3771522796U, 3611622603U, 3458501653U,
|
||||
3311872529U, 3171459999U, 3037000500U, 2908241642U, 2784941738U, 2666869345U,
|
||||
2553802834U, 2445529972U, 2341847524U, 2242560872U
|
||||
# endif
|
||||
};
|
||||
|
||||
/* Adjustment table; provided to explain the numbers in the code below. */
|
||||
#if PNG_DO_BC
|
||||
#ifdef PNG_DO_BC
|
||||
for (i=11;i>=0;--i){ print i, " ", (1 - e(-(2^i)/65536*l(2))) * 2^(32-i), "\n"}
|
||||
11 44937.64284865548751208448
|
||||
10 45180.98734845585101160448
|
||||
@@ -2517,7 +2524,7 @@ png_gamma_significant(png_fixed_point gamma_val)
|
||||
}
|
||||
|
||||
/* Internal function to build a single 16-bit table - the table consists of
|
||||
* 'num' 256 entry subtables, where 'num' is determined by 'shift' - the amount
|
||||
* 'num' 256-entry subtables, where 'num' is determined by 'shift' - the amount
|
||||
* to shift the input values right (or 16-number_of_signifiant_bits).
|
||||
*
|
||||
* The caller is responsible for ensuring that the table gets cleaned up on
|
||||
@@ -2604,9 +2611,9 @@ png_build_16to8_table(png_structp png_ptr, png_uint_16pp *ptable,
|
||||
png_uint_16pp table = *ptable =
|
||||
(png_uint_16pp)png_calloc(png_ptr, num * png_sizeof(png_uint_16p));
|
||||
|
||||
/* 'num' is the number of tables and also the number of low bits of low
|
||||
* bits of the input 16-bit value used to select a table. Each table is
|
||||
* itself index by the high 8 bits of the value.
|
||||
/* 'num' is the number of tables and also the number of low bits of the
|
||||
* input 16-bit value used to select a table. Each table is itself indexed
|
||||
* by the high 8 bits of the value.
|
||||
*/
|
||||
for (i = 0; i < num; i++)
|
||||
table[i] = (png_uint_16p)png_malloc(png_ptr,
|
||||
@@ -2657,7 +2664,7 @@ png_build_16to8_table(png_structp png_ptr, png_uint_16pp *ptable,
|
||||
|
||||
/* Build a single 8-bit table: same as the 16-bit case but much simpler (and
|
||||
* typically much faster). Note that libpng currently does no sBIT processing
|
||||
* (apparently contrary to the spec) so a 256 entry table is always generated.
|
||||
* (apparently contrary to the spec) so a 256-entry table is always generated.
|
||||
*/
|
||||
static void
|
||||
png_build_8bit_table(png_structp png_ptr, png_bytepp ptable,
|
||||
@@ -2793,7 +2800,7 @@ png_build_gamma_table(png_structp png_ptr, int bit_depth)
|
||||
* Where 'iv' is the input color value and 'ov' is the output value -
|
||||
* pow(iv, gamma).
|
||||
*
|
||||
* Thus the gamma table consists of up to 256 256 entry tables. The table
|
||||
* Thus the gamma table consists of up to 256 256-entry tables. The table
|
||||
* is selected by the (8-gamma_shift) most significant of the low 8 bits of
|
||||
* the color value then indexed by the upper 8 bits:
|
||||
*
|
||||
@@ -2864,262 +2871,4 @@ png_build_gamma_table(png_structp png_ptr, int bit_depth)
|
||||
}
|
||||
}
|
||||
#endif /* READ_GAMMA */
|
||||
|
||||
/* sRGB support */
|
||||
#if defined PNG_SIMPLIFIED_READ_SUPPORTED ||\
|
||||
defined PNG_SIMPLIFIED_WRITE_SUPPORTED
|
||||
/* sRGB conversion tables; these are machine generated with the code in
|
||||
* contrib/sRGBtables/makesRGB.c. The sRGB to linear table is exact (to the
|
||||
* nearest 16 bit linear fraction). The inverse (linear to sRGB) table has
|
||||
* accuracies as follows:
|
||||
*
|
||||
* For all possible (255*65535+1) input values:
|
||||
*
|
||||
* error: -0.515566 - 0.625971, 79441 (0.475369%) of readings inexact
|
||||
*
|
||||
* For the input values corresponding to the 65536 16-bit values:
|
||||
*
|
||||
* error: -0.513727 - 0.607759, 308 (0.469978%) of readings inexact
|
||||
*
|
||||
* In all cases the inexact readings are off by one.
|
||||
*/
|
||||
|
||||
#ifdef PNG_SIMPLIFIED_READ_SUPPORTED
|
||||
/* The convert-to-sRGB table is only currently required for read. */
|
||||
PNG_CONST_DATA png_uint_16 png_sRGB_table[256] =
|
||||
{
|
||||
0,20,40,60,80,99,119,139,
|
||||
159,179,199,219,241,264,288,313,
|
||||
340,367,396,427,458,491,526,562,
|
||||
599,637,677,718,761,805,851,898,
|
||||
947,997,1048,1101,1156,1212,1270,1330,
|
||||
1391,1453,1517,1583,1651,1720,1790,1863,
|
||||
1937,2013,2090,2170,2250,2333,2418,2504,
|
||||
2592,2681,2773,2866,2961,3058,3157,3258,
|
||||
3360,3464,3570,3678,3788,3900,4014,4129,
|
||||
4247,4366,4488,4611,4736,4864,4993,5124,
|
||||
5257,5392,5530,5669,5810,5953,6099,6246,
|
||||
6395,6547,6700,6856,7014,7174,7335,7500,
|
||||
7666,7834,8004,8177,8352,8528,8708,8889,
|
||||
9072,9258,9445,9635,9828,10022,10219,10417,
|
||||
10619,10822,11028,11235,11446,11658,11873,12090,
|
||||
12309,12530,12754,12980,13209,13440,13673,13909,
|
||||
14146,14387,14629,14874,15122,15371,15623,15878,
|
||||
16135,16394,16656,16920,17187,17456,17727,18001,
|
||||
18277,18556,18837,19121,19407,19696,19987,20281,
|
||||
20577,20876,21177,21481,21787,22096,22407,22721,
|
||||
23038,23357,23678,24002,24329,24658,24990,25325,
|
||||
25662,26001,26344,26688,27036,27386,27739,28094,
|
||||
28452,28813,29176,29542,29911,30282,30656,31033,
|
||||
31412,31794,32179,32567,32957,33350,33745,34143,
|
||||
34544,34948,35355,35764,36176,36591,37008,37429,
|
||||
37852,38278,38706,39138,39572,40009,40449,40891,
|
||||
41337,41785,42236,42690,43147,43606,44069,44534,
|
||||
45002,45473,45947,46423,46903,47385,47871,48359,
|
||||
48850,49344,49841,50341,50844,51349,51858,52369,
|
||||
52884,53401,53921,54445,54971,55500,56032,56567,
|
||||
57105,57646,58190,58737,59287,59840,60396,60955,
|
||||
61517,62082,62650,63221,63795,64372,64952,65535
|
||||
};
|
||||
|
||||
#endif /* simplified read only */
|
||||
|
||||
/* The base/delta tables are required for both read and write (but currently
|
||||
* only the simplified versions.)
|
||||
*/
|
||||
PNG_CONST_DATA png_uint_16 png_sRGB_base[512] =
|
||||
{
|
||||
128,1782,3383,4644,5675,6564,7357,8074,
|
||||
8732,9346,9921,10463,10977,11466,11935,12384,
|
||||
12816,13233,13634,14024,14402,14769,15125,15473,
|
||||
15812,16142,16466,16781,17090,17393,17690,17981,
|
||||
18266,18546,18822,19093,19359,19621,19879,20133,
|
||||
20383,20630,20873,21113,21349,21583,21813,22041,
|
||||
22265,22487,22707,22923,23138,23350,23559,23767,
|
||||
23972,24175,24376,24575,24772,24967,25160,25352,
|
||||
25542,25730,25916,26101,26284,26465,26645,26823,
|
||||
27000,27176,27350,27523,27695,27865,28034,28201,
|
||||
28368,28533,28697,28860,29021,29182,29341,29500,
|
||||
29657,29813,29969,30123,30276,30429,30580,30730,
|
||||
30880,31028,31176,31323,31469,31614,31758,31902,
|
||||
32045,32186,32327,32468,32607,32746,32884,33021,
|
||||
33158,33294,33429,33564,33697,33831,33963,34095,
|
||||
34226,34357,34486,34616,34744,34873,35000,35127,
|
||||
35253,35379,35504,35629,35753,35876,35999,36122,
|
||||
36244,36365,36486,36606,36726,36845,36964,37083,
|
||||
37201,37318,37435,37551,37668,37783,37898,38013,
|
||||
38127,38241,38354,38467,38580,38692,38803,38915,
|
||||
39026,39136,39246,39356,39465,39574,39682,39790,
|
||||
39898,40005,40112,40219,40325,40431,40537,40642,
|
||||
40747,40851,40955,41059,41163,41266,41369,41471,
|
||||
41573,41675,41777,41878,41979,42079,42179,42279,
|
||||
42379,42478,42577,42676,42775,42873,42971,43068,
|
||||
43165,43262,43359,43456,43552,43648,43743,43839,
|
||||
43934,44028,44123,44217,44311,44405,44499,44592,
|
||||
44685,44778,44870,44962,45054,45146,45238,45329,
|
||||
45420,45511,45601,45692,45782,45872,45961,46051,
|
||||
46140,46229,46318,46406,46494,46583,46670,46758,
|
||||
46846,46933,47020,47107,47193,47280,47366,47452,
|
||||
47538,47623,47709,47794,47879,47964,48048,48133,
|
||||
48217,48301,48385,48468,48552,48635,48718,48801,
|
||||
48884,48966,49048,49131,49213,49294,49376,49458,
|
||||
49539,49620,49701,49782,49862,49943,50023,50103,
|
||||
50183,50263,50342,50422,50501,50580,50659,50738,
|
||||
50816,50895,50973,51051,51129,51207,51285,51362,
|
||||
51439,51517,51594,51671,51747,51824,51900,51977,
|
||||
52053,52129,52205,52280,52356,52432,52507,52582,
|
||||
52657,52732,52807,52881,52956,53030,53104,53178,
|
||||
53252,53326,53400,53473,53546,53620,53693,53766,
|
||||
53839,53911,53984,54056,54129,54201,54273,54345,
|
||||
54417,54489,54560,54632,54703,54774,54845,54916,
|
||||
54987,55058,55129,55199,55269,55340,55410,55480,
|
||||
55550,55620,55689,55759,55828,55898,55967,56036,
|
||||
56105,56174,56243,56311,56380,56448,56517,56585,
|
||||
56653,56721,56789,56857,56924,56992,57059,57127,
|
||||
57194,57261,57328,57395,57462,57529,57595,57662,
|
||||
57728,57795,57861,57927,57993,58059,58125,58191,
|
||||
58256,58322,58387,58453,58518,58583,58648,58713,
|
||||
58778,58843,58908,58972,59037,59101,59165,59230,
|
||||
59294,59358,59422,59486,59549,59613,59677,59740,
|
||||
59804,59867,59930,59993,60056,60119,60182,60245,
|
||||
60308,60370,60433,60495,60558,60620,60682,60744,
|
||||
60806,60868,60930,60992,61054,61115,61177,61238,
|
||||
61300,61361,61422,61483,61544,61605,61666,61727,
|
||||
61788,61848,61909,61969,62030,62090,62150,62211,
|
||||
62271,62331,62391,62450,62510,62570,62630,62689,
|
||||
62749,62808,62867,62927,62986,63045,63104,63163,
|
||||
63222,63281,63340,63398,63457,63515,63574,63632,
|
||||
63691,63749,63807,63865,63923,63981,64039,64097,
|
||||
64155,64212,64270,64328,64385,64443,64500,64557,
|
||||
64614,64672,64729,64786,64843,64900,64956,65013,
|
||||
65070,65126,65183,65239,65296,65352,65409,65465
|
||||
};
|
||||
|
||||
PNG_CONST_DATA png_byte png_sRGB_delta[512] =
|
||||
{
|
||||
207,201,158,129,113,100,90,82,77,72,68,64,61,59,56,54,
|
||||
52,50,49,47,46,45,43,42,41,40,39,39,38,37,36,36,
|
||||
35,34,34,33,33,32,32,31,31,30,30,30,29,29,28,28,
|
||||
28,27,27,27,27,26,26,26,25,25,25,25,24,24,24,24,
|
||||
23,23,23,23,23,22,22,22,22,22,22,21,21,21,21,21,
|
||||
21,20,20,20,20,20,20,20,20,19,19,19,19,19,19,19,
|
||||
19,18,18,18,18,18,18,18,18,18,18,17,17,17,17,17,
|
||||
17,17,17,17,17,17,16,16,16,16,16,16,16,16,16,16,
|
||||
16,16,16,16,15,15,15,15,15,15,15,15,15,15,15,15,
|
||||
15,15,15,15,14,14,14,14,14,14,14,14,14,14,14,14,
|
||||
14,14,14,14,14,14,14,13,13,13,13,13,13,13,13,13,
|
||||
13,13,13,13,13,13,13,13,13,13,13,13,13,13,12,12,
|
||||
12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
|
||||
12,12,12,12,12,12,12,12,12,12,12,12,11,11,11,11,
|
||||
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
||||
11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
|
||||
11,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
||||
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
||||
10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
|
||||
10,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
|
||||
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
|
||||
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
|
||||
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
|
||||
9,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
|
||||
8,8,8,8,8,8,8,8,8,7,7,7,7,7,7,7,
|
||||
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
|
||||
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
|
||||
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
|
||||
};
|
||||
#endif /* SIMPLIFIED READ/WRITE sRGB support */
|
||||
|
||||
/* SIMPLIFIED READ/WRITE SUPPORT */
|
||||
#if defined PNG_SIMPLIFIED_READ_SUPPORTED ||\
|
||||
defined PNG_SIMPLIFIED_WRITE_SUPPORTED
|
||||
static int
|
||||
png_image_free_function(png_voidp argument)
|
||||
{
|
||||
png_imagep image = png_voidcast(png_imagep, argument);
|
||||
png_controlp cp = image->opaque;
|
||||
png_control c;
|
||||
|
||||
/* Double check that we have a png_ptr - it should be impossible to get here
|
||||
* without one.
|
||||
*/
|
||||
if (cp->png_ptr == NULL)
|
||||
return 0;
|
||||
|
||||
/* First free any data held in the control structure. */
|
||||
# ifdef PNG_STDIO_SUPPORTED
|
||||
if (cp->owned_file)
|
||||
{
|
||||
FILE *fp = png_voidcast(FILE*, cp->png_ptr->io_ptr);
|
||||
cp->owned_file = 0;
|
||||
|
||||
/* Ignore errors here. */
|
||||
if (fp != NULL)
|
||||
{
|
||||
cp->png_ptr->io_ptr = NULL;
|
||||
(void)fclose(fp);
|
||||
}
|
||||
}
|
||||
# endif
|
||||
|
||||
/* Copy the control structure so that the original, allocated, version can be
|
||||
* safely freed. Notice that a png_error here stops the remainder of the
|
||||
* cleanup, but this is probably fine because that would indicate bad memory
|
||||
* problems anyway.
|
||||
*/
|
||||
c = *cp;
|
||||
image->opaque = &c;
|
||||
png_free(c.png_ptr, cp);
|
||||
|
||||
/* Then the structures, calling the correct API. */
|
||||
if (c.for_write)
|
||||
{
|
||||
# ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED
|
||||
png_destroy_write_struct(&c.png_ptr, &c.info_ptr);
|
||||
# else
|
||||
png_error(c.png_ptr, "simplified write not supported");
|
||||
# endif
|
||||
}
|
||||
else
|
||||
{
|
||||
# ifdef PNG_SIMPLIFIED_READ_SUPPORTED
|
||||
png_destroy_read_struct(&c.png_ptr, &c.info_ptr, NULL);
|
||||
# else
|
||||
png_error(c.png_ptr, "simplified read not supported");
|
||||
# endif
|
||||
}
|
||||
|
||||
/* Success. */
|
||||
return 1;
|
||||
}
|
||||
|
||||
void PNGAPI
|
||||
png_image_free(png_imagep image)
|
||||
{
|
||||
/* Safely call the real function, but only if doing so is safe at this point
|
||||
* (if not inside an error handling context). Otherwise assume
|
||||
* png_safe_execute will call this API after the return.
|
||||
*/
|
||||
if (image != NULL && image->opaque != NULL &&
|
||||
image->opaque->error_buf == NULL)
|
||||
{
|
||||
/* Ignore errors here: */
|
||||
(void)png_safe_execute(image, png_image_free_function, image);
|
||||
image->opaque = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
int /* PRIVATE */
|
||||
png_image_error(png_imagep image, png_const_charp error_message)
|
||||
{
|
||||
/* Utility to log an error. */
|
||||
png_safecat(image->message, sizeof image->message, 0, error_message);
|
||||
image->warning_or_error = 1;
|
||||
png_image_free(image);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* SIMPLIFIED READ/WRITE */
|
||||
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
|
||||
|
||||
333
png.h
333
png.h
@@ -1,8 +1,8 @@
|
||||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.5.7beta05 - November 22, 2011
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
* libpng version 1.5.10beta03 - March 5, 2012
|
||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@@ -11,7 +11,7 @@
|
||||
* Authors and maintainers:
|
||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
||||
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||
* libpng versions 0.97, January 1998, through 1.5.7beta05 - November 22, 2011: Glenn
|
||||
* libpng versions 0.97, January 1998, through 1.5.10beta03 - March 5, 2012: Glenn
|
||||
* See also "Contributing Authors", below.
|
||||
*
|
||||
* Note about libpng version numbers:
|
||||
@@ -164,6 +164,15 @@
|
||||
* 1.5.6rc01-03 15 10506 15.so.15.6[.0]
|
||||
* 1.5.6 15 10506 15.so.15.6[.0]
|
||||
* 1.5.7beta01-05 15 10507 15.so.15.7[.0]
|
||||
* 1.5.7rc01-03 15 10507 15.so.15.7[.0]
|
||||
* 1.5.7 15 10507 15.so.15.7[.0]
|
||||
* 1.5.8beta01 15 10508 15.so.15.8[.0]
|
||||
* 1.5.8rc01 15 10508 15.so.15.8[.0]
|
||||
* 1.5.8 15 10508 15.so.15.8[.0]
|
||||
* 1.5.9beta01-02 15 10509 15.so.15.9[.0]
|
||||
* 1.5.9rc01 15 10509 15.so.15.9[.0]
|
||||
* 1.5.9 15 10509 15.so.15.9[.0]
|
||||
* 1.5.10beta01-03 15 10510 15.so.15.10[.0]
|
||||
*
|
||||
* Henceforth the source version will match the shared-library major
|
||||
* and minor numbers; the shared-library major version number will be
|
||||
@@ -173,7 +182,7 @@
|
||||
* to the source version x.y.z (leading zeros in y and z). Beta versions
|
||||
* were given the previous public release number plus a letter, until
|
||||
* version 1.0.6j; from then on they were given the upcoming public
|
||||
* release number plus "betaNN" or "rcN".
|
||||
* release number plus "betaNN" or "rcNN".
|
||||
*
|
||||
* Binary incompatibility exists only when applications make direct access
|
||||
* to the info_ptr or png_ptr members through png.h, and the compiled
|
||||
@@ -195,8 +204,8 @@
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
*
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.5.7beta05, November 22, 2011, are
|
||||
* Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.5.10beta03, March 5, 2012, are
|
||||
* Copyright (c) 2004, 2006-2012 Glenn Randers-Pehrson, and are
|
||||
* distributed according to the same disclaimer and license as libpng-1.2.5
|
||||
* with the following individual added to the list of Contributing Authors:
|
||||
*
|
||||
@@ -307,13 +316,13 @@
|
||||
* Y2K compliance in libpng:
|
||||
* =========================
|
||||
*
|
||||
* November 22, 2011
|
||||
* March 5, 2012
|
||||
*
|
||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||
* an official declaration.
|
||||
*
|
||||
* This is your unofficial assurance that libpng from version 0.71 and
|
||||
* upward through 1.5.7beta05 are Y2K compliant. It is my belief that
|
||||
* upward through 1.5.10beta03 are Y2K compliant. It is my belief that
|
||||
* earlier versions were also Y2K compliant.
|
||||
*
|
||||
* Libpng only has two year fields. One is a 2-byte unsigned integer
|
||||
@@ -371,9 +380,9 @@
|
||||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.5.7beta05"
|
||||
#define PNG_LIBPNG_VER_STRING "1.5.10beta03"
|
||||
#define PNG_HEADER_VERSION_STRING \
|
||||
" libpng version 1.5.7beta05 - November 22, 2011\n"
|
||||
" libpng version 1.5.10beta03 - March 5, 2012\n"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 15
|
||||
#define PNG_LIBPNG_VER_DLLNUM 15
|
||||
@@ -381,12 +390,13 @@
|
||||
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
||||
#define PNG_LIBPNG_VER_MAJOR 1
|
||||
#define PNG_LIBPNG_VER_MINOR 5
|
||||
#define PNG_LIBPNG_VER_RELEASE 7
|
||||
#define PNG_LIBPNG_VER_RELEASE 10
|
||||
|
||||
/* This should match the numeric part of the final component of
|
||||
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
|
||||
*/
|
||||
|
||||
#define PNG_LIBPNG_VER_BUILD 02
|
||||
#define PNG_LIBPNG_VER_BUILD 03
|
||||
|
||||
/* Release Status */
|
||||
#define PNG_LIBPNG_BUILD_ALPHA 1
|
||||
@@ -411,7 +421,7 @@
|
||||
* version 1.0.0 was mis-numbered 100 instead of 10000). From
|
||||
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
|
||||
*/
|
||||
#define PNG_LIBPNG_VER 10507 /* 1.5.7 */
|
||||
#define PNG_LIBPNG_VER 10510 /* 1.5.10 */
|
||||
|
||||
/* Library configuration: these options cannot be changed after
|
||||
* the library has been built.
|
||||
@@ -491,7 +501,6 @@ extern "C" {
|
||||
* 2. Type definitions (base types are defined in pngconf.h), structure
|
||||
* definitions.
|
||||
* 3. Exported library functions.
|
||||
* 4. Simplified API.
|
||||
*
|
||||
* The library source code has additional files (principally pngpriv.h) that
|
||||
* allow configuration of the library.
|
||||
@@ -534,7 +543,7 @@ extern "C" {
|
||||
/* This triggers a compiler error in png.c, if png.c and png.h
|
||||
* do not agree upon the version number.
|
||||
*/
|
||||
typedef char* png_libpng_version_1_5_7beta05;
|
||||
typedef char* png_libpng_version_1_5_10beta03;
|
||||
|
||||
/* Three color definitions. The order of the red, green, and blue, (and the
|
||||
* exact size) is not important, although the size of the fields need to
|
||||
@@ -2629,296 +2638,12 @@ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i));
|
||||
: (png_int_32)png_get_uint_32(buf)))
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
* SIMPLIFIED API
|
||||
*******************************************************************************
|
||||
*
|
||||
* Please read the documentation in libpng-manual.txt if you don't understand
|
||||
* what follows.
|
||||
*
|
||||
* The simplified API hides the details of both libpng and the PNG file format
|
||||
* itself. It allows PNG files to be read into a very limited number of
|
||||
* in-memory bitmap formats or to be written from the same formats. If these
|
||||
* formats do not accomodate your needs then you can, and should, use the more
|
||||
* sophisticated APIs above - these support a wide variety of in-memory formats
|
||||
* and a wide variety of sophisticated transformations to those formats as well
|
||||
* as a wide variety of APIs to manipulate ancilliary information.
|
||||
*
|
||||
* To read a PNG file using the simplified API:
|
||||
*
|
||||
* 1) Declare a 'png_image' structure (see below) on the stack and memset() it
|
||||
* to all zero.
|
||||
* 2) Call the appropriate png_image_begin_read... function.
|
||||
* 3) Set the png_image 'format' member to the required format and allocate a
|
||||
* buffer for the image.
|
||||
* 4) Call png_image_finish_read to read the image into your buffer.
|
||||
*
|
||||
* There are no restrictions on the format of the PNG input itself; all valid
|
||||
* color types, bit depths, and interlace methods are acceptable, and the
|
||||
* input image is transformed as necessary to the requested in-memory format
|
||||
* during the png_image_finish_read() step.
|
||||
*
|
||||
* To write a PNG file using the simplified API:
|
||||
*
|
||||
* 1) Declare a 'png_image' structure on the stack and memset() it to all zero.
|
||||
* 2) Initialize the members of the structure that describe the image, setting
|
||||
* the 'format' member to the format of the image in memory.
|
||||
* 3) Call the appropriate png_image_write... function with a pointer to the
|
||||
* image to write the PNG data.
|
||||
*
|
||||
* png_image is a structure that describes the in-memory format of an image
|
||||
* when it is being read or define the in-memory format of an image that you
|
||||
* need to write:
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct png_control *png_controlp;
|
||||
typedef struct
|
||||
{
|
||||
png_uint_32 width; /* Image width in pixels (columns) */
|
||||
png_uint_32 height; /* Image height in pixels (rows) */
|
||||
png_uint_32 format; /* Image format as defined below */
|
||||
png_uint_32 flags; /* A bit mask containing informational flags */
|
||||
png_controlp opaque; /* Initialize to NULL, free with png_image_free */
|
||||
|
||||
/* In the event of an error or warning the following field will be set to a
|
||||
* non-zero value and the 'message' field will contain a '\0' terminated
|
||||
* string with the libpng error or warning message. If both warnings and
|
||||
* an error were encountered, only the error is recorded. If there
|
||||
* are multiple warnings, only the first one is recorded.
|
||||
*
|
||||
* As of libpng-1.5.7 the values are
|
||||
* 0 - no warning or error
|
||||
* 1 - error
|
||||
* 2 - warning
|
||||
*/
|
||||
png_uint_32 warning_or_error;
|
||||
char message[64];
|
||||
} png_image, *png_imagep;
|
||||
|
||||
/* The pixels (samples) of the image have one to four channels whose components
|
||||
* have original values in the range 0 to 1.0:
|
||||
*
|
||||
* 1: A single gray or luminance channel (G).
|
||||
* 2: A gray/luminance channel and an alpha channel (GA).
|
||||
* 3: Three red, green, blue color channels (RGB).
|
||||
* 4: Three color channels and an alpha channel (RGBA).
|
||||
*
|
||||
* The channels are encoded in one of two ways:
|
||||
*
|
||||
* a) As a small integer, value 0..255, contained in a (png_byte). For the
|
||||
* alpha channel the original value is simply value/255. For the color or
|
||||
* luminance channels the value is encoded according to the sRGB specification
|
||||
* and matches the 8-bit format expected by typical display devices.
|
||||
*
|
||||
* The color/gray channels are not scaled (pre-multiplied) by the alpha
|
||||
* channel and are suitable for passing to color management software.
|
||||
*
|
||||
* b) As a value in the range 0..65535, contained in a (png_uint_16). All
|
||||
* channels can be converted to the original value by dividing by 65535; all
|
||||
* channels are linear. Color channels use the RGB encoding (RGB end-points) of
|
||||
* the sRGB specification. This encoding is identified by the
|
||||
* PNG_FORMAT_FLAG_LINEAR flag below.
|
||||
*
|
||||
* When an alpha channel is present it is expected to denote pixel coverage
|
||||
* of the color or luminance channels and is returned as an associated alpha
|
||||
* channel: the color/gray channels are scaled (pre-multiplied) by the alpha
|
||||
* value.
|
||||
*/
|
||||
|
||||
/* PNG_FORMAT_*
|
||||
*
|
||||
* #defines to be used in png_image::format. Each #define identifies a
|
||||
* particular layout of channel data and, if present, alpha values. There are
|
||||
* separate defines for each of the two channel encodings.
|
||||
*
|
||||
* A format is built up using single bit flag values. Not all combinations are
|
||||
* valid: use the bit flag values below for testing a format returned by the
|
||||
* read APIs, but set formats from the derived values.
|
||||
*
|
||||
* NOTE: libpng can be built with particular features disabled, if you see
|
||||
* compiler errors because the definition of one of the following flags has been
|
||||
* compiled out it is because libpng does not have the required support. It is
|
||||
* possible, however, for the libpng configuration to enable the format on just
|
||||
* read or just write; in that case you may see an error at run time. You can
|
||||
* guard against this by checking for the definition of:
|
||||
*
|
||||
* PNG_SIMPLIFIED_{READ,WRITE}_{BGR,AFIRST}_SUPPORTED
|
||||
*/
|
||||
#define PNG_FORMAT_FLAG_ALPHA 0x01 /* format with an alpha channel */
|
||||
#define PNG_FORMAT_FLAG_COLOR 0x02 /* color format: otherwise grayscale */
|
||||
#define PNG_FORMAT_FLAG_LINEAR 0x04 /* png_uint_16 channels else png_byte */
|
||||
|
||||
#ifdef PNG_FORMAT_BGR_SUPPORTED
|
||||
# define PNG_FORMAT_FLAG_BGR 0x08 /* BGR colors, else order is RGB */
|
||||
#if defined(PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED) || \
|
||||
defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED)
|
||||
PNG_EXPORT(234, void, png_set_check_for_invalid_index, (png_structp png_ptr,
|
||||
int allowed));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_FORMAT_AFIRST_SUPPORTED
|
||||
# define PNG_FORMAT_FLAG_AFIRST 0x10 /* alpha channel comes first */
|
||||
#endif
|
||||
|
||||
/* Supported formats are as follows. Future versions of libpng may support more
|
||||
* formats; for compatibility with older versions simply check if the format
|
||||
* macro is defined using #ifdef. These defines describe the in-memory layout
|
||||
* of the components of the pixels of the image.
|
||||
*
|
||||
* First the single byte formats:
|
||||
*/
|
||||
#define PNG_FORMAT_GRAY 0
|
||||
#define PNG_FORMAT_GA PNG_FORMAT_FLAG_ALPHA
|
||||
#define PNG_FORMAT_AG (PNG_FORMAT_GA|PNG_FORMAT_FLAG_AFIRST)
|
||||
#define PNG_FORMAT_RGB PNG_FORMAT_FLAG_COLOR
|
||||
#define PNG_FORMAT_BGR (PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_BGR)
|
||||
#define PNG_FORMAT_RGBA (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_ALPHA)
|
||||
#define PNG_FORMAT_ARGB (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_AFIRST)
|
||||
#define PNG_FORMAT_BGRA (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_ALPHA)
|
||||
#define PNG_FORMAT_ABGR (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_AFIRST)
|
||||
|
||||
/* Then the linear (png_uint_16) formats. When naming these "Y" is used to
|
||||
* indicate a luminance (gray) channel. The component order within the pixel
|
||||
* is always the same - there is no provision for swapping the order of the
|
||||
* components in the linear format.
|
||||
*/
|
||||
#define PNG_FORMAT_LINEAR_Y PNG_FORMAT_FLAG_LINEAR
|
||||
#define PNG_FORMAT_LINEAR_Y_ALPHA (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_ALPHA)
|
||||
#define PNG_FORMAT_LINEAR_RGB (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR)
|
||||
#define PNG_FORMAT_LINEAR_RGB_ALPHA \
|
||||
(PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_ALPHA)
|
||||
|
||||
/* PNG_IMAGE macros
|
||||
*
|
||||
* These are convenience macros to derive information from a png_image structure
|
||||
*/
|
||||
#define PNG_IMAGE_CHANNELS(fmt)\
|
||||
(1+((fmt)&(PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_ALPHA)))
|
||||
/* Return the total number of channels in a given format: 1..4 */
|
||||
|
||||
#define PNG_IMAGE_COMPONENT_SIZE(fmt)\
|
||||
(((fmt) & PNG_FORMAT_FLAG_LINEAR) ? sizeof (png_uint_16) : sizeof (png_byte))
|
||||
/* Return the size in bytes of a single component of a pixel in the image. */
|
||||
|
||||
#define PNG_IMAGE_PIXEL_SIZE(fmt)\
|
||||
(PNG_IMAGE_CHANNELS(fmt) * PNG_IMAGE_COMPONENT_SIZE(fmt))
|
||||
/* Return the size in bytes of a single pixel in the image. */
|
||||
|
||||
#define PNG_IMAGE_ROW_STRIDE(image)\
|
||||
(PNG_IMAGE_CHANNELS((image).format) * (image).width)
|
||||
/* Return the total number of components in a single row of the image; this
|
||||
* is the minimum 'row stride', the minimum count of components between each
|
||||
* row.
|
||||
*/
|
||||
|
||||
#define PNG_IMAGE_BUFFER_SIZE(image, row_stride)\
|
||||
(PNG_IMAGE_COMPONENT_SIZE((image).format) * (image).height * (row_stride))
|
||||
/* Return the size, in bytes, of an image buffer given a png_image and a row
|
||||
* stride - the number of components to leave space for in each row.
|
||||
*/
|
||||
|
||||
#define PNG_IMAGE_SIZE(image)\
|
||||
PNG_IMAGE_BUFFER_SIZE(image, PNG_IMAGE_ROW_STRIDE(image))
|
||||
/* Return the size, in bytes, of the image in memory given just a png_image;
|
||||
* the row stride is the minimum stride required for the image.
|
||||
*/
|
||||
|
||||
/* PNG_IMAGE_FLAG_*
|
||||
*
|
||||
* Flags containing additional information about the image are held in the
|
||||
* 'flags' field of png_image.
|
||||
*/
|
||||
#define PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB 1
|
||||
/* This indicates the the RGB values of the in-memory bitmap do not
|
||||
* correspond to the red, green and blue end-points defined by sRGB.
|
||||
*/
|
||||
|
||||
#ifdef PNG_SIMPLIFIED_READ_SUPPORTED
|
||||
/* READ APIs
|
||||
* ---------
|
||||
*
|
||||
* The png_image passed to the read APIs must have been initialized by setting
|
||||
* the png_controlp field 'opaque' to NULL (or, better, memset the whole thing.)
|
||||
*/
|
||||
#ifdef PNG_STDIO_SUPPORTED
|
||||
PNG_EXPORT(234, int, png_image_begin_read_from_file, (png_imagep image,
|
||||
const char *file_name));
|
||||
/* The named file is opened for read and the image header is filled in
|
||||
* from the PNG header in the file.
|
||||
*/
|
||||
|
||||
PNG_EXPORT(235, int, png_image_begin_read_from_stdio, (png_imagep image,
|
||||
FILE* file));
|
||||
/* The PNG header is read from the stdio FILE object. */
|
||||
#endif /* PNG_STDIO_SUPPORTED */
|
||||
|
||||
PNG_EXPORT(236, int, png_image_begin_read_from_memory, (png_imagep image,
|
||||
png_const_voidp memory, png_size_t size));
|
||||
/* The PNG header is read from the given memory buffer. */
|
||||
|
||||
PNG_EXPORT(237, int, png_image_finish_read, (png_imagep image,
|
||||
png_colorp background, void *buffer, png_int_32 row_stride));
|
||||
/* Finish reading the image into the supplied buffer and clean up the
|
||||
* png_image structure.
|
||||
*
|
||||
* row_stride is the step, in png_byte or png_uint_16 units as appropriate,
|
||||
* between adjacent rows. A positive stride indicates that the top-most row
|
||||
* is first in the buffer - the normal top-down arrangement. A negative
|
||||
* stride indicates that the bottom-most row is first in the buffer.
|
||||
*
|
||||
* background need only be supplied if an alpha channel must be removed from
|
||||
* a png_byte format and the removal is to be done by compositing on a solid
|
||||
* color; otherwise it may be NULL and any composition will be done directly
|
||||
* onto the buffer. The value is an sRGB color to use for the background,
|
||||
* for grayscale output the green channel is used.
|
||||
*
|
||||
* For linear output removing the alpha channel is always done by compositing
|
||||
* on black.
|
||||
*/
|
||||
|
||||
PNG_EXPORT(238, void, png_image_free, (png_imagep image));
|
||||
/* Free any data allocated by libpng in image->opaque, setting the pointer to
|
||||
* NULL. May be called at any time after the structure is initialized.
|
||||
*/
|
||||
#endif /* PNG_SIMPLIFIED_READ_SUPPORTED */
|
||||
|
||||
#ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED
|
||||
/* WRITE APIS
|
||||
* ----------
|
||||
* For write you must initialize a png_image structure to describe the image to
|
||||
* be written:
|
||||
*
|
||||
* opaque: must be initialized to NULL
|
||||
* width: image width in pixels
|
||||
* height: image height in rows
|
||||
* format: the format of the data you wish to write
|
||||
* flags: set to 0 unless one of the defined flags applies; set
|
||||
* PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB for color format images where the RGB
|
||||
* values do not correspond to the colors in sRGB.
|
||||
*/
|
||||
PNG_EXPORT(239, int, png_image_write_to_file, (png_imagep image,
|
||||
const char *file, int convert_to_8bit, const void *buffer,
|
||||
png_int_32 row_stride));
|
||||
/* Write the image to the named file. */
|
||||
|
||||
PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file,
|
||||
int convert_to_8_bit, const void *buffer, png_int_32 row_stride));
|
||||
/* Write the image to the given (FILE*). */
|
||||
|
||||
/* With all write APIs if image is in one of the linear formats with
|
||||
* (png_uint_16) data then setting convert_to_8_bit will cause the output to be
|
||||
* a (png_byte) PNG gamma encoded according to the sRGB specification, otherwise
|
||||
* a 16-bit linear encoded PNG file is written.
|
||||
*
|
||||
* With all APIs row_stride is handled as in the read APIs - it is the spacing
|
||||
* from one row to the next in component sized units (float) and if negative
|
||||
* indicates a bottom-up row layout in the buffer.
|
||||
*
|
||||
* Note that the write API does not support interlacing, sub-8-bit pixels,
|
||||
* and indexed (paletted) images.
|
||||
*/
|
||||
#endif /* PNG_SIMPLIFIED_WRITE_SUPPORTED */
|
||||
/*******************************************************************************
|
||||
* END OF SIMPLIFIED API
|
||||
******************************************************************************/
|
||||
|
||||
/* Maintainer: Put new public prototypes here ^, in libpng.3, and project
|
||||
* defs
|
||||
*/
|
||||
@@ -2928,7 +2653,7 @@ PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file,
|
||||
* scripts/symbols.def as well.
|
||||
*/
|
||||
#ifdef PNG_EXPORT_LAST_ORDINAL
|
||||
PNG_EXPORT_LAST_ORDINAL(240);
|
||||
PNG_EXPORT_LAST_ORDINAL(234);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
/* pngconf.h - machine configurable file for libpng
|
||||
*
|
||||
* libpng version 1.5.7beta05 - November 18, 2011
|
||||
* libpng version 1.5.10beta03 - March 5, 2012
|
||||
*
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@@ -366,10 +366,10 @@
|
||||
# define PNG_USE_RESULT /* not supported */
|
||||
# endif
|
||||
# ifndef PNG_NORETURN
|
||||
# define PNG_NORETURN __declspec(noreturn)
|
||||
# define PNG_NORETURN __declspec(noreturn)
|
||||
# endif
|
||||
# ifndef PNG_ALLOCATED
|
||||
# if defined(_MSC_VER) && (_MSC_VER >= 1300)
|
||||
# if (_MSC_VER >= 1400)
|
||||
# define PNG_ALLOCATED __declspec(restrict)
|
||||
# endif
|
||||
# endif
|
||||
|
||||
152
pngerror.c
152
pngerror.c
@@ -1,8 +1,8 @@
|
||||
|
||||
/* pngerror.c - stub functions for i/o and memory allocation
|
||||
*
|
||||
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.5.8 [February 1, 2011]
|
||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@@ -281,35 +281,40 @@ void
|
||||
png_formatted_warning(png_structp png_ptr, png_warning_parameters p,
|
||||
png_const_charp message)
|
||||
{
|
||||
/* The internal buffer is just 128 bytes - enough for all our messages,
|
||||
* overflow doesn't happen because this code checks!
|
||||
/* The internal buffer is just 192 bytes - enough for all our messages,
|
||||
* overflow doesn't happen because this code checks! If someone figures
|
||||
* out how to send us a message longer than 192 bytes, all that will
|
||||
* happen is that the message will be truncated appropriately.
|
||||
*/
|
||||
size_t i;
|
||||
char msg[128];
|
||||
size_t i = 0; /* Index in the msg[] buffer: */
|
||||
char msg[192];
|
||||
|
||||
for (i=0; i<(sizeof msg)-1 && *message != '\0'; ++i)
|
||||
/* Each iteration through the following loop writes at most one character
|
||||
* to msg[i++] then returns here to validate that there is still space for
|
||||
* the trailing '\0'. It may (in the case of a parameter) read more than
|
||||
* one character from message[]; it must check for '\0' and continue to the
|
||||
* test if it finds the end of string.
|
||||
*/
|
||||
while (i<(sizeof msg)-1 && *message != '\0')
|
||||
{
|
||||
if (*message == '@')
|
||||
/* '@' at end of string is now just printed (previously it was skipped);
|
||||
* it is an error in the calling code to terminate the string with @.
|
||||
*/
|
||||
if (p != NULL && *message == '@' && message[1] != '\0')
|
||||
{
|
||||
int parameter = -1;
|
||||
switch (*++message)
|
||||
{
|
||||
case '1':
|
||||
parameter = 0;
|
||||
break;
|
||||
int parameter_char = *++message; /* Consume the '@' */
|
||||
static const char valid_parameters[] = "123456789";
|
||||
int parameter = 0;
|
||||
|
||||
case '2':
|
||||
parameter = 1;
|
||||
break;
|
||||
/* Search for the parameter digit, the index in the string is the
|
||||
* parameter to use.
|
||||
*/
|
||||
while (valid_parameters[parameter] != parameter_char &&
|
||||
valid_parameters[parameter] != '\0')
|
||||
++parameter;
|
||||
|
||||
case '\0':
|
||||
continue; /* To break out of the for loop above. */
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (parameter >= 0 && parameter < PNG_WARNING_PARAMETER_COUNT)
|
||||
/* If the parameter digit is out of range it will just get printed. */
|
||||
if (parameter < PNG_WARNING_PARAMETER_COUNT)
|
||||
{
|
||||
/* Append this parameter */
|
||||
png_const_charp parm = p[parameter];
|
||||
@@ -319,28 +324,32 @@ png_formatted_warning(png_structp png_ptr, png_warning_parameters p,
|
||||
* that parm[] has been initialized, so there is no guarantee of a
|
||||
* trailing '\0':
|
||||
*/
|
||||
for (; i<(sizeof msg)-1 && parm != '\0' && parm < pend; ++i)
|
||||
msg[i] = *parm++;
|
||||
while (i<(sizeof msg)-1 && *parm != '\0' && parm < pend)
|
||||
msg[i++] = *parm++;
|
||||
|
||||
/* Consume the parameter digit too: */
|
||||
++message;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* else not a parameter and there is a character after the @ sign; just
|
||||
* copy that.
|
||||
* copy that. This is known not to be '\0' because of the test above.
|
||||
*/
|
||||
}
|
||||
|
||||
/* At this point *message can't be '\0', even in the bad parameter case
|
||||
* above where there is a lone '@' at the end of the message string.
|
||||
*/
|
||||
msg[i] = *message++;
|
||||
msg[i++] = *message++;
|
||||
}
|
||||
|
||||
/* i is always less than (sizeof msg), so: */
|
||||
msg[i] = '\0';
|
||||
|
||||
/* And this is the formatted message: */
|
||||
/* And this is the formatted message, it may be larger than
|
||||
* PNG_MAX_ERROR_TEXT, but that is only used for 'chunk' errors and these are
|
||||
* not (currently) formatted.
|
||||
*/
|
||||
png_warning(png_ptr, msg);
|
||||
}
|
||||
#endif /* PNG_WARNINGS_SUPPORTED */
|
||||
@@ -673,87 +682,4 @@ png_set_strip_error_numbers(png_structp png_ptr, png_uint_32 strip_mode)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined PNG_SIMPLIFIED_READ_SUPPORTED ||\
|
||||
defined PNG_SIMPLIFIED_WRITE_SUPPORTED
|
||||
/* Currently the above both depend on SETJMP_SUPPORTED, however it would be
|
||||
* possible to implement without setjmp support just so long as there is some
|
||||
* way to handle the error return here:
|
||||
*/
|
||||
PNG_FUNCTION(void /* PRIVATE */,
|
||||
png_safe_error,(png_structp png_ptr, png_const_charp error_message),
|
||||
PNG_NORETURN)
|
||||
{
|
||||
png_imagep image = png_voidcast(png_imagep, png_ptr->error_ptr);
|
||||
|
||||
/* An error is always logged here, overwriting anything (typically a warning)
|
||||
* that is already there:
|
||||
*/
|
||||
if (image != NULL)
|
||||
{
|
||||
png_safecat(image->message, sizeof image->message, 0, error_message);
|
||||
image->warning_or_error = 1;
|
||||
|
||||
/* Retrieve the jmp_buf from within the png_control, making this work for
|
||||
* C++ compilation too is pretty tricky: C++ wants a pointer to the first
|
||||
* element of a jmp_buf, but C doesn't tell us the type of that.
|
||||
*/
|
||||
if (image->opaque != NULL && image->opaque->error_buf != NULL)
|
||||
longjmp(png_control_jmp_buf(image->opaque), 1);
|
||||
|
||||
/* Missing longjmp buffer, the following is to help debugging: */
|
||||
{
|
||||
size_t pos = png_safecat(image->message, sizeof image->message, 0,
|
||||
"bad longjmp: ");
|
||||
png_safecat(image->message, sizeof image->message, pos, error_message);
|
||||
}
|
||||
}
|
||||
|
||||
/* Here on an internal programming error. */
|
||||
abort();
|
||||
}
|
||||
|
||||
#ifdef PNG_WARNINGS_SUPPORTED
|
||||
void /* PRIVATE */
|
||||
png_safe_warning(png_structp png_ptr, png_const_charp warning_message)
|
||||
{
|
||||
png_imagep image = png_voidcast(png_imagep, png_ptr->error_ptr);
|
||||
|
||||
/* A warning is only logged if there is no prior warning or error. */
|
||||
if (image->warning_or_error == 0)
|
||||
{
|
||||
png_safecat(image->message, sizeof image->message, 0, warning_message);
|
||||
image->warning_or_error = 2;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int /* PRIVATE */
|
||||
png_safe_execute(png_imagep imageIn, int (*function)(png_voidp), png_voidp arg)
|
||||
{
|
||||
volatile png_imagep image = imageIn;
|
||||
volatile int result;
|
||||
volatile png_voidp saved_error_buf;
|
||||
jmp_buf safe_jmpbuf;
|
||||
|
||||
/* Safely execute function(arg) with png_error returning to this function. */
|
||||
saved_error_buf = image->opaque->error_buf;
|
||||
result = setjmp(safe_jmpbuf) == 0;
|
||||
|
||||
if (result)
|
||||
{
|
||||
|
||||
image->opaque->error_buf = safe_jmpbuf;
|
||||
result = function(arg);
|
||||
}
|
||||
|
||||
image->opaque->error_buf = saved_error_buf;
|
||||
|
||||
/* And do the cleanup prior to any failure return. */
|
||||
if (!result)
|
||||
png_image_free(image);
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif /* SIMPLIFIED READ/WRITE */
|
||||
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
|
||||
|
||||
2
pngget.c
2
pngget.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngget.c - retrieval of values from info struct
|
||||
*
|
||||
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||
* Last changed in libpng 1.5.7 [December 15, 2011]
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
|
||||
2
pngmem.c
2
pngmem.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngmem.c - stub functions for memory allocation
|
||||
*
|
||||
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||
* Last changed in libpng 1.5.7 [December 15, 2011]
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
|
||||
570
pngpread.c
570
pngpread.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngpread.c - read a png file in push mode
|
||||
*
|
||||
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||
* Last changed in libpng 1.5.9 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
@@ -128,30 +128,6 @@ png_process_some_data(png_structp png_ptr, png_infop info_ptr)
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef PNG_READ_tEXt_SUPPORTED
|
||||
case PNG_READ_tEXt_MODE:
|
||||
{
|
||||
png_push_read_tEXt(png_ptr, info_ptr);
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifdef PNG_READ_zTXt_SUPPORTED
|
||||
case PNG_READ_zTXt_MODE:
|
||||
{
|
||||
png_push_read_zTXt(png_ptr, info_ptr);
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifdef PNG_READ_iTXt_SUPPORTED
|
||||
case PNG_READ_iTXt_MODE:
|
||||
{
|
||||
png_push_read_iTXt(png_ptr, info_ptr);
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
case PNG_SKIP_MODE:
|
||||
{
|
||||
png_push_crc_finish(png_ptr);
|
||||
@@ -176,7 +152,7 @@ void /* PRIVATE */
|
||||
png_push_read_sig(png_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
png_size_t num_checked = png_ptr->sig_bytes,
|
||||
num_to_check = 8 - num_checked;
|
||||
num_to_check = 8 - num_checked;
|
||||
|
||||
if (png_ptr->buffer_size < num_to_check)
|
||||
{
|
||||
@@ -196,6 +172,7 @@ png_push_read_sig(png_structp png_ptr, png_infop info_ptr)
|
||||
else
|
||||
png_error(png_ptr, "PNG file corrupted by ASCII conversion");
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (png_ptr->sig_bytes >= 8)
|
||||
@@ -543,7 +520,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
|
||||
return;
|
||||
}
|
||||
|
||||
png_push_handle_tEXt(png_ptr, info_ptr, png_ptr->push_length);
|
||||
png_handle_tEXt(png_ptr, info_ptr, png_ptr->push_length);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -556,7 +533,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
|
||||
return;
|
||||
}
|
||||
|
||||
png_push_handle_zTXt(png_ptr, info_ptr, png_ptr->push_length);
|
||||
png_handle_zTXt(png_ptr, info_ptr, png_ptr->push_length);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -569,7 +546,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
|
||||
return;
|
||||
}
|
||||
|
||||
png_push_handle_iTXt(png_ptr, info_ptr, png_ptr->push_length);
|
||||
png_handle_iTXt(png_ptr, info_ptr, png_ptr->push_length);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -580,7 +557,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
|
||||
png_push_save_buffer(png_ptr);
|
||||
return;
|
||||
}
|
||||
png_push_handle_unknown(png_ptr, info_ptr, png_ptr->push_length);
|
||||
png_handle_unknown(png_ptr, info_ptr, png_ptr->push_length);
|
||||
}
|
||||
|
||||
png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
|
||||
@@ -620,6 +597,7 @@ png_push_crc_finish(png_structp png_ptr)
|
||||
png_ptr->save_buffer_size -= save_size;
|
||||
png_ptr->save_buffer_ptr += save_size;
|
||||
}
|
||||
|
||||
if (png_ptr->skip_length && png_ptr->current_buffer_size)
|
||||
{
|
||||
png_size_t save_size = png_ptr->current_buffer_size;
|
||||
@@ -641,6 +619,7 @@ png_push_crc_finish(png_structp png_ptr)
|
||||
png_ptr->current_buffer_size -= save_size;
|
||||
png_ptr->current_buffer_ptr += save_size;
|
||||
}
|
||||
|
||||
if (!png_ptr->skip_length)
|
||||
{
|
||||
if (png_ptr->buffer_size < 4)
|
||||
@@ -663,6 +642,7 @@ png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length)
|
||||
return;
|
||||
|
||||
ptr = buffer;
|
||||
|
||||
if (png_ptr->save_buffer_size)
|
||||
{
|
||||
png_size_t save_size;
|
||||
@@ -680,6 +660,7 @@ png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length)
|
||||
png_ptr->save_buffer_size -= save_size;
|
||||
png_ptr->save_buffer_ptr += save_size;
|
||||
}
|
||||
|
||||
if (length && png_ptr->current_buffer_size)
|
||||
{
|
||||
png_size_t save_size;
|
||||
@@ -709,6 +690,7 @@ png_push_save_buffer(png_structp png_ptr)
|
||||
png_bytep dp;
|
||||
|
||||
istop = png_ptr->save_buffer_size;
|
||||
|
||||
for (i = 0, sp = png_ptr->save_buffer_ptr, dp = png_ptr->save_buffer;
|
||||
i < istop; i++, sp++, dp++)
|
||||
{
|
||||
@@ -716,6 +698,7 @@ png_push_save_buffer(png_structp png_ptr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (png_ptr->save_buffer_size + png_ptr->current_buffer_size >
|
||||
png_ptr->save_buffer_max)
|
||||
{
|
||||
@@ -730,8 +713,7 @@ png_push_save_buffer(png_structp png_ptr)
|
||||
|
||||
new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + 256;
|
||||
old_buffer = png_ptr->save_buffer;
|
||||
png_ptr->save_buffer = (png_bytep)png_malloc_warn(png_ptr,
|
||||
(png_size_t)new_max);
|
||||
png_ptr->save_buffer = (png_bytep)png_malloc_warn(png_ptr, new_max);
|
||||
|
||||
if (png_ptr->save_buffer == NULL)
|
||||
{
|
||||
@@ -743,6 +725,7 @@ png_push_save_buffer(png_structp png_ptr)
|
||||
png_free(png_ptr, old_buffer);
|
||||
png_ptr->save_buffer_max = new_max;
|
||||
}
|
||||
|
||||
if (png_ptr->current_buffer_size)
|
||||
{
|
||||
png_memcpy(png_ptr->save_buffer + png_ptr->save_buffer_size,
|
||||
@@ -750,6 +733,7 @@ png_push_save_buffer(png_structp png_ptr)
|
||||
png_ptr->save_buffer_size += png_ptr->current_buffer_size;
|
||||
png_ptr->current_buffer_size = 0;
|
||||
}
|
||||
|
||||
png_ptr->save_buffer_ptr = png_ptr->save_buffer;
|
||||
png_ptr->buffer_size = 0;
|
||||
}
|
||||
@@ -851,6 +835,7 @@ png_push_read_IDAT(png_structp png_ptr)
|
||||
png_ptr->current_buffer_size -= save_size;
|
||||
png_ptr->current_buffer_ptr += save_size;
|
||||
}
|
||||
|
||||
if (!png_ptr->idat_size)
|
||||
{
|
||||
if (png_ptr->buffer_size < 4)
|
||||
@@ -1201,6 +1186,7 @@ png_push_process_row(png_structp png_ptr)
|
||||
void /* PRIVATE */
|
||||
png_read_push_finish_row(png_structp png_ptr)
|
||||
{
|
||||
#ifdef PNG_READ_INTERLACING_SUPPORTED
|
||||
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
|
||||
|
||||
/* Start of interlace block */
|
||||
@@ -1219,6 +1205,7 @@ png_read_push_finish_row(png_structp png_ptr)
|
||||
* it, uncomment it here and in png.h
|
||||
static PNG_CONST png_byte FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
|
||||
*/
|
||||
#endif
|
||||
|
||||
png_ptr->row_number++;
|
||||
if (png_ptr->row_number < png_ptr->num_rows)
|
||||
@@ -1262,525 +1249,6 @@ png_read_push_finish_row(png_structp png_ptr)
|
||||
#endif /* PNG_READ_INTERLACING_SUPPORTED */
|
||||
}
|
||||
|
||||
#ifdef PNG_READ_tEXt_SUPPORTED
|
||||
void /* PRIVATE */
|
||||
png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
|
||||
length)
|
||||
{
|
||||
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
|
||||
{
|
||||
PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
|
||||
png_error(png_ptr, "Out of place tEXt");
|
||||
/* NOT REACHED */
|
||||
}
|
||||
|
||||
#ifdef PNG_MAX_MALLOC_64K
|
||||
png_ptr->skip_length = 0; /* This may not be necessary */
|
||||
|
||||
if (length > (png_uint_32)65535L) /* Can't hold entire string in memory */
|
||||
{
|
||||
png_warning(png_ptr, "tEXt chunk too large to fit in memory");
|
||||
png_ptr->skip_length = length - (png_uint_32)65535L;
|
||||
length = (png_uint_32)65535L;
|
||||
}
|
||||
#endif
|
||||
|
||||
png_ptr->current_text = (png_charp)png_malloc(png_ptr,
|
||||
(png_size_t)(length + 1));
|
||||
png_ptr->current_text[length] = '\0';
|
||||
png_ptr->current_text_ptr = png_ptr->current_text;
|
||||
png_ptr->current_text_size = (png_size_t)length;
|
||||
png_ptr->current_text_left = (png_size_t)length;
|
||||
png_ptr->process_mode = PNG_READ_tEXt_MODE;
|
||||
}
|
||||
|
||||
void /* PRIVATE */
|
||||
png_push_read_tEXt(png_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
if (png_ptr->buffer_size && png_ptr->current_text_left)
|
||||
{
|
||||
png_size_t text_size;
|
||||
|
||||
if (png_ptr->buffer_size < png_ptr->current_text_left)
|
||||
text_size = png_ptr->buffer_size;
|
||||
|
||||
else
|
||||
text_size = png_ptr->current_text_left;
|
||||
|
||||
png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size);
|
||||
png_ptr->current_text_left -= text_size;
|
||||
png_ptr->current_text_ptr += text_size;
|
||||
}
|
||||
if (!(png_ptr->current_text_left))
|
||||
{
|
||||
png_textp text_ptr;
|
||||
png_charp text;
|
||||
png_charp key;
|
||||
int ret;
|
||||
|
||||
if (png_ptr->buffer_size < 4)
|
||||
{
|
||||
png_push_save_buffer(png_ptr);
|
||||
return;
|
||||
}
|
||||
|
||||
png_push_crc_finish(png_ptr);
|
||||
|
||||
#ifdef PNG_MAX_MALLOC_64K
|
||||
if (png_ptr->skip_length)
|
||||
return;
|
||||
#endif
|
||||
|
||||
key = png_ptr->current_text;
|
||||
|
||||
for (text = key; *text; text++)
|
||||
/* Empty loop */ ;
|
||||
|
||||
if (text < key + png_ptr->current_text_size)
|
||||
text++;
|
||||
|
||||
text_ptr = (png_textp)png_malloc(png_ptr, png_sizeof(png_text));
|
||||
text_ptr->compression = PNG_TEXT_COMPRESSION_NONE;
|
||||
text_ptr->key = key;
|
||||
text_ptr->itxt_length = 0;
|
||||
text_ptr->lang = NULL;
|
||||
text_ptr->lang_key = NULL;
|
||||
text_ptr->text = text;
|
||||
|
||||
ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
|
||||
|
||||
png_free(png_ptr, key);
|
||||
png_free(png_ptr, text_ptr);
|
||||
png_ptr->current_text = NULL;
|
||||
|
||||
if (ret)
|
||||
png_warning(png_ptr, "Insufficient memory to store text chunk");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_zTXt_SUPPORTED
|
||||
void /* PRIVATE */
|
||||
png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
|
||||
length)
|
||||
{
|
||||
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
|
||||
{
|
||||
PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
|
||||
png_error(png_ptr, "Out of place zTXt");
|
||||
/* NOT REACHED */
|
||||
}
|
||||
|
||||
#ifdef PNG_MAX_MALLOC_64K
|
||||
/* We can't handle zTXt chunks > 64K, since we don't have enough space
|
||||
* to be able to store the uncompressed data. Actually, the threshold
|
||||
* is probably around 32K, but it isn't as definite as 64K is.
|
||||
*/
|
||||
if (length > (png_uint_32)65535L)
|
||||
{
|
||||
png_warning(png_ptr, "zTXt chunk too large to fit in memory");
|
||||
png_push_crc_skip(png_ptr, length);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
png_ptr->current_text = (png_charp)png_malloc(png_ptr,
|
||||
(png_size_t)(length + 1));
|
||||
png_ptr->current_text[length] = '\0';
|
||||
png_ptr->current_text_ptr = png_ptr->current_text;
|
||||
png_ptr->current_text_size = (png_size_t)length;
|
||||
png_ptr->current_text_left = (png_size_t)length;
|
||||
png_ptr->process_mode = PNG_READ_zTXt_MODE;
|
||||
}
|
||||
|
||||
void /* PRIVATE */
|
||||
png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
if (png_ptr->buffer_size && png_ptr->current_text_left)
|
||||
{
|
||||
png_size_t text_size;
|
||||
|
||||
if (png_ptr->buffer_size < (png_uint_32)png_ptr->current_text_left)
|
||||
text_size = png_ptr->buffer_size;
|
||||
|
||||
else
|
||||
text_size = png_ptr->current_text_left;
|
||||
|
||||
png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size);
|
||||
png_ptr->current_text_left -= text_size;
|
||||
png_ptr->current_text_ptr += text_size;
|
||||
}
|
||||
if (!(png_ptr->current_text_left))
|
||||
{
|
||||
png_textp text_ptr;
|
||||
png_charp text;
|
||||
png_charp key;
|
||||
int ret;
|
||||
png_size_t text_size, key_size;
|
||||
|
||||
if (png_ptr->buffer_size < 4)
|
||||
{
|
||||
png_push_save_buffer(png_ptr);
|
||||
return;
|
||||
}
|
||||
|
||||
png_push_crc_finish(png_ptr);
|
||||
|
||||
key = png_ptr->current_text;
|
||||
|
||||
for (text = key; *text; text++)
|
||||
/* Empty loop */ ;
|
||||
|
||||
/* zTXt can't have zero text */
|
||||
if (text >= key + png_ptr->current_text_size)
|
||||
{
|
||||
png_ptr->current_text = NULL;
|
||||
png_free(png_ptr, key);
|
||||
return;
|
||||
}
|
||||
|
||||
text++;
|
||||
|
||||
if (*text != PNG_TEXT_COMPRESSION_zTXt) /* Check compression byte */
|
||||
{
|
||||
png_ptr->current_text = NULL;
|
||||
png_free(png_ptr, key);
|
||||
return;
|
||||
}
|
||||
|
||||
text++;
|
||||
|
||||
png_ptr->zstream.next_in = (png_bytep)text;
|
||||
png_ptr->zstream.avail_in = (uInt)(png_ptr->current_text_size -
|
||||
(text - key));
|
||||
png_ptr->zstream.next_out = png_ptr->zbuf;
|
||||
png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
|
||||
|
||||
key_size = text - key;
|
||||
text_size = 0;
|
||||
text = NULL;
|
||||
ret = Z_STREAM_END;
|
||||
|
||||
while (png_ptr->zstream.avail_in)
|
||||
{
|
||||
ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH);
|
||||
if (ret != Z_OK && ret != Z_STREAM_END)
|
||||
{
|
||||
inflateReset(&png_ptr->zstream);
|
||||
png_ptr->zstream.avail_in = 0;
|
||||
png_ptr->current_text = NULL;
|
||||
png_free(png_ptr, key);
|
||||
png_free(png_ptr, text);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(png_ptr->zstream.avail_out) || ret == Z_STREAM_END)
|
||||
{
|
||||
if (text == NULL)
|
||||
{
|
||||
text = (png_charp)png_malloc(png_ptr,
|
||||
(png_ptr->zbuf_size
|
||||
- png_ptr->zstream.avail_out + key_size + 1));
|
||||
|
||||
png_memcpy(text + key_size, png_ptr->zbuf,
|
||||
png_ptr->zbuf_size - png_ptr->zstream.avail_out);
|
||||
|
||||
png_memcpy(text, key, key_size);
|
||||
|
||||
text_size = key_size + png_ptr->zbuf_size -
|
||||
png_ptr->zstream.avail_out;
|
||||
|
||||
*(text + text_size) = '\0';
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
png_charp tmp;
|
||||
|
||||
tmp = text;
|
||||
text = (png_charp)png_malloc(png_ptr, text_size +
|
||||
(png_ptr->zbuf_size
|
||||
- png_ptr->zstream.avail_out + 1));
|
||||
|
||||
png_memcpy(text, tmp, text_size);
|
||||
png_free(png_ptr, tmp);
|
||||
|
||||
png_memcpy(text + text_size, png_ptr->zbuf,
|
||||
png_ptr->zbuf_size - png_ptr->zstream.avail_out);
|
||||
|
||||
text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out;
|
||||
*(text + text_size) = '\0';
|
||||
}
|
||||
|
||||
if (ret != Z_STREAM_END)
|
||||
{
|
||||
png_ptr->zstream.next_out = png_ptr->zbuf;
|
||||
png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (ret == Z_STREAM_END)
|
||||
break;
|
||||
}
|
||||
|
||||
inflateReset(&png_ptr->zstream);
|
||||
png_ptr->zstream.avail_in = 0;
|
||||
|
||||
if (ret != Z_STREAM_END)
|
||||
{
|
||||
png_ptr->current_text = NULL;
|
||||
png_free(png_ptr, key);
|
||||
png_free(png_ptr, text);
|
||||
return;
|
||||
}
|
||||
|
||||
png_ptr->current_text = NULL;
|
||||
png_free(png_ptr, key);
|
||||
key = text;
|
||||
text += key_size;
|
||||
|
||||
text_ptr = (png_textp)png_malloc(png_ptr,
|
||||
png_sizeof(png_text));
|
||||
text_ptr->compression = PNG_TEXT_COMPRESSION_zTXt;
|
||||
text_ptr->key = key;
|
||||
text_ptr->itxt_length = 0;
|
||||
text_ptr->lang = NULL;
|
||||
text_ptr->lang_key = NULL;
|
||||
text_ptr->text = text;
|
||||
|
||||
ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
|
||||
|
||||
png_free(png_ptr, key);
|
||||
png_free(png_ptr, text_ptr);
|
||||
|
||||
if (ret)
|
||||
png_warning(png_ptr, "Insufficient memory to store text chunk");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_iTXt_SUPPORTED
|
||||
void /* PRIVATE */
|
||||
png_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
|
||||
length)
|
||||
{
|
||||
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
|
||||
{
|
||||
PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
|
||||
png_error(png_ptr, "Out of place iTXt");
|
||||
/* NOT REACHED */
|
||||
}
|
||||
|
||||
#ifdef PNG_MAX_MALLOC_64K
|
||||
png_ptr->skip_length = 0; /* This may not be necessary */
|
||||
|
||||
if (length > (png_uint_32)65535L) /* Can't hold entire string in memory */
|
||||
{
|
||||
png_warning(png_ptr, "iTXt chunk too large to fit in memory");
|
||||
png_ptr->skip_length = length - (png_uint_32)65535L;
|
||||
length = (png_uint_32)65535L;
|
||||
}
|
||||
#endif
|
||||
|
||||
png_ptr->current_text = (png_charp)png_malloc(png_ptr,
|
||||
(png_size_t)(length + 1));
|
||||
png_ptr->current_text[length] = '\0';
|
||||
png_ptr->current_text_ptr = png_ptr->current_text;
|
||||
png_ptr->current_text_size = (png_size_t)length;
|
||||
png_ptr->current_text_left = (png_size_t)length;
|
||||
png_ptr->process_mode = PNG_READ_iTXt_MODE;
|
||||
}
|
||||
|
||||
void /* PRIVATE */
|
||||
png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
|
||||
if (png_ptr->buffer_size && png_ptr->current_text_left)
|
||||
{
|
||||
png_size_t text_size;
|
||||
|
||||
if (png_ptr->buffer_size < png_ptr->current_text_left)
|
||||
text_size = png_ptr->buffer_size;
|
||||
|
||||
else
|
||||
text_size = png_ptr->current_text_left;
|
||||
|
||||
png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size);
|
||||
png_ptr->current_text_left -= text_size;
|
||||
png_ptr->current_text_ptr += text_size;
|
||||
}
|
||||
|
||||
if (!(png_ptr->current_text_left))
|
||||
{
|
||||
png_textp text_ptr;
|
||||
png_charp key;
|
||||
int comp_flag;
|
||||
png_charp lang;
|
||||
png_charp lang_key;
|
||||
png_charp text;
|
||||
int ret;
|
||||
|
||||
if (png_ptr->buffer_size < 4)
|
||||
{
|
||||
png_push_save_buffer(png_ptr);
|
||||
return;
|
||||
}
|
||||
|
||||
png_push_crc_finish(png_ptr);
|
||||
|
||||
#ifdef PNG_MAX_MALLOC_64K
|
||||
if (png_ptr->skip_length)
|
||||
return;
|
||||
#endif
|
||||
|
||||
key = png_ptr->current_text;
|
||||
|
||||
for (lang = key; *lang; lang++)
|
||||
/* Empty loop */ ;
|
||||
|
||||
if (lang < key + png_ptr->current_text_size - 3)
|
||||
lang++;
|
||||
|
||||
comp_flag = *lang++;
|
||||
lang++; /* Skip comp_type, always zero */
|
||||
|
||||
for (lang_key = lang; *lang_key; lang_key++)
|
||||
/* Empty loop */ ;
|
||||
|
||||
lang_key++; /* Skip NUL separator */
|
||||
|
||||
text=lang_key;
|
||||
|
||||
if (lang_key < key + png_ptr->current_text_size - 1)
|
||||
{
|
||||
for (; *text; text++)
|
||||
/* Empty loop */ ;
|
||||
}
|
||||
|
||||
if (text < key + png_ptr->current_text_size)
|
||||
text++;
|
||||
|
||||
text_ptr = (png_textp)png_malloc(png_ptr,
|
||||
png_sizeof(png_text));
|
||||
|
||||
text_ptr->compression = comp_flag + 2;
|
||||
text_ptr->key = key;
|
||||
text_ptr->lang = lang;
|
||||
text_ptr->lang_key = lang_key;
|
||||
text_ptr->text = text;
|
||||
text_ptr->text_length = 0;
|
||||
text_ptr->itxt_length = png_strlen(text);
|
||||
|
||||
ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
|
||||
|
||||
png_ptr->current_text = NULL;
|
||||
|
||||
png_free(png_ptr, text_ptr);
|
||||
if (ret)
|
||||
png_warning(png_ptr, "Insufficient memory to store iTXt chunk");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* This function is called when we haven't found a handler for this
|
||||
* chunk. If there isn't a problem with the chunk itself (ie a bad chunk
|
||||
* name or a critical chunk), the chunk is (currently) silently ignored.
|
||||
*/
|
||||
void /* PRIVATE */
|
||||
png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32
|
||||
length)
|
||||
{
|
||||
png_uint_32 skip = 0;
|
||||
png_uint_32 chunk_name = png_ptr->chunk_name;
|
||||
|
||||
if (PNG_CHUNK_CRITICAL(chunk_name))
|
||||
{
|
||||
#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
|
||||
if (png_chunk_unknown_handling(png_ptr, chunk_name) !=
|
||||
PNG_HANDLE_CHUNK_ALWAYS
|
||||
#ifdef PNG_READ_USER_CHUNKS_SUPPORTED
|
||||
&& png_ptr->read_user_chunk_fn == NULL
|
||||
#endif
|
||||
)
|
||||
#endif
|
||||
png_chunk_error(png_ptr, "unknown critical chunk");
|
||||
|
||||
PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
|
||||
}
|
||||
|
||||
#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
|
||||
/* TODO: the code below is apparently just using the
|
||||
* png_struct::unknown_chunk member as a temporarily variable, it should be
|
||||
* possible to eliminate both it and the temporary buffer.
|
||||
*/
|
||||
if (png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS)
|
||||
{
|
||||
#ifdef PNG_MAX_MALLOC_64K
|
||||
if (length > 65535)
|
||||
{
|
||||
png_warning(png_ptr, "unknown chunk too large to fit in memory");
|
||||
skip = length - 65535;
|
||||
length = 65535;
|
||||
}
|
||||
#endif
|
||||
/* This is just a record for the user; libpng doesn't use the character
|
||||
* form of the name.
|
||||
*/
|
||||
PNG_CSTRING_FROM_CHUNK(png_ptr->unknown_chunk.name, png_ptr->chunk_name);
|
||||
|
||||
/* The following cast should be safe because of the check above. */
|
||||
png_ptr->unknown_chunk.size = (png_size_t)length;
|
||||
|
||||
if (length == 0)
|
||||
png_ptr->unknown_chunk.data = NULL;
|
||||
|
||||
else
|
||||
{
|
||||
png_ptr->unknown_chunk.data = (png_bytep)png_malloc(png_ptr,
|
||||
png_ptr->unknown_chunk.size);
|
||||
png_crc_read(png_ptr, (png_bytep)png_ptr->unknown_chunk.data,
|
||||
png_ptr->unknown_chunk.size);
|
||||
}
|
||||
|
||||
#ifdef PNG_READ_USER_CHUNKS_SUPPORTED
|
||||
if (png_ptr->read_user_chunk_fn != NULL)
|
||||
{
|
||||
/* Callback to user unknown chunk handler */
|
||||
int ret;
|
||||
ret = (*(png_ptr->read_user_chunk_fn))
|
||||
(png_ptr, &png_ptr->unknown_chunk);
|
||||
|
||||
if (ret < 0)
|
||||
png_chunk_error(png_ptr, "error in user chunk");
|
||||
|
||||
if (ret == 0)
|
||||
{
|
||||
if (PNG_CHUNK_CRITICAL(png_ptr->chunk_name))
|
||||
if (png_chunk_unknown_handling(png_ptr, chunk_name) !=
|
||||
PNG_HANDLE_CHUNK_ALWAYS)
|
||||
png_chunk_error(png_ptr, "unknown critical chunk");
|
||||
png_set_unknown_chunks(png_ptr, info_ptr,
|
||||
&png_ptr->unknown_chunk, 1);
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
#endif
|
||||
png_set_unknown_chunks(png_ptr, info_ptr, &png_ptr->unknown_chunk, 1);
|
||||
png_free(png_ptr, png_ptr->unknown_chunk.data);
|
||||
png_ptr->unknown_chunk.data = NULL;
|
||||
}
|
||||
|
||||
else
|
||||
#endif
|
||||
skip=length;
|
||||
png_push_crc_skip(png_ptr, skip);
|
||||
}
|
||||
|
||||
void /* PRIVATE */
|
||||
png_push_have_info(png_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
|
||||
142
pngpriv.h
142
pngpriv.h
@@ -2,11 +2,11 @@
|
||||
/* pngpriv.h - private declarations for use inside libpng
|
||||
*
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||
* Last changed in libpng 1.5.10 [(PENDING RELEASE)]
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
@@ -133,6 +133,46 @@
|
||||
# define PNG_DLL_EXPORT
|
||||
#endif
|
||||
|
||||
/* SECURITY and SAFETY:
|
||||
*
|
||||
* By default libpng is built without any internal limits on image size,
|
||||
* individual heap (png_malloc) allocations or the total amount of memory used.
|
||||
* If PNG_SAFE_LIMITS_SUPPORTED is defined, however, the limits below are used
|
||||
* (unless individually overridden). These limits are believed to be fairly
|
||||
* safe, but builders of secure systems should verify the values against the
|
||||
* real system capabilities.
|
||||
*/
|
||||
|
||||
#ifdef PNG_SAFE_LIMITS_SUPPORTED
|
||||
/* 'safe' limits */
|
||||
# ifndef PNG_USER_WIDTH_MAX
|
||||
# define PNG_USER_WIDTH_MAX 1000000
|
||||
# endif
|
||||
# ifndef PNG_USER_HEIGHT_MAX
|
||||
# define PNG_USER_HEIGHT_MAX 1000000
|
||||
# endif
|
||||
# ifndef PNG_USER_CHUNK_CACHE_MAX
|
||||
# define PNG_USER_CHUNK_CACHE_MAX 128
|
||||
# endif
|
||||
# ifndef PNG_USER_CHUNK_MALLOC_MAX
|
||||
# define PNG_USER_CHUNK_MALLOC_MAX 8000000
|
||||
# endif
|
||||
#else
|
||||
/* values for no limits */
|
||||
# ifndef PNG_USER_WIDTH_MAX
|
||||
# define PNG_USER_WIDTH_MAX 0x7fffffff
|
||||
# endif
|
||||
# ifndef PNG_USER_HEIGHT_MAX
|
||||
# define PNG_USER_HEIGHT_MAX 0x7fffffff
|
||||
# endif
|
||||
# ifndef PNG_USER_CHUNK_CACHE_MAX
|
||||
# define PNG_USER_CHUNK_CACHE_MAX 0
|
||||
# endif
|
||||
# ifndef PNG_USER_CHUNK_MALLOC_MAX
|
||||
# define PNG_USER_CHUNK_MALLOC_MAX 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* This is used for 16 bit gamma tables - only the top level pointers are const,
|
||||
* this could be changed:
|
||||
*/
|
||||
@@ -258,26 +298,6 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
|
||||
# define PNG_EXTERN extern
|
||||
#endif
|
||||
|
||||
#ifndef PNG_CONST_DATA
|
||||
/* Some compilers fail if given an "extern const" data declaration followed by a
|
||||
* "const" definition, therefore declaring const data in pngpriv.h is
|
||||
* impossible, the following allows a work-round for the problematic compilers
|
||||
* by defining -DPNG_NO_CONST_DATA on the command line (notice that this does
|
||||
* not affect static const definitions, where there is no declaration.)
|
||||
*/
|
||||
# ifndef PNG_NO_CONST_DATA
|
||||
/* List of compilers where "extern const" is known to be OK: */
|
||||
# if defined __GNUC__ || defined _MSC_VER || defined __WATCOMC__
|
||||
# define PNG_CONST_DATA const
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* Default to disabling const data declarations: */
|
||||
# ifndef PNG_CONST_DATA
|
||||
# define PNG_CONST_DATA /*const*/
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Some fixed point APIs are still required even if not exported because
|
||||
* they get used by the corresponding floating point APIs. This magic
|
||||
* deals with this:
|
||||
@@ -548,26 +568,6 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
|
||||
abs((int)((c1).green) - (int)((c2).green)) + \
|
||||
abs((int)((c1).blue) - (int)((c2).blue)))
|
||||
|
||||
/* Added to libpng-1.5.7: sRGB conversion tables */
|
||||
#if defined PNG_SIMPLIFIED_READ_SUPPORTED ||\
|
||||
defined PNG_SIMPLIFIED_WRITE_SUPPORTED
|
||||
#ifdef PNG_SIMPLIFIED_READ_SUPPORTED
|
||||
extern /*PRIVATE*/ PNG_CONST_DATA png_uint_16 png_sRGB_table[256];
|
||||
/* Convert from an sRGB encoded value 0..255 to a 16-bit linear value,
|
||||
* 0..65535. This table gives the closes 16-bit answers (no errors).
|
||||
*/
|
||||
#endif
|
||||
|
||||
extern /*PRIVATE*/ PNG_CONST_DATA png_uint_16 png_sRGB_base[512];
|
||||
extern /*PRIVATE*/ PNG_CONST_DATA png_byte png_sRGB_delta[512];
|
||||
|
||||
#define PNG_sRGB_FROM_LINEAR(linear) ((png_sRGB_base[(linear)>>15] +\
|
||||
((((linear)&0x7fff)*png_sRGB_delta[(linear)>>15])>>12)) >> 8)
|
||||
/* Given a value 'linear' in the range 0..255*65535 calculate the 8-bit sRGB
|
||||
* encoded value with maximum error 0.646365. Note that the input is not a
|
||||
* 16-bit value; it has been multiplied by 255! */
|
||||
#endif /* PNG_SIMPLIFIED_READ/WRITE */
|
||||
|
||||
/* Added to libpng-1.2.6 JB */
|
||||
#define PNG_ROWBYTES(pixel_bits, width) \
|
||||
((pixel_bits) >= 8 ? \
|
||||
@@ -1395,6 +1395,13 @@ PNG_EXTERN void png_check_IHDR PNGARG((png_structp png_ptr,
|
||||
int color_type, int interlace_type, int compression_type,
|
||||
int filter_type));
|
||||
|
||||
/* Added at libpng version 1.5.10 */
|
||||
#if defined(PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED) || \
|
||||
defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED)
|
||||
PNG_EXTERN void png_do_check_palette_indexes PNGARG((png_structp png_ptr,
|
||||
png_row_infop row_info));
|
||||
#endif
|
||||
|
||||
/* Free all memory used by the read (old method - NOT DLL EXPORTED) */
|
||||
PNG_EXTERN void png_read_destroy PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_infop end_info_ptr));
|
||||
@@ -1658,59 +1665,8 @@ PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr,
|
||||
int bit_depth));
|
||||
#endif
|
||||
|
||||
/* SIMPLIFIED READ/WRITE SUPPORT */
|
||||
#if defined PNG_SIMPLIFIED_READ_SUPPORTED ||\
|
||||
defined PNG_SIMPLIFIED_WRITE_SUPPORTED
|
||||
/* The internal structure that png_image::opaque points to. */
|
||||
typedef struct png_control
|
||||
{
|
||||
png_structp png_ptr;
|
||||
png_infop info_ptr;
|
||||
png_voidp error_buf; /* Always a jmp_buf at present. */
|
||||
|
||||
png_const_bytep memory; /* Memory buffer. */
|
||||
png_size_t size; /* Size of the memory buffer. */
|
||||
|
||||
unsigned int for_write :1; /* Otherwise it is a read structure */
|
||||
unsigned int owned_file :1; /* We own the file in io_ptr */
|
||||
} png_control;
|
||||
|
||||
/* Return the pointer to the jmp_buf from a png_control: necessary because C
|
||||
* does not reveal the type of the elements of jmp_buf.
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
# define png_control_jmp_buf(pc) (((jmp_buf*)((pc)->error_buf))[0])
|
||||
#else
|
||||
# define png_control_jmp_buf(pc) ((pc)->error_buf)
|
||||
#endif
|
||||
|
||||
/* Utility to safely execute a piece of libpng code catching and logging any
|
||||
* errors that might occur. Returns true on success, false on failure (either
|
||||
* of the function or as a result of a png_error.)
|
||||
*/
|
||||
PNG_FUNCTION(void, png_safe_error, (png_structp png_ptr,
|
||||
png_const_charp error_message), PNG_NORETURN);
|
||||
|
||||
#ifdef PNG_WARNINGS_SUPPORTED
|
||||
PNG_EXTERN void png_safe_warning(png_structp png_ptr,
|
||||
png_const_charp warning_message);
|
||||
#else
|
||||
# define png_safe_warning 0/*dummy argument*/
|
||||
#endif
|
||||
|
||||
PNG_EXTERN int png_safe_execute PNGARG((png_imagep image,
|
||||
int (*function)(png_voidp), png_voidp arg));
|
||||
|
||||
/* Utility to log an error, this also cleans up the png_image, the function
|
||||
* always returns 0 (false).
|
||||
*/
|
||||
PNG_EXTERN int png_image_error(png_imagep image, png_const_charp error_message);
|
||||
|
||||
#endif /* SIMPLIFIED READ/WRITE */
|
||||
|
||||
/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
|
||||
|
||||
|
||||
#include "pngdebug.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
12
pngrtran.c
12
pngrtran.c
@@ -1,8 +1,8 @@
|
||||
|
||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||
*
|
||||
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.5.10 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@@ -1956,7 +1956,7 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
|
||||
info_ptr->bit_depth = 8;
|
||||
# else
|
||||
|
||||
# if PNG_READ_SCALE_16_TO_8_SUPPORTED
|
||||
# ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED
|
||||
png_ptr->transformations |= PNG_SCALE_16_TO_8;
|
||||
info_ptr->bit_depth = 8;
|
||||
# else
|
||||
@@ -2296,6 +2296,12 @@ png_do_read_transformations(png_structp png_ptr, png_row_infop row_info)
|
||||
png_do_unpack(row_info, png_ptr->row_buf + 1);
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||
/* Added at libpng-1.5.10 */
|
||||
if (row_info->color_type == PNG_COLOR_TYPE_PALETTE)
|
||||
png_do_check_palette_indexes(png_ptr, row_info);
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_BGR_SUPPORTED
|
||||
if (png_ptr->transformations & PNG_BGR)
|
||||
png_do_bgr(row_info, png_ptr->row_buf + 1);
|
||||
|
||||
42
pngrutil.c
42
pngrutil.c
@@ -1,8 +1,8 @@
|
||||
|
||||
/* pngrutil.c - utilities to read a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.5.10 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@@ -432,15 +432,16 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
|
||||
/* Now check the limits on this chunk - if the limit fails the
|
||||
* compressed data will be removed, the prefix will remain.
|
||||
*/
|
||||
#ifdef PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
|
||||
if (png_ptr->user_chunk_malloc_max &&
|
||||
if (prefix_size >= (~(png_size_t)0) - 1 ||
|
||||
expanded_size >= (~(png_size_t)0) - 1 - prefix_size
|
||||
#ifdef PNG_USER_LIMITS_SUPPORTED
|
||||
|| (png_ptr->user_chunk_malloc_max &&
|
||||
(prefix_size + expanded_size >= png_ptr->user_chunk_malloc_max - 1))
|
||||
#else
|
||||
# ifdef PNG_USER_CHUNK_MALLOC_MAX
|
||||
if ((PNG_USER_CHUNK_MALLOC_MAX > 0) &&
|
||||
|| ((PNG_USER_CHUNK_MALLOC_MAX > 0) &&
|
||||
prefix_size + expanded_size >= PNG_USER_CHUNK_MALLOC_MAX - 1)
|
||||
# endif
|
||||
#endif
|
||||
)
|
||||
png_warning(png_ptr, "Exceeded size limit while expanding chunk");
|
||||
|
||||
/* If the size is zero either there was an error and a message
|
||||
@@ -448,12 +449,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
|
||||
* and we have nothing to do - the code will exit through the
|
||||
* error case below.
|
||||
*/
|
||||
#if defined(PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED) || \
|
||||
defined(PNG_USER_CHUNK_MALLOC_MAX)
|
||||
else if (expanded_size > 0)
|
||||
#else
|
||||
if (expanded_size > 0)
|
||||
#endif
|
||||
{
|
||||
/* Success (maybe) - really uncompress the chunk. */
|
||||
png_size_t new_size = 0;
|
||||
@@ -1279,7 +1275,7 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
|
||||
png_free(png_ptr, png_ptr->chunkdata);
|
||||
png_ptr->chunkdata = (png_charp)png_malloc(png_ptr, length + 1);
|
||||
slength = (png_size_t)length;
|
||||
slength = length;
|
||||
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
|
||||
|
||||
if (png_crc_finish(png_ptr, skip))
|
||||
@@ -1429,7 +1425,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
* that the PNG_MAX_MALLOC_64K test is enabled in this case, but this is a
|
||||
* potential breakage point if the types in pngconf.h aren't exactly right.
|
||||
*/
|
||||
slength = (png_size_t)length;
|
||||
slength = length;
|
||||
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
|
||||
|
||||
if (png_crc_finish(png_ptr, skip))
|
||||
@@ -1797,16 +1793,16 @@ png_handle_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
return;
|
||||
}
|
||||
|
||||
num = length / 2 ;
|
||||
|
||||
if (num != (unsigned int)png_ptr->num_palette || num >
|
||||
(unsigned int)PNG_MAX_PALETTE_LENGTH)
|
||||
if (length > 2*PNG_MAX_PALETTE_LENGTH ||
|
||||
length != (unsigned int) (2*png_ptr->num_palette))
|
||||
{
|
||||
png_warning(png_ptr, "Incorrect hIST chunk length");
|
||||
png_crc_finish(png_ptr, length);
|
||||
return;
|
||||
}
|
||||
|
||||
num = length / 2 ;
|
||||
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
png_byte buf[2];
|
||||
@@ -1956,7 +1952,7 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
return;
|
||||
}
|
||||
|
||||
slength = (png_size_t)length;
|
||||
slength = length;
|
||||
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
|
||||
|
||||
if (png_crc_finish(png_ptr, 0))
|
||||
@@ -2105,7 +2101,7 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
return;
|
||||
}
|
||||
|
||||
slength = (png_size_t)length;
|
||||
slength = length;
|
||||
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
|
||||
png_ptr->chunkdata[slength] = 0x00; /* Null terminate the last string */
|
||||
|
||||
@@ -2265,7 +2261,7 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
return;
|
||||
}
|
||||
|
||||
slength = (png_size_t)length;
|
||||
slength = length;
|
||||
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
|
||||
|
||||
if (png_crc_finish(png_ptr, skip))
|
||||
@@ -2373,7 +2369,7 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
return;
|
||||
}
|
||||
|
||||
slength = (png_size_t)length;
|
||||
slength = length;
|
||||
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
|
||||
|
||||
if (png_crc_finish(png_ptr, 0))
|
||||
@@ -2504,7 +2500,7 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
return;
|
||||
}
|
||||
|
||||
slength = (png_size_t)length;
|
||||
slength = length;
|
||||
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
|
||||
|
||||
if (png_crc_finish(png_ptr, 0))
|
||||
|
||||
20
pngset.c
20
pngset.c
@@ -1,8 +1,8 @@
|
||||
|
||||
/* pngset.c - storage of image information into info struct
|
||||
*
|
||||
* Last changed in libpng 1.5.6 [November 3, 2011]
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.5.10 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@@ -1281,4 +1281,20 @@ png_set_benign_errors(png_structp png_ptr, int allowed)
|
||||
png_ptr->flags &= ~PNG_FLAG_BENIGN_ERRORS_WARN;
|
||||
}
|
||||
#endif /* PNG_BENIGN_ERRORS_SUPPORTED */
|
||||
|
||||
#ifdef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||
/* Do not report invalid palette index; added at libng-1.5.10 */
|
||||
void PNGAPI
|
||||
png_set_check_for_invalid_index(png_structp png_ptr, int allowed)
|
||||
{
|
||||
png_debug(1, "in png_set_check_for_invalid_index");
|
||||
|
||||
if (allowed)
|
||||
png_ptr->num_palette_max = 0;
|
||||
|
||||
else
|
||||
png_ptr->num_palette_max = -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
|
||||
|
||||
19
pngstruct.h
19
pngstruct.h
@@ -5,7 +5,7 @@
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
* Last changed in libpng 1.5.5 [September 22, 2011]
|
||||
* Last changed in libpng 1.5.9 [(PENDING RELEASE)]
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
@@ -121,6 +121,12 @@ struct png_struct_def
|
||||
png_uint_32 crc; /* current chunk CRC value */
|
||||
png_colorp palette; /* palette from the input file */
|
||||
png_uint_16 num_palette; /* number of color entries in palette */
|
||||
|
||||
/* Added at libpng-1.5.10 */
|
||||
#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||
int num_palette_max; /* maximum palette index found in IDAT */
|
||||
#endif
|
||||
|
||||
png_uint_16 num_trans; /* number of transparency values */
|
||||
png_byte compression; /* file compression type (always 0) */
|
||||
png_byte filter; /* file filter type (always 0) */
|
||||
@@ -211,13 +217,6 @@ struct png_struct_def
|
||||
int process_mode; /* what push library is currently doing */
|
||||
int cur_palette; /* current push library palette index */
|
||||
|
||||
# ifdef PNG_TEXT_SUPPORTED
|
||||
png_size_t current_text_size; /* current size of text input data */
|
||||
png_size_t current_text_left; /* how much text left to read in input */
|
||||
png_charp current_text; /* current text chunk buffer */
|
||||
png_charp current_text_ptr; /* current location in current_text */
|
||||
# endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */
|
||||
|
||||
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
|
||||
|
||||
#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
|
||||
@@ -283,9 +282,7 @@ struct png_struct_def
|
||||
#endif
|
||||
|
||||
/* New member added in libpng-1.0.4 (renamed in 1.0.9) */
|
||||
#if defined(PNG_MNG_FEATURES_SUPPORTED) || \
|
||||
defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
|
||||
defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
|
||||
#if defined(PNG_MNG_FEATURES_SUPPORTED)
|
||||
/* Changed from png_byte to png_uint_32 at version 1.2.0 */
|
||||
png_uint_32 mng_features_permitted;
|
||||
#endif
|
||||
|
||||
@@ -1163,6 +1163,10 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
||||
if (png_get_text(read_ptr, read_info_ptr, &text_ptr, &num_text) > 0)
|
||||
{
|
||||
pngtest_debug1("Handling %d iTXt/tEXt/zTXt chunks", num_text);
|
||||
|
||||
if (verbose)
|
||||
printf("\n Text compression=%d\n", text_ptr->compression);
|
||||
|
||||
png_set_text(write_ptr, write_info_ptr, text_ptr, num_text);
|
||||
}
|
||||
}
|
||||
@@ -1813,4 +1817,4 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef png_libpng_version_1_5_7beta05 Your_png_h_is_not_version_1_5_7beta05;
|
||||
typedef png_libpng_version_1_5_10beta03 Your_png_h_is_not_version_1_5_10beta03;
|
||||
|
||||
107
pngtrans.c
107
pngtrans.c
@@ -1,8 +1,8 @@
|
||||
|
||||
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
||||
*
|
||||
* Last changed in libpng 1.5.4 [July 7, 2011]
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.5.10 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@@ -619,6 +619,109 @@ png_do_bgr(png_row_infop row_info, png_bytep row)
|
||||
}
|
||||
#endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */
|
||||
|
||||
#if defined(PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED) || \
|
||||
defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED)
|
||||
/* Added at libpng-1.5.10 */
|
||||
void /* PRIVATE */
|
||||
png_do_check_palette_indexes(png_structp png_ptr, png_row_infop row_info)
|
||||
{
|
||||
if (png_ptr->num_palette < (1 << row_info->bit_depth) &&
|
||||
png_ptr->num_palette_max >= 0)
|
||||
{
|
||||
/* Calculations moved outside switch in an attempt to stop different
|
||||
* compiler warnings. 'padding' is in *bits* within the last byte, it is
|
||||
* an 'int' because pixel_depth becomes an 'int' in the expression below,
|
||||
* and this calculation is used because it avoids warnings that other
|
||||
* forms produced on either GCC or MSVC.
|
||||
*/
|
||||
int padding = (-row_info->pixel_depth * row_info->width) & 7;
|
||||
png_bytep rp = png_ptr->row_buf + 1 + row_info->rowbytes;
|
||||
|
||||
switch (row_info->bit_depth)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
/* in this case, all bytes must be 0 so we don't need
|
||||
* to unpack the pixels except for the rightmost one.
|
||||
*/
|
||||
for (; rp > png_ptr->row_buf; rp--)
|
||||
{
|
||||
if (*rp >> padding != 0)
|
||||
png_ptr->num_palette_max = 1;
|
||||
padding = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 2:
|
||||
{
|
||||
for (; rp > png_ptr->row_buf; rp--)
|
||||
{
|
||||
int i = ((*rp >> padding) & 0x03);
|
||||
|
||||
if (i > png_ptr->num_palette_max)
|
||||
png_ptr->num_palette_max = i;
|
||||
|
||||
i = (((*rp >> padding) >> 2) & 0x03);
|
||||
|
||||
if (i > png_ptr->num_palette_max)
|
||||
png_ptr->num_palette_max = i;
|
||||
|
||||
i = (((*rp >> padding) >> 4) & 0x03);
|
||||
|
||||
if (i > png_ptr->num_palette_max)
|
||||
png_ptr->num_palette_max = i;
|
||||
|
||||
i = (((*rp >> padding) >> 6) & 0x03);
|
||||
|
||||
if (i > png_ptr->num_palette_max)
|
||||
png_ptr->num_palette_max = i;
|
||||
|
||||
padding = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 4:
|
||||
{
|
||||
for (; rp > png_ptr->row_buf; rp--)
|
||||
{
|
||||
int i = ((*rp >> padding) & 0x0f);
|
||||
|
||||
if (i > png_ptr->num_palette_max)
|
||||
png_ptr->num_palette_max = i;
|
||||
|
||||
i = (((*rp >> padding) >> 4) & 0x0f);
|
||||
|
||||
if (i > png_ptr->num_palette_max)
|
||||
png_ptr->num_palette_max = i;
|
||||
|
||||
padding = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 8:
|
||||
{
|
||||
for (; rp > png_ptr->row_buf; rp--)
|
||||
{
|
||||
if (*rp >= png_ptr->num_palette_max)
|
||||
png_ptr->num_palette_max = (int) *rp;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED */
|
||||
|
||||
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
|
||||
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
||||
#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
|
||||
|
||||
14
pngusr.dfa
Normal file
14
pngusr.dfa
Normal file
@@ -0,0 +1,14 @@
|
||||
# pngusr.dfa
|
||||
#
|
||||
# Build time configuration of libpng
|
||||
#
|
||||
# Enter build configuration options in this file
|
||||
#
|
||||
# Security settings: by default these limits are unset, you can change them
|
||||
# here by entering the appropriate values as #defines preceded by '@' (to cause,
|
||||
# them to be passed through to the build of pnglibconf.h), for example:
|
||||
#
|
||||
# @# define PNG_USER_WIDTH_MAX 1000000
|
||||
# @# define PNG_USER_HEIGHT_MAX 1000000
|
||||
# @# define PNG_USER_CHUNK_CACHE_MAX 128
|
||||
# @# define PNG_USER_CHUNK_MALLOC_MAX 8000000
|
||||
578
pngwrite.c
578
pngwrite.c
@@ -1,8 +1,8 @@
|
||||
|
||||
/* pngwrite.c - general routines to write a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.5.10 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@@ -12,9 +12,6 @@
|
||||
*/
|
||||
|
||||
#include "pngpriv.h"
|
||||
#if defined PNG_SIMPLIFIED_WRITE_SUPPORTED && defined PNG_STDIO_SUPPORTED
|
||||
# include <errno.h>
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_SUPPORTED
|
||||
|
||||
@@ -308,6 +305,11 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
|
||||
if (!(png_ptr->mode & PNG_HAVE_IDAT))
|
||||
png_error(png_ptr, "No IDATs written into file");
|
||||
|
||||
#ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||
if (png_ptr->num_palette_max > png_ptr->num_palette)
|
||||
png_warning(png_ptr, "Wrote palette index exceeding num_palette");
|
||||
#endif
|
||||
|
||||
/* See if user wants us to write information chunks */
|
||||
if (info_ptr != NULL)
|
||||
{
|
||||
@@ -801,6 +803,13 @@ png_write_row(png_structp png_ptr, png_const_bytep row)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Added at libpng-1.5.10 */
|
||||
#ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||
/* Check for out-of-range palette index */
|
||||
if(row_info.color_type == PNG_COLOR_TYPE_PALETTE)
|
||||
png_do_check_palette_indexes(png_ptr, &row_info);
|
||||
#endif
|
||||
|
||||
/* Find a filter if necessary, filter the row and write it out. */
|
||||
png_write_find_filter(png_ptr, &row_info);
|
||||
|
||||
@@ -1655,563 +1664,4 @@ png_write_png(png_structp png_ptr, png_infop info_ptr,
|
||||
PNG_UNUSED(params)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED
|
||||
#ifdef PNG_STDIO_SUPPORTED /* currently required for png_image_write_* */
|
||||
/* Initialize the write structure - general purpose utility. */
|
||||
static int
|
||||
png_image_write_init(png_imagep image)
|
||||
{
|
||||
png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, image,
|
||||
png_safe_error, png_safe_warning);
|
||||
|
||||
if (png_ptr != NULL)
|
||||
{
|
||||
png_infop info_ptr = png_create_info_struct(png_ptr);
|
||||
|
||||
if (info_ptr != NULL)
|
||||
{
|
||||
png_controlp control = png_voidcast(png_controlp,
|
||||
png_malloc_warn(png_ptr, sizeof *control));
|
||||
|
||||
if (control != NULL)
|
||||
{
|
||||
memset(control, 0, sizeof *control);
|
||||
|
||||
control->png_ptr = png_ptr;
|
||||
control->info_ptr = info_ptr;
|
||||
control->for_write = 1;
|
||||
|
||||
image->opaque = control;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Error clean up */
|
||||
png_destroy_info_struct(png_ptr, &info_ptr);
|
||||
}
|
||||
|
||||
png_destroy_write_struct(&png_ptr, NULL);
|
||||
}
|
||||
|
||||
return png_image_error(image, "png_image_read: out of memory");
|
||||
}
|
||||
|
||||
/* Arguments to png_image_write_main: */
|
||||
typedef struct
|
||||
{
|
||||
/* Arguments: */
|
||||
png_imagep image;
|
||||
png_const_voidp buffer;
|
||||
png_int_32 row_stride;
|
||||
int convert_to_8bit;
|
||||
/* Local variables: */
|
||||
png_const_voidp first_row;
|
||||
ptrdiff_t row_bytes;
|
||||
png_voidp local_row;
|
||||
} png_image_write_control;
|
||||
|
||||
/* Write png_uint_16 input to a 16-bit PNG; the png_ptr has already been set to
|
||||
* do any necessary byte swapping. The component order is defined by the
|
||||
* png_image format value.
|
||||
*/
|
||||
static int
|
||||
png_write_image_16bit(png_voidp argument)
|
||||
{
|
||||
png_image_write_control *display = png_voidcast(png_image_write_control*,
|
||||
argument);
|
||||
png_imagep image = display->image;
|
||||
png_structp png_ptr = image->opaque->png_ptr;
|
||||
|
||||
png_const_uint_16p input_row = png_voidcast(png_const_uint_16p,
|
||||
display->first_row);
|
||||
png_uint_16p output_row = png_voidcast(png_uint_16p, display->local_row);
|
||||
png_uint_16p row_end;
|
||||
int channels = (image->format & PNG_FORMAT_FLAG_COLOR) ? 3 : 1;
|
||||
int aindex = 0;
|
||||
png_uint_32 y = image->height;
|
||||
|
||||
if (image->format & PNG_FORMAT_FLAG_ALPHA)
|
||||
{
|
||||
if (image->format & PNG_FORMAT_FLAG_AFIRST)
|
||||
{
|
||||
aindex = -1;
|
||||
++input_row; /* To point to the first component */
|
||||
++output_row;
|
||||
}
|
||||
|
||||
else
|
||||
aindex = channels;
|
||||
}
|
||||
|
||||
else
|
||||
png_error(png_ptr, "png_write_image: internal call error");
|
||||
|
||||
/* Work out the output row end and count over this, note that the increment
|
||||
* above to 'row' means that row_end can actually be beyond the end of the
|
||||
* row; this is correct.
|
||||
*/
|
||||
row_end = output_row + image->width * (channels+1);
|
||||
|
||||
while (y-- > 0)
|
||||
{
|
||||
png_const_uint_16p in_ptr = input_row;
|
||||
png_uint_16p out_ptr = output_row;
|
||||
|
||||
while (out_ptr < row_end)
|
||||
{
|
||||
png_uint_16 alpha = in_ptr[aindex];
|
||||
png_uint_32 reciprocal = 0;
|
||||
int c;
|
||||
|
||||
out_ptr[aindex] = alpha;
|
||||
|
||||
/* Calculate a reciprocal. The correct calculation is simply
|
||||
* component/alpha*65535 << 15. (I.e. 15 bits of precision); this
|
||||
* allows correct rounding by adding .5 before the shift. 'reciprocal'
|
||||
* is only initialized when required.
|
||||
*/
|
||||
if (alpha > 0 && alpha < 65535)
|
||||
reciprocal = ((0xffff<<15)+(alpha>>1))/alpha;
|
||||
|
||||
c = channels;
|
||||
do /* always at least one channel */
|
||||
{
|
||||
png_uint_16 component = *in_ptr++;
|
||||
|
||||
/* The following gives 65535 for an alpha of 0, which is fine,
|
||||
* otherwise if 0/0 is represented as some other value there is more
|
||||
* likely to be a discontinuity which will probably damage
|
||||
* compression when moving from a fully transparent area to a
|
||||
* nearly transparent one. (The assumption here is that opaque
|
||||
* areas tend not to be 0 intensity.)
|
||||
*/
|
||||
if (component >= alpha)
|
||||
component = 65535;
|
||||
|
||||
/* component<alpha, so component/alpha is less than one and
|
||||
* component*reciprocal is less than 2^31.
|
||||
*/
|
||||
else if (component > 0 && alpha < 65535)
|
||||
{
|
||||
png_uint_32 calc = component * reciprocal;
|
||||
calc += 16384; /* round to nearest */
|
||||
component = (png_uint_16)(calc >> 15);
|
||||
}
|
||||
|
||||
*out_ptr++ = component;
|
||||
}
|
||||
while (--c > 0);
|
||||
|
||||
/* Skip to next component (skip the intervening alpha channel) */
|
||||
++in_ptr;
|
||||
++out_ptr;
|
||||
}
|
||||
|
||||
png_write_row(png_ptr, png_voidcast(png_const_bytep, display->local_row));
|
||||
input_row += display->row_bytes/(sizeof (png_uint_16));
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Given 16-bit input (1 to 4 channels) write 8-bit output. If an alpha channel
|
||||
* is present it must be removed from the components, the components are then
|
||||
* written in sRGB encoding. No components are added or removed.
|
||||
*/
|
||||
static int
|
||||
png_write_image_8bit(png_voidp argument)
|
||||
{
|
||||
png_image_write_control *display = png_voidcast(png_image_write_control*,
|
||||
argument);
|
||||
png_imagep image = display->image;
|
||||
png_structp png_ptr = image->opaque->png_ptr;
|
||||
|
||||
png_const_uint_16p input_row = png_voidcast(png_const_uint_16p,
|
||||
display->first_row);
|
||||
png_bytep output_row = png_voidcast(png_bytep, display->local_row);
|
||||
png_uint_32 y = image->height;
|
||||
int channels = (image->format & PNG_FORMAT_FLAG_COLOR) ? 3 : 1;
|
||||
|
||||
if (image->format & PNG_FORMAT_FLAG_ALPHA)
|
||||
{
|
||||
png_bytep row_end;
|
||||
int aindex;
|
||||
|
||||
if (image->format & PNG_FORMAT_FLAG_AFIRST)
|
||||
{
|
||||
aindex = -1;
|
||||
++input_row; /* To point to the first component */
|
||||
++output_row;
|
||||
}
|
||||
|
||||
else
|
||||
aindex = channels;
|
||||
|
||||
/* Use row_end in place of a loop counter: */
|
||||
row_end = output_row + image->width * (channels+1);
|
||||
|
||||
while (y-- > 0)
|
||||
{
|
||||
png_const_uint_16p in_ptr = input_row;
|
||||
png_bytep out_ptr = output_row;
|
||||
|
||||
if (aindex != 0) while (out_ptr < row_end) /* Alpha channel case */
|
||||
{
|
||||
png_uint_16 alpha = in_ptr[aindex];
|
||||
png_uint_32 reciprocal = 0;
|
||||
int c;
|
||||
|
||||
/* Scale and write the alpha channel. See pngrtran.c
|
||||
* png_do_scale_16_to_8 for a discussion of this calculation. The
|
||||
* code here has machine native values, so use:
|
||||
*
|
||||
* (V * 255 + 32895) >> 16
|
||||
*/
|
||||
out_ptr[aindex] = (png_byte)((alpha * 255 + 32895) >> 16);
|
||||
|
||||
/* Calculate a reciprocal. As above the calculation can be done to
|
||||
* 15 bits of accuracy, however the output needs to be scaled in the
|
||||
* range 0..255*65535, so include that scaling here.
|
||||
*/
|
||||
if (alpha > 0 && alpha < 65535)
|
||||
reciprocal = (((0xffff*0xff)<<7)+(alpha>>1))/alpha;
|
||||
|
||||
c = channels;
|
||||
do /* always at least one channel */
|
||||
{
|
||||
/* Need 32 bit accuracy in the sRGB tables */
|
||||
png_uint_32 component = *in_ptr++;
|
||||
|
||||
/* The following gives 1.0 for an alpha of 0, which is fine,
|
||||
* otherwise if 0/0 is represented as some other value there is
|
||||
* more likely to be a discontinuity which will probably damage
|
||||
* compression when moving from a fully transparent area to a
|
||||
* nearly transparent one. (The assumption here is that opaque
|
||||
* areas tend not to be 0 intensity.)
|
||||
*/
|
||||
if (component >= alpha)
|
||||
*out_ptr++ = 255;
|
||||
|
||||
/* component<alpha, so component/alpha is less than one and
|
||||
* component*reciprocal is less than 2^31.
|
||||
*/
|
||||
else if (component > 0)
|
||||
{
|
||||
if (alpha < 65535)
|
||||
{
|
||||
component *= reciprocal;
|
||||
component += 64; /* round to nearest */
|
||||
component >>= 7;
|
||||
}
|
||||
|
||||
else
|
||||
component *= 255;
|
||||
|
||||
/* Convert the component to sRGB. */
|
||||
*out_ptr++ = (png_byte)PNG_sRGB_FROM_LINEAR(component);
|
||||
}
|
||||
|
||||
else
|
||||
*out_ptr++ = 0;
|
||||
}
|
||||
while (--c > 0);
|
||||
|
||||
/* Skip to next component (skip the intervening alpha channel) */
|
||||
++in_ptr;
|
||||
++out_ptr;
|
||||
} /* while out_ptr < row_end */
|
||||
|
||||
png_write_row(png_ptr, png_voidcast(png_const_bytep,
|
||||
display->local_row));
|
||||
input_row += display->row_bytes/(sizeof (png_uint_16));
|
||||
} /* while y */
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
/* No alpha channel, so the row_end really is the end of the row and it
|
||||
* is sufficient to loop over the components one by one.
|
||||
*/
|
||||
png_bytep row_end = output_row + image->width * channels;
|
||||
|
||||
while (y-- > 0)
|
||||
{
|
||||
png_const_uint_16p in_ptr = input_row;
|
||||
png_bytep out_ptr = output_row;
|
||||
|
||||
while (out_ptr < row_end)
|
||||
{
|
||||
png_uint_32 component = *in_ptr++;
|
||||
|
||||
component *= 255;
|
||||
*out_ptr++ = (png_byte)PNG_sRGB_FROM_LINEAR(component);
|
||||
}
|
||||
|
||||
png_write_row(png_ptr, output_row);
|
||||
input_row += display->row_bytes/(sizeof (png_uint_16));
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
png_image_write_main(png_voidp argument)
|
||||
{
|
||||
png_image_write_control *display = png_voidcast(png_image_write_control*,
|
||||
argument);
|
||||
png_imagep image = display->image;
|
||||
png_structp png_ptr = image->opaque->png_ptr;
|
||||
png_infop info_ptr = image->opaque->info_ptr;
|
||||
png_uint_32 format = image->format;
|
||||
|
||||
int linear = (format & PNG_FORMAT_FLAG_LINEAR) != 0; /* input */
|
||||
int alpha = (format & PNG_FORMAT_FLAG_ALPHA) != 0;
|
||||
int write_16bit = linear && !display->convert_to_8bit;
|
||||
|
||||
/* Default the 'row_stride' parameter if required. */
|
||||
if (display->row_stride == 0)
|
||||
display->row_stride = PNG_IMAGE_ROW_STRIDE(*image);
|
||||
|
||||
/* Set the required transforms then write the rows in the correct order. */
|
||||
png_set_IHDR(png_ptr, info_ptr, image->width, image->height,
|
||||
write_16bit ? 16 : 8,
|
||||
((format & PNG_FORMAT_FLAG_COLOR) ? PNG_COLOR_MASK_COLOR : 0) +
|
||||
((format & PNG_FORMAT_FLAG_ALPHA) ? PNG_COLOR_MASK_ALPHA : 0),
|
||||
PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
|
||||
|
||||
/* Counter-intuitively the data transformations must be called *after*
|
||||
* png_write_info, not before as in the read code, but the 'set' functions
|
||||
* must still be called before. Just set the color space information, never
|
||||
* write an interlaced image.
|
||||
*/
|
||||
if (write_16bit)
|
||||
{
|
||||
/* The gamma here is 1.0 (linear) and the cHRM chunk matches sRGB. */
|
||||
png_set_gAMA_fixed(png_ptr, info_ptr, PNG_GAMMA_LINEAR);
|
||||
|
||||
if (!(image->flags & PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB))
|
||||
png_set_cHRM_fixed(png_ptr, info_ptr,
|
||||
/* color x y */
|
||||
/* white */ 31270, 32900,
|
||||
/* red */ 64000, 33000,
|
||||
/* green */ 30000, 60000,
|
||||
/* blue */ 15000, 6000
|
||||
);
|
||||
}
|
||||
|
||||
else if (!(image->flags & PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB))
|
||||
png_set_sRGB(png_ptr, info_ptr, PNG_sRGB_INTENT_PERCEPTUAL);
|
||||
|
||||
/* Else writing an 8-bit file and the *colors* aren't sRGB, but the 8-bit
|
||||
* space must still be gamma encoded.
|
||||
*/
|
||||
else
|
||||
png_set_gAMA_fixed(png_ptr, info_ptr, PNG_GAMMA_sRGB_INVERSE);
|
||||
|
||||
/* Write the file header. */
|
||||
png_write_info(png_ptr, info_ptr);
|
||||
|
||||
/* Now set up the data transformations (*after* the header is written),
|
||||
* remove the handled transformations from the 'format' flags for checking.
|
||||
*
|
||||
* First check for a little endian system if writing 16 bit files.
|
||||
*/
|
||||
if (write_16bit)
|
||||
{
|
||||
PNG_CONST png_uint_16 le = 0x0001;
|
||||
|
||||
if (*(png_const_bytep)&le)
|
||||
png_set_swap(png_ptr);
|
||||
}
|
||||
|
||||
# ifdef PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED
|
||||
if (format & PNG_FORMAT_FLAG_BGR)
|
||||
{
|
||||
if (format & PNG_FORMAT_FLAG_COLOR)
|
||||
png_set_bgr(png_ptr);
|
||||
format &= ~PNG_FORMAT_FLAG_BGR;
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED
|
||||
if (format & PNG_FORMAT_FLAG_AFIRST)
|
||||
{
|
||||
if (format & PNG_FORMAT_FLAG_ALPHA)
|
||||
png_set_swap_alpha(png_ptr);
|
||||
format &= ~PNG_FORMAT_FLAG_AFIRST;
|
||||
}
|
||||
# endif
|
||||
|
||||
/* That should have handled all (both) the transforms. */
|
||||
if ((format & ~(png_uint_32)(PNG_FORMAT_FLAG_COLOR | PNG_FORMAT_FLAG_LINEAR |
|
||||
PNG_FORMAT_FLAG_ALPHA)) != 0)
|
||||
png_error(png_ptr, "png_write_image: unsupported transformation");
|
||||
|
||||
{
|
||||
png_const_bytep row = png_voidcast(png_const_bytep, display->buffer);
|
||||
ptrdiff_t row_bytes = display->row_stride;
|
||||
|
||||
if (linear)
|
||||
row_bytes *= sizeof (png_uint_16);
|
||||
|
||||
if (row_bytes < 0)
|
||||
row += (image->height-1) * (-row_bytes);
|
||||
|
||||
display->first_row = row;
|
||||
display->row_bytes = row_bytes;
|
||||
}
|
||||
|
||||
/* Check for the cases that currently require a pre-transform on the row
|
||||
* before it is written. This only applies when the input is 16-bit and
|
||||
* either there is an alpha channel or it is converted to 8-bit.
|
||||
*/
|
||||
if ((linear && alpha) || display->convert_to_8bit)
|
||||
{
|
||||
png_bytep row = png_voidcast(png_bytep, png_malloc(png_ptr,
|
||||
png_get_rowbytes(png_ptr, info_ptr)));
|
||||
int result;
|
||||
|
||||
display->local_row = row;
|
||||
if (write_16bit)
|
||||
result = png_safe_execute(image, png_write_image_16bit, display);
|
||||
else
|
||||
result = png_safe_execute(image, png_write_image_8bit, display);
|
||||
display->local_row = NULL;
|
||||
|
||||
png_free(png_ptr, row);
|
||||
|
||||
/* Skip the 'write_end' on error: */
|
||||
if (!result)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Otherwise this is the case where the input is in a format currently
|
||||
* supported by the rest of the libpng write code; call it directly.
|
||||
*/
|
||||
else
|
||||
{
|
||||
png_const_bytep row = png_voidcast(png_const_bytep, display->first_row);
|
||||
ptrdiff_t row_bytes = display->row_bytes;
|
||||
png_uint_32 y = image->height;
|
||||
|
||||
while (y-- > 0)
|
||||
{
|
||||
png_write_row(png_ptr, row);
|
||||
row += row_bytes;
|
||||
}
|
||||
}
|
||||
|
||||
png_write_end(png_ptr, info_ptr);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int PNGAPI
|
||||
png_image_write_to_stdio(png_imagep image, FILE *file, int convert_to_8bit,
|
||||
const void *buffer, png_int_32 row_stride)
|
||||
{
|
||||
/* Write the image to the given (FILE*). */
|
||||
if (image != NULL)
|
||||
{
|
||||
if (file != NULL)
|
||||
{
|
||||
if (png_image_write_init(image))
|
||||
{
|
||||
png_image_write_control display;
|
||||
int result;
|
||||
|
||||
/* This is slightly evil, but png_init_io doesn't do anything other
|
||||
* than this and we haven't changed the standard IO functions so
|
||||
* this saves a 'safe' function.
|
||||
*/
|
||||
image->opaque->png_ptr->io_ptr = file;
|
||||
|
||||
memset(&display, 0, sizeof display);
|
||||
display.image = image;
|
||||
display.buffer = buffer;
|
||||
display.row_stride = row_stride;
|
||||
display.convert_to_8bit = convert_to_8bit;
|
||||
|
||||
result = png_safe_execute(image, png_image_write_main, &display);
|
||||
png_image_free(image);
|
||||
return result;
|
||||
}
|
||||
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
else
|
||||
return png_image_error(image,
|
||||
"png_image_write_to_stdio: invalid argument");
|
||||
}
|
||||
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
int PNGAPI
|
||||
png_image_write_to_file(png_imagep image, const char *file_name,
|
||||
int convert_to_8bit, const void *buffer, png_int_32 row_stride)
|
||||
{
|
||||
/* Write the image to the named file. */
|
||||
if (image != NULL)
|
||||
{
|
||||
if (file_name != NULL)
|
||||
{
|
||||
FILE *fp = fopen(file_name, "wb");
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
if (png_image_write_to_stdio(image, fp, convert_to_8bit, buffer,
|
||||
row_stride))
|
||||
{
|
||||
int error; /* from fflush/fclose */
|
||||
|
||||
/* Make sure the file is flushed correctly. */
|
||||
if (fflush(fp) == 0 && ferror(fp) == 0)
|
||||
{
|
||||
if (fclose(fp) == 0)
|
||||
return 1;
|
||||
|
||||
error = errno; /* from fclose */
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
error = errno; /* from fflush or ferror */
|
||||
(void)fclose(fp);
|
||||
}
|
||||
|
||||
(void)remove(file_name);
|
||||
/* The image has already been cleaned up; this is just used to
|
||||
* set the error (because the original write succeeded).
|
||||
*/
|
||||
return png_image_error(image, strerror(error));
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
/* Clean up: just the opened file. */
|
||||
(void)fclose(fp);
|
||||
(void)remove(file_name);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
return png_image_error(image, strerror(errno));
|
||||
}
|
||||
|
||||
else
|
||||
return png_image_error(image,
|
||||
"png_image_write_to_file: invalid argument");
|
||||
}
|
||||
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
#endif /* PNG_STDIO_SUPPORTED */
|
||||
#endif /* SIMPLIFIED_WRITE */
|
||||
#endif /* PNG_WRITE_SUPPORTED */
|
||||
|
||||
@@ -1,383 +1,383 @@
|
||||
40
|
||||
targetIdent
|
||||
0
|
||||
MProject
|
||||
1
|
||||
MComponent
|
||||
0
|
||||
2
|
||||
WString
|
||||
3
|
||||
LIB
|
||||
3
|
||||
WString
|
||||
5
|
||||
n_2sn
|
||||
1
|
||||
0
|
||||
0
|
||||
4
|
||||
MCommand
|
||||
0
|
||||
5
|
||||
MCommand
|
||||
0
|
||||
6
|
||||
MItem
|
||||
10
|
||||
libpng.lib
|
||||
7
|
||||
WString
|
||||
3
|
||||
LIB
|
||||
8
|
||||
WVList
|
||||
0
|
||||
9
|
||||
WVList
|
||||
1
|
||||
10
|
||||
ActionStates
|
||||
11
|
||||
WString
|
||||
5
|
||||
&Make
|
||||
12
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
13
|
||||
WPickList
|
||||
16
|
||||
14
|
||||
MItem
|
||||
3
|
||||
*.c
|
||||
15
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
16
|
||||
WVList
|
||||
2
|
||||
17
|
||||
MVState
|
||||
18
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
19
|
||||
WString
|
||||
25
|
||||
n????Include directories:
|
||||
1
|
||||
20
|
||||
WString
|
||||
39
|
||||
"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt"
|
||||
0
|
||||
21
|
||||
MVState
|
||||
22
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
23
|
||||
WString
|
||||
25
|
||||
n????Include directories:
|
||||
0
|
||||
24
|
||||
WString
|
||||
39
|
||||
"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt"
|
||||
0
|
||||
25
|
||||
WVList
|
||||
1
|
||||
26
|
||||
ActionStates
|
||||
27
|
||||
WString
|
||||
5
|
||||
&Make
|
||||
28
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
29
|
||||
MItem
|
||||
11
|
||||
..\..\png.c
|
||||
30
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
31
|
||||
WVList
|
||||
0
|
||||
32
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
33
|
||||
MItem
|
||||
16
|
||||
..\..\pngerror.c
|
||||
34
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
35
|
||||
WVList
|
||||
0
|
||||
36
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
37
|
||||
MItem
|
||||
14
|
||||
..\..\pngget.c
|
||||
38
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
39
|
||||
WVList
|
||||
0
|
||||
40
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
41
|
||||
MItem
|
||||
14
|
||||
..\..\pngmem.c
|
||||
42
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
43
|
||||
WVList
|
||||
0
|
||||
44
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
45
|
||||
MItem
|
||||
16
|
||||
..\..\pngpread.c
|
||||
46
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
47
|
||||
WVList
|
||||
0
|
||||
48
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
49
|
||||
MItem
|
||||
15
|
||||
..\..\pngread.c
|
||||
50
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
51
|
||||
WVList
|
||||
0
|
||||
52
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
53
|
||||
MItem
|
||||
14
|
||||
..\..\pngrio.c
|
||||
54
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
55
|
||||
WVList
|
||||
0
|
||||
56
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
57
|
||||
MItem
|
||||
16
|
||||
..\..\pngrtran.c
|
||||
58
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
59
|
||||
WVList
|
||||
0
|
||||
60
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
61
|
||||
MItem
|
||||
16
|
||||
..\..\pngrutil.c
|
||||
62
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
63
|
||||
WVList
|
||||
0
|
||||
64
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
65
|
||||
MItem
|
||||
14
|
||||
..\..\pngset.c
|
||||
66
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
67
|
||||
WVList
|
||||
0
|
||||
68
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
69
|
||||
MItem
|
||||
16
|
||||
..\..\pngtrans.c
|
||||
70
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
71
|
||||
WVList
|
||||
0
|
||||
72
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
73
|
||||
MItem
|
||||
14
|
||||
..\..\pngwio.c
|
||||
74
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
75
|
||||
WVList
|
||||
0
|
||||
76
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
77
|
||||
MItem
|
||||
16
|
||||
..\..\pngwrite.c
|
||||
78
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
79
|
||||
WVList
|
||||
0
|
||||
80
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
81
|
||||
MItem
|
||||
16
|
||||
..\..\pngwtran.c
|
||||
82
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
83
|
||||
WVList
|
||||
0
|
||||
84
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
85
|
||||
MItem
|
||||
16
|
||||
..\..\pngwutil.c
|
||||
86
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
87
|
||||
WVList
|
||||
0
|
||||
88
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
40
|
||||
targetIdent
|
||||
0
|
||||
MProject
|
||||
1
|
||||
MComponent
|
||||
0
|
||||
2
|
||||
WString
|
||||
3
|
||||
LIB
|
||||
3
|
||||
WString
|
||||
5
|
||||
n_2sn
|
||||
1
|
||||
0
|
||||
0
|
||||
4
|
||||
MCommand
|
||||
0
|
||||
5
|
||||
MCommand
|
||||
0
|
||||
6
|
||||
MItem
|
||||
10
|
||||
libpng.lib
|
||||
7
|
||||
WString
|
||||
3
|
||||
LIB
|
||||
8
|
||||
WVList
|
||||
0
|
||||
9
|
||||
WVList
|
||||
1
|
||||
10
|
||||
ActionStates
|
||||
11
|
||||
WString
|
||||
5
|
||||
&Make
|
||||
12
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
13
|
||||
WPickList
|
||||
16
|
||||
14
|
||||
MItem
|
||||
3
|
||||
*.c
|
||||
15
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
16
|
||||
WVList
|
||||
2
|
||||
17
|
||||
MVState
|
||||
18
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
19
|
||||
WString
|
||||
25
|
||||
n????Include directories:
|
||||
1
|
||||
20
|
||||
WString
|
||||
39
|
||||
"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt"
|
||||
0
|
||||
21
|
||||
MVState
|
||||
22
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
23
|
||||
WString
|
||||
25
|
||||
n????Include directories:
|
||||
0
|
||||
24
|
||||
WString
|
||||
39
|
||||
"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt"
|
||||
0
|
||||
25
|
||||
WVList
|
||||
1
|
||||
26
|
||||
ActionStates
|
||||
27
|
||||
WString
|
||||
5
|
||||
&Make
|
||||
28
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
29
|
||||
MItem
|
||||
11
|
||||
..\..\png.c
|
||||
30
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
31
|
||||
WVList
|
||||
0
|
||||
32
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
33
|
||||
MItem
|
||||
16
|
||||
..\..\pngerror.c
|
||||
34
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
35
|
||||
WVList
|
||||
0
|
||||
36
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
37
|
||||
MItem
|
||||
14
|
||||
..\..\pngget.c
|
||||
38
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
39
|
||||
WVList
|
||||
0
|
||||
40
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
41
|
||||
MItem
|
||||
14
|
||||
..\..\pngmem.c
|
||||
42
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
43
|
||||
WVList
|
||||
0
|
||||
44
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
45
|
||||
MItem
|
||||
16
|
||||
..\..\pngpread.c
|
||||
46
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
47
|
||||
WVList
|
||||
0
|
||||
48
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
49
|
||||
MItem
|
||||
15
|
||||
..\..\pngread.c
|
||||
50
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
51
|
||||
WVList
|
||||
0
|
||||
52
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
53
|
||||
MItem
|
||||
14
|
||||
..\..\pngrio.c
|
||||
54
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
55
|
||||
WVList
|
||||
0
|
||||
56
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
57
|
||||
MItem
|
||||
16
|
||||
..\..\pngrtran.c
|
||||
58
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
59
|
||||
WVList
|
||||
0
|
||||
60
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
61
|
||||
MItem
|
||||
16
|
||||
..\..\pngrutil.c
|
||||
62
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
63
|
||||
WVList
|
||||
0
|
||||
64
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
65
|
||||
MItem
|
||||
14
|
||||
..\..\pngset.c
|
||||
66
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
67
|
||||
WVList
|
||||
0
|
||||
68
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
69
|
||||
MItem
|
||||
16
|
||||
..\..\pngtrans.c
|
||||
70
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
71
|
||||
WVList
|
||||
0
|
||||
72
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
73
|
||||
MItem
|
||||
14
|
||||
..\..\pngwio.c
|
||||
74
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
75
|
||||
WVList
|
||||
0
|
||||
76
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
77
|
||||
MItem
|
||||
16
|
||||
..\..\pngwrite.c
|
||||
78
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
79
|
||||
WVList
|
||||
0
|
||||
80
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
81
|
||||
MItem
|
||||
16
|
||||
..\..\pngwtran.c
|
||||
82
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
83
|
||||
WVList
|
||||
0
|
||||
84
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
85
|
||||
MItem
|
||||
16
|
||||
..\..\pngwutil.c
|
||||
86
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
87
|
||||
WVList
|
||||
0
|
||||
88
|
||||
WVList
|
||||
0
|
||||
14
|
||||
1
|
||||
1
|
||||
0
|
||||
|
||||
@@ -1,112 +1,92 @@
|
||||
40
|
||||
projectIdent
|
||||
0
|
||||
VpeMain
|
||||
1
|
||||
WRect
|
||||
256
|
||||
0
|
||||
8960
|
||||
9294
|
||||
2
|
||||
MProject
|
||||
3
|
||||
MCommand
|
||||
322
|
||||
# Locations of zlib and (if required) awk (change as required:)
|
||||
set zlib=..\..\..\zlib
|
||||
set awk=
|
||||
#
|
||||
@if not exist pngconfig.dfa $(MAKE) $(__MAKEOPTS__) -f pngconfig.mak defaults
|
||||
@if exist config.inf type config.inf
|
||||
@echo Checking for the libpng configuration file pnglibconf.h
|
||||
$(MAKE) $(__MAKEOPTS__) -f pngconfig.mak
|
||||
4
|
||||
MCommand
|
||||
19
|
||||
@type pngconfig.inf
|
||||
4
|
||||
5
|
||||
WFileName
|
||||
10
|
||||
libpng.tgt
|
||||
6
|
||||
WFileName
|
||||
11
|
||||
pngtest.tgt
|
||||
7
|
||||
WFileName
|
||||
12
|
||||
pngvalid.tgt
|
||||
8
|
||||
WFileName
|
||||
12
|
||||
pngstest.tgt
|
||||
9
|
||||
WVList
|
||||
4
|
||||
10
|
||||
VComponent
|
||||
11
|
||||
WRect
|
||||
0
|
||||
0
|
||||
5638
|
||||
4174
|
||||
0
|
||||
0
|
||||
12
|
||||
WFileName
|
||||
10
|
||||
libpng.tgt
|
||||
0
|
||||
0
|
||||
13
|
||||
VComponent
|
||||
14
|
||||
WRect
|
||||
1280
|
||||
1550
|
||||
5638
|
||||
4174
|
||||
0
|
||||
0
|
||||
15
|
||||
WFileName
|
||||
11
|
||||
pngtest.tgt
|
||||
0
|
||||
1
|
||||
16
|
||||
VComponent
|
||||
17
|
||||
WRect
|
||||
524
|
||||
497
|
||||
5638
|
||||
4174
|
||||
0
|
||||
0
|
||||
18
|
||||
WFileName
|
||||
12
|
||||
pngvalid.tgt
|
||||
0
|
||||
1
|
||||
19
|
||||
VComponent
|
||||
20
|
||||
WRect
|
||||
2054
|
||||
2701
|
||||
5674
|
||||
4232
|
||||
0
|
||||
0
|
||||
21
|
||||
WFileName
|
||||
12
|
||||
pngstest.tgt
|
||||
0
|
||||
1
|
||||
19
|
||||
40
|
||||
projectIdent
|
||||
0
|
||||
VpeMain
|
||||
1
|
||||
WRect
|
||||
256
|
||||
0
|
||||
8960
|
||||
9284
|
||||
2
|
||||
MProject
|
||||
3
|
||||
MCommand
|
||||
322
|
||||
# Locations of zlib and (if required) awk (change as required:)
|
||||
set zlib=..\..\..\zlib
|
||||
set awk=
|
||||
#
|
||||
@if not exist pngconfig.dfa $(MAKE) $(__MAKEOPTS__) -f pngconfig.mak defaults
|
||||
@if exist config.inf type config.inf
|
||||
@echo Checking for the libpng configuration file pnglibconf.h
|
||||
$(MAKE) $(__MAKEOPTS__) -f pngconfig.mak
|
||||
4
|
||||
MCommand
|
||||
19
|
||||
@type pngconfig.inf
|
||||
3
|
||||
5
|
||||
WFileName
|
||||
10
|
||||
libpng.tgt
|
||||
6
|
||||
WFileName
|
||||
11
|
||||
pngtest.tgt
|
||||
7
|
||||
WFileName
|
||||
12
|
||||
pngvalid.tgt
|
||||
8
|
||||
WVList
|
||||
3
|
||||
9
|
||||
VComponent
|
||||
10
|
||||
WRect
|
||||
0
|
||||
0
|
||||
5632
|
||||
4164
|
||||
0
|
||||
0
|
||||
11
|
||||
WFileName
|
||||
10
|
||||
libpng.tgt
|
||||
0
|
||||
0
|
||||
12
|
||||
VComponent
|
||||
13
|
||||
WRect
|
||||
1280
|
||||
1540
|
||||
5632
|
||||
4164
|
||||
0
|
||||
0
|
||||
14
|
||||
WFileName
|
||||
11
|
||||
pngtest.tgt
|
||||
0
|
||||
1
|
||||
15
|
||||
VComponent
|
||||
16
|
||||
WRect
|
||||
518
|
||||
487
|
||||
5632
|
||||
4164
|
||||
0
|
||||
0
|
||||
17
|
||||
WFileName
|
||||
12
|
||||
pngvalid.tgt
|
||||
0
|
||||
1
|
||||
9
|
||||
|
||||
@@ -1,160 +1,160 @@
|
||||
# This is an OpenWatcom make file which builds pnglibconf.h - the libpng
|
||||
# configuration header. You can ignore this file if you don't need to
|
||||
# configure libpng; a default configuration will be built.
|
||||
#
|
||||
# For more information build libpng.wpj under the IDE and then read the
|
||||
# generated files:
|
||||
#
|
||||
# config.inf: Basic configuration information for a standard build.
|
||||
# pngconfig.dfa: Advanced configuration for non-standard libpng builds.
|
||||
#
|
||||
DELETE=rm -f
|
||||
ECHO=echo
|
||||
COPY=copy
|
||||
#
|
||||
# If your configuration needs to test compiler flags when building
|
||||
# pnglibconf.h you may need to override the following on the wmake command
|
||||
# line:
|
||||
CFLAGS=
|
||||
CC=wcl386
|
||||
CPP=$(CC) -pw0
|
||||
#
|
||||
# Read awk from the environment if set, else it can be set on the command
|
||||
# line (the default approach is to set the %awk% environment variable in the
|
||||
# IDE libpng.wpj 'before' rule - this setting is local.)
|
||||
!ifdef %awk
|
||||
AWK=$(%awk)
|
||||
!endif
|
||||
#
|
||||
# pnglibconf.h must exist in the source directory, this is the final rule
|
||||
# which copies the local built version (and this is the default target for
|
||||
# this makefile.)
|
||||
..\..\pnglibconf.h: pnglibconf.h
|
||||
$(COPY) pnglibconf.h $@
|
||||
|
||||
!ifdef AWK
|
||||
# CPPFLAGS should contain the options to control the result,
|
||||
# but DEFS and CFLAGS are also supported here, override
|
||||
# as appropriate
|
||||
DFNFLAGS = $(DEFS) $(CPPFLAGS) $(CFLAGS)
|
||||
|
||||
pnglibconf.h: pnglibconf.dfn
|
||||
$(DELETE) $@ dfn.c dfn1.out dfn2.out
|
||||
$(ECHO) $#include "pnglibconf.dfn" >dfn.c
|
||||
$(CPP) $(DFNFLAGS) dfn.c >dfn1.out
|
||||
$(AWK) -f << dfn1.out >dfn2.out
|
||||
/^.*PNG_DEFN_MAGIC-.*-PNG_DEFN_END.*$$/{
|
||||
sub(/^.*PNG_DEFN_MAGIC-/, "")
|
||||
sub(/ *-PNG_DEFN_END.*$$/, "")
|
||||
gsub(/ *@@@ */, "")
|
||||
print
|
||||
}
|
||||
<<
|
||||
$(COPY) dfn2.out $@
|
||||
@type << >pngconfig.inf
|
||||
This is a locally configurable build of libpng.lib; for configuration
|
||||
instructions consult and edit projects/openwatcom/pngconfig.dfa
|
||||
<<
|
||||
$(DELETE) dfn.c dfn1.out dfn2.out
|
||||
|
||||
pnglibconf.dfn: ..\..\scripts\pnglibconf.dfa ..\..\scripts\options.awk pngconfig.dfa ..\..\pngconf.h
|
||||
$(DELETE) $@ dfn1.out dfn2.out
|
||||
$(AWK) -f ..\..\scripts\options.awk out=dfn1.out version=search ..\..\pngconf.h ..\..\scripts\pnglibconf.dfa pngconfig.dfa $(DFA_XTRA) 1>&2
|
||||
$(AWK) -f ..\..\scripts\options.awk out=dfn2.out dfn1.out 1>&2
|
||||
$(COPY) dfn2.out $@
|
||||
$(DELETE) dfn1.out dfn2.out
|
||||
|
||||
!else
|
||||
# The following lines are used to copy scripts\pnglibconf.h.prebuilt and make
|
||||
# the required change to the calling convention.
|
||||
#
|
||||
# By default libpng is built to use the __cdecl calling convention on
|
||||
# Windows. This gives compatibility with MSVC and GCC. Unfortunately it
|
||||
# does not work with OpenWatcom because OpenWatcom implements longjmp using
|
||||
# the __watcall convention (compared with both MSVC and GCC which use __cdecl
|
||||
# for library functions.)
|
||||
#
|
||||
# Thus the default must be changed to build on OpenWatcom and, once changed,
|
||||
# the result will not be compatible with applications built using other
|
||||
# compilers (in fact attempts to build will fail at compile time.)
|
||||
#
|
||||
pnglibconf.h: ..\..\scripts\pnglibconf.h.prebuilt .existsonly
|
||||
@$(ECHO) .
|
||||
@$(ECHO) .
|
||||
@$(ECHO) $$(AWK) NOT AVAILABLE: COPYING scripts\pnglibconf.h.prebuilt
|
||||
@$(ECHO) .
|
||||
@$(ECHO) .
|
||||
vi -q -k ":1,$$s/PNG_API_RULE 0$$/PNG_API_RULE 2/\n:w! $@\n:q!\n" ..\..\scripts\pnglibconf.h.prebuilt
|
||||
@$(ECHO) .
|
||||
@$(ECHO) .
|
||||
@$(ECHO) YOU HAVE A DEFAULT CONFIGURATION BECAUSE YOU DO NOT HAVE AWK!
|
||||
@$(ECHO) .
|
||||
@$(ECHO) .
|
||||
@type << >pngconfig.inf
|
||||
This is the default configuration of libpng.lib, if you wish to
|
||||
change the configuration please consult the instructions in
|
||||
projects/owatcom/pngconfig.dfa.
|
||||
<<
|
||||
|
||||
!endif
|
||||
|
||||
# Make the default files
|
||||
defaults: .symbolic
|
||||
@$(COPY) << config.inf
|
||||
$# The libpng project is incompletely configured. To complete configuration
|
||||
$# please complete the following steps:
|
||||
$#
|
||||
$# 1) Edit the 'before' rule of libpng.wpj (from the IDE) to define the
|
||||
$# locations of the zlib include file zlib.h and the built zlib library,
|
||||
$# zlib.lib.
|
||||
$#
|
||||
$# 2) If you want to change libpng to a non-standard configuration also
|
||||
$# change the definition of 'awk' in the before rule to the name of your
|
||||
$# awk command. For more instructions on configuration read
|
||||
$# pngconfig.dfa.
|
||||
$#
|
||||
$# 3) Delete this file (config.inf).
|
||||
<<
|
||||
@$(COPY) << pngconfig.dfa
|
||||
$# pngconfig.dfa: this file contains configuration options for libpng.
|
||||
$# If emtpy the standard configuration will be built. For this file to be
|
||||
$# used a working version of the program 'awk' is required and the program
|
||||
$# must be identified in the 'before' rule of the project.
|
||||
$#
|
||||
$# If you don't already have 'awk', or the version of awk you have seems not
|
||||
$# to work, download Brian Kernighan's awk (Brian Kernighan is the author of
|
||||
$# awk.) You can find source code and a built executable (called awk95.exe)
|
||||
$# here:
|
||||
$#
|
||||
$# http://www.cs.princeton.edu/~bwk/btl.mirror/
|
||||
$#
|
||||
$# The executable works just fine.
|
||||
$#
|
||||
$# If build issues errors after a change to pngconfig.dfa you have entered
|
||||
$# inconsistent feature requests, or even malformed requests, in
|
||||
$# pngconfig.dfa. The error messages from awk should be comprehensible, but
|
||||
$# if not simply go back to the start (nothing but comments in this file) and
|
||||
$# enter configuration lines one by one until one produces an error. (Or, of
|
||||
$# course, do the standard binary chop.)
|
||||
$#
|
||||
$# You need to rebuild everything after a change to pnglibconf.dfa - i.e. you
|
||||
$# must do Actions/Mark All Targets for Remake. This is because the compiler
|
||||
$# generated dependency information (as of OpenWatcom 1.9) does not record the
|
||||
$# dependency on pnglibconf.h correctly.
|
||||
$#
|
||||
$# If awk isn't set then this file is bypassed. If you just want the standard
|
||||
$# configuration it is automatically produced from the distributed version
|
||||
$# (scripts\pnglibconf.h.prebuilt) by editting PNG_API_RULE to 2 (to force use
|
||||
$# of the OpenWatcom library calling convention.)
|
||||
$#
|
||||
<<
|
||||
|
||||
clean:: .symbolic
|
||||
$(DELETE) ..\..\pnglibconf.h pnglibconf.* dfn.c *.out pngconfig.inf
|
||||
$(DELETE) *.obj *.mbr *.sym *.err *.pch libpng.mk
|
||||
$(DELETE) libpng.lib libpng.lbr libpng.lb1 libpng.cbr libpng.mk1
|
||||
$(DELETE) pngtest.exe pngtest.map pngtest.lk1 pngtest.mk1
|
||||
$(DELETE) pngvalid.exe pngvalid.map pngvalid.lk1 pngvalid.mk1
|
||||
|
||||
distclean:: clean .symbolic
|
||||
$(DELETE) zlib.inf awk.inf config.inf pngconfig.dfa
|
||||
# This is an OpenWatcom make file which builds pnglibconf.h - the libpng
|
||||
# configuration header. You can ignore this file if you don't need to
|
||||
# configure libpng; a default configuration will be built.
|
||||
#
|
||||
# For more information build libpng.wpj under the IDE and then read the
|
||||
# generated files:
|
||||
#
|
||||
# config.inf: Basic configuration information for a standard build.
|
||||
# pngconfig.dfa: Advanced configuration for non-standard libpng builds.
|
||||
#
|
||||
DELETE=rm -f
|
||||
ECHO=echo
|
||||
COPY=copy
|
||||
#
|
||||
# If your configuration needs to test compiler flags when building
|
||||
# pnglibconf.h you may need to override the following on the wmake command
|
||||
# line:
|
||||
CFLAGS=
|
||||
CC=wcl386
|
||||
CPP=$(CC) -pw0
|
||||
#
|
||||
# Read awk from the environment if set, else it can be set on the command
|
||||
# line (the default approach is to set the %awk% environment variable in the
|
||||
# IDE libpng.wpj 'before' rule - this setting is local.)
|
||||
!ifdef %awk
|
||||
AWK=$(%awk)
|
||||
!endif
|
||||
#
|
||||
# pnglibconf.h must exist in the source directory, this is the final rule
|
||||
# which copies the local built version (and this is the default target for
|
||||
# this makefile.)
|
||||
..\..\pnglibconf.h: pnglibconf.h
|
||||
$(COPY) pnglibconf.h $@
|
||||
|
||||
!ifdef AWK
|
||||
# CPPFLAGS should contain the options to control the result,
|
||||
# but DEFS and CFLAGS are also supported here, override
|
||||
# as appropriate
|
||||
DFNFLAGS = $(DEFS) $(CPPFLAGS) $(CFLAGS)
|
||||
|
||||
pnglibconf.h: pnglibconf.dfn
|
||||
$(DELETE) $@ dfn.c dfn1.out dfn2.out
|
||||
$(ECHO) $#include "pnglibconf.dfn" >dfn.c
|
||||
$(CPP) $(DFNFLAGS) dfn.c >dfn1.out
|
||||
$(AWK) -f << dfn1.out >dfn2.out
|
||||
/^.*PNG_DEFN_MAGIC-.*-PNG_DEFN_END.*$$/{
|
||||
sub(/^.*PNG_DEFN_MAGIC-/, "")
|
||||
sub(/ *-PNG_DEFN_END.*$$/, "")
|
||||
gsub(/ *@@@ */, "")
|
||||
print
|
||||
}
|
||||
<<
|
||||
$(COPY) dfn2.out $@
|
||||
@type << >pngconfig.inf
|
||||
This is a locally configurable build of libpng.lib; for configuration
|
||||
instructions consult and edit projects/openwatcom/pngconfig.dfa
|
||||
<<
|
||||
$(DELETE) dfn.c dfn1.out dfn2.out
|
||||
|
||||
pnglibconf.dfn: ..\..\scripts\pnglibconf.dfa ..\..\scripts\options.awk pngconfig.dfa ..\..\pngconf.h
|
||||
$(DELETE) $@ dfn1.out dfn2.out
|
||||
$(AWK) -f ..\..\scripts\options.awk out=dfn1.out version=search ..\..\pngconf.h ..\..\scripts\pnglibconf.dfa pngconfig.dfa $(DFA_XTRA) 1>&2
|
||||
$(AWK) -f ..\..\scripts\options.awk out=dfn2.out dfn1.out 1>&2
|
||||
$(COPY) dfn2.out $@
|
||||
$(DELETE) dfn1.out dfn2.out
|
||||
|
||||
!else
|
||||
# The following lines are used to copy scripts\pnglibconf.h.prebuilt and make
|
||||
# the required change to the calling convention.
|
||||
#
|
||||
# By default libpng is built to use the __cdecl calling convention on
|
||||
# Windows. This gives compatibility with MSVC and GCC. Unfortunately it
|
||||
# does not work with OpenWatcom because OpenWatcom implements longjmp using
|
||||
# the __watcall convention (compared with both MSVC and GCC which use __cdecl
|
||||
# for library functions.)
|
||||
#
|
||||
# Thus the default must be changed to build on OpenWatcom and, once changed,
|
||||
# the result will not be compatible with applications built using other
|
||||
# compilers (in fact attempts to build will fail at compile time.)
|
||||
#
|
||||
pnglibconf.h: ..\..\scripts\pnglibconf.h.prebuilt .existsonly
|
||||
@$(ECHO) .
|
||||
@$(ECHO) .
|
||||
@$(ECHO) $$(AWK) NOT AVAILABLE: COPYING scripts\pnglibconf.h.prebuilt
|
||||
@$(ECHO) .
|
||||
@$(ECHO) .
|
||||
vi -q -k ":1,$$s/PNG_API_RULE 0$$/PNG_API_RULE 2/\n:w! $@\n:q!\n" ..\..\scripts\pnglibconf.h.prebuilt
|
||||
@$(ECHO) .
|
||||
@$(ECHO) .
|
||||
@$(ECHO) YOU HAVE A DEFAULT CONFIGURATION BECAUSE YOU DO NOT HAVE AWK!
|
||||
@$(ECHO) .
|
||||
@$(ECHO) .
|
||||
@type << >pngconfig.inf
|
||||
This is the default configuration of libpng.lib, if you wish to
|
||||
change the configuration please consult the instructions in
|
||||
projects/owatcom/pngconfig.dfa.
|
||||
<<
|
||||
|
||||
!endif
|
||||
|
||||
# Make the default files
|
||||
defaults: .symbolic
|
||||
@$(COPY) << config.inf
|
||||
$# The libpng project is incompletely configured. To complete configuration
|
||||
$# please complete the following steps:
|
||||
$#
|
||||
$# 1) Edit the 'before' rule of libpng.wpj (from the IDE) to define the
|
||||
$# locations of the zlib include file zlib.h and the built zlib library,
|
||||
$# zlib.lib.
|
||||
$#
|
||||
$# 2) If you want to change libpng to a non-standard configuration also
|
||||
$# change the definition of 'awk' in the before rule to the name of your
|
||||
$# awk command. For more instructions on configuration read
|
||||
$# pngconfig.dfa.
|
||||
$#
|
||||
$# 3) Delete this file (config.inf).
|
||||
<<
|
||||
@$(COPY) << pngconfig.dfa
|
||||
$# pngconfig.dfa: this file contains configuration options for libpng.
|
||||
$# If emtpy the standard configuration will be built. For this file to be
|
||||
$# used a working version of the program 'awk' is required and the program
|
||||
$# must be identified in the 'before' rule of the project.
|
||||
$#
|
||||
$# If you don't already have 'awk', or the version of awk you have seems not
|
||||
$# to work, download Brian Kernighan's awk (Brian Kernighan is the author of
|
||||
$# awk.) You can find source code and a built executable (called awk95.exe)
|
||||
$# here:
|
||||
$#
|
||||
$# http://www.cs.princeton.edu/~bwk/btl.mirror/
|
||||
$#
|
||||
$# The executable works just fine.
|
||||
$#
|
||||
$# If build issues errors after a change to pngconfig.dfa you have entered
|
||||
$# inconsistent feature requests, or even malformed requests, in
|
||||
$# pngconfig.dfa. The error messages from awk should be comprehensible, but
|
||||
$# if not simply go back to the start (nothing but comments in this file) and
|
||||
$# enter configuration lines one by one until one produces an error. (Or, of
|
||||
$# course, do the standard binary chop.)
|
||||
$#
|
||||
$# You need to rebuild everything after a change to pnglibconf.dfa - i.e. you
|
||||
$# must do Actions/Mark All Targets for Remake. This is because the compiler
|
||||
$# generated dependency information (as of OpenWatcom 1.9) does not record the
|
||||
$# dependency on pnglibconf.h correctly.
|
||||
$#
|
||||
$# If awk isn't set then this file is bypassed. If you just want the standard
|
||||
$# configuration it is automatically produced from the distributed version
|
||||
$# (scripts\pnglibconf.h.prebuilt) by editting PNG_API_RULE to 2 (to force use
|
||||
$# of the OpenWatcom library calling convention.)
|
||||
$#
|
||||
<<
|
||||
|
||||
clean:: .symbolic
|
||||
$(DELETE) ..\..\pnglibconf.h pnglibconf.* dfn.c *.out pngconfig.inf
|
||||
$(DELETE) *.obj *.mbr *.sym *.err *.pch libpng.mk
|
||||
$(DELETE) libpng.lib libpng.lbr libpng.lb1 libpng.cbr libpng.mk1
|
||||
$(DELETE) pngtest.exe pngtest.map pngtest.lk1 pngtest.mk1
|
||||
$(DELETE) pngvalid.exe pngvalid.map pngvalid.lk1 pngvalid.mk1
|
||||
|
||||
distclean:: clean .symbolic
|
||||
$(DELETE) zlib.inf awk.inf config.inf pngconfig.dfa
|
||||
|
||||
@@ -1,219 +0,0 @@
|
||||
40
|
||||
targetIdent
|
||||
0
|
||||
MProject
|
||||
1
|
||||
MComponent
|
||||
0
|
||||
2
|
||||
WString
|
||||
4
|
||||
NEXE
|
||||
3
|
||||
WString
|
||||
5
|
||||
nc2en
|
||||
1
|
||||
0
|
||||
0
|
||||
4
|
||||
MCommand
|
||||
0
|
||||
5
|
||||
MCommand
|
||||
1035
|
||||
pngstest --log ../../contrib/pngsuite/basn0g01.png ../../contrib/pngsuite/basn0g02.png ../../contrib/pngsuite/basn0g04.png ../../contrib/pngsuite/basn0g08.png ../../contrib/pngsuite/basn0g16.png ../../contrib/pngsuite/basn2c08.png ../../contrib/pngsuite/basn2c16.png ../../contrib/pngsuite/basn3p01.png ../../contrib/pngsuite/basn3p02.png ../../contrib/pngsuite/basn3p04.png ../../contrib/pngsuite/basn3p08.png ../../contrib/pngsuite/basn4a08.png ../../contrib/pngsuite/basn4a16.png ../../contrib/pngsuite/basn6a08.png ../../contrib/pngsuite/basn6a16.png ../../contrib/pngsuite/ftbbn1g04.png ../../contrib/pngsuite/ftbbn2c16.png ../../contrib/pngsuite/ftbbn3p08.png ../../contrib/pngsuite/ftbgn2c16.png ../../contrib/pngsuite/ftbgn3p08.png ../../contrib/pngsuite/ftbrn2c08.png ../../contrib/pngsuite/ftbwn1g16.png ../../contrib/pngsuite/ftbwn3p08.png ../../contrib/pngsuite/ftbyn3p08.png ../../contrib/pngsuite/ftp0n1g08.png ../../contrib/pngsuite/ftp0n2c08.png ../../contrib/pngsuite/ftp0n3p08.png ../../contrib/pngsuite/ftp1n3p08.png
|
||||
6
|
||||
MItem
|
||||
12
|
||||
pngstest.exe
|
||||
7
|
||||
WString
|
||||
4
|
||||
NEXE
|
||||
8
|
||||
WVList
|
||||
6
|
||||
9
|
||||
MVState
|
||||
10
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
11
|
||||
WString
|
||||
11
|
||||
?????Stack:
|
||||
1
|
||||
12
|
||||
WString
|
||||
4
|
||||
768k
|
||||
0
|
||||
13
|
||||
MVState
|
||||
14
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
15
|
||||
WString
|
||||
28
|
||||
?????Library directories(;):
|
||||
1
|
||||
16
|
||||
WString
|
||||
8
|
||||
$(%zlib)
|
||||
0
|
||||
17
|
||||
MVState
|
||||
18
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
19
|
||||
WString
|
||||
18
|
||||
?????Libraries(,):
|
||||
1
|
||||
20
|
||||
WString
|
||||
19
|
||||
libpng.lib zlib.lib
|
||||
0
|
||||
21
|
||||
MVState
|
||||
22
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
23
|
||||
WString
|
||||
11
|
||||
?????Stack:
|
||||
0
|
||||
24
|
||||
WString
|
||||
4
|
||||
768k
|
||||
0
|
||||
25
|
||||
MVState
|
||||
26
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
27
|
||||
WString
|
||||
28
|
||||
?????Library directories(;):
|
||||
0
|
||||
28
|
||||
WString
|
||||
8
|
||||
$(%zlib)
|
||||
0
|
||||
29
|
||||
MVState
|
||||
30
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
31
|
||||
WString
|
||||
18
|
||||
?????Libraries(,):
|
||||
0
|
||||
32
|
||||
WString
|
||||
19
|
||||
libpng.lib zlib.lib
|
||||
0
|
||||
33
|
||||
WVList
|
||||
1
|
||||
34
|
||||
ActionStates
|
||||
35
|
||||
WString
|
||||
4
|
||||
&Run
|
||||
36
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
37
|
||||
WPickList
|
||||
2
|
||||
38
|
||||
MItem
|
||||
3
|
||||
*.c
|
||||
39
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
40
|
||||
WVList
|
||||
2
|
||||
41
|
||||
MVState
|
||||
42
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
43
|
||||
WString
|
||||
25
|
||||
n????Include directories:
|
||||
1
|
||||
44
|
||||
WString
|
||||
39
|
||||
"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt"
|
||||
0
|
||||
45
|
||||
MVState
|
||||
46
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
47
|
||||
WString
|
||||
25
|
||||
n????Include directories:
|
||||
0
|
||||
48
|
||||
WString
|
||||
39
|
||||
"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt"
|
||||
0
|
||||
49
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
50
|
||||
MItem
|
||||
33
|
||||
..\..\contrib\libtests\pngstest.c
|
||||
51
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
52
|
||||
WVList
|
||||
0
|
||||
53
|
||||
WVList
|
||||
0
|
||||
38
|
||||
1
|
||||
1
|
||||
0
|
||||
@@ -1,179 +1,179 @@
|
||||
40
|
||||
targetIdent
|
||||
0
|
||||
MProject
|
||||
1
|
||||
MComponent
|
||||
0
|
||||
2
|
||||
WString
|
||||
4
|
||||
NEXE
|
||||
3
|
||||
WString
|
||||
5
|
||||
nc2en
|
||||
1
|
||||
0
|
||||
0
|
||||
4
|
||||
MCommand
|
||||
0
|
||||
5
|
||||
MCommand
|
||||
34
|
||||
cd ..\..
|
||||
projects\owatcom\pngtest
|
||||
6
|
||||
MItem
|
||||
11
|
||||
pngtest.exe
|
||||
7
|
||||
WString
|
||||
4
|
||||
NEXE
|
||||
8
|
||||
WVList
|
||||
4
|
||||
9
|
||||
MVState
|
||||
10
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
11
|
||||
WString
|
||||
28
|
||||
?????Library directories(;):
|
||||
1
|
||||
12
|
||||
WString
|
||||
8
|
||||
$(%zlib)
|
||||
0
|
||||
13
|
||||
MVState
|
||||
14
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
15
|
||||
WString
|
||||
18
|
||||
?????Libraries(,):
|
||||
1
|
||||
16
|
||||
WString
|
||||
19
|
||||
libpng.lib zlib.lib
|
||||
0
|
||||
17
|
||||
MVState
|
||||
18
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
19
|
||||
WString
|
||||
28
|
||||
?????Library directories(;):
|
||||
0
|
||||
20
|
||||
WString
|
||||
8
|
||||
$(%zlib)
|
||||
0
|
||||
21
|
||||
MVState
|
||||
22
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
23
|
||||
WString
|
||||
18
|
||||
?????Libraries(,):
|
||||
0
|
||||
24
|
||||
WString
|
||||
19
|
||||
libpng.lib zlib.lib
|
||||
0
|
||||
25
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
26
|
||||
WPickList
|
||||
2
|
||||
27
|
||||
MItem
|
||||
3
|
||||
*.c
|
||||
28
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
29
|
||||
WVList
|
||||
2
|
||||
30
|
||||
MVState
|
||||
31
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
32
|
||||
WString
|
||||
25
|
||||
n????Include directories:
|
||||
1
|
||||
33
|
||||
WString
|
||||
39
|
||||
"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt"
|
||||
0
|
||||
34
|
||||
MVState
|
||||
35
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
36
|
||||
WString
|
||||
25
|
||||
n????Include directories:
|
||||
0
|
||||
37
|
||||
WString
|
||||
39
|
||||
"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt"
|
||||
0
|
||||
38
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
39
|
||||
MItem
|
||||
15
|
||||
..\..\pngtest.c
|
||||
40
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
41
|
||||
WVList
|
||||
0
|
||||
42
|
||||
WVList
|
||||
0
|
||||
27
|
||||
1
|
||||
1
|
||||
0
|
||||
40
|
||||
targetIdent
|
||||
0
|
||||
MProject
|
||||
1
|
||||
MComponent
|
||||
0
|
||||
2
|
||||
WString
|
||||
4
|
||||
NEXE
|
||||
3
|
||||
WString
|
||||
5
|
||||
nc2en
|
||||
1
|
||||
0
|
||||
0
|
||||
4
|
||||
MCommand
|
||||
0
|
||||
5
|
||||
MCommand
|
||||
34
|
||||
cd ..\..
|
||||
projects\owatcom\pngtest
|
||||
6
|
||||
MItem
|
||||
11
|
||||
pngtest.exe
|
||||
7
|
||||
WString
|
||||
4
|
||||
NEXE
|
||||
8
|
||||
WVList
|
||||
4
|
||||
9
|
||||
MVState
|
||||
10
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
11
|
||||
WString
|
||||
28
|
||||
?????Library directories(;):
|
||||
1
|
||||
12
|
||||
WString
|
||||
8
|
||||
$(%zlib)
|
||||
0
|
||||
13
|
||||
MVState
|
||||
14
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
15
|
||||
WString
|
||||
18
|
||||
?????Libraries(,):
|
||||
1
|
||||
16
|
||||
WString
|
||||
19
|
||||
libpng.lib zlib.lib
|
||||
0
|
||||
17
|
||||
MVState
|
||||
18
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
19
|
||||
WString
|
||||
28
|
||||
?????Library directories(;):
|
||||
0
|
||||
20
|
||||
WString
|
||||
8
|
||||
$(%zlib)
|
||||
0
|
||||
21
|
||||
MVState
|
||||
22
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
23
|
||||
WString
|
||||
18
|
||||
?????Libraries(,):
|
||||
0
|
||||
24
|
||||
WString
|
||||
19
|
||||
libpng.lib zlib.lib
|
||||
0
|
||||
25
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
26
|
||||
WPickList
|
||||
2
|
||||
27
|
||||
MItem
|
||||
3
|
||||
*.c
|
||||
28
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
29
|
||||
WVList
|
||||
2
|
||||
30
|
||||
MVState
|
||||
31
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
32
|
||||
WString
|
||||
25
|
||||
n????Include directories:
|
||||
1
|
||||
33
|
||||
WString
|
||||
39
|
||||
"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt"
|
||||
0
|
||||
34
|
||||
MVState
|
||||
35
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
36
|
||||
WString
|
||||
25
|
||||
n????Include directories:
|
||||
0
|
||||
37
|
||||
WString
|
||||
39
|
||||
"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt"
|
||||
0
|
||||
38
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
39
|
||||
MItem
|
||||
15
|
||||
..\..\pngtest.c
|
||||
40
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
41
|
||||
WVList
|
||||
0
|
||||
42
|
||||
WVList
|
||||
0
|
||||
27
|
||||
1
|
||||
1
|
||||
0
|
||||
|
||||
@@ -1,210 +1,210 @@
|
||||
40
|
||||
targetIdent
|
||||
0
|
||||
MProject
|
||||
1
|
||||
MComponent
|
||||
0
|
||||
2
|
||||
WString
|
||||
4
|
||||
NEXE
|
||||
3
|
||||
WString
|
||||
5
|
||||
nc2en
|
||||
1
|
||||
0
|
||||
0
|
||||
4
|
||||
MCommand
|
||||
0
|
||||
5
|
||||
MCommand
|
||||
8
|
||||
pngvalid
|
||||
6
|
||||
MItem
|
||||
12
|
||||
pngvalid.exe
|
||||
7
|
||||
WString
|
||||
4
|
||||
NEXE
|
||||
8
|
||||
WVList
|
||||
6
|
||||
9
|
||||
MVState
|
||||
10
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
11
|
||||
WString
|
||||
11
|
||||
?????Stack:
|
||||
1
|
||||
12
|
||||
WString
|
||||
4
|
||||
768k
|
||||
0
|
||||
13
|
||||
MVState
|
||||
14
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
15
|
||||
WString
|
||||
28
|
||||
?????Library directories(;):
|
||||
1
|
||||
16
|
||||
WString
|
||||
8
|
||||
$(%zlib)
|
||||
0
|
||||
17
|
||||
MVState
|
||||
18
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
19
|
||||
WString
|
||||
18
|
||||
?????Libraries(,):
|
||||
1
|
||||
20
|
||||
WString
|
||||
19
|
||||
libpng.lib zlib.lib
|
||||
0
|
||||
21
|
||||
MVState
|
||||
22
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
23
|
||||
WString
|
||||
11
|
||||
?????Stack:
|
||||
0
|
||||
24
|
||||
WString
|
||||
4
|
||||
768k
|
||||
0
|
||||
25
|
||||
MVState
|
||||
26
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
27
|
||||
WString
|
||||
28
|
||||
?????Library directories(;):
|
||||
0
|
||||
28
|
||||
WString
|
||||
8
|
||||
$(%zlib)
|
||||
0
|
||||
29
|
||||
MVState
|
||||
30
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
31
|
||||
WString
|
||||
18
|
||||
?????Libraries(,):
|
||||
0
|
||||
32
|
||||
WString
|
||||
19
|
||||
libpng.lib zlib.lib
|
||||
0
|
||||
33
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
34
|
||||
WPickList
|
||||
2
|
||||
35
|
||||
MItem
|
||||
3
|
||||
*.c
|
||||
36
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
37
|
||||
WVList
|
||||
2
|
||||
38
|
||||
MVState
|
||||
39
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
40
|
||||
WString
|
||||
25
|
||||
n????Include directories:
|
||||
1
|
||||
41
|
||||
WString
|
||||
39
|
||||
"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt"
|
||||
0
|
||||
42
|
||||
MVState
|
||||
43
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
44
|
||||
WString
|
||||
25
|
||||
n????Include directories:
|
||||
0
|
||||
45
|
||||
WString
|
||||
39
|
||||
"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt"
|
||||
0
|
||||
46
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
47
|
||||
MItem
|
||||
16
|
||||
..\..\pngvalid.c
|
||||
48
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
49
|
||||
WVList
|
||||
0
|
||||
50
|
||||
WVList
|
||||
0
|
||||
35
|
||||
1
|
||||
1
|
||||
0
|
||||
40
|
||||
targetIdent
|
||||
0
|
||||
MProject
|
||||
1
|
||||
MComponent
|
||||
0
|
||||
2
|
||||
WString
|
||||
4
|
||||
NEXE
|
||||
3
|
||||
WString
|
||||
5
|
||||
nc2en
|
||||
1
|
||||
0
|
||||
0
|
||||
4
|
||||
MCommand
|
||||
0
|
||||
5
|
||||
MCommand
|
||||
8
|
||||
pngvalid
|
||||
6
|
||||
MItem
|
||||
12
|
||||
pngvalid.exe
|
||||
7
|
||||
WString
|
||||
4
|
||||
NEXE
|
||||
8
|
||||
WVList
|
||||
6
|
||||
9
|
||||
MVState
|
||||
10
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
11
|
||||
WString
|
||||
11
|
||||
?????Stack:
|
||||
1
|
||||
12
|
||||
WString
|
||||
4
|
||||
768k
|
||||
0
|
||||
13
|
||||
MVState
|
||||
14
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
15
|
||||
WString
|
||||
28
|
||||
?????Library directories(;):
|
||||
1
|
||||
16
|
||||
WString
|
||||
8
|
||||
$(%zlib)
|
||||
0
|
||||
17
|
||||
MVState
|
||||
18
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
19
|
||||
WString
|
||||
18
|
||||
?????Libraries(,):
|
||||
1
|
||||
20
|
||||
WString
|
||||
19
|
||||
libpng.lib zlib.lib
|
||||
0
|
||||
21
|
||||
MVState
|
||||
22
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
23
|
||||
WString
|
||||
11
|
||||
?????Stack:
|
||||
0
|
||||
24
|
||||
WString
|
||||
4
|
||||
768k
|
||||
0
|
||||
25
|
||||
MVState
|
||||
26
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
27
|
||||
WString
|
||||
28
|
||||
?????Library directories(;):
|
||||
0
|
||||
28
|
||||
WString
|
||||
8
|
||||
$(%zlib)
|
||||
0
|
||||
29
|
||||
MVState
|
||||
30
|
||||
WString
|
||||
7
|
||||
WINLINK
|
||||
31
|
||||
WString
|
||||
18
|
||||
?????Libraries(,):
|
||||
0
|
||||
32
|
||||
WString
|
||||
19
|
||||
libpng.lib zlib.lib
|
||||
0
|
||||
33
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
34
|
||||
WPickList
|
||||
2
|
||||
35
|
||||
MItem
|
||||
3
|
||||
*.c
|
||||
36
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
37
|
||||
WVList
|
||||
2
|
||||
38
|
||||
MVState
|
||||
39
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
40
|
||||
WString
|
||||
25
|
||||
n????Include directories:
|
||||
1
|
||||
41
|
||||
WString
|
||||
39
|
||||
"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt"
|
||||
0
|
||||
42
|
||||
MVState
|
||||
43
|
||||
WString
|
||||
3
|
||||
WCC
|
||||
44
|
||||
WString
|
||||
25
|
||||
n????Include directories:
|
||||
0
|
||||
45
|
||||
WString
|
||||
39
|
||||
"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt"
|
||||
0
|
||||
46
|
||||
WVList
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
0
|
||||
47
|
||||
MItem
|
||||
33
|
||||
..\..\contrib\libtests\pngvalid.c
|
||||
48
|
||||
WString
|
||||
4
|
||||
COBJ
|
||||
49
|
||||
WVList
|
||||
0
|
||||
50
|
||||
WVList
|
||||
0
|
||||
35
|
||||
1
|
||||
1
|
||||
0
|
||||
|
||||
@@ -1,218 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug Library|Win32">
|
||||
<Configuration>Debug Library</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release Library|Win32">
|
||||
<Configuration>Release Library</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>pngstest</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<Import Project="$(SolutionDir)\zlib.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<CustomBuildAfterTargets />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<CustomBuildAfterTargets />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<CustomBuildAfterTargets />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<CustomBuildAfterTargets />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PNG_USE_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4127</DisableSpecificWarnings>
|
||||
<CompileAsManaged>false</CompileAsManaged>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<FloatingPointExceptions>false</FloatingPointExceptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>libpng15.lib;zlib.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<CustomBuildStep>
|
||||
<Message>Executing libpng simplified API test program</Message>
|
||||
<Command>"$(OutDir)pngstest.exe" --log --touch "$(IntDir)pngstest.out" ../../../contrib/pngsuite/basn0g01.png ../../../contrib/pngsuite/basn0g02.png ../../../contrib/pngsuite/basn0g04.png ../../../contrib/pngsuite/basn0g08.png ../../../contrib/pngsuite/basn0g16.png ../../../contrib/pngsuite/basn2c08.png ../../../contrib/pngsuite/basn2c16.png ../../../contrib/pngsuite/basn3p01.png ../../../contrib/pngsuite/basn3p02.png ../../../contrib/pngsuite/basn3p04.png ../../../contrib/pngsuite/basn3p08.png ../../../contrib/pngsuite/basn4a08.png ../../../contrib/pngsuite/basn4a16.png ../../../contrib/pngsuite/basn6a08.png ../../../contrib/pngsuite/basn6a16.png ../../../contrib/pngsuite/ftbbn1g04.png ../../../contrib/pngsuite/ftbbn2c16.png ../../../contrib/pngsuite/ftbbn3p08.png ../../../contrib/pngsuite/ftbgn2c16.png ../../../contrib/pngsuite/ftbgn3p08.png ../../../contrib/pngsuite/ftbrn2c08.png ../../../contrib/pngsuite/ftbwn1g16.png ../../../contrib/pngsuite/ftbwn3p08.png ../../../contrib/pngsuite/ftbyn3p08.png ../../../contrib/pngsuite/ftp0n1g08.png ../../../contrib/pngsuite/ftp0n2c08.png ../../../contrib/pngsuite/ftp0n3p08.png ../../../contrib/pngsuite/ftp1n3p08.png</Command>
|
||||
<Outputs>$(IntDir)pngstest.out</Outputs>
|
||||
<Inputs>$(OutDir)pngstest.exe</Inputs>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4127</DisableSpecificWarnings>
|
||||
<CompileAsManaged>false</CompileAsManaged>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<FloatingPointExceptions>false</FloatingPointExceptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>libpng15.lib;zlib.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<CustomBuildStep>
|
||||
<Message>Executing libpng simplified API test program</Message>
|
||||
<Command>"$(OutDir)pngstest.exe" --log --touch "$(IntDir)pngstest.out" ../../../contrib/pngsuite/basn0g01.png ../../../contrib/pngsuite/basn0g02.png ../../../contrib/pngsuite/basn0g04.png ../../../contrib/pngsuite/basn0g08.png ../../../contrib/pngsuite/basn0g16.png ../../../contrib/pngsuite/basn2c08.png ../../../contrib/pngsuite/basn2c16.png ../../../contrib/pngsuite/basn3p01.png ../../../contrib/pngsuite/basn3p02.png ../../../contrib/pngsuite/basn3p04.png ../../../contrib/pngsuite/basn3p08.png ../../../contrib/pngsuite/basn4a08.png ../../../contrib/pngsuite/basn4a16.png ../../../contrib/pngsuite/basn6a08.png ../../../contrib/pngsuite/basn6a16.png ../../../contrib/pngsuite/ftbbn1g04.png ../../../contrib/pngsuite/ftbbn2c16.png ../../../contrib/pngsuite/ftbbn3p08.png ../../../contrib/pngsuite/ftbgn2c16.png ../../../contrib/pngsuite/ftbgn3p08.png ../../../contrib/pngsuite/ftbrn2c08.png ../../../contrib/pngsuite/ftbwn1g16.png ../../../contrib/pngsuite/ftbwn3p08.png ../../../contrib/pngsuite/ftbyn3p08.png ../../../contrib/pngsuite/ftp0n1g08.png ../../../contrib/pngsuite/ftp0n2c08.png ../../../contrib/pngsuite/ftp0n3p08.png ../../../contrib/pngsuite/ftp1n3p08.png</Command>
|
||||
<Outputs>$(IntDir)pngstest.out</Outputs>
|
||||
<Inputs>$(OutDir)pngstest.exe</Inputs>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>Full</Optimization>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;PNG_USE_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4127</DisableSpecificWarnings>
|
||||
<CompileAsManaged>false</CompileAsManaged>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<FloatingPointExceptions>false</FloatingPointExceptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>libpng15.lib;zlib.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
<CustomBuildStep>
|
||||
<Message>Executing libpng simplified API test program</Message>
|
||||
<Command>"$(OutDir)pngstest.exe" --log --touch "$(IntDir)pngstest.out" ../../../contrib/pngsuite/basn0g01.png ../../../contrib/pngsuite/basn0g02.png ../../../contrib/pngsuite/basn0g04.png ../../../contrib/pngsuite/basn0g08.png ../../../contrib/pngsuite/basn0g16.png ../../../contrib/pngsuite/basn2c08.png ../../../contrib/pngsuite/basn2c16.png ../../../contrib/pngsuite/basn3p01.png ../../../contrib/pngsuite/basn3p02.png ../../../contrib/pngsuite/basn3p04.png ../../../contrib/pngsuite/basn3p08.png ../../../contrib/pngsuite/basn4a08.png ../../../contrib/pngsuite/basn4a16.png ../../../contrib/pngsuite/basn6a08.png ../../../contrib/pngsuite/basn6a16.png ../../../contrib/pngsuite/ftbbn1g04.png ../../../contrib/pngsuite/ftbbn2c16.png ../../../contrib/pngsuite/ftbbn3p08.png ../../../contrib/pngsuite/ftbgn2c16.png ../../../contrib/pngsuite/ftbgn3p08.png ../../../contrib/pngsuite/ftbrn2c08.png ../../../contrib/pngsuite/ftbwn1g16.png ../../../contrib/pngsuite/ftbwn3p08.png ../../../contrib/pngsuite/ftbyn3p08.png ../../../contrib/pngsuite/ftp0n1g08.png ../../../contrib/pngsuite/ftp0n2c08.png ../../../contrib/pngsuite/ftp0n3p08.png ../../../contrib/pngsuite/ftp1n3p08.png</Command>
|
||||
<Outputs>$(IntDir)pngstest.out</Outputs>
|
||||
<Inputs>$(OutDir)pngstest.exe</Inputs>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>Full</Optimization>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4996;4127</DisableSpecificWarnings>
|
||||
<CompileAsManaged>false</CompileAsManaged>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<FloatingPointExceptions>false</FloatingPointExceptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>libpng15.lib;zlib.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
<CustomBuildStep>
|
||||
<Message>Executing libpng simplified API test program</Message>
|
||||
<Command>"$(OutDir)pngstest.exe" --log --touch "$(IntDir)pngstest.out" ../../../contrib/pngsuite/basn0g01.png ../../../contrib/pngsuite/basn0g02.png ../../../contrib/pngsuite/basn0g04.png ../../../contrib/pngsuite/basn0g08.png ../../../contrib/pngsuite/basn0g16.png ../../../contrib/pngsuite/basn2c08.png ../../../contrib/pngsuite/basn2c16.png ../../../contrib/pngsuite/basn3p01.png ../../../contrib/pngsuite/basn3p02.png ../../../contrib/pngsuite/basn3p04.png ../../../contrib/pngsuite/basn3p08.png ../../../contrib/pngsuite/basn4a08.png ../../../contrib/pngsuite/basn4a16.png ../../../contrib/pngsuite/basn6a08.png ../../../contrib/pngsuite/basn6a16.png ../../../contrib/pngsuite/ftbbn1g04.png ../../../contrib/pngsuite/ftbbn2c16.png ../../../contrib/pngsuite/ftbbn3p08.png ../../../contrib/pngsuite/ftbgn2c16.png ../../../contrib/pngsuite/ftbgn3p08.png ../../../contrib/pngsuite/ftbrn2c08.png ../../../contrib/pngsuite/ftbwn1g16.png ../../../contrib/pngsuite/ftbwn3p08.png ../../../contrib/pngsuite/ftbyn3p08.png ../../../contrib/pngsuite/ftp0n1g08.png ../../../contrib/pngsuite/ftp0n2c08.png ../../../contrib/pngsuite/ftp0n3p08.png ../../../contrib/pngsuite/ftp1n3p08.png</Command>
|
||||
<Outputs>$(IntDir)pngstest.out</Outputs>
|
||||
<Inputs>$(OutDir)pngstest.exe</Inputs>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\contrib\libtests\pngstest.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -210,7 +210,7 @@
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\pngvalid.c" />
|
||||
<ClCompile Include="..\..\..\contrib\libtests\pngvalid.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
VisualStudio instructions
|
||||
|
||||
libpng version 1.5.7beta05 - November 18, 2011
|
||||
libpng version 1.5.10beta03 - March 5, 2012
|
||||
|
||||
Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
||||
|
||||
|
||||
@@ -24,13 +24,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pngvalid", "pngvalid\pngval
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pnglibconf", "pnglibconf\pnglibconf.vcxproj", "{EB33566E-DA7F-4D28-9077-88C0B7C77E35}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pngstest", "pngstest\pngstest.vcxproj", "{277AC57F-313B-4D06-B119-A3CDB672D2FF}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF} = {60F89955-91C6-3A36-8000-13C592FEC2DF}
|
||||
{EB33566E-DA7F-4D28-9077-88C0B7C77E35} = {EB33566E-DA7F-4D28-9077-88C0B7C77E35}
|
||||
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {D6973076-9317-4EF2-A0B8-B7A18AC0713E}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug Library|Win32 = Debug Library|Win32
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!--
|
||||
* zlib.props - location of zlib source
|
||||
*
|
||||
* libpng version 1.5.7beta05 - November 18, 2011
|
||||
* libpng version 1.5.10beta03 - March 5, 2012
|
||||
*
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
Makefiles for libpng version 1.5.7beta05 - November 18, 2011
|
||||
Makefiles for libpng version 1.5.10beta03 - March 5, 2012
|
||||
|
||||
pnglibconf.h.prebuilt => Stores configuration settings
|
||||
makefile.linux => Linux/ELF makefile
|
||||
(gcc, creates libpng15.so.15.1.5.7beta05)
|
||||
(gcc, creates libpng15.so.15.1.5.10beta03)
|
||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||
ansi2knr (Requires ansi2knr.c from
|
||||
@@ -20,7 +20,7 @@ pnglibconf.h.prebuilt => Stores configuration settings
|
||||
makefile.dec => DEC Alpha UNIX makefile
|
||||
makefile.dj2 => DJGPP 2 makefile
|
||||
makefile.elf => Linux/ELF makefile symbol versioning,
|
||||
(gcc, creates libpng15.so.15.1.5.7beta05)
|
||||
(gcc, creates libpng15.so.15.1.5.10beta03)
|
||||
makefile.freebsd => FreeBSD makefile
|
||||
makefile.gcc => Generic gcc makefile
|
||||
makefile.hpgcc => HPUX makefile using gcc
|
||||
@@ -35,12 +35,12 @@ pnglibconf.h.prebuilt => Stores configuration settings
|
||||
makefile.os2 => OS/2 Makefile (gcc and emx, requires libpng.def)
|
||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||
makefile.sggcc => Silicon Graphics (gcc,
|
||||
creates libpng15.so.15.1.5.7beta05)
|
||||
creates libpng15.so.15.1.5.10beta03)
|
||||
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
||||
makefile.solaris => Solaris 2.X makefile (gcc,
|
||||
creates libpng15.so.15.1.5.7beta05)
|
||||
creates libpng15.so.15.1.5.10beta03)
|
||||
makefile.so9 => Solaris 9 makefile (gcc,
|
||||
creates libpng15.so.15.1.5.7beta05)
|
||||
creates libpng15.so.15.1.5.10beta03)
|
||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.32sunu => Sun Ultra 32-bit makefile
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* def.dfn - define format of libpng.def
|
||||
*
|
||||
* Last changed in libpng version 1.5.0 [(PENDING RELEASE)]
|
||||
* Last changed in libpng version 1.5.7 [December 15, 2011]
|
||||
* Copyright (c) 2010-2011 Glenn Randers-Pehrson
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
# Modeled after libxml-config.
|
||||
|
||||
version=1.5.7beta05
|
||||
version=1.5.10beta03
|
||||
prefix=""
|
||||
libdir=""
|
||||
libs=""
|
||||
|
||||
@@ -5,6 +5,6 @@ includedir=@includedir@/libpng15
|
||||
|
||||
Name: libpng
|
||||
Description: Loads and saves PNG files
|
||||
Version: 1.5.7beta05
|
||||
Version: 1.5.10beta03
|
||||
Libs: -L${libdir} -lpng15
|
||||
Cflags: -I${includedir}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
VERMAJ = 1
|
||||
VERMIN = 5
|
||||
VERMIC = 7
|
||||
VERMIC = 10
|
||||
VER = $(VERMAJ).$(VERMIN).$(VERMIC)
|
||||
NAME = libpng
|
||||
PACKAGE = $(NAME)-$(VER)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
# Library name:
|
||||
LIBNAME = libpng15
|
||||
PNGMAJ = 15
|
||||
RELEASE = 7
|
||||
RELEASE = 10
|
||||
|
||||
# Shared library names:
|
||||
LIBSO=$(LIBNAME).so
|
||||
|
||||
@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng15
|
||||
|
||||
LIB= png15
|
||||
SHLIB_MAJOR= 0
|
||||
SHLIB_MINOR= 1.5.7beta05
|
||||
SHLIB_MINOR= 1.5.10beta03
|
||||
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
||||
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
||||
pngwtran.c pngmem.c pngerror.c pngpread.c
|
||||
|
||||
@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include
|
||||
|
||||
LIB= png
|
||||
SHLIB_MAJOR= 15
|
||||
SHLIB_MINOR= 1.5.7beta05
|
||||
SHLIB_MINOR= 1.5.10beta03
|
||||
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
||||
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
||||
pngwtran.c pngmem.c pngerror.c pngpread.c
|
||||
|
||||
@@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib
|
||||
MANDIR= ${PREFIX}/man/cat
|
||||
|
||||
SHLIB_MAJOR= 15
|
||||
SHLIB_MINOR= 1.5.7beta05
|
||||
SHLIB_MINOR= 1.5.10beta03
|
||||
|
||||
LIB= png
|
||||
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/awk -f
|
||||
# scripts/options.awk - library build configuration control
|
||||
#
|
||||
# last changed in libpng version 1.5.7 - (PENDING RELEASE)
|
||||
# last changed in libpng version 1.5.7 - December 15, 2011
|
||||
#
|
||||
# Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
#
|
||||
@@ -42,7 +42,7 @@ BEGIN{
|
||||
comment=start cx # Comment start
|
||||
cend="*/" end # Comment end
|
||||
def=start "#define PNG_" ct # Arbitrary define
|
||||
sup=ct "_SUPPORTED" end # end supported option
|
||||
sup=ct "_SUPPORTED 1" end # end supported option
|
||||
und=comment "#undef PNG_" ct # Unsupported option
|
||||
une=ct "_SUPPORTED" cend # end unsupported option
|
||||
error=start "ERROR:" # error message
|
||||
|
||||
@@ -27,7 +27,7 @@ file pnglibconf.h scripts/pnglibconf.dfa PNGLCONF_H
|
||||
# The syntax is detailed in scripts/options.awk, this is a summary
|
||||
# only:
|
||||
#
|
||||
# setting <name> [requires ...] [default]
|
||||
# setting <name> [default]
|
||||
# #define PNG_<name> <value> /* value comes from current setting */
|
||||
# option <name> [requires ...] [if ...] [enables ...] [disabled]
|
||||
# #define PNG_<name>_SUPPORTED if the requirements are met and
|
||||
@@ -266,20 +266,22 @@ option SET_USER_LIMITS enables SET_CHUNK_CACHE_LIMIT
|
||||
|
||||
option SET_USER_LIMITS enables SET_CHUNK_MALLOC_LIMIT
|
||||
|
||||
# Added at libpng-1.0.16 and 1.2.6. To accept all valid PNGs no matter
|
||||
# how large, set these two limits to 0x7fffffff
|
||||
# Libpng limits.
|
||||
#
|
||||
# If these settings are *not* set libpng will not limit the size of
|
||||
# images or the size of data in ancilliary chunks. This does lead to
|
||||
# security issues if PNG files come from untrusted sources.
|
||||
setting USER_WIDTH_MAX
|
||||
setting USER_HEIGHT_MAX
|
||||
setting USER_CHUNK_CACHE_MAX
|
||||
setting USER_CHUNK_MALLOC_MAX
|
||||
|
||||
setting USER_WIDTH_MAX default 1000000
|
||||
setting USER_HEIGHT_MAX default 1000000
|
||||
|
||||
# Added at libpng-1.2.43. To accept all valid PNGs no matter
|
||||
# how large, set these two limits to 0.
|
||||
|
||||
setting USER_CHUNK_CACHE_MAX default 0
|
||||
|
||||
# Added at libpng-1.2.43
|
||||
|
||||
setting USER_CHUNK_MALLOC_MAX default 0
|
||||
# To default all these settings to values that are large but probably
|
||||
# safe turn the SAFE_LIMITS option on; this will cause the value in
|
||||
# pngpriv.h to be used. Individual values can also be set, simply set
|
||||
# them in pngusr.dfa with '@#define PNG_setting value' lines.
|
||||
option SAFE_LIMITS enables USER_LIMITS disabled
|
||||
= SAFE_LIMITS SAFE_LIMITS
|
||||
|
||||
# All of the following options relate to code capabilities for
|
||||
# processing image data before creating a PNG or after reading one.
|
||||
@@ -296,7 +298,7 @@ option READ enables READ_INTERLACING
|
||||
# processing after that has happened. You need to be sure to enable
|
||||
# READ_SCALE_16_TO_8 or READ_STRIP_16_TO_8 when you disable READ_16BIT for
|
||||
# this to work properly. You should disable the other option if you need to
|
||||
# ensure a particular convertion (otherwise the app can chose.)
|
||||
# ensure a particular conversion (otherwise the app can chose.)
|
||||
|
||||
option READ_16BIT requires READ enables 16BIT
|
||||
|
||||
@@ -577,30 +579,12 @@ option WRITE_COMPRESSED_TEXT enables WRITE_TEXT
|
||||
|
||||
option INFO_IMAGE
|
||||
|
||||
# Simplified API options
|
||||
# Read:
|
||||
option SIMPLIFIED_READ requires SEQUENTIAL_READ READ_TRANSFORMS SETJMP
|
||||
option SIMPLIFIED_READ enables READ_EXPAND READ_16BIT READ_EXPAND_16
|
||||
option SIMPLIFIED_READ enables READ_SCALE_16_TO_8 READ_RGB_TO_GRAY
|
||||
option SIMPLIFIED_READ enables READ_ALPHA_MODE READ_BACKGROUND READ_STRIP_ALPHA
|
||||
option SIMPLIFIED_READ enables READ_FILLER READ_SWAP
|
||||
# added at libpng-1.5.10
|
||||
# Turn this off to disable warning about invalid palette index and
|
||||
# leave the num_palette_max member out of the png structure.
|
||||
|
||||
option SIMPLIFIED_READ_AFIRST requires SIMPLIFIED_READ disabled
|
||||
option READ_SWAP_ALPHA enables SIMPLIFIED_READ_AFIRST
|
||||
option CHECK_FOR_INVALID_INDEX enables READ_CHECK_FOR_INVALID_INDEX
|
||||
option CHECK_FOR_INVALID_INDEX enables WRITE_CHECK_FOR_INVALID_INDEX
|
||||
option READ_CHECK_FOR_INVALID_INDEX requires READ CHECK_FOR_INVALID_INDEX
|
||||
option WRITE_CHECK_FOR_INVALID_INDEX requires WRITE CHECK_FOR_INVALID_INDEX
|
||||
|
||||
option SIMPLIFIED_READ_BGR requires SIMPLIFIED_READ disabled
|
||||
option READ_BGR enables SIMPLIFIED_READ_BGR
|
||||
|
||||
# Write:
|
||||
option SIMPLIFIED_WRITE requires WRITE STDIO SETJMP
|
||||
option SIMPLIFIED_WRITE enables WRITE_SWAP WRITE_gAMA WRITE_sRGB WRITE_cHRM
|
||||
|
||||
option SIMPLIFIED_WRITE_AFIRST requires SIMPLIFIED_WRITE disabled
|
||||
option WRITE_SWAP_ALPHA enables SIMPLIFIED_WRITE_AFIRST
|
||||
|
||||
option SIMPLIFIED_WRITE_BGR requires SIMPLIFIED_WRITE disabled
|
||||
option WRITE_BGR enables SIMPLIFIED_WRITE_BGR
|
||||
|
||||
# Formats:
|
||||
option FORMAT_AFIRST if SIMPLIFIED_READ_AFIRST SIMPLIFIED_WRITE_AFIRST
|
||||
option FORMAT_BGR if SIMPLIFIED_READ_BGR SIMPLIFIED_WRITE_BGR
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
/* pnglibconf.h - library build configuration */
|
||||
|
||||
/* Libpng 1.5.7beta05 - November 18, 2011 */
|
||||
/* Libpng 1.5.10beta03 - March 5, 2012 */
|
||||
|
||||
/* Copyright (c) 1998-2011 Glenn Randers-Pehrson */
|
||||
/* Copyright (c) 1998-2012 Glenn Randers-Pehrson */
|
||||
|
||||
/* This code is released under the libpng license. */
|
||||
/* For conditions of distribution and use, see the disclaimer */
|
||||
@@ -31,10 +31,6 @@
|
||||
#define PNG_QUANTIZE_GREEN_BITS 5
|
||||
#define PNG_QUANTIZE_RED_BITS 5
|
||||
#define PNG_sCAL_PRECISION 5
|
||||
#define PNG_USER_CHUNK_CACHE_MAX 0
|
||||
#define PNG_USER_CHUNK_MALLOC_MAX 0
|
||||
#define PNG_USER_HEIGHT_MAX 1000000
|
||||
#define PNG_USER_WIDTH_MAX 1000000
|
||||
#define PNG_WEIGHT_SHIFT 8
|
||||
#define PNG_ZBUF_SIZE 8192
|
||||
/* end of settings */
|
||||
@@ -45,6 +41,7 @@
|
||||
#define PNG_bKGD_SUPPORTED
|
||||
#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED
|
||||
#define PNG_CHECK_cHRM_SUPPORTED
|
||||
#define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||
#define PNG_cHRM_SUPPORTED
|
||||
#define PNG_CONSOLE_IO_SUPPORTED
|
||||
#define PNG_CONVERT_tIME_SUPPORTED
|
||||
@@ -54,8 +51,6 @@
|
||||
#define PNG_FIXED_POINT_SUPPORTED
|
||||
#define PNG_FLOATING_ARITHMETIC_SUPPORTED
|
||||
#define PNG_FLOATING_POINT_SUPPORTED
|
||||
#define PNG_FORMAT_AFIRST_SUPPORTED
|
||||
#define PNG_FORMAT_BGR_SUPPORTED
|
||||
#define PNG_gAMA_SUPPORTED
|
||||
#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
||||
#define PNG_hIST_SUPPORTED
|
||||
@@ -76,6 +71,7 @@
|
||||
#define PNG_READ_BACKGROUND_SUPPORTED
|
||||
#define PNG_READ_BGR_SUPPORTED
|
||||
#define PNG_READ_bKGD_SUPPORTED
|
||||
#define PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||
#define PNG_READ_cHRM_SUPPORTED
|
||||
#define PNG_READ_COMPOSITE_NODIV_SUPPORTED
|
||||
#define PNG_READ_COMPRESSED_TEXT_SUPPORTED
|
||||
@@ -128,12 +124,6 @@
|
||||
#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
|
||||
#define PNG_SETJMP_SUPPORTED
|
||||
#define PNG_SET_USER_LIMITS_SUPPORTED
|
||||
#define PNG_SIMPLIFIED_READ_AFIRST_SUPPORTED
|
||||
#define PNG_SIMPLIFIED_READ_BGR_SUPPORTED
|
||||
#define PNG_SIMPLIFIED_READ_SUPPORTED
|
||||
#define PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED
|
||||
#define PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED
|
||||
#define PNG_SIMPLIFIED_WRITE_SUPPORTED
|
||||
#define PNG_sPLT_SUPPORTED
|
||||
#define PNG_sRGB_SUPPORTED
|
||||
#define PNG_STDIO_SUPPORTED
|
||||
@@ -153,6 +143,7 @@
|
||||
#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
|
||||
#define PNG_WRITE_BGR_SUPPORTED
|
||||
#define PNG_WRITE_bKGD_SUPPORTED
|
||||
#define PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||
#define PNG_WRITE_cHRM_SUPPORTED
|
||||
#define PNG_WRITE_COMPRESSED_TEXT_SUPPORTED
|
||||
#define PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
LIBRARY
|
||||
|
||||
EXPORTS
|
||||
;Version 1.5.7beta05
|
||||
;Version 1.5.10beta03
|
||||
png_access_version_number @1
|
||||
png_set_sig_bytes @2
|
||||
png_sig_cmp @3
|
||||
@@ -239,10 +239,4 @@ EXPORTS
|
||||
png_get_cHRM_XYZ_fixed @231
|
||||
png_set_cHRM_XYZ @232
|
||||
png_set_cHRM_XYZ_fixed @233
|
||||
png_image_begin_read_from_file @234
|
||||
png_image_begin_read_from_stdio @235
|
||||
png_image_begin_read_from_memory @236
|
||||
png_image_finish_read @237
|
||||
png_image_free @238
|
||||
png_image_write_to_file @239
|
||||
png_image_write_to_stdio @240
|
||||
png_set_check_for_invalid_index @234
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Run the simplified API tests
|
||||
err=0
|
||||
|
||||
echo >> pngtest-log.txt
|
||||
echo "============ pngstest.sh ==============" >> pngtest-log.txt
|
||||
|
||||
echo "Running test-pngstest.sh on contrib/pngsuite/*.png"
|
||||
for opts in "" "--background"
|
||||
do
|
||||
if ./pngstest --log "$@" $opts ${srcdir}/contrib/pngsuite/*.png \
|
||||
>>pngtest-log.txt 2>&1
|
||||
then
|
||||
echo " PASS: pngstest $opts"
|
||||
else
|
||||
echo " FAIL: pngstest $opts"
|
||||
err=1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $err
|
||||
Reference in New Issue
Block a user