From 7317b1a174e06f9c41c30c40e35a04b0cf920884 Mon Sep 17 00:00:00 2001 From: manongjohn <19245851+manongjohn@users.noreply.github.com> Date: Fri, 26 Aug 2022 07:56:49 -0400 Subject: [PATCH] Update 3rd party library binaries for MSVC 2019 and update to libtiff 4.2.0 w/ customizations --- .../libjpeg-turbo/lib/jpeg-static_2019_64.lib | 3 + .../lib/turbojpeg-static_2019_64.lib | 3 + .../cmakescripts/BuildPackages.cmake | 189 + .../release/Distribution.xml.in | 24 + .../libjpeg-turbo-2.0.6/release/License.rtf | 20 + .../libjpeg-turbo-2.0.6/release/ReadMe.txt | 5 + .../libjpeg-turbo-2.0.6/release/Welcome.rtf | 17 + .../release/deb-control.in | 31 + .../release/installer.nsi.in | 191 + .../libjpeg-turbo-2.0.6/release/libjpeg.pc.in | 10 + .../release/libturbojpeg.pc.in | 10 + .../release/makecygwinpkg.in | 66 + .../libjpeg-turbo-2.0.6/release/makedpkg.in | 121 + .../libjpeg-turbo-2.0.6/release/makemacpkg.in | 284 + .../libjpeg-turbo-2.0.6/release/makerpm.in | 30 + .../libjpeg-turbo-2.0.6/release/makesrpm.in | 48 + .../release/maketarball.in | 51 + .../libjpeg-turbo-2.0.6/release/rpm.spec.in | 221 + .../libjpeg-turbo-2.0.6/release/uninstall.in | 113 + .../libpng-1.6.21/lib/libpng16_2019.lib | 3 + .../libpng-1.6.21/lib/libpng16_2019_64.lib | 3 + .../libpng-1.6.21/lib/libpng16_2019_64d.lib | 3 + .../libpng-1.6.21/lib/libpng16_2019d.lib | 3 + .../projects/vstudio/libpng/libpng.vcxproj | 16 +- .../vstudio/pnglibconf/pnglibconf.vcxproj | 4 +- .../vstudio/pngstest/pngstest.vcxproj | 16 +- .../projects/vstudio/pngtest/pngtest.vcxproj | 16 +- .../vstudio/pngunknown/pngunknown.vcxproj | 16 +- .../vstudio/pngvalid/pngvalid.vcxproj | 16 +- .../projects/vstudio/zlib/zlib.vcxproj | 16 +- thirdparty/superlu/SuperLU_2019_32.d.lib | 3 + thirdparty/superlu/SuperLU_2019_32.lib | 3 + thirdparty/superlu/SuperLU_2019_64.d.lib | 3 + thirdparty/superlu/SuperLU_2019_64.lib | 3 + .../SuperLU_4.1/prj/SuperLU/SuperLU.sln | 19 +- .../SuperLU_4.1/prj/SuperLU/SuperLU.vcproj | 1056 -- .../SuperLU_4.1/prj/SuperLU/SuperLU.vcxproj | 338 + .../prj/SuperLU/SuperLU.vcxproj.filters | 591 + thirdparty/tiff-4.0.3/.gitignore | 2 - thirdparty/tiff-4.0.3/ChangeLog | 5835 -------- thirdparty/tiff-4.0.3/README.vms | 12 - thirdparty/tiff-4.0.3/RELEASE-DATE | 1 - thirdparty/tiff-4.0.3/VERSION | 1 - thirdparty/tiff-4.0.3/config/compile | 142 - thirdparty/tiff-4.0.3/config/depcomp | 584 - thirdparty/tiff-4.0.3/config/install-sh | 507 - thirdparty/tiff-4.0.3/config/missing | 367 - thirdparty/tiff-4.0.3/config/mkinstalldirs | 161 - .../tiff-4.0.3/contrib/win_dib/Makefile.am | 27 - .../tiff-4.0.3/html/man/bmp2tiff.1.html | 121 - .../tiff-4.0.3/html/man/gif2tiff.1.html | 141 - .../tiff-4.0.3/html/man/ras2tiff.1.html | 139 - .../tiff-4.0.3/html/man/rgb2ycbcr.1.html | 155 - .../tiff-4.0.3/html/man/sgi2tiff.1.html | 147 - .../tiff-4.0.3/html/man/thumbnail.1.html | 148 - thirdparty/tiff-4.0.3/html/man/tiffsv.1.html | 207 - .../tiff-4.0.3/lib/LibTIFF-4.0.3_2013.lib | 3 - .../tiff-4.0.3/lib/LibTIFF-4.0.3_2013_64.lib | 3 - .../tiff-4.0.3/lib/LibTIFF-4.0.3_2013_64d.lib | 3 - .../tiff-4.0.3/lib/LibTIFF-4.0.3_2013d.lib | 3 - .../tiff-4.0.3/lib/LibTIFF-4.0.3_2015.lib | 3 - .../tiff-4.0.3/lib/LibTIFF-4.0.3_2015_64.lib | 3 - .../tiff-4.0.3/lib/LibTIFF-4.0.3_2015_64d.lib | 3 - .../tiff-4.0.3/lib/LibTIFF-4.0.3_2015d.lib | 3 - thirdparty/tiff-4.0.3/libtiff/tif_flush.c | 118 - thirdparty/tiff-4.0.3/libtiff/tif_zip.c | 469 - thirdparty/tiff-4.0.3/man/bmp2tiff.1 | 85 - thirdparty/tiff-4.0.3/man/gif2tiff.1 | 81 - thirdparty/tiff-4.0.3/man/ras2tiff.1 | 96 - thirdparty/tiff-4.0.3/man/rgb2ycbcr.1 | 99 - thirdparty/tiff-4.0.3/man/sgi2tiff.1 | 93 - thirdparty/tiff-4.0.3/man/thumbnail.1 | 90 - thirdparty/tiff-4.0.3/man/tiffsv.1 | 142 - thirdparty/tiff-4.0.3/port/strtoull.c | 116 - .../tiff-4.0.3/test/bmp2tiff_palette.sh | 7 - thirdparty/tiff-4.0.3/test/bmp2tiff_rgb.sh | 7 - thirdparty/tiff-4.0.3/test/gif2tiff.sh | 7 - .../tiff-4.0.3/test/images/palette-1c-8b.bmp | Bin 24954 -> 0 bytes .../tiff-4.0.3/test/images/palette-1c-8b.gif | Bin 21614 -> 0 bytes .../tiff-4.0.3/test/images/rgb-3c-8b.bmp | Bin 71298 -> 0 bytes thirdparty/tiff-4.0.3/test/ppm2tiff_ppm.sh | 7 - thirdparty/tiff-4.0.3/test/tiff2ps-EPS1.sh | 6 - thirdparty/tiff-4.0.3/test/tiff2ps-PS1.sh | 6 - thirdparty/tiff-4.0.3/test/tiff2ps-PS2.sh | 6 - thirdparty/tiff-4.0.3/test/tiff2ps-PS3.sh | 6 - thirdparty/tiff-4.0.3/tools/bmp2tiff.c | 854 -- thirdparty/tiff-4.0.3/tools/gif2tiff.c | 530 - thirdparty/tiff-4.0.3/tools/ras2tiff.c | 316 - thirdparty/tiff-4.0.3/tools/rasterfile.h | 42 - thirdparty/tiff-4.0.3/tools/sgi2tiff.c | 335 - thirdparty/tiff-4.0.3/tools/sgisv.c | 316 - thirdparty/tiff-4.0.3/tools/ycbcr.c | 168 - thirdparty/tiff-4.2.0/CMakeLists.txt | 787 ++ .../{tiff-4.0.3 => tiff-4.2.0}/COPYRIGHT | 0 thirdparty/tiff-4.2.0/ChangeLog | 11094 ++++++++++++++++ .../{tiff-4.0.3 => tiff-4.2.0}/HOWTO-RELEASE | 79 +- .../{tiff-4.0.3 => tiff-4.2.0}/Makefile.am | 39 +- .../{tiff-4.0.3 => tiff-4.2.0}/Makefile.in | 327 +- .../{tiff-4.0.3 => tiff-4.2.0}/Makefile.vc | 4 +- .../README => tiff-4.2.0/README.md} | 20 +- thirdparty/tiff-4.2.0/RELEASE-DATE | 1 + .../{tiff-4.0.3 => tiff-4.2.0}/SConstruct | 2 - thirdparty/{tiff-4.0.3 => tiff-4.2.0}/TODO | 2 - thirdparty/tiff-4.2.0/VERSION | 1 + .../{tiff-4.0.3 => tiff-4.2.0}/aclocal.m4 | 541 +- .../{tiff-4.0.3 => tiff-4.2.0}/autogen.sh | 0 thirdparty/tiff-4.2.0/build/CMakeLists.txt | 25 + .../build/Makefile.am | 4 +- .../build/Makefile.in | 222 +- .../{tiff-4.0.3 => tiff-4.2.0}/build/README | 0 thirdparty/tiff-4.2.0/config/compile | 348 + .../config/config.guess | 793 +- .../config/config.sub | 359 +- thirdparty/tiff-4.2.0/config/depcomp | 791 ++ thirdparty/tiff-4.2.0/config/install-sh | 501 + .../config/ltmain.sh | 5580 +++++--- thirdparty/tiff-4.2.0/config/missing | 215 + .../config/test-driver | 37 +- .../{tiff-4.0.3 => tiff-4.2.0}/configure | 4662 ++++--- .../{tiff-4.0.3 => tiff-4.2.0}/configure.ac | 307 +- .../{tiff-4.0.3 => tiff-4.2.0}/configure.com | 1 - thirdparty/tiff-4.2.0/contrib/CMakeLists.txt | 35 + .../contrib/Makefile.am | 4 +- .../contrib/Makefile.in | 222 +- .../{tiff-4.0.3 => tiff-4.2.0}/contrib/README | 0 .../contrib/addtiffo/CMakeLists.txt | 40 + .../contrib/addtiffo/Makefile.am | 5 +- .../contrib/addtiffo/Makefile.in | 211 +- .../contrib/addtiffo/Makefile.vc | 0 .../contrib/addtiffo/README | 0 .../contrib/addtiffo/addtiffo.c | 11 +- .../contrib/addtiffo/tif_overview.c | 35 +- .../contrib/addtiffo/tif_ovrcache.c | 24 +- .../contrib/addtiffo/tif_ovrcache.h | 0 .../tiff-4.2.0/contrib/dbs/CMakeLists.txt | 54 + .../contrib/dbs/Makefile.am | 4 +- .../contrib/dbs/Makefile.in | 276 +- .../contrib/dbs/README | 0 .../contrib/dbs/tiff-bi.c | 2 - .../contrib/dbs/tiff-grayscale.c | 2 - .../contrib/dbs/tiff-palette.c | 2 - .../contrib/dbs/tiff-rgb.c | 2 - .../contrib/dbs/xtiff/CMakeLists.txt | 29 + .../contrib/dbs/xtiff/Makefile.am | 7 +- .../contrib/dbs/xtiff/Makefile.in | 124 +- .../contrib/dbs/xtiff/README | 0 .../contrib/dbs/xtiff/patchlevel.h | 0 .../contrib/dbs/xtiff/xtiff.c | 6 +- .../contrib/dbs/xtiff/xtifficon.h | 0 .../contrib/iptcutil/CMakeLists.txt | 35 + .../contrib/iptcutil/Makefile.am | 6 +- .../contrib/iptcutil/Makefile.in | 203 +- .../contrib/iptcutil/README | 0 .../contrib/iptcutil/iptcutil.c | 766 +- .../contrib/iptcutil/test.iptc | Bin .../contrib/iptcutil/test.txt | 0 .../tiff-4.2.0/contrib/mfs/CMakeLists.txt | 27 + .../contrib/mfs/Makefile.am | 6 +- .../contrib/mfs/Makefile.in | 122 +- .../contrib/mfs/README | 0 .../contrib/mfs/mfs_file.c | 0 .../tiff-4.2.0/contrib/pds/CMakeLists.txt | 30 + thirdparty/tiff-4.2.0/contrib/pds/Makefile.am | 32 + .../contrib/pds/Makefile.in | 125 +- .../contrib/pds/README | 2 +- .../contrib/pds/tif_imageiter.c | 8 +- .../contrib/pds/tif_imageiter.h | 2 +- .../contrib/pds/tif_pdsdirread.c | 6 +- .../contrib/pds/tif_pdsdirwrite.c | 2 - .../tiff-4.2.0/contrib/ras/CMakeLists.txt | 28 + .../contrib/ras}/Makefile.am | 7 +- .../contrib/ras/Makefile.in | 123 +- .../contrib/ras/README | 0 .../contrib/ras/ras2tif.c | 0 .../contrib/ras/tif2ras.c | 3 - .../tiff-4.2.0/contrib/stream/CMakeLists.txt | 28 + .../contrib/stream}/Makefile.am | 7 +- .../contrib/stream/Makefile.in | 123 +- .../contrib/stream/README | 0 .../contrib/stream/tiffstream.cpp | 0 .../contrib/stream/tiffstream.h | 0 .../tiff-4.2.0/contrib/tags/CMakeLists.txt | 32 + .../contrib/tags}/Makefile.am | 10 +- .../contrib/tags/Makefile.in | 126 +- .../contrib/tags/README | 2 +- .../contrib/tags/listtif.c | 0 .../contrib/tags/maketif.c | 0 .../contrib/tags/xtif_dir.c | 2 +- .../contrib/tags/xtiffio.h | 0 .../contrib/tags/xtiffiop.h | 0 .../tiff-4.2.0/contrib/win_dib/CMakeLists.txt | 30 + .../contrib/win_dib}/Makefile.am | 9 +- .../contrib/win_dib/Makefile.in | 125 +- .../contrib/win_dib/Makefile.w95 | 2 - .../contrib/win_dib/README.Tiffile | 0 .../contrib/win_dib/README.tiff2dib | 2 +- .../contrib/win_dib/Tiffile.cpp | 4 +- .../contrib/win_dib/tiff2dib.c | 2 + thirdparty/tiff-4.2.0/html/CMakeLists.txt | 87 + .../html/Makefile.am | 15 +- .../html/Makefile.in | 246 +- .../html/TIFFTechNote2.html | 0 .../html/addingtags.html | 23 +- .../{tiff-4.0.3 => tiff-4.2.0}/html/bugs.html | 42 +- .../html/build.html | 343 +- .../html/contrib.html | 19 +- .../html/document.html | 17 +- .../html/images.html | 17 +- .../tiff-4.2.0/html/images/CMakeLists.txt | 46 + .../html/images/Makefile.am | 3 + .../html/images/Makefile.in | 122 +- .../html/images/back.gif | Bin .../html/images/bali.jpg | Bin .../html/images/cat.gif | Bin .../html/images/cover.jpg | Bin .../html/images/cramps.gif | Bin .../html/images/dave.gif | Bin .../html/images/info.gif | Bin .../html/images/jello.jpg | Bin .../html/images/jim.gif | Bin .../html/images/note.gif | Bin .../html/images/oxford.gif | Bin .../html/images/quad.jpg | Bin .../html/images/ring.gif | Bin .../html/images/smallliz.jpg | Bin .../html/images/strike.gif | Bin .../html/images/warning.gif | Bin .../html/index.html | 55 +- .../html/internals.html | 77 +- .../html/intro.html | 15 +- .../html/libtiff.html | 38 +- thirdparty/tiff-4.2.0/html/man/CMakeLists.txt | 108 + thirdparty/tiff-4.2.0/html/man/HtmlDoc.cmake | 50 + .../html/man/Makefile.am | 12 +- .../html/man/Makefile.in | 132 +- .../html/man/TIFFClose.3tiff.html | 2 +- .../html/man/TIFFDataWidth.3tiff.html | 2 +- .../html/man/TIFFError.3tiff.html | 2 +- .../html/man/TIFFFieldDataType.3tiff.html | 2 +- .../html/man/TIFFFieldName.3tiff.html | 2 +- .../html/man/TIFFFieldPassCount.3tiff.html | 2 +- .../html/man/TIFFFieldReadCount.3tiff.html | 2 +- .../html/man/TIFFFieldTag.3tiff.html | 2 +- .../html/man/TIFFFieldWriteCount.3tiff.html | 2 +- .../html/man/TIFFFlush.3tiff.html | 2 +- .../html/man/TIFFGetField.3tiff.html | 2 +- .../html/man/TIFFOpen.3tiff.html | 0 .../html/man/TIFFPrintDirectory.3tiff.html | 0 .../html/man/TIFFRGBAImage.3tiff.html | 2 +- .../html/man/TIFFReadDirectory.3tiff.html | 10 +- .../html/man/TIFFReadEncodedStrip.3tiff.html | 2 +- .../html/man/TIFFReadEncodedTile.3tiff.html | 2 +- .../html/man/TIFFReadRGBAImage.3tiff.html | 2 +- .../html/man/TIFFReadRGBAStrip.3tiff.html | 2 +- .../html/man/TIFFReadRGBATile.3tiff.html | 2 +- .../html/man/TIFFReadRawStrip.3tiff.html | 2 +- .../html/man/TIFFReadRawTile.3tiff.html | 2 +- .../html/man/TIFFReadScanline.3tiff.html | 2 +- .../html/man/TIFFReadTile.3tiff.html | 2 +- .../html/man/TIFFSetDirectory.3tiff.html | 2 +- .../html/man/TIFFSetField.3tiff.html | 2 +- .../html/man/TIFFWarning.3tiff.html | 2 +- .../html/man/TIFFWriteDirectory.3tiff.html | 4 +- .../html/man/TIFFWriteEncodedStrip.3tiff.html | 2 +- .../html/man/TIFFWriteEncodedTile.3tiff.html | 2 +- .../html/man/TIFFWriteRawStrip.3tiff.html | 2 +- .../html/man/TIFFWriteRawTile.3tiff.html | 2 +- .../html/man/TIFFWriteScanline.3tiff.html | 2 +- .../html/man/TIFFWriteTile.3tiff.html | 2 +- .../html/man/TIFFbuffer.3tiff.html | 2 +- .../html/man/TIFFcodec.3tiff.html | 2 +- .../html/man/TIFFcolor.3tiff.html | 2 +- .../html/man/TIFFmemory.3tiff.html | 4 +- .../html/man/TIFFquery.3tiff.html | 0 .../html/man/TIFFsize.3tiff.html | 2 +- .../html/man/TIFFstrip.3tiff.html | 2 +- .../html/man/TIFFswab.3tiff.html | 2 +- .../html/man/TIFFtile.3tiff.html | 2 +- .../html/man/fax2ps.1.html | 2 +- .../html/man/fax2tiff.1.html | 2 +- .../html/man/index.html | 8 +- .../html/man/libtiff.3tiff.html | 0 .../html/man/pal2rgb.1.html | 2 +- .../html/man/ppm2tiff.1.html | 2 +- .../html/man/raw2tiff.1.html | 2 +- .../html/man/tiff2bw.1.html | 2 +- .../html/man/tiff2pdf.1.html | 2 +- .../html/man/tiff2ps.1.html | 113 +- .../html/man/tiff2rgba.1.html | 2 +- .../html/man/tiffcmp.1.html | 2 +- .../html/man/tiffcp.1.html | 65 +- .../html/man/tiffcrop.1.html | 2 +- .../html/man/tiffdither.1.html | 15 +- .../html/man/tiffdump.1.html | 2 +- .../html/man/tiffgt.1.html | 2 +- .../html/man/tiffinfo.1.html | 2 +- .../html/man/tiffmedian.1.html | 2 +- .../html/man/tiffset.1.html | 2 +- .../html/man/tiffsplit.1.html | 2 +- .../{tiff-4.0.3 => tiff-4.2.0}/html/misc.html | 19 +- .../html/support.html | 4 +- .../html/tools.html | 42 +- .../html/v3.4beta007.html | 5 +- .../html/v3.4beta016.html | 5 +- .../html/v3.4beta018.html | 5 +- .../html/v3.4beta024.html | 5 +- .../html/v3.4beta028.html | 5 +- .../html/v3.4beta029.html | 5 +- .../html/v3.4beta031.html | 5 +- .../html/v3.4beta032.html | 5 +- .../html/v3.4beta033.html | 5 +- .../html/v3.4beta034.html | 5 +- .../html/v3.4beta035.html | 5 +- .../html/v3.4beta036.html | 5 +- .../html/v3.5.1.html | 7 +- .../html/v3.5.2.html | 7 +- .../html/v3.5.3.html | 9 +- .../html/v3.5.4.html | 7 +- .../html/v3.5.5.html | 7 +- .../html/v3.5.6-beta.html | 9 +- .../html/v3.5.7.html | 9 +- .../html/v3.6.0.html | 15 +- .../html/v3.6.1.html | 13 +- .../html/v3.7.0.html | 11 +- .../html/v3.7.0alpha.html | 11 +- .../html/v3.7.0beta.html | 11 +- .../html/v3.7.0beta2.html | 11 +- .../html/v3.7.1.html | 11 +- .../html/v3.7.2.html | 13 +- .../html/v3.7.3.html | 13 +- .../html/v3.7.4.html | 11 +- .../html/v3.8.0.html | 11 +- .../html/v3.8.1.html | 11 +- .../html/v3.8.2.html | 11 +- .../html/v3.9.0beta.html | 11 +- .../html/v3.9.1.html | 11 +- .../html/v3.9.2.html | 11 +- .../html/v4.0.0.html | 11 +- .../html/v4.0.1.html | 11 +- thirdparty/tiff-4.2.0/html/v4.0.10.html | 327 + .../html/v4.0.2.html | 11 +- thirdparty/tiff-4.2.0/html/v4.0.3.html | 126 + thirdparty/tiff-4.2.0/html/v4.0.4.html | 275 + thirdparty/tiff-4.2.0/html/v4.0.4beta.html | 292 + thirdparty/tiff-4.2.0/html/v4.0.5.html | 149 + thirdparty/tiff-4.2.0/html/v4.0.6.html | 140 + thirdparty/tiff-4.2.0/html/v4.0.7.html | 412 + thirdparty/tiff-4.2.0/html/v4.0.8.html | 446 + thirdparty/tiff-4.2.0/html/v4.0.9.html | 374 + thirdparty/tiff-4.2.0/html/v4.1.0.html | 205 + thirdparty/tiff-4.2.0/html/v4.2.0.html | 205 + .../tiff-4.2.0/lib/LibTIFF-4.2.0_2019.lib | 3 + .../tiff-4.2.0/lib/LibTIFF-4.2.0_2019_64.lib | 3 + .../tiff-4.2.0/lib/LibTIFF-4.2.0_2019_64d.lib | 3 + .../tiff-4.2.0/lib/LibTIFF-4.2.0_2019d.lib | 3 + .../libtiff-4.pc.in | 0 thirdparty/tiff-4.2.0/libtiff/CMakeLists.txt | 169 + .../libtiff/Makefile.am | 28 +- .../libtiff/Makefile.in | 438 +- .../libtiff/Makefile.vc | 6 +- .../libtiff/SConstruct | 2 - .../libtiff/libtiff.def | 309 +- .../libtiff/libtiff.map | 0 .../libtiff/libtiffxx.map | 0 .../libtiff/mkg3states.c | 7 +- .../{tiff-4.0.3 => tiff-4.2.0}/libtiff/t4.h | 2 - .../libtiff/tif_aux.c | 139 +- .../libtiff/tif_close.c | 12 +- .../libtiff/tif_codec.c | 12 +- .../libtiff/tif_color.c | 62 +- .../libtiff/tif_compress.c | 10 +- thirdparty/tiff-4.2.0/libtiff/tif_config.h | 150 + .../libtiff/tif_config.h-vms | 0 .../tiff-4.2.0/libtiff/tif_config.h.cmake.in | 231 + .../libtiff/tif_config.h.in | 90 +- .../libtiff/tif_config.vc.h | 81 +- .../libtiff/tif_config.wince.h | 2 - .../libtiff/tif_dir.c | 336 +- .../libtiff/tif_dir.h | 21 +- .../libtiff/tif_dirinfo.c | 414 +- .../libtiff/tif_dirread.c | 1706 ++- .../libtiff/tif_dirwrite.c | 1030 +- .../libtiff/tif_dumpmode.c | 4 +- .../libtiff/tif_error.c | 26 +- .../libtiff/tif_extension.c | 38 +- .../libtiff/tif_fax3.c | 255 +- .../libtiff/tif_fax3.h | 47 +- .../libtiff/tif_fax3sm.c | 1 + thirdparty/tiff-4.2.0/libtiff/tif_flush.c | 174 + .../libtiff/tif_getimage.c | 688 +- .../libtiff/tif_getimage_64.c | 572 +- .../libtiff/tif_jbig.c | 36 +- .../libtiff/tif_jpeg.c | 585 +- .../libtiff/tif_jpeg_12.c | 4 + .../libtiff/tif_luv.c | 211 +- .../libtiff/tif_lzma.c | 22 +- .../libtiff/tif_lzw.c | 187 +- .../libtiff/tif_next.c | 41 +- .../libtiff/tif_ojpeg.c | 215 +- .../libtiff/tif_open.c | 35 +- .../libtiff/tif_packbits.c | 25 +- .../libtiff/tif_pixarlog.c | 250 +- .../libtiff/tif_predict.c | 323 +- .../libtiff/tif_predict.h | 12 +- .../libtiff/tif_print.c | 44 +- .../libtiff/tif_read.c | 972 +- .../libtiff/tif_stream.cxx | 25 +- .../libtiff/tif_strip.c | 48 +- .../libtiff/tif_swab.c | 30 +- .../libtiff/tif_thunder.c | 15 +- .../libtiff/tif_tile.c | 56 +- .../libtiff/tif_unix.c | 96 +- .../libtiff/tif_version.c | 1 - .../libtiff/tif_warning.c | 26 +- thirdparty/tiff-4.2.0/libtiff/tif_webp.c | 702 + .../libtiff/tif_win32.c | 97 +- .../libtiff/tif_write.c | 268 +- thirdparty/tiff-4.2.0/libtiff/tif_zip.c | 700 + thirdparty/tiff-4.2.0/libtiff/tif_zstd.c | 442 + .../{tiff-4.0.3 => tiff-4.2.0}/libtiff/tiff.h | 138 +- thirdparty/tiff-4.2.0/libtiff/tiffconf.h | 152 + .../tiff-4.2.0/libtiff/tiffconf.h.cmake.in | 124 + .../libtiff/tiffconf.h.in | 12 +- .../libtiff/tiffconf.vc.h | 34 +- .../libtiff/tiffconf.wince.h | 11 - .../libtiff/tiffio.h | 57 +- .../libtiff/tiffio.hxx | 3 +- .../libtiff/tiffiop.h | 170 +- .../libtiff/tiffvers.h | 4 +- .../libtiff/uvcode.h | 2 +- .../m4/acinclude.m4 | 0 .../{tiff-4.0.3 => tiff-4.2.0}/m4/libtool.m4 | 2559 ++-- .../m4/ltoptions.m4 | 127 +- .../{tiff-4.0.3 => tiff-4.2.0}/m4/ltsugar.m4 | 7 +- .../m4/ltversion.m4 | 12 +- .../m4/lt~obsolete.m4 | 7 +- thirdparty/tiff-4.2.0/man/CMakeLists.txt | 97 + .../man/Makefile.am | 12 +- .../man/Makefile.in | 146 +- .../man/TIFFClose.3tiff | 3 +- .../man/TIFFDataWidth.3tiff | 3 +- .../man/TIFFError.3tiff | 3 +- .../man/TIFFFieldDataType.3tiff | 3 +- .../man/TIFFFieldName.3tiff | 3 +- .../man/TIFFFieldPassCount.3tiff | 3 +- .../man/TIFFFieldReadCount.3tiff | 3 +- .../man/TIFFFieldTag.3tiff | 3 +- .../man/TIFFFieldWriteCount.3tiff | 3 +- .../man/TIFFFlush.3tiff | 3 +- .../man/TIFFGetField.3tiff | 65 +- .../man/TIFFOpen.3tiff | 16 +- .../man/TIFFPrintDirectory.3tiff | 1 - .../man/TIFFRGBAImage.3tiff | 3 +- .../man/TIFFReadDirectory.3tiff | 3 +- .../man/TIFFReadEncodedStrip.3tiff | 5 +- .../man/TIFFReadEncodedTile.3tiff | 3 +- .../man/TIFFReadRGBAImage.3tiff | 3 +- .../man/TIFFReadRGBAStrip.3tiff | 3 +- .../man/TIFFReadRGBATile.3tiff | 3 +- .../man/TIFFReadRawStrip.3tiff | 3 +- .../man/TIFFReadRawTile.3tiff | 3 +- .../man/TIFFReadScanline.3tiff | 3 +- .../man/TIFFReadTile.3tiff | 3 +- .../man/TIFFSetDirectory.3tiff | 5 +- .../man/TIFFSetField.3tiff | 5 +- .../man/TIFFWarning.3tiff | 3 +- .../man/TIFFWriteDirectory.3tiff | 3 +- .../man/TIFFWriteEncodedStrip.3tiff | 3 +- .../man/TIFFWriteEncodedTile.3tiff | 3 +- .../man/TIFFWriteRawStrip.3tiff | 3 +- .../man/TIFFWriteRawTile.3tiff | 3 +- .../man/TIFFWriteScanline.3tiff | 3 +- .../man/TIFFWriteTile.3tiff | 3 +- .../man/TIFFbuffer.3tiff | 3 +- .../man/TIFFcodec.3tiff | 3 +- .../man/TIFFcolor.3tiff | 3 +- .../man/TIFFmemory.3tiff | 5 +- .../man/TIFFquery.3tiff | 3 +- .../man/TIFFsize.3tiff | 3 +- .../man/TIFFstrip.3tiff | 9 +- .../man/TIFFswab.3tiff | 3 +- .../man/TIFFtile.3tiff | 3 +- .../{tiff-4.0.3 => tiff-4.2.0}/man/fax2ps.1 | 3 +- .../{tiff-4.0.3 => tiff-4.2.0}/man/fax2tiff.1 | 3 +- .../man/libtiff.3tiff | 9 +- .../{tiff-4.0.3 => tiff-4.2.0}/man/pal2rgb.1 | 3 +- .../{tiff-4.0.3 => tiff-4.2.0}/man/ppm2tiff.1 | 3 +- .../{tiff-4.0.3 => tiff-4.2.0}/man/raw2tiff.1 | 3 +- .../{tiff-4.0.3 => tiff-4.2.0}/man/tiff2bw.1 | 3 +- .../{tiff-4.0.3 => tiff-4.2.0}/man/tiff2pdf.1 | 6 +- .../{tiff-4.0.3 => tiff-4.2.0}/man/tiff2ps.1 | 48 +- .../man/tiff2rgba.1 | 7 +- .../{tiff-4.0.3 => tiff-4.2.0}/man/tiffcmp.1 | 3 +- .../{tiff-4.0.3 => tiff-4.2.0}/man/tiffcp.1 | 33 +- .../{tiff-4.0.3 => tiff-4.2.0}/man/tiffcrop.1 | 7 +- .../man/tiffdither.1 | 6 +- .../{tiff-4.0.3 => tiff-4.2.0}/man/tiffdump.1 | 3 +- .../{tiff-4.0.3 => tiff-4.2.0}/man/tiffgt.1 | 3 +- .../{tiff-4.0.3 => tiff-4.2.0}/man/tiffinfo.1 | 3 +- .../man/tiffmedian.1 | 3 +- .../{tiff-4.0.3 => tiff-4.2.0}/man/tiffset.1 | 12 +- .../man/tiffsplit.1 | 3 +- .../{tiff-4.0.3 => tiff-4.2.0}/nmake.opt | 438 +- thirdparty/tiff-4.2.0/port/CMakeLists.txt | 68 + .../port/Makefile.am | 8 +- .../port/Makefile.in | 237 +- .../port/Makefile.vc | 44 +- thirdparty/tiff-4.2.0/port/_strtol.h | 160 + .../strtoul.c => tiff-4.2.0/port/_strtoul.h} | 96 +- .../{tiff-4.0.3 => tiff-4.2.0}/port/dummy.c | 2 - .../{tiff-4.0.3 => tiff-4.2.0}/port/getopt.c | 2 - .../{tiff-4.0.3 => tiff-4.2.0}/port/lfind.c | 2 - .../{tiff-4.0.3 => tiff-4.2.0}/port/libport.h | 26 +- thirdparty/tiff-4.2.0/port/snprintf.c | 42 + .../port/strcasecmp.c | 6 +- thirdparty/tiff-4.2.0/port/strtol.c | 45 + thirdparty/tiff-4.2.0/port/strtoll.c | 44 + thirdparty/tiff-4.2.0/port/strtoul.c | 44 + thirdparty/tiff-4.2.0/port/strtoull.c | 44 + .../prj/LibTIFF/LibTIFF.sln | 0 .../prj/LibTIFF/LibTIFF.vcxproj | 8 +- .../prj/LibTIFF/LibTIFF.vcxproj.filters | 0 thirdparty/tiff-4.2.0/test/CMakeLists.txt | 443 + .../test/Makefile.am | 114 +- .../test/Makefile.in | 611 +- .../tiff-4.2.0/test/TiffSplitTest.cmake | 34 + thirdparty/tiff-4.2.0/test/TiffTest.cmake | 63 + .../tiff-4.2.0/test/TiffTestCommon.cmake | 108 + .../test/ascii_tag.c | 4 +- .../test/check_tag.c | 2 - .../{tiff-4.0.3 => tiff-4.2.0}/test/common.sh | 14 +- .../test/custom_dir.c | 4 +- .../tiff-4.2.0/test/custom_dir_EXIF_231.c | 1398 ++ .../tiff-4.2.0/test/defer_strile_loading.c | 318 + .../tiff-4.2.0/test/defer_strile_writing.c | 239 + thirdparty/tiff-4.2.0/test/fax2tiff.sh | 17 + .../test/images/README.txt | 6 + .../images/deflate-last-strip-extra-data.tiff | Bin 0 -> 12789 bytes .../test/images/logluv-3c-16b.tiff | Bin .../test/images/lzw-single-strip.tiff | Bin 0 -> 76264 bytes .../test/images/minisblack-1c-16b.tiff | Bin .../test/images/minisblack-1c-8b.pgm | Bin .../test/images/minisblack-1c-8b.tiff | Bin .../test/images/minisblack-2c-8b-alpha.tiff | Bin .../test/images/miniswhite-1c-1b.g3 | Bin 0 -> 9687 bytes .../test/images/miniswhite-1c-1b.pbm | Bin .../test/images/miniswhite-1c-1b.tiff | Bin .../ojpeg_chewey_subsamp21_multi_strip.tiff | Bin 0 -> 39752 bytes .../ojpeg_single_strip_no_rowsperstrip.tiff | Bin 0 -> 8258 bytes ...peg_zackthecat_subsamp22_single_strip.tiff | Bin 0 -> 8258 bytes .../test/images/palette-1c-1b.tiff | Bin .../test/images/palette-1c-4b.tiff | Bin .../test/images/palette-1c-8b.tiff | Bin .../test/images/quad-lzw-compat.tiff | Bin 0 -> 214342 bytes .../test/images/quad-tile.jpg.tiff | Bin .../tiff-4.2.0/test/images/rgb-3c-16b.ppm | Bin 0 -> 142305 bytes .../test/images/rgb-3c-16b.tiff | Bin .../test/images/rgb-3c-8b.ppm | Bin .../test/images/rgb-3c-8b.tiff | Bin .../tiff-4.2.0/test/images/testfax4.tiff | Bin 0 -> 39637 bytes .../test/long_tag.c | 4 +- .../test/ppm2tiff_pbm.sh | 1 - .../test/ppm2tiff_pgm.sh | 1 - thirdparty/tiff-4.2.0/test/ppm2tiff_ppm.sh | 10 + .../test/rational_precision2double.c | 972 ++ .../test/raw_decode.c | 108 +- .../refs/o-deflate-last-strip-extra-data.tiff | Bin 0 -> 12560 bytes .../tiff-4.2.0/test/refs/o-testfax4.tiff | Bin 0 -> 106326 bytes .../tiff-4.2.0/test/refs/o-tiff2ps-EPS1.ps | 112 + .../tiff-4.2.0/test/refs/o-tiff2ps-PS1.ps | 115 + .../tiff-4.2.0/test/refs/o-tiff2ps-PS2.ps | 104 + .../tiff-4.2.0/test/refs/o-tiff2ps-PS3.ps | 104 + .../test/rewrite_tag.c | 47 +- .../test/short_tag.c | 4 +- .../{tiff-4.0.3 => tiff-4.2.0}/test/strip.c | 4 +- .../test/strip_rw.c | 2 - .../test/test_arrays.c | 2 - .../test/test_arrays.h | 2 - .../test/testdeflatelaststripextradata.sh | 43 + thirdparty/tiff-4.2.0/test/testfax4.sh | 24 + thirdparty/tiff-4.2.0/test/testtypes.c | 58 + .../tiff-4.2.0/test/tiff2bw-palette-1c-8b.sh | 7 + .../test/tiff2bw-quad-lzw-compat.sh | 7 + .../tiff-4.2.0/test/tiff2bw-rgb-3c-8b.sh | 7 + .../test/tiff2pdf.sh | 0 thirdparty/tiff-4.2.0/test/tiff2ps-EPS1.sh | 8 + thirdparty/tiff-4.2.0/test/tiff2ps-PS1.sh | 9 + thirdparty/tiff-4.2.0/test/tiff2ps-PS2.sh | 8 + thirdparty/tiff-4.2.0/test/tiff2ps-PS3.sh | 8 + .../test/tiff2rgba-logluv-3c-16b.sh | 0 .../test/tiff2rgba-minisblack-1c-16b.sh | 0 .../test/tiff2rgba-minisblack-1c-8b.sh | 0 .../test/tiff2rgba-minisblack-2c-8b-alpha.sh | 0 .../test/tiff2rgba-miniswhite-1c-1b.sh | 0 ...rgba-ojpeg_chewey_subsamp21_multi_strip.sh | 7 + ...rgba-ojpeg_single_strip_no_rowsperstrip.sh | 7 + ...ojpeg_zackthecat_subsamp22_single_strip.sh | 7 + .../test/tiff2rgba-palette-1c-1b.sh | 0 .../test/tiff2rgba-palette-1c-4b.sh | 0 .../test/tiff2rgba-palette-1c-8b.sh | 0 .../test/tiff2rgba-quad-tile.jpg.sh | 0 .../test/tiff2rgba-rgb-3c-16b.sh | 0 .../test/tiff2rgba-rgb-3c-8b.sh | 0 .../test/tiffcp-g3-1d-fill.sh | 0 .../test/tiffcp-g3-1d.sh | 0 .../test/tiffcp-g3-2d-fill.sh | 0 .../test/tiffcp-g3-2d.sh | 0 .../test/tiffcp-g3.sh | 0 .../test/tiffcp-g4.sh | 0 .../test/tiffcp-logluv.sh | 0 .../tiff-4.2.0/test/tiffcp-lzw-compat.sh | 6 + .../test/tiffcp-lzw-scanline-decode.sh | 6 + .../test/tiffcp-split-join.sh | 0 .../test/tiffcp-split.sh | 0 .../test/tiffcp-thumbnail.sh | 0 .../test/tiffcrop-R90-logluv-3c-16b.sh | 0 .../test/tiffcrop-R90-minisblack-1c-16b.sh | 0 .../test/tiffcrop-R90-minisblack-1c-8b.sh | 0 .../tiffcrop-R90-minisblack-2c-8b-alpha.sh | 0 .../test/tiffcrop-R90-miniswhite-1c-1b.sh | 0 .../test/tiffcrop-R90-palette-1c-1b.sh | 0 .../test/tiffcrop-R90-palette-1c-4b.sh | 0 .../test/tiffcrop-R90-palette-1c-8b.sh | 0 .../test/tiffcrop-R90-rgb-3c-16b.sh | 0 .../test/tiffcrop-R90-rgb-3c-8b.sh | 0 .../test/tiffcrop-doubleflip-logluv-3c-16b.sh | 0 .../tiffcrop-doubleflip-minisblack-1c-16b.sh | 0 .../tiffcrop-doubleflip-minisblack-1c-8b.sh | 0 ...fcrop-doubleflip-minisblack-2c-8b-alpha.sh | 0 .../tiffcrop-doubleflip-miniswhite-1c-1b.sh | 0 .../test/tiffcrop-doubleflip-palette-1c-1b.sh | 0 .../test/tiffcrop-doubleflip-palette-1c-4b.sh | 0 .../test/tiffcrop-doubleflip-palette-1c-8b.sh | 0 .../test/tiffcrop-doubleflip-rgb-3c-16b.sh | 0 .../test/tiffcrop-doubleflip-rgb-3c-8b.sh | 0 .../test/tiffcrop-extract-logluv-3c-16b.sh | 0 .../tiffcrop-extract-minisblack-1c-16b.sh | 0 .../test/tiffcrop-extract-minisblack-1c-8b.sh | 0 ...tiffcrop-extract-minisblack-2c-8b-alpha.sh | 0 .../test/tiffcrop-extract-miniswhite-1c-1b.sh | 0 .../test/tiffcrop-extract-palette-1c-1b.sh | 0 .../test/tiffcrop-extract-palette-1c-4b.sh | 0 .../test/tiffcrop-extract-palette-1c-8b.sh | 0 .../test/tiffcrop-extract-rgb-3c-16b.sh | 0 .../test/tiffcrop-extract-rgb-3c-8b.sh | 0 .../test/tiffcrop-extractz14-logluv-3c-16b.sh | 0 .../tiffcrop-extractz14-minisblack-1c-16b.sh | 0 .../tiffcrop-extractz14-minisblack-1c-8b.sh | 0 ...fcrop-extractz14-minisblack-2c-8b-alpha.sh | 0 .../tiffcrop-extractz14-miniswhite-1c-1b.sh | 0 .../test/tiffcrop-extractz14-palette-1c-1b.sh | 0 .../test/tiffcrop-extractz14-palette-1c-4b.sh | 0 .../test/tiffcrop-extractz14-palette-1c-8b.sh | 0 .../test/tiffcrop-extractz14-rgb-3c-16b.sh | 0 .../test/tiffcrop-extractz14-rgb-3c-8b.sh | 0 .../test/tiffdump.sh | 0 .../test/tiffinfo.sh | 0 .../test/tifftest.h | 2 - thirdparty/tiff-4.2.0/tools/CMakeLists.txt | 152 + .../tools/Makefile.am | 25 +- .../tools/Makefile.in | 415 +- .../tools/Makefile.vc | 7 +- .../{tiff-4.0.3 => tiff-4.2.0}/tools/fax2ps.c | 48 +- .../tools/fax2tiff.c | 49 +- .../tools/pal2rgb.c | 97 +- .../tools/ppm2tiff.c | 266 +- .../tools/raw2tiff.c | 157 +- .../tools/rgb2ycbcr.c | 39 +- .../tools/thumbnail.c | 94 +- .../tools/tiff2bw.c | 130 +- .../tools/tiff2pdf.c | 1231 +- .../tools/tiff2ps.c | 227 +- .../tools/tiff2rgba.c | 94 +- .../tools/tiffcmp.c | 68 +- .../{tiff-4.0.3 => tiff-4.2.0}/tools/tiffcp.c | 270 +- .../tools/tiffcrop.c | 749 +- .../tools/tiffdither.c | 74 +- .../tools/tiffdump.c | 127 +- .../{tiff-4.0.3 => tiff-4.2.0}/tools/tiffgt.c | 86 +- .../tools/tiffinfo.c | 147 +- .../tools/tiffmedian.c | 101 +- .../tools/tiffset.c | 102 +- .../tools/tiffsplit.c | 23 +- thirdparty/zlib-1.2.8/lib/zlib-1.2.8_2019.lib | 3 + .../zlib-1.2.8/lib/zlib-1.2.8_2019_64.lib | 3 + .../zlib-1.2.8/lib/zlib-1.2.8_2019_64d.lib | 3 + .../zlib-1.2.8/lib/zlib-1.2.8_2019d.lib | 3 + thirdparty/zlib-1.2.8/prj/zlib/zlib.vcxproj | 8 +- toonz/sources/CMakeLists.txt | 17 +- 689 files changed, 52594 insertions(+), 26618 deletions(-) create mode 100644 thirdparty/libjpeg-turbo/lib/jpeg-static_2019_64.lib create mode 100644 thirdparty/libjpeg-turbo/lib/turbojpeg-static_2019_64.lib create mode 100644 thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/cmakescripts/BuildPackages.cmake create mode 100644 thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/Distribution.xml.in create mode 100644 thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/License.rtf create mode 100644 thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/ReadMe.txt create mode 100644 thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/Welcome.rtf create mode 100644 thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/deb-control.in create mode 100644 thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/installer.nsi.in create mode 100644 thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/libjpeg.pc.in create mode 100644 thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/libturbojpeg.pc.in create mode 100644 thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makecygwinpkg.in create mode 100644 thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makedpkg.in create mode 100644 thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makemacpkg.in create mode 100644 thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makerpm.in create mode 100644 thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makesrpm.in create mode 100644 thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/maketarball.in create mode 100644 thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/rpm.spec.in create mode 100644 thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/uninstall.in create mode 100644 thirdparty/libpng-1.6.21/lib/libpng16_2019.lib create mode 100644 thirdparty/libpng-1.6.21/lib/libpng16_2019_64.lib create mode 100644 thirdparty/libpng-1.6.21/lib/libpng16_2019_64d.lib create mode 100644 thirdparty/libpng-1.6.21/lib/libpng16_2019d.lib create mode 100644 thirdparty/superlu/SuperLU_2019_32.d.lib create mode 100644 thirdparty/superlu/SuperLU_2019_32.lib create mode 100644 thirdparty/superlu/SuperLU_2019_64.d.lib create mode 100644 thirdparty/superlu/SuperLU_2019_64.lib delete mode 100644 thirdparty/superlu/SuperLU_4.1/prj/SuperLU/SuperLU.vcproj create mode 100644 thirdparty/superlu/SuperLU_4.1/prj/SuperLU/SuperLU.vcxproj create mode 100644 thirdparty/superlu/SuperLU_4.1/prj/SuperLU/SuperLU.vcxproj.filters delete mode 100644 thirdparty/tiff-4.0.3/.gitignore delete mode 100644 thirdparty/tiff-4.0.3/ChangeLog delete mode 100644 thirdparty/tiff-4.0.3/README.vms delete mode 100644 thirdparty/tiff-4.0.3/RELEASE-DATE delete mode 100644 thirdparty/tiff-4.0.3/VERSION delete mode 100755 thirdparty/tiff-4.0.3/config/compile delete mode 100755 thirdparty/tiff-4.0.3/config/depcomp delete mode 100755 thirdparty/tiff-4.0.3/config/install-sh delete mode 100755 thirdparty/tiff-4.0.3/config/missing delete mode 100755 thirdparty/tiff-4.0.3/config/mkinstalldirs delete mode 100644 thirdparty/tiff-4.0.3/contrib/win_dib/Makefile.am delete mode 100644 thirdparty/tiff-4.0.3/html/man/bmp2tiff.1.html delete mode 100644 thirdparty/tiff-4.0.3/html/man/gif2tiff.1.html delete mode 100644 thirdparty/tiff-4.0.3/html/man/ras2tiff.1.html delete mode 100644 thirdparty/tiff-4.0.3/html/man/rgb2ycbcr.1.html delete mode 100644 thirdparty/tiff-4.0.3/html/man/sgi2tiff.1.html delete mode 100644 thirdparty/tiff-4.0.3/html/man/thumbnail.1.html delete mode 100644 thirdparty/tiff-4.0.3/html/man/tiffsv.1.html delete mode 100644 thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2013.lib delete mode 100644 thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2013_64.lib delete mode 100644 thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2013_64d.lib delete mode 100644 thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2013d.lib delete mode 100644 thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2015.lib delete mode 100644 thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2015_64.lib delete mode 100644 thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2015_64d.lib delete mode 100644 thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2015d.lib delete mode 100644 thirdparty/tiff-4.0.3/libtiff/tif_flush.c delete mode 100644 thirdparty/tiff-4.0.3/libtiff/tif_zip.c delete mode 100644 thirdparty/tiff-4.0.3/man/bmp2tiff.1 delete mode 100644 thirdparty/tiff-4.0.3/man/gif2tiff.1 delete mode 100644 thirdparty/tiff-4.0.3/man/ras2tiff.1 delete mode 100644 thirdparty/tiff-4.0.3/man/rgb2ycbcr.1 delete mode 100644 thirdparty/tiff-4.0.3/man/sgi2tiff.1 delete mode 100644 thirdparty/tiff-4.0.3/man/thumbnail.1 delete mode 100644 thirdparty/tiff-4.0.3/man/tiffsv.1 delete mode 100644 thirdparty/tiff-4.0.3/port/strtoull.c delete mode 100755 thirdparty/tiff-4.0.3/test/bmp2tiff_palette.sh delete mode 100755 thirdparty/tiff-4.0.3/test/bmp2tiff_rgb.sh delete mode 100755 thirdparty/tiff-4.0.3/test/gif2tiff.sh delete mode 100644 thirdparty/tiff-4.0.3/test/images/palette-1c-8b.bmp delete mode 100644 thirdparty/tiff-4.0.3/test/images/palette-1c-8b.gif delete mode 100644 thirdparty/tiff-4.0.3/test/images/rgb-3c-8b.bmp delete mode 100755 thirdparty/tiff-4.0.3/test/ppm2tiff_ppm.sh delete mode 100755 thirdparty/tiff-4.0.3/test/tiff2ps-EPS1.sh delete mode 100755 thirdparty/tiff-4.0.3/test/tiff2ps-PS1.sh delete mode 100755 thirdparty/tiff-4.0.3/test/tiff2ps-PS2.sh delete mode 100755 thirdparty/tiff-4.0.3/test/tiff2ps-PS3.sh delete mode 100644 thirdparty/tiff-4.0.3/tools/bmp2tiff.c delete mode 100644 thirdparty/tiff-4.0.3/tools/gif2tiff.c delete mode 100644 thirdparty/tiff-4.0.3/tools/ras2tiff.c delete mode 100644 thirdparty/tiff-4.0.3/tools/rasterfile.h delete mode 100644 thirdparty/tiff-4.0.3/tools/sgi2tiff.c delete mode 100644 thirdparty/tiff-4.0.3/tools/sgisv.c delete mode 100644 thirdparty/tiff-4.0.3/tools/ycbcr.c create mode 100644 thirdparty/tiff-4.2.0/CMakeLists.txt rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/COPYRIGHT (100%) create mode 100644 thirdparty/tiff-4.2.0/ChangeLog rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/HOWTO-RELEASE (56%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/Makefile.am (64%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/Makefile.in (76%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/Makefile.vc (96%) rename thirdparty/{tiff-4.0.3/README => tiff-4.2.0/README.md} (82%) create mode 100644 thirdparty/tiff-4.2.0/RELEASE-DATE rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/SConstruct (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/TODO (82%) create mode 100644 thirdparty/tiff-4.2.0/VERSION rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/aclocal.m4 (72%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/autogen.sh (100%) mode change 100755 => 100644 create mode 100644 thirdparty/tiff-4.2.0/build/CMakeLists.txt rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/build/Makefile.am (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/build/Makefile.in (78%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/build/README (100%) create mode 100644 thirdparty/tiff-4.2.0/config/compile rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/config/config.guess (72%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/config/config.sub (82%) mode change 100755 => 100644 create mode 100644 thirdparty/tiff-4.2.0/config/depcomp create mode 100644 thirdparty/tiff-4.2.0/config/install-sh rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/config/ltmain.sh (65%) create mode 100644 thirdparty/tiff-4.2.0/config/missing rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/config/test-driver (77%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/configure (81%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/configure.ac (79%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/configure.com (99%) create mode 100644 thirdparty/tiff-4.2.0/contrib/CMakeLists.txt rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/Makefile.am (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/Makefile.in (78%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/README (100%) create mode 100644 thirdparty/tiff-4.2.0/contrib/addtiffo/CMakeLists.txt rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/addtiffo/Makefile.am (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/addtiffo/Makefile.in (77%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/addtiffo/Makefile.vc (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/addtiffo/README (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/addtiffo/addtiffo.c (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/addtiffo/tif_overview.c (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/addtiffo/tif_ovrcache.c (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/addtiffo/tif_ovrcache.h (100%) create mode 100644 thirdparty/tiff-4.2.0/contrib/dbs/CMakeLists.txt rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/dbs/Makefile.am (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/dbs/Makefile.in (78%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/dbs/README (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/dbs/tiff-bi.c (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/dbs/tiff-grayscale.c (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/dbs/tiff-palette.c (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/dbs/tiff-rgb.c (99%) create mode 100644 thirdparty/tiff-4.2.0/contrib/dbs/xtiff/CMakeLists.txt rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/dbs/xtiff/Makefile.am (94%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/dbs/xtiff/Makefile.in (81%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/dbs/xtiff/README (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/dbs/xtiff/patchlevel.h (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/dbs/xtiff/xtiff.c (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/dbs/xtiff/xtifficon.h (100%) create mode 100644 thirdparty/tiff-4.2.0/contrib/iptcutil/CMakeLists.txt rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/iptcutil/Makefile.am (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/iptcutil/Makefile.in (77%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/iptcutil/README (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/iptcutil/iptcutil.c (54%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/iptcutil/test.iptc (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/iptcutil/test.txt (100%) create mode 100644 thirdparty/tiff-4.2.0/contrib/mfs/CMakeLists.txt rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/mfs/Makefile.am (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/mfs/Makefile.in (80%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/mfs/README (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/mfs/mfs_file.c (100%) create mode 100644 thirdparty/tiff-4.2.0/contrib/pds/CMakeLists.txt create mode 100644 thirdparty/tiff-4.2.0/contrib/pds/Makefile.am rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/pds/Makefile.in (80%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/pds/README (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/pds/tif_imageiter.c (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/pds/tif_imageiter.h (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/pds/tif_pdsdirread.c (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/pds/tif_pdsdirwrite.c (99%) create mode 100644 thirdparty/tiff-4.2.0/contrib/ras/CMakeLists.txt rename thirdparty/{tiff-4.0.3/contrib/stream => tiff-4.2.0/contrib/ras}/Makefile.am (94%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/ras/Makefile.in (80%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/ras/README (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/ras/ras2tif.c (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/ras/tif2ras.c (98%) create mode 100644 thirdparty/tiff-4.2.0/contrib/stream/CMakeLists.txt rename thirdparty/{tiff-4.0.3/contrib/tags => tiff-4.2.0/contrib/stream}/Makefile.am (94%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/stream/Makefile.in (80%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/stream/README (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/stream/tiffstream.cpp (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/stream/tiffstream.h (100%) create mode 100644 thirdparty/tiff-4.2.0/contrib/tags/CMakeLists.txt rename thirdparty/{tiff-4.0.3/contrib/pds => tiff-4.2.0/contrib/tags}/Makefile.am (92%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/tags/Makefile.in (80%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/tags/README (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/tags/listtif.c (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/tags/maketif.c (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/tags/xtif_dir.c (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/tags/xtiffio.h (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/tags/xtiffiop.h (100%) create mode 100644 thirdparty/tiff-4.2.0/contrib/win_dib/CMakeLists.txt rename thirdparty/{tiff-4.0.3/contrib/ras => tiff-4.2.0/contrib/win_dib}/Makefile.am (91%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/win_dib/Makefile.in (80%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/win_dib/Makefile.w95 (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/win_dib/README.Tiffile (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/win_dib/README.tiff2dib (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/win_dib/Tiffile.cpp (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/contrib/win_dib/tiff2dib.c (99%) create mode 100644 thirdparty/tiff-4.2.0/html/CMakeLists.txt rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/Makefile.am (91%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/Makefile.in (79%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/TIFFTechNote2.html (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/addingtags.html (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/bugs.html (51%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/build.html (62%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/contrib.html (88%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/document.html (75%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/images.html (65%) create mode 100644 thirdparty/tiff-4.2.0/html/images/CMakeLists.txt rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/images/Makefile.am (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/images/Makefile.in (83%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/images/back.gif (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/images/bali.jpg (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/images/cat.gif (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/images/cover.jpg (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/images/cramps.gif (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/images/dave.gif (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/images/info.gif (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/images/jello.jpg (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/images/jim.gif (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/images/note.gif (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/images/oxford.gif (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/images/quad.jpg (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/images/ring.gif (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/images/smallliz.jpg (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/images/strike.gif (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/images/warning.gif (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/index.html (67%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/internals.html (90%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/intro.html (88%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/libtiff.html (96%) create mode 100644 thirdparty/tiff-4.2.0/html/man/CMakeLists.txt create mode 100644 thirdparty/tiff-4.2.0/html/man/HtmlDoc.cmake rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/Makefile.am (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/Makefile.in (85%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFClose.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFDataWidth.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFError.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFFieldDataType.3tiff.html (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFFieldName.3tiff.html (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFFieldPassCount.3tiff.html (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFFieldReadCount.3tiff.html (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFFieldTag.3tiff.html (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFFieldWriteCount.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFFlush.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFGetField.3tiff.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFOpen.3tiff.html (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFPrintDirectory.3tiff.html (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFRGBAImage.3tiff.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFReadDirectory.3tiff.html (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFReadEncodedStrip.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFReadEncodedTile.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFReadRGBAImage.3tiff.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFReadRGBAStrip.3tiff.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFReadRGBATile.3tiff.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFReadRawStrip.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFReadRawTile.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFReadScanline.3tiff.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFReadTile.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFSetDirectory.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFSetField.3tiff.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFWarning.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFWriteDirectory.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFWriteEncodedStrip.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFWriteEncodedTile.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFWriteRawStrip.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFWriteRawTile.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFWriteScanline.3tiff.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFWriteTile.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFbuffer.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFcodec.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFcolor.3tiff.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFmemory.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFquery.3tiff.html (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFsize.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFstrip.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFswab.3tiff.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/TIFFtile.3tiff.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/fax2ps.1.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/fax2tiff.1.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/index.html (94%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/libtiff.3tiff.html (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/pal2rgb.1.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/ppm2tiff.1.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/raw2tiff.1.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/tiff2bw.1.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/tiff2pdf.1.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/tiff2ps.1.html (86%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/tiff2rgba.1.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/tiffcmp.1.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/tiffcp.1.html (94%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/tiffcrop.1.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/tiffdither.1.html (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/tiffdump.1.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/tiffgt.1.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/tiffinfo.1.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/tiffmedian.1.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/tiffset.1.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/man/tiffsplit.1.html (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/misc.html (91%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/support.html (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/tools.html (79%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.4beta007.html (93%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.4beta016.html (94%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.4beta018.html (91%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.4beta024.html (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.4beta028.html (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.4beta029.html (91%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.4beta031.html (92%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.4beta032.html (91%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.4beta033.html (89%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.4beta034.html (89%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.4beta035.html (87%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.4beta036.html (94%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.5.1.html (84%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.5.2.html (89%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.5.3.html (90%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.5.4.html (85%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.5.5.html (93%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.5.6-beta.html (93%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.5.7.html (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.6.0.html (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.6.1.html (94%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.7.0.html (91%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.7.0alpha.html (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.7.0beta.html (93%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.7.0beta2.html (90%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.7.1.html (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.7.2.html (94%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.7.3.html (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.7.4.html (92%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.8.0.html (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.8.1.html (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.8.2.html (92%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.9.0beta.html (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.9.1.html (89%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v3.9.2.html (90%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v4.0.0.html (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v4.0.1.html (88%) create mode 100644 thirdparty/tiff-4.2.0/html/v4.0.10.html rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/html/v4.0.2.html (88%) create mode 100644 thirdparty/tiff-4.2.0/html/v4.0.3.html create mode 100644 thirdparty/tiff-4.2.0/html/v4.0.4.html create mode 100644 thirdparty/tiff-4.2.0/html/v4.0.4beta.html create mode 100644 thirdparty/tiff-4.2.0/html/v4.0.5.html create mode 100644 thirdparty/tiff-4.2.0/html/v4.0.6.html create mode 100644 thirdparty/tiff-4.2.0/html/v4.0.7.html create mode 100644 thirdparty/tiff-4.2.0/html/v4.0.8.html create mode 100644 thirdparty/tiff-4.2.0/html/v4.0.9.html create mode 100644 thirdparty/tiff-4.2.0/html/v4.1.0.html create mode 100644 thirdparty/tiff-4.2.0/html/v4.2.0.html create mode 100644 thirdparty/tiff-4.2.0/lib/LibTIFF-4.2.0_2019.lib create mode 100644 thirdparty/tiff-4.2.0/lib/LibTIFF-4.2.0_2019_64.lib create mode 100644 thirdparty/tiff-4.2.0/lib/LibTIFF-4.2.0_2019_64d.lib create mode 100644 thirdparty/tiff-4.2.0/lib/LibTIFF-4.2.0_2019d.lib rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff-4.pc.in (100%) create mode 100644 thirdparty/tiff-4.2.0/libtiff/CMakeLists.txt rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/Makefile.am (92%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/Makefile.in (73%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/Makefile.vc (94%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/SConstruct (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/libtiff.def (81%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/libtiff.map (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/libtiffxx.map (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/mkg3states.c (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/t4.h (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_aux.c (71%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_close.c (93%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_codec.c (94%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_color.c (82%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_compress.c (97%) create mode 100644 thirdparty/tiff-4.2.0/libtiff/tif_config.h rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_config.h-vms (100%) create mode 100644 thirdparty/tiff-4.2.0/libtiff/tif_config.h.cmake.in rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_config.h.in (84%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_config.vc.h (50%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_config.wince.h (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_dir.c (80%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_dir.h (93%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_dirinfo.c (66%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_dirread.c (73%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_dirwrite.c (69%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_dumpmode.c (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_error.c (88%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_extension.c (75%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_fax3.c (86%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_fax3.h (87%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_fax3sm.c (99%) create mode 100644 thirdparty/tiff-4.2.0/libtiff/tif_flush.c rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_getimage.c (81%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_getimage_64.c (81%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_jbig.c (85%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_jpeg.c (78%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_jpeg_12.c (93%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_luv.c (90%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_lzma.c (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_lzw.c (87%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_next.c (80%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_ojpeg.c (91%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_open.c (93%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_packbits.c (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_pixarlog.c (85%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_predict.c (67%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_predict.h (91%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_print.c (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_read.c (51%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_stream.cxx (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_strip.c (93%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_swab.c (91%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_thunder.c (94%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_tile.c (88%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_unix.c (71%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_version.c (93%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_warning.c (88%) create mode 100644 thirdparty/tiff-4.2.0/libtiff/tif_webp.c rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_win32.c (83%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tif_write.c (73%) create mode 100644 thirdparty/tiff-4.2.0/libtiff/tif_zip.c create mode 100644 thirdparty/tiff-4.2.0/libtiff/tif_zstd.c rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tiff.h (75%) create mode 100644 thirdparty/tiff-4.2.0/libtiff/tiffconf.h create mode 100644 thirdparty/tiff-4.2.0/libtiff/tiffconf.h.cmake.in rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tiffconf.h.in (93%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tiffconf.vc.h (87%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tiffconf.wince.h (90%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tiffio.h (91%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tiffio.hxx (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tiffiop.h (66%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/tiffvers.h (76%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/libtiff/uvcode.h (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/m4/acinclude.m4 (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/m4/libtool.m4 (72%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/m4/ltoptions.m4 (73%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/m4/ltsugar.m4 (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/m4/ltversion.m4 (68%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/m4/lt~obsolete.m4 (98%) create mode 100644 thirdparty/tiff-4.2.0/man/CMakeLists.txt rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/Makefile.am (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/Makefile.in (86%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFClose.3tiff (94%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFDataWidth.3tiff (94%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFError.3tiff (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFFieldDataType.3tiff (94%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFFieldName.3tiff (94%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFFieldPassCount.3tiff (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFFieldReadCount.3tiff (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFFieldTag.3tiff (94%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFFieldWriteCount.3tiff (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFFlush.3tiff (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFGetField.3tiff (81%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFOpen.3tiff (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFPrintDirectory.3tiff (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFRGBAImage.3tiff (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFReadDirectory.3tiff (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFReadEncodedStrip.3tiff (92%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFReadEncodedTile.3tiff (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFReadRGBAImage.3tiff (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFReadRGBAStrip.3tiff (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFReadRGBATile.3tiff (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFReadRawStrip.3tiff (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFReadRawTile.3tiff (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFReadScanline.3tiff (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFReadTile.3tiff (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFSetDirectory.3tiff (93%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFSetField.3tiff (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFWarning.3tiff (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFWriteDirectory.3tiff (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFWriteEncodedStrip.3tiff (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFWriteEncodedTile.3tiff (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFWriteRawStrip.3tiff (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFWriteRawTile.3tiff (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFWriteScanline.3tiff (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFWriteTile.3tiff (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFbuffer.3tiff (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFcodec.3tiff (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFcolor.3tiff (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFmemory.3tiff (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFquery.3tiff (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFsize.3tiff (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFstrip.3tiff (92%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFswab.3tiff (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/TIFFtile.3tiff (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/fax2ps.1 (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/fax2tiff.1 (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/libtiff.3tiff (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/pal2rgb.1 (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/ppm2tiff.1 (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/raw2tiff.1 (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/tiff2bw.1 (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/tiff2pdf.1 (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/tiff2ps.1 (92%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/tiff2rgba.1 (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/tiffcmp.1 (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/tiffcp.1 (92%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/tiffcrop.1 (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/tiffdither.1 (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/tiffdump.1 (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/tiffgt.1 (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/tiffinfo.1 (96%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/tiffmedian.1 (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/tiffset.1 (91%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/man/tiffsplit.1 (95%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/nmake.opt (89%) create mode 100644 thirdparty/tiff-4.2.0/port/CMakeLists.txt rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/port/Makefile.am (93%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/port/Makefile.in (74%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/port/Makefile.vc (70%) create mode 100644 thirdparty/tiff-4.2.0/port/_strtol.h rename thirdparty/{tiff-4.0.3/port/strtoul.c => tiff-4.2.0/port/_strtoul.h} (57%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/port/dummy.c (70%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/port/getopt.c (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/port/lfind.c (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/port/libport.h (74%) create mode 100644 thirdparty/tiff-4.2.0/port/snprintf.c rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/port/strcasecmp.c (92%) create mode 100644 thirdparty/tiff-4.2.0/port/strtol.c create mode 100644 thirdparty/tiff-4.2.0/port/strtoll.c create mode 100644 thirdparty/tiff-4.2.0/port/strtoul.c create mode 100644 thirdparty/tiff-4.2.0/port/strtoull.c rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/prj/LibTIFF/LibTIFF.sln (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/prj/LibTIFF/LibTIFF.vcxproj (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/prj/LibTIFF/LibTIFF.vcxproj.filters (100%) create mode 100644 thirdparty/tiff-4.2.0/test/CMakeLists.txt rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/Makefile.am (72%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/Makefile.in (76%) create mode 100644 thirdparty/tiff-4.2.0/test/TiffSplitTest.cmake create mode 100644 thirdparty/tiff-4.2.0/test/TiffTest.cmake create mode 100644 thirdparty/tiff-4.2.0/test/TiffTestCommon.cmake rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/ascii_tag.c (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/check_tag.c (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/common.sh (90%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/custom_dir.c (98%) create mode 100644 thirdparty/tiff-4.2.0/test/custom_dir_EXIF_231.c create mode 100644 thirdparty/tiff-4.2.0/test/defer_strile_loading.c create mode 100644 thirdparty/tiff-4.2.0/test/defer_strile_writing.c create mode 100644 thirdparty/tiff-4.2.0/test/fax2tiff.sh rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/images/README.txt (80%) create mode 100644 thirdparty/tiff-4.2.0/test/images/deflate-last-strip-extra-data.tiff rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/images/logluv-3c-16b.tiff (100%) create mode 100644 thirdparty/tiff-4.2.0/test/images/lzw-single-strip.tiff rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/images/minisblack-1c-16b.tiff (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/images/minisblack-1c-8b.pgm (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/images/minisblack-1c-8b.tiff (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/images/minisblack-2c-8b-alpha.tiff (100%) create mode 100644 thirdparty/tiff-4.2.0/test/images/miniswhite-1c-1b.g3 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/images/miniswhite-1c-1b.pbm (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/images/miniswhite-1c-1b.tiff (100%) create mode 100644 thirdparty/tiff-4.2.0/test/images/ojpeg_chewey_subsamp21_multi_strip.tiff create mode 100644 thirdparty/tiff-4.2.0/test/images/ojpeg_single_strip_no_rowsperstrip.tiff create mode 100644 thirdparty/tiff-4.2.0/test/images/ojpeg_zackthecat_subsamp22_single_strip.tiff rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/images/palette-1c-1b.tiff (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/images/palette-1c-4b.tiff (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/images/palette-1c-8b.tiff (100%) create mode 100644 thirdparty/tiff-4.2.0/test/images/quad-lzw-compat.tiff rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/images/quad-tile.jpg.tiff (100%) create mode 100644 thirdparty/tiff-4.2.0/test/images/rgb-3c-16b.ppm rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/images/rgb-3c-16b.tiff (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/images/rgb-3c-8b.ppm (100%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/images/rgb-3c-8b.tiff (100%) create mode 100644 thirdparty/tiff-4.2.0/test/images/testfax4.tiff rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/long_tag.c (97%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/ppm2tiff_pbm.sh (81%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/ppm2tiff_pgm.sh (81%) mode change 100755 => 100644 create mode 100644 thirdparty/tiff-4.2.0/test/ppm2tiff_ppm.sh create mode 100644 thirdparty/tiff-4.2.0/test/rational_precision2double.c rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/raw_decode.c (63%) create mode 100644 thirdparty/tiff-4.2.0/test/refs/o-deflate-last-strip-extra-data.tiff create mode 100644 thirdparty/tiff-4.2.0/test/refs/o-testfax4.tiff create mode 100644 thirdparty/tiff-4.2.0/test/refs/o-tiff2ps-EPS1.ps create mode 100644 thirdparty/tiff-4.2.0/test/refs/o-tiff2ps-PS1.ps create mode 100644 thirdparty/tiff-4.2.0/test/refs/o-tiff2ps-PS2.ps create mode 100644 thirdparty/tiff-4.2.0/test/refs/o-tiff2ps-PS3.ps rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/rewrite_tag.c (89%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/short_tag.c (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/strip.c (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/strip_rw.c (98%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/test_arrays.c (99%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/test_arrays.h (96%) create mode 100644 thirdparty/tiff-4.2.0/test/testdeflatelaststripextradata.sh create mode 100644 thirdparty/tiff-4.2.0/test/testfax4.sh create mode 100644 thirdparty/tiff-4.2.0/test/testtypes.c create mode 100644 thirdparty/tiff-4.2.0/test/tiff2bw-palette-1c-8b.sh create mode 100644 thirdparty/tiff-4.2.0/test/tiff2bw-quad-lzw-compat.sh create mode 100644 thirdparty/tiff-4.2.0/test/tiff2bw-rgb-3c-8b.sh rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiff2pdf.sh (100%) mode change 100755 => 100644 create mode 100644 thirdparty/tiff-4.2.0/test/tiff2ps-EPS1.sh create mode 100644 thirdparty/tiff-4.2.0/test/tiff2ps-PS1.sh create mode 100644 thirdparty/tiff-4.2.0/test/tiff2ps-PS2.sh create mode 100644 thirdparty/tiff-4.2.0/test/tiff2ps-PS3.sh rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiff2rgba-logluv-3c-16b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiff2rgba-minisblack-1c-16b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiff2rgba-minisblack-1c-8b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiff2rgba-minisblack-2c-8b-alpha.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiff2rgba-miniswhite-1c-1b.sh (100%) mode change 100755 => 100644 create mode 100644 thirdparty/tiff-4.2.0/test/tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh create mode 100644 thirdparty/tiff-4.2.0/test/tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh create mode 100644 thirdparty/tiff-4.2.0/test/tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiff2rgba-palette-1c-1b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiff2rgba-palette-1c-4b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiff2rgba-palette-1c-8b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiff2rgba-quad-tile.jpg.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiff2rgba-rgb-3c-16b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiff2rgba-rgb-3c-8b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcp-g3-1d-fill.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcp-g3-1d.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcp-g3-2d-fill.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcp-g3-2d.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcp-g3.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcp-g4.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcp-logluv.sh (100%) mode change 100755 => 100644 create mode 100644 thirdparty/tiff-4.2.0/test/tiffcp-lzw-compat.sh create mode 100644 thirdparty/tiff-4.2.0/test/tiffcp-lzw-scanline-decode.sh rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcp-split-join.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcp-split.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcp-thumbnail.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-R90-logluv-3c-16b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-R90-minisblack-1c-16b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-R90-minisblack-1c-8b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-R90-minisblack-2c-8b-alpha.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-R90-miniswhite-1c-1b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-R90-palette-1c-1b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-R90-palette-1c-4b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-R90-palette-1c-8b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-R90-rgb-3c-16b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-R90-rgb-3c-8b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-doubleflip-logluv-3c-16b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-doubleflip-minisblack-1c-16b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-doubleflip-minisblack-1c-8b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-doubleflip-miniswhite-1c-1b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-doubleflip-palette-1c-1b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-doubleflip-palette-1c-4b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-doubleflip-palette-1c-8b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-doubleflip-rgb-3c-16b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-doubleflip-rgb-3c-8b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extract-logluv-3c-16b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extract-minisblack-1c-16b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extract-minisblack-1c-8b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extract-minisblack-2c-8b-alpha.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extract-miniswhite-1c-1b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extract-palette-1c-1b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extract-palette-1c-4b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extract-palette-1c-8b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extract-rgb-3c-16b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extract-rgb-3c-8b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extractz14-logluv-3c-16b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extractz14-minisblack-1c-16b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extractz14-minisblack-1c-8b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extractz14-miniswhite-1c-1b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extractz14-palette-1c-1b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extractz14-palette-1c-4b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extractz14-palette-1c-8b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extractz14-rgb-3c-16b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffcrop-extractz14-rgb-3c-8b.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffdump.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tiffinfo.sh (100%) mode change 100755 => 100644 rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/test/tifftest.h (96%) create mode 100644 thirdparty/tiff-4.2.0/tools/CMakeLists.txt rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/Makefile.am (90%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/Makefile.in (78%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/Makefile.vc (87%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/fax2ps.c (92%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/fax2tiff.c (93%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/pal2rgb.c (84%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/ppm2tiff.c (65%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/raw2tiff.c (76%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/rgb2ycbcr.c (93%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/thumbnail.c (88%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/tiff2bw.c (80%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/tiff2pdf.c (81%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/tiff2ps.c (94%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/tiff2rgba.c (83%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/tiffcmp.c (92%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/tiffcp.c (87%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/tiffcrop.c (94%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/tiffdither.c (86%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/tiffdump.c (87%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/tiffgt.c (89%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/tiffinfo.c (77%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/tiffmedian.c (90%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/tiffset.c (79%) rename thirdparty/{tiff-4.0.3 => tiff-4.2.0}/tools/tiffsplit.c (95%) create mode 100644 thirdparty/zlib-1.2.8/lib/zlib-1.2.8_2019.lib create mode 100644 thirdparty/zlib-1.2.8/lib/zlib-1.2.8_2019_64.lib create mode 100644 thirdparty/zlib-1.2.8/lib/zlib-1.2.8_2019_64d.lib create mode 100644 thirdparty/zlib-1.2.8/lib/zlib-1.2.8_2019d.lib diff --git a/thirdparty/libjpeg-turbo/lib/jpeg-static_2019_64.lib b/thirdparty/libjpeg-turbo/lib/jpeg-static_2019_64.lib new file mode 100644 index 00000000..ae6f2736 --- /dev/null +++ b/thirdparty/libjpeg-turbo/lib/jpeg-static_2019_64.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1949782745964dd7bfd45e9bb3e72f083f97b43cc9602e98b3ea7bbe9b959d19 +size 983682 diff --git a/thirdparty/libjpeg-turbo/lib/turbojpeg-static_2019_64.lib b/thirdparty/libjpeg-turbo/lib/turbojpeg-static_2019_64.lib new file mode 100644 index 00000000..5bf8f3fb --- /dev/null +++ b/thirdparty/libjpeg-turbo/lib/turbojpeg-static_2019_64.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7580d8a7fb9479a24e97372d98b7ebb5b3684590588a8a578a282d3a6dc95395 +size 1183242 diff --git a/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/cmakescripts/BuildPackages.cmake b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/cmakescripts/BuildPackages.cmake new file mode 100644 index 00000000..277c72fb --- /dev/null +++ b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/cmakescripts/BuildPackages.cmake @@ -0,0 +1,189 @@ +# This file is included from the top-level CMakeLists.txt. We just store it +# here to avoid cluttering up that file. + +set(PKGNAME ${CMAKE_PROJECT_NAME} CACHE STRING + "Distribution package name (default: ${CMAKE_PROJECT_NAME})") +set(PKGVENDOR "The ${CMAKE_PROJECT_NAME} Project" CACHE STRING + "Vendor name to be included in distribution package descriptions (default: The ${CMAKE_PROJECT_NAME} Project)") +set(PKGURL "http://www.${CMAKE_PROJECT_NAME}.org" CACHE STRING + "URL of project web site to be included in distribution package descriptions (default: http://www.${CMAKE_PROJECT_NAME}.org)") +set(PKGEMAIL "information@${CMAKE_PROJECT_NAME}.org" CACHE STRING + "E-mail of project maintainer to be included in distribution package descriptions (default: information@${CMAKE_PROJECT_NAME}.org") +set(PKGID "com.${CMAKE_PROJECT_NAME}.${PKGNAME}" CACHE STRING + "Globally unique package identifier (reverse DNS notation) (default: com.${CMAKE_PROJECT_NAME}.${PKGNAME})") + + +############################################################################### +# Linux RPM and DEB +############################################################################### + +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + +set(RPMARCH ${CMAKE_SYSTEM_PROCESSOR}) +if(CPU_TYPE STREQUAL "x86_64") + set(DEBARCH amd64) +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armv7*") + set(RPMARCH armv7hl) + set(DEBARCH armhf) +elseif(CPU_TYPE STREQUAL "arm64") + set(DEBARCH ${CPU_TYPE}) +elseif(CPU_TYPE STREQUAL "arm") + if(CMAKE_C_COMPILER MATCHES "gnueabihf") + set(RPMARCH armv7hl) + set(DEBARCH armhf) + else() + set(RPMARCH armel) + set(DEBARCH armel) + endif() +elseif(CMAKE_SYSTEM_PROCESSOR_LC STREQUAL "ppc64le") + set(DEBARCH ppc64el) +elseif(CPU_TYPE STREQUAL "powerpc" AND BITS EQUAL 32) + set(RPMARCH ppc) + set(DEBARCH ppc) +else() + set(DEBARCH ${CMAKE_SYSTEM_PROCESSOR}) +endif() +message(STATUS "RPM architecture = ${RPMARCH}, DEB architecture = ${DEBARCH}") + +# Re-set CMAKE_POSITION_INDEPENDENT_CODE so that the RPM spec file works +# properly +boolean_number(CMAKE_POSITION_INDEPENDENT_CODE) + +configure_file(release/makerpm.in pkgscripts/makerpm) +configure_file(release/rpm.spec.in pkgscripts/rpm.spec @ONLY) + +add_custom_target(rpm pkgscripts/makerpm + SOURCES pkgscripts/makerpm) + +configure_file(release/makesrpm.in pkgscripts/makesrpm) + +add_custom_target(srpm pkgscripts/makesrpm + SOURCES pkgscripts/makesrpm + DEPENDS dist) + +configure_file(release/makedpkg.in pkgscripts/makedpkg) +configure_file(release/deb-control.in pkgscripts/deb-control) + +add_custom_target(deb pkgscripts/makedpkg + SOURCES pkgscripts/makedpkg) + +endif() # Linux + + +############################################################################### +# Windows installer (NullSoft Installer) +############################################################################### + +if(WIN32) + +if(MSVC) + set(INST_PLATFORM "Visual C++") + set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}-vc) + set(INST_REG_NAME ${CMAKE_PROJECT_NAME}) +elseif(MINGW) + set(INST_PLATFORM GCC) + set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}-gcc) + set(INST_REG_NAME ${CMAKE_PROJECT_NAME}-gcc) + set(INST_DEFS -DGCC) +endif() + +if(BITS EQUAL 64) + set(INST_PLATFORM "${INST_PLATFORM} 64-bit") + set(INST_NAME ${INST_NAME}64) + set(INST_REG_NAME ${INST_REG_NAME}64) + set(INST_DEFS ${INST_DEFS} -DWIN64) +endif() + +if(WITH_JAVA) + set(INST_DEFS ${INST_DEFS} -DJAVA) +endif() + +if(MSVC_IDE) + set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=${CMAKE_CFG_INTDIR}\\") +else() + set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=") +endif() + +string(REGEX REPLACE "/" "\\\\" INST_DIR ${CMAKE_INSTALL_PREFIX}) + +configure_file(release/installer.nsi.in installer.nsi @ONLY) + +if(WITH_JAVA) + set(JAVA_DEPEND turbojpeg-java) +endif() +add_custom_target(installer + makensis -nocd ${INST_DEFS} installer.nsi + DEPENDS jpeg jpeg-static turbojpeg turbojpeg-static rdjpgcom wrjpgcom + cjpeg djpeg jpegtran tjbench ${JAVA_DEPEND} + SOURCES installer.nsi) + +endif() # WIN32 + + +############################################################################### +# Cygwin Package +############################################################################### + +if(CYGWIN) + +configure_file(release/makecygwinpkg.in pkgscripts/makecygwinpkg) + +add_custom_target(cygwinpkg pkgscripts/makecygwinpkg) + +endif() # CYGWIN + + +############################################################################### +# Mac DMG +############################################################################### + +if(APPLE) + +set(DEFAULT_OSX_32BIT_BUILD ${CMAKE_SOURCE_DIR}/osxx86) +set(OSX_32BIT_BUILD ${DEFAULT_OSX_32BIT_BUILD} CACHE PATH + "Directory containing 32-bit (i386) Mac build to include in universal binaries (default: ${DEFAULT_OSX_32BIT_BUILD})") +set(DEFAULT_IOS_ARMV7_BUILD ${CMAKE_SOURCE_DIR}/iosarmv7) +set(IOS_ARMV7_BUILD ${DEFAULT_IOS_ARMV7_BUILD} CACHE PATH + "Directory containing Armv7 iOS build to include in universal binaries (default: ${DEFAULT_IOS_ARMV7_BUILD})") +set(DEFAULT_IOS_ARMV7S_BUILD ${CMAKE_SOURCE_DIR}/iosarmv7s) +set(IOS_ARMV7S_BUILD ${DEFAULT_IOS_ARMV7S_BUILD} CACHE PATH + "Directory containing Armv7s iOS build to include in universal binaries (default: ${DEFAULT_IOS_ARMV7S_BUILD})") +set(DEFAULT_IOS_ARMV8_BUILD ${CMAKE_SOURCE_DIR}/iosarmv8) +set(IOS_ARMV8_BUILD ${DEFAULT_IOS_ARMV8_BUILD} CACHE PATH + "Directory containing Armv8 iOS build to include in universal binaries (default: ${DEFAULT_IOS_ARMV8_BUILD})") + +set(OSX_APP_CERT_NAME "" CACHE STRING + "Name of the Developer ID Application certificate (in the macOS keychain) that should be used to sign the libjpeg-turbo DMG. Leave this blank to generate an unsigned DMG.") +set(OSX_INST_CERT_NAME "" CACHE STRING + "Name of the Developer ID Installer certificate (in the macOS keychain) that should be used to sign the libjpeg-turbo installer package. Leave this blank to generate an unsigned package.") + +configure_file(release/makemacpkg.in pkgscripts/makemacpkg) +configure_file(release/Distribution.xml.in pkgscripts/Distribution.xml) +configure_file(release/uninstall.in pkgscripts/uninstall) + +add_custom_target(dmg pkgscripts/makemacpkg + SOURCES pkgscripts/makemacpkg) + +add_custom_target(udmg pkgscripts/makemacpkg universal + SOURCES pkgscripts/makemacpkg) + +endif() # APPLE + + +############################################################################### +# Generic +############################################################################### + +add_custom_target(dist + COMMAND git archive --prefix=${CMAKE_PROJECT_NAME}-${VERSION}/ HEAD | + gzip > ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar.gz + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + +configure_file(release/maketarball.in pkgscripts/maketarball) + +add_custom_target(tarball pkgscripts/maketarball + SOURCES pkgscripts/maketarball) + +configure_file(release/libjpeg.pc.in pkgscripts/libjpeg.pc @ONLY) + +configure_file(release/libturbojpeg.pc.in pkgscripts/libturbojpeg.pc @ONLY) diff --git a/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/Distribution.xml.in b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/Distribution.xml.in new file mode 100644 index 00000000..e1f79eee --- /dev/null +++ b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/Distribution.xml.in @@ -0,0 +1,24 @@ + + + @CMAKE_PROJECT_NAME@ + + + + + + + + + + + + + + + @PKGNAME@.pkg + diff --git a/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/License.rtf b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/License.rtf new file mode 100644 index 00000000..5073a27f --- /dev/null +++ b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/License.rtf @@ -0,0 +1,20 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}} +{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}} +\margl1440\margr1440\vieww9820\viewh8480\viewkind0 +\deftab720 +\pard\pardeftab720 + +\f0\fs24 \cf0 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\ +\ +\pard\tx220\tx720\pardeftab720\li720\fi-720 +\ls1\ilvl0\cf0 {\listtext \'95 }Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\ +{\listtext \'95 }Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\ +{\listtext \'95 }Neither the name of the libjpeg-turbo Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\ +\pard\pardeftab720\qc +\cf0 \ +\pard\pardeftab720 +\cf0 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\ +} \ No newline at end of file diff --git a/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/ReadMe.txt b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/ReadMe.txt new file mode 100644 index 00000000..0d1888d1 --- /dev/null +++ b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/ReadMe.txt @@ -0,0 +1,5 @@ +libjpeg-turbo is a JPEG image codec that uses SIMD instructions to accelerate baseline JPEG compression and decompression on x86, x86-64, Arm, PowerPC, and MIPS systems, as well as progressive JPEG compression on x86 and x86-64 systems. On such systems, libjpeg-turbo is generally 2-6x as fast as libjpeg, all else being equal. On other types of systems, libjpeg-turbo can still outperform libjpeg by a significant amount, by virtue of its highly-optimized Huffman coding routines. In many cases, the performance of libjpeg-turbo rivals that of proprietary high-speed JPEG codecs. + +libjpeg-turbo implements both the traditional libjpeg API as well as the less powerful but more straightforward TurboJPEG API. libjpeg-turbo also features colorspace extensions that allow it to compress from/decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java interface. + +libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated derivative of libjpeg v6b developed by Miyasaka Masaru. The TigerVNC and VirtualGL projects made numerous enhancements to the codec in 2009, and in early 2010, libjpeg-turbo spun off into an independent project, with the goal of making high-speed JPEG compression/decompression technology available to a broader range of users and developers. diff --git a/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/Welcome.rtf b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/Welcome.rtf new file mode 100644 index 00000000..a570c5ba --- /dev/null +++ b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/Welcome.rtf @@ -0,0 +1,17 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fmodern\fcharset0 CourierNewPSMT;} +{\colortbl;\red255\green255\blue255;} +\margl1440\margr1440\vieww9000\viewh8400\viewkind0 +\deftab720 +\pard\pardeftab720\ql\qnatural + +\f0\fs24 \cf0 This installer will install the libjpeg-turbo SDK and run-time libraries onto your computer so that you can use libjpeg-turbo to build new applications or accelerate existing ones. To remove the libjpeg-turbo package, run\ +\ +\pard\pardeftab720\ql\qnatural + +\f1 \cf0 /opt/libjpeg-turbo/bin/uninstall\ +\pard\pardeftab720\ql\qnatural + +\f0 \cf0 \ +from the command line.\ +} \ No newline at end of file diff --git a/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/deb-control.in b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/deb-control.in new file mode 100644 index 00000000..b82bdacb --- /dev/null +++ b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/deb-control.in @@ -0,0 +1,31 @@ +Package: {__PKGNAME} +Version: @VERSION@-@BUILD@ +Section: misc +Priority: optional +Architecture: {__ARCH} +Essential: no +Maintainer: @PKGVENDOR@ <@PKGEMAIL@> +Homepage: @PKGURL@ +Installed-Size: {__SIZE} +Description: A SIMD-accelerated JPEG codec that provides both the libjpeg and TurboJPEG APIs + libjpeg-turbo is a JPEG image codec that uses SIMD instructions to accelerate + baseline JPEG compression and decompression on x86, x86-64, Arm, PowerPC, and + MIPS systems, as well as progressive JPEG compression on x86 and x86-64 + systems. On such systems, libjpeg-turbo is generally 2-6x as fast as libjpeg, + all else being equal. On other types of systems, libjpeg-turbo can still + outperform libjpeg by a significant amount, by virtue of its highly-optimized + Huffman coding routines. In many cases, the performance of libjpeg-turbo + rivals that of proprietary high-speed JPEG codecs. + . + libjpeg-turbo implements both the traditional libjpeg API as well as the less + powerful but more straightforward TurboJPEG API. libjpeg-turbo also features + colorspace extensions that allow it to compress from/decompress to 32-bit and + big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java + interface. + . + libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated + derivative of libjpeg v6b developed by Miyasaka Masaru. The TigerVNC and + VirtualGL projects made numerous enhancements to the codec in 2009, and in + early 2010, libjpeg-turbo spun off into an independent project, with the goal + of making high-speed JPEG compression/decompression technology available to a + broader range of users and developers. diff --git a/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/installer.nsi.in b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/installer.nsi.in new file mode 100644 index 00000000..44419fa8 --- /dev/null +++ b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/installer.nsi.in @@ -0,0 +1,191 @@ +!include x64.nsh +Name "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@" +OutFile "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}@INST_NAME@.exe" +InstallDir "@INST_DIR@" + +SetCompressor bzip2 + +Page directory +Page instfiles + +UninstPage uninstConfirm +UninstPage instfiles + +Section "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ (required)" +!ifdef WIN64 + ${If} ${RunningX64} + ${DisableX64FSRedirection} + ${Endif} +!endif + SectionIn RO +!ifdef GCC + IfFileExists $SYSDIR/libturbojpeg.dll exists 0 +!else + IfFileExists $SYSDIR/turbojpeg.dll exists 0 +!endif + goto notexists + exists: +!ifdef GCC + MessageBox MB_OK "An existing version of the @CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ is already installed. Please uninstall it first." +!else + MessageBox MB_OK "An existing version of the @CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ or the TurboJPEG SDK is already installed. Please uninstall it first." +!endif + quit + + notexists: + SetOutPath $SYSDIR +!ifdef GCC + File "@CMAKE_CURRENT_BINARY_DIR@\libturbojpeg.dll" +!else + File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}turbojpeg.dll" +!endif + SetOutPath $INSTDIR\bin +!ifdef GCC + File "@CMAKE_CURRENT_BINARY_DIR@\libturbojpeg.dll" +!else + File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}turbojpeg.dll" +!endif +!ifdef GCC + File "@CMAKE_CURRENT_BINARY_DIR@\libjpeg-@SO_MAJOR_VERSION@.dll" +!else + File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}jpeg@SO_MAJOR_VERSION@.dll" +!endif + File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}cjpeg.exe" + File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}djpeg.exe" + File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}jpegtran.exe" + File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}tjbench.exe" + File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}rdjpgcom.exe" + File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}wrjpgcom.exe" + SetOutPath $INSTDIR\lib +!ifdef GCC + File "@CMAKE_CURRENT_BINARY_DIR@\libturbojpeg.dll.a" + File "@CMAKE_CURRENT_BINARY_DIR@\libturbojpeg.a" + File "@CMAKE_CURRENT_BINARY_DIR@\libjpeg.dll.a" + File "@CMAKE_CURRENT_BINARY_DIR@\libjpeg.a" +!else + File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}turbojpeg.lib" + File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}turbojpeg-static.lib" + File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}jpeg.lib" + File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}jpeg-static.lib" +!endif + SetOutPath $INSTDIR\lib\pkgconfig + File "@CMAKE_CURRENT_BINARY_DIR@\pkgscripts\libjpeg.pc" + File "@CMAKE_CURRENT_BINARY_DIR@\pkgscripts\libturbojpeg.pc" +!ifdef JAVA + SetOutPath $INSTDIR\classes + File "@CMAKE_CURRENT_BINARY_DIR@\java\turbojpeg.jar" +!endif + SetOutPath $INSTDIR\include + File "@CMAKE_CURRENT_BINARY_DIR@\jconfig.h" + File "@CMAKE_CURRENT_SOURCE_DIR@\jerror.h" + File "@CMAKE_CURRENT_SOURCE_DIR@\jmorecfg.h" + File "@CMAKE_CURRENT_SOURCE_DIR@\jpeglib.h" + File "@CMAKE_CURRENT_SOURCE_DIR@\turbojpeg.h" + SetOutPath $INSTDIR\doc + File "@CMAKE_CURRENT_SOURCE_DIR@\README.ijg" + File "@CMAKE_CURRENT_SOURCE_DIR@\README.md" + File "@CMAKE_CURRENT_SOURCE_DIR@\LICENSE.md" + File "@CMAKE_CURRENT_SOURCE_DIR@\example.txt" + File "@CMAKE_CURRENT_SOURCE_DIR@\libjpeg.txt" + File "@CMAKE_CURRENT_SOURCE_DIR@\structure.txt" + File "@CMAKE_CURRENT_SOURCE_DIR@\usage.txt" + File "@CMAKE_CURRENT_SOURCE_DIR@\wizard.txt" + File "@CMAKE_CURRENT_SOURCE_DIR@\tjexample.c" + File "@CMAKE_CURRENT_SOURCE_DIR@\java\TJExample.java" +!ifdef GCC + SetOutPath $INSTDIR\man\man1 + File "@CMAKE_CURRENT_SOURCE_DIR@\cjpeg.1" + File "@CMAKE_CURRENT_SOURCE_DIR@\djpeg.1" + File "@CMAKE_CURRENT_SOURCE_DIR@\jpegtran.1" + File "@CMAKE_CURRENT_SOURCE_DIR@\rdjpgcom.1" + File "@CMAKE_CURRENT_SOURCE_DIR@\wrjpgcom.1" +!endif + + WriteRegStr HKLM "SOFTWARE\@INST_REG_NAME@ @VERSION@" "Install_Dir" "$INSTDIR" + + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@" "DisplayName" "@CMAKE_PROJECT_NAME@ SDK v@VERSION@ for @INST_PLATFORM@" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@" "UninstallString" '"$INSTDIR\uninstall_@VERSION@.exe"' + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@" "NoModify" 1 + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@" "NoRepair" 1 + WriteUninstaller "uninstall_@VERSION@.exe" +SectionEnd + +Section "Uninstall" +!ifdef WIN64 + ${If} ${RunningX64} + ${DisableX64FSRedirection} + ${Endif} +!endif + + SetShellVarContext all + + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@" + DeleteRegKey HKLM "SOFTWARE\@INST_REG_NAME@ @VERSION@" + +!ifdef GCC + Delete $INSTDIR\bin\libjpeg-@SO_MAJOR_VERSION@.dll + Delete $INSTDIR\bin\libturbojpeg.dll + Delete $SYSDIR\libturbojpeg.dll + Delete $INSTDIR\lib\libturbojpeg.dll.a + Delete $INSTDIR\lib\libturbojpeg.a + Delete $INSTDIR\lib\libjpeg.dll.a + Delete $INSTDIR\lib\libjpeg.a +!else + Delete $INSTDIR\bin\jpeg@SO_MAJOR_VERSION@.dll + Delete $INSTDIR\bin\turbojpeg.dll + Delete $SYSDIR\turbojpeg.dll + Delete $INSTDIR\lib\jpeg.lib + Delete $INSTDIR\lib\jpeg-static.lib + Delete $INSTDIR\lib\turbojpeg.lib + Delete $INSTDIR\lib\turbojpeg-static.lib +!endif + Delete $INSTDIR\lib\pkgconfig\libjpeg.pc + Delete $INSTDIR\lib\pkgconfig\libturbojpeg.pc +!ifdef JAVA + Delete $INSTDIR\classes\turbojpeg.jar +!endif + Delete $INSTDIR\bin\cjpeg.exe + Delete $INSTDIR\bin\djpeg.exe + Delete $INSTDIR\bin\jpegtran.exe + Delete $INSTDIR\bin\tjbench.exe + Delete $INSTDIR\bin\rdjpgcom.exe + Delete $INSTDIR\bin\wrjpgcom.exe + Delete $INSTDIR\include\jconfig.h + Delete $INSTDIR\include\jerror.h + Delete $INSTDIR\include\jmorecfg.h + Delete $INSTDIR\include\jpeglib.h + Delete $INSTDIR\include\turbojpeg.h + Delete $INSTDIR\uninstall_@VERSION@.exe + Delete $INSTDIR\doc\README.ijg + Delete $INSTDIR\doc\README.md + Delete $INSTDIR\doc\LICENSE.md + Delete $INSTDIR\doc\example.txt + Delete $INSTDIR\doc\libjpeg.txt + Delete $INSTDIR\doc\structure.txt + Delete $INSTDIR\doc\usage.txt + Delete $INSTDIR\doc\wizard.txt + Delete $INSTDIR\doc\tjexample.c + Delete $INSTDIR\doc\TJExample.java +!ifdef GCC + Delete $INSTDIR\man\man1\cjpeg.1 + Delete $INSTDIR\man\man1\djpeg.1 + Delete $INSTDIR\man\man1\jpegtran.1 + Delete $INSTDIR\man\man1\rdjpgcom.1 + Delete $INSTDIR\man\man1\wrjpgcom.1 +!endif + + RMDir "$INSTDIR\include" + RMDir "$INSTDIR\lib\pkgconfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR\doc" +!ifdef GCC + RMDir "$INSTDIR\man\man1" + RMDir "$INSTDIR\man" +!endif +!ifdef JAVA + RMDir "$INSTDIR\classes" +!endif + RMDir "$INSTDIR\bin" + RMDir "$INSTDIR" + +SectionEnd diff --git a/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/libjpeg.pc.in b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/libjpeg.pc.in new file mode 100644 index 00000000..74fb7fc6 --- /dev/null +++ b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/libjpeg.pc.in @@ -0,0 +1,10 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=@CMAKE_INSTALL_PREFIX@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + +Name: libjpeg +Description: A SIMD-accelerated JPEG codec that provides the libjpeg API +Version: @VERSION@ +Libs: -L${libdir} -ljpeg +Cflags: -I${includedir} diff --git a/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/libturbojpeg.pc.in b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/libturbojpeg.pc.in new file mode 100644 index 00000000..81a00632 --- /dev/null +++ b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/libturbojpeg.pc.in @@ -0,0 +1,10 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=@CMAKE_INSTALL_PREFIX@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + +Name: libturbojpeg +Description: A SIMD-accelerated JPEG codec that provides the TurboJPEG API +Version: @VERSION@ +Libs: -L${libdir} -lturbojpeg +Cflags: -I${includedir} diff --git a/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makecygwinpkg.in b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makecygwinpkg.in new file mode 100644 index 00000000..b7f353e9 --- /dev/null +++ b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makecygwinpkg.in @@ -0,0 +1,66 @@ +#!/bin/sh + +set -u +set -e +trap onexit INT +trap onexit TERM +trap onexit EXIT + +TMPDIR= + +onexit() +{ + if [ ! "$TMPDIR" = "" ]; then + rm -rf $TMPDIR + fi +} + +safedirmove () +{ + if [ "$1" = "$2" ]; then + return 0 + fi + if [ "$1" = "" -o ! -d "$1" ]; then + echo safedirmove: source dir $1 is not valid + return 1 + fi + if [ "$2" = "" -o -e "$2" ]; then + echo safedirmove: dest dir $2 is not valid + return 1 + fi + if [ "$3" = "" -o -e "$3" ]; then + echo safedirmove: tmp dir $3 is not valid + return 1 + fi + mkdir -p $3 + mv $1/* $3/ + rmdir $1 + mkdir -p $2 + mv $3/* $2/ + rmdir $3 + return 0 +} + +PKGNAME=@PKGNAME@ +VERSION=@VERSION@ +BUILD=@BUILD@ + +PREFIX=@CMAKE_INSTALL_PREFIX@ +DOCDIR=@CMAKE_INSTALL_FULL_DOCDIR@ +LIBDIR=@CMAKE_INSTALL_FULL_LIBDIR@ + +umask 022 +rm -f $PKGNAME-$VERSION-$BUILD.tar.bz2 +TMPDIR=`mktemp -d /tmp/ljtbuild.XXXXXX` +__PWD=`pwd` +make install DESTDIR=$TMPDIR/pkg +if [ "$PREFIX" = "@CMAKE_INSTALL_DEFAULT_PREFIX@" -a "$DOCDIR" = "@CMAKE_INSTALL_DEFAULT_PREFIX@/doc" ]; then + safedirmove $TMPDIR/pkg$DOCDIR $TMPDIR/pkg/usr/share/doc/$PKGNAME-$VERSION $TMPDIR/__tmpdoc + ln -fs /usr/share/doc/$PKGNAME-$VERSION $TMPDIR/pkg$DOCDIR +fi +cd $TMPDIR/pkg +tar cfj ../$PKGNAME-$VERSION-$BUILD.tar.bz2 * +cd $__PWD +mv $TMPDIR/*.tar.bz2 . + +exit 0 diff --git a/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makedpkg.in b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makedpkg.in new file mode 100644 index 00000000..a7ff7c20 --- /dev/null +++ b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makedpkg.in @@ -0,0 +1,121 @@ +#!/bin/sh + +set -u +set -e +trap onexit INT +trap onexit TERM +trap onexit EXIT + +TMPDIR= +SUDO= + +onexit() +{ + if [ ! "$TMPDIR" = "" ]; then + $SUDO rm -rf $TMPDIR + fi +} + +uid() +{ + id | cut -f2 -d = | cut -f1 -d \(; +} + +safedirmove () +{ + if [ "$1" = "$2" ]; then + return 0 + fi + if [ "$1" = "" -o ! -d "$1" ]; then + echo safedirmove: source dir $1 is not valid + return 1 + fi + if [ "$2" = "" -o -e "$2" ]; then + echo safedirmove: dest dir $2 is not valid + return 1 + fi + if [ "$3" = "" -o -e "$3" ]; then + echo safedirmove: tmp dir $3 is not valid + return 1 + fi + mkdir -p $3 + mv $1/* $3/ + rmdir $1 + mkdir -p $2 + mv $3/* $2/ + rmdir $3 + return 0 +} + +makedeb() +{ + SUPPLEMENT=$1 + DIRNAME=$PKGNAME + + if [ $SUPPLEMENT = 1 ]; then + PKGNAME=$PKGNAME\32 + if [ "$DEBARCH" = "i386" ]; then + DEBARCH=amd64 + else + DEBARCH=arm64 + fi + fi + + umask 022 + rm -f $PKGNAME\_$VERSION\_$DEBARCH.deb + TMPDIR=`mktemp -d /tmp/$PKGNAME-build.XXXXXX` + mkdir $TMPDIR/DEBIAN + + if [ $SUPPLEMENT = 1 ]; then + make install DESTDIR=$TMPDIR + rm -rf $TMPDIR$BINDIR + if [ "$DATAROOTDIR" != "$PREFIX" ]; then + rm -rf $TMPDIR$DATAROOTDIR + fi + if [ "$JAVADIR" != "" ]; then + rm -rf $TMPDIR$JAVADIR + fi + rm -rf $TMPDIR$DOCDIR + rm -rf $TMPDIR$INCLUDEDIR + rm -rf $TMPDIR$MANDIR + else + make install DESTDIR=$TMPDIR + if [ "$PREFIX" = "@CMAKE_INSTALL_DEFAULT_PREFIX@" -a "$DOCDIR" = "@CMAKE_INSTALL_DEFAULT_PREFIX@/doc" ]; then + safedirmove $TMPDIR/$DOCDIR $TMPDIR/usr/share/doc/$PKGNAME-$VERSION $TMPDIR/__tmpdoc + ln -fs /usr/share/doc/$DIRNAME-$VERSION $TMPDIR$DOCDIR + fi + fi + + SIZE=`du -s $TMPDIR | cut -f1` + (cat pkgscripts/deb-control | sed s/{__PKGNAME}/$PKGNAME/g \ + | sed s/{__ARCH}/$DEBARCH/g | sed s/{__SIZE}/$SIZE/g \ + > $TMPDIR/DEBIAN/control) + + /sbin/ldconfig -n $TMPDIR$LIBDIR + + $SUDO chown -Rh root:root $TMPDIR/* + dpkg -b $TMPDIR $PKGNAME\_$VERSION\_$DEBARCH.deb +} + +PKGNAME=@PKGNAME@ +VERSION=@VERSION@ +DEBARCH=@DEBARCH@ +PREFIX=@CMAKE_INSTALL_PREFIX@ +BINDIR=@CMAKE_INSTALL_FULL_BINDIR@ +DATAROOTDIR=@CMAKE_INSTALL_FULL_DATAROOTDIR@ +DOCDIR=@CMAKE_INSTALL_FULL_DOCDIR@ +INCLUDEDIR=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +JAVADIR=@CMAKE_INSTALL_FULL_JAVADIR@ +LIBDIR=@CMAKE_INSTALL_FULL_LIBDIR@ +MANDIR=@CMAKE_INSTALL_FULL_MANDIR@ + +if [ ! `uid` -eq 0 ]; then + SUDO=sudo +fi + +makedeb 0 +if [ "$DEBARCH" = "i386" -o "$DEBARCH" = "armel" -o "$DEBARCH" = "armhf" ]; then + makedeb 1 +fi + +exit diff --git a/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makemacpkg.in b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makemacpkg.in new file mode 100644 index 00000000..ae80bec1 --- /dev/null +++ b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makemacpkg.in @@ -0,0 +1,284 @@ +#!/bin/sh + +set -u +set -e +trap onexit INT +trap onexit TERM +trap onexit EXIT + +TMPDIR= + +onexit() +{ + if [ ! "$TMPDIR" = "" ]; then + rm -rf $TMPDIR + fi +} + +safedirmove () +{ + if [ "$1" = "$2" ]; then + return 0 + fi + if [ "$1" = "" -o ! -d "$1" ]; then + echo safedirmove: source dir $1 is not valid + return 1 + fi + if [ "$2" = "" -o -e "$2" ]; then + echo safedirmove: dest dir $2 is not valid + return 1 + fi + if [ "$3" = "" -o -e "$3" ]; then + echo safedirmove: tmp dir $3 is not valid + return 1 + fi + mkdir -p $3 + mv $1/* $3/ + rmdir $1 + mkdir -p $2 + mv $3/* $2/ + rmdir $3 + return 0 +} + +usage() +{ + echo "$0 [universal] [-lipo [path to lipo]]" + exit 1 +} + +UNIVERSAL=0 + +PKGNAME=@PKGNAME@ +VERSION=@VERSION@ +BUILD=@BUILD@ +SRCDIR=@CMAKE_CURRENT_SOURCE_DIR@ +BUILDDIR32=@OSX_32BIT_BUILD@ +BUILDDIRARMV7=@IOS_ARMV7_BUILD@ +BUILDDIRARMV7S=@IOS_ARMV7S_BUILD@ +BUILDDIRARMV8=@IOS_ARMV8_BUILD@ +WITH_JAVA=@WITH_JAVA@ +OSX_APP_CERT_NAME="@OSX_APP_CERT_NAME@" +OSX_INST_CERT_NAME="@OSX_INST_CERT_NAME@" +LIPO=lipo + +PREFIX=@CMAKE_INSTALL_PREFIX@ +BINDIR=@CMAKE_INSTALL_FULL_BINDIR@ +DOCDIR=@CMAKE_INSTALL_FULL_DOCDIR@ +LIBDIR=@CMAKE_INSTALL_FULL_LIBDIR@ + +LIBJPEG_DSO_NAME=libjpeg.@SO_MAJOR_VERSION@.@SO_AGE@.@SO_MINOR_VERSION@.dylib +TURBOJPEG_DSO_NAME=libturbojpeg.@TURBOJPEG_SO_VERSION@.dylib + +while [ $# -gt 0 ]; do + case $1 in + -h*) + usage 0 + ;; + -lipo) + if [ $# -gt 1 ]; then + if [[ ! "$2" =~ -.* ]]; then + LIPO=$2; shift + fi + fi + ;; + universal) + UNIVERSAL=1 + ;; + esac + shift +done + +if [ -f $PKGNAME-$VERSION.dmg ]; then + rm -f $PKGNAME-$VERSION.dmg +fi + +umask 022 +TMPDIR=`mktemp -d /tmp/$PKGNAME-build.XXXXXX` +PKGROOT=$TMPDIR/pkg/Package_Root +mkdir -p $PKGROOT + +make install DESTDIR=$PKGROOT + +if [ "$PREFIX" = "@CMAKE_INSTALL_DEFAULT_PREFIX@" -a "$DOCDIR" = "@CMAKE_INSTALL_DEFAULT_PREFIX@/doc" ]; then + mkdir -p $PKGROOT/Library/Documentation + safedirmove $PKGROOT$DOCDIR $PKGROOT/Library/Documentation/$PKGNAME $TMPDIR/__tmpdoc + ln -fs /Library/Documentation/$PKGNAME $PKGROOT$DOCDIR +fi + +if [ $UNIVERSAL = 1 -a "$BUILDDIR32" != "" ]; then + if [ ! -d $BUILDDIR32 ]; then + echo ERROR: 32-bit build directory $BUILDDIR32 does not exist + exit 1 + fi + if [ ! -f $BUILDDIR32/Makefile ]; then + echo ERROR: 32-bit build directory $BUILDDIR32 is not configured + exit 1 + fi + mkdir -p $TMPDIR/dist.x86 + pushd $BUILDDIR32 + make install DESTDIR=$TMPDIR/dist.x86 + popd + $LIPO -create \ + -arch i386 $TMPDIR/dist.x86/$LIBDIR/$LIBJPEG_DSO_NAME \ + -arch x86_64 $PKGROOT/$LIBDIR/$LIBJPEG_DSO_NAME \ + -output $PKGROOT/$LIBDIR/$LIBJPEG_DSO_NAME + $LIPO -create \ + -arch i386 $TMPDIR/dist.x86/$LIBDIR/libjpeg.a \ + -arch x86_64 $PKGROOT/$LIBDIR/libjpeg.a \ + -output $PKGROOT/$LIBDIR/libjpeg.a + $LIPO -create \ + -arch i386 $TMPDIR/dist.x86/$LIBDIR/$TURBOJPEG_DSO_NAME \ + -arch x86_64 $PKGROOT/$LIBDIR/$TURBOJPEG_DSO_NAME \ + -output $PKGROOT/$LIBDIR/$TURBOJPEG_DSO_NAME + $LIPO -create \ + -arch i386 $TMPDIR/dist.x86/$LIBDIR/libturbojpeg.a \ + -arch x86_64 $PKGROOT/$LIBDIR/libturbojpeg.a \ + -output $PKGROOT/$LIBDIR/libturbojpeg.a + $LIPO -create \ + -arch i386 $TMPDIR/dist.x86/$BINDIR/cjpeg \ + -arch x86_64 $PKGROOT/$BINDIR/cjpeg \ + -output $PKGROOT/$BINDIR/cjpeg + $LIPO -create \ + -arch i386 $TMPDIR/dist.x86/$BINDIR/djpeg \ + -arch x86_64 $PKGROOT/$BINDIR/djpeg \ + -output $PKGROOT/$BINDIR/djpeg + $LIPO -create \ + -arch i386 $TMPDIR/dist.x86/$BINDIR/jpegtran \ + -arch x86_64 $PKGROOT/$BINDIR/jpegtran \ + -output $PKGROOT/$BINDIR/jpegtran + $LIPO -create \ + -arch i386 $TMPDIR/dist.x86/$BINDIR/tjbench \ + -arch x86_64 $PKGROOT/$BINDIR/tjbench \ + -output $PKGROOT/$BINDIR/tjbench + $LIPO -create \ + -arch i386 $TMPDIR/dist.x86/$BINDIR/rdjpgcom \ + -arch x86_64 $PKGROOT/$BINDIR/rdjpgcom \ + -output $PKGROOT/$BINDIR/rdjpgcom + $LIPO -create \ + -arch i386 $TMPDIR/dist.x86/$BINDIR/wrjpgcom \ + -arch x86_64 $PKGROOT/$BINDIR/wrjpgcom \ + -output $PKGROOT/$BINDIR/wrjpgcom +fi + +install_ios() +{ + BUILDDIR=$1 + ARCHNAME=$2 + DIRNAME=$3 + LIPOARCH=$4 + + if [ ! -d $BUILDDIR ]; then + echo ERROR: $ARCHNAME build directory $BUILDDIR does not exist + exit 1 + fi + if [ ! -f $BUILDDIR/Makefile ]; then + echo ERROR: $ARCHNAME build directory $BUILDDIR is not configured + exit 1 + fi + mkdir -p $TMPDIR/dist.$DIRNAME + pushd $BUILDDIR + make install DESTDIR=$TMPDIR/dist.$DIRNAME + popd + $LIPO -create \ + $PKGROOT/$LIBDIR/$LIBJPEG_DSO_NAME \ + -arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$LIBDIR/$LIBJPEG_DSO_NAME \ + -output $PKGROOT/$LIBDIR/$LIBJPEG_DSO_NAME + $LIPO -create \ + $PKGROOT/$LIBDIR/libjpeg.a \ + -arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$LIBDIR/libjpeg.a \ + -output $PKGROOT/$LIBDIR/libjpeg.a + $LIPO -create \ + $PKGROOT/$LIBDIR/$TURBOJPEG_DSO_NAME \ + -arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$LIBDIR/$TURBOJPEG_DSO_NAME \ + -output $PKGROOT/$LIBDIR/$TURBOJPEG_DSO_NAME + $LIPO -create \ + $PKGROOT/$LIBDIR/libturbojpeg.a \ + -arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$LIBDIR/libturbojpeg.a \ + -output $PKGROOT/$LIBDIR/libturbojpeg.a + $LIPO -create \ + $PKGROOT/$BINDIR/cjpeg \ + -arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$BINDIR/cjpeg \ + -output $PKGROOT/$BINDIR/cjpeg + $LIPO -create \ + $PKGROOT/$BINDIR/djpeg \ + -arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$BINDIR/djpeg \ + -output $PKGROOT/$BINDIR/djpeg + $LIPO -create \ + $PKGROOT/$BINDIR/jpegtran \ + -arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$BINDIR/jpegtran \ + -output $PKGROOT/$BINDIR/jpegtran + $LIPO -create \ + $PKGROOT/$BINDIR/tjbench \ + -arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$BINDIR/tjbench \ + -output $PKGROOT/$BINDIR/tjbench + $LIPO -create \ + $PKGROOT/$BINDIR/rdjpgcom \ + -arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$BINDIR/rdjpgcom \ + -output $PKGROOT/$BINDIR/rdjpgcom + $LIPO -create \ + $PKGROOT/$BINDIR/wrjpgcom \ + -arch $LIPOARCH $TMPDIR/dist.$DIRNAME/$BINDIR/wrjpgcom \ + -output $PKGROOT/$BINDIR/wrjpgcom +} + +if [ $UNIVERSAL = 1 -a "$BUILDDIRARMV7" != "" ]; then + install_ios $BUILDDIRARMV7 Armv7 armv7 arm +fi + +if [ $UNIVERSAL = 1 -a "$BUILDDIRARMV7S" != "" ]; then + install_ios $BUILDDIRARMV7S Armv7s armv7s arm +fi + +if [ $UNIVERSAL = 1 -a "$BUILDDIRARMV8" != "" ]; then + install_ios $BUILDDIRARMV8 Armv8 armv8 arm64 +fi + +install_name_tool -id $LIBDIR/$LIBJPEG_DSO_NAME $PKGROOT/$LIBDIR/$LIBJPEG_DSO_NAME +install_name_tool -id $LIBDIR/$TURBOJPEG_DSO_NAME $PKGROOT/$LIBDIR/$TURBOJPEG_DSO_NAME + +if [ $WITH_JAVA = 1 ]; then + ln -fs $TURBOJPEG_DSO_NAME $PKGROOT/$LIBDIR/libturbojpeg.jnilib +fi +if [ "$PREFIX" = "@CMAKE_INSTALL_DEFAULT_PREFIX@" -a "$LIBDIR" = "@CMAKE_INSTALL_DEFAULT_PREFIX@/lib" ]; then + if [ ! -h $PKGROOT/$PREFIX/lib32 ]; then + ln -fs lib $PKGROOT/$PREFIX/lib32 + fi + if [ ! -h $PKGROOT/$PREFIX/lib64 ]; then + ln -fs lib $PKGROOT/$PREFIX/lib64 + fi +fi + +mkdir -p $TMPDIR/pkg + +install -m 755 pkgscripts/uninstall $PKGROOT/$BINDIR/ + +find $PKGROOT -type f | while read file; do xattr -c $file; done + +cp $SRCDIR/release/License.rtf $SRCDIR/release/Welcome.rtf $SRCDIR/release/ReadMe.txt $TMPDIR/pkg/ + +mkdir $TMPDIR/dmg +pkgbuild --root $PKGROOT --version $VERSION.$BUILD --identifier @PKGID@ \ + $TMPDIR/pkg/$PKGNAME.pkg +SUFFIX= +if [ "$OSX_INST_CERT_NAME" != "" ]; then + SUFFIX=-unsigned +fi +productbuild --distribution pkgscripts/Distribution.xml \ + --package-path $TMPDIR/pkg/ --resources $TMPDIR/pkg/ \ + $TMPDIR/dmg/$PKGNAME$SUFFIX.pkg +if [ "$OSX_INST_CERT_NAME" != "" ]; then + productsign --sign "$OSX_INST_CERT_NAME" --timestamp \ + $TMPDIR/dmg/$PKGNAME$SUFFIX.pkg $TMPDIR/dmg/$PKGNAME.pkg + rm -r $TMPDIR/dmg/$PKGNAME$SUFFIX.pkg + pkgutil --check-signature $TMPDIR/dmg/$PKGNAME.pkg +fi +hdiutil create -fs HFS+ -volname $PKGNAME-$VERSION \ + -srcfolder "$TMPDIR/dmg" $TMPDIR/$PKGNAME-$VERSION.dmg +if [ "$OSX_APP_CERT_NAME" != "" ]; then + codesign -s "$OSX_APP_CERT_NAME" --timestamp $TMPDIR/$PKGNAME-$VERSION.dmg + codesign -vv $TMPDIR/$PKGNAME-$VERSION.dmg +fi +cp $TMPDIR/$PKGNAME-$VERSION.dmg . + +exit diff --git a/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makerpm.in b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makerpm.in new file mode 100644 index 00000000..fc3b1d49 --- /dev/null +++ b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makerpm.in @@ -0,0 +1,30 @@ +#!/bin/sh + +set -u +set -e +trap onexit INT +trap onexit TERM +trap onexit EXIT + +TMPDIR= + +onexit() +{ + if [ ! "$TMPDIR" = "" ]; then + rm -rf $TMPDIR + fi +} + +if [ -f @PKGNAME@-@VERSION@.@RPMARCH@.rpm ]; then + rm -f @PKGNAME@-@VERSION@.@RPMARCH@.rpm +fi + +umask 022 +TMPDIR=`mktemp -d /tmp/@CMAKE_PROJECT_NAME@-build.XXXXXX` + +mkdir -p $TMPDIR/RPMS +ln -fs `pwd` $TMPDIR/BUILD +rpmbuild -bb --define "_blddir $TMPDIR/buildroot" --define "_topdir $TMPDIR" \ + --target @RPMARCH@ pkgscripts/rpm.spec; \ +cp $TMPDIR/RPMS/@RPMARCH@/@PKGNAME@-@VERSION@-@BUILD@.@RPMARCH@.rpm \ + @PKGNAME@-@VERSION@.@RPMARCH@.rpm diff --git a/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makesrpm.in b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makesrpm.in new file mode 100644 index 00000000..84c39d4e --- /dev/null +++ b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/makesrpm.in @@ -0,0 +1,48 @@ +#!/bin/sh + +set -u +set -e +trap onexit INT +trap onexit TERM +trap onexit EXIT + +TMPDIR= + +onexit() +{ + if [ ! "$TMPDIR" = "" ]; then + rm -rf $TMPDIR + fi +} + +PKGNAME=@PKGNAME@ +PROJECT=@CMAKE_PROJECT_NAME@ +VERSION=@VERSION@ +BUILD=@BUILD@ + +if [ -f $PKGNAME-$VERSION.src.rpm ]; then + rm -f $PKGNAME-$VERSION.src.rpm +fi + +umask 022 +TMPDIR=`mktemp -d /tmp/$PKGNAME-build.XXXXXX` + +mkdir -p $TMPDIR/RPMS +mkdir -p $TMPDIR/SRPMS +mkdir -p $TMPDIR/BUILD +mkdir -p $TMPDIR/SOURCES +mkdir -p $TMPDIR/SPECS + +if [ ! -f $PROJECT-$VERSION.tar.gz ]; then + echo "ERROR: $PROJECT-$VERSION.tar.gz does not exist." +fi + +cp $PROJECT-$VERSION.tar.gz $TMPDIR/SOURCES/$PROJECT-$VERSION.tar.gz + +cat pkgscripts/rpm.spec | sed s/%{_blddir}/%{_tmppath}/g \ + | sed s/#--\>//g > $TMPDIR/SPECS/$PKGNAME.spec + +rpmbuild -bs --define "_topdir $TMPDIR" $TMPDIR/SPECS/$PKGNAME.spec +mv $TMPDIR/SRPMS/$PKGNAME-$VERSION-$BUILD.src.rpm $PKGNAME-$VERSION.src.rpm + +exit diff --git a/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/maketarball.in b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/maketarball.in new file mode 100644 index 00000000..00a9c7e3 --- /dev/null +++ b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/maketarball.in @@ -0,0 +1,51 @@ +#!/bin/sh + +set -u +set -e +trap onexit INT +trap onexit TERM +trap onexit EXIT + +TMPDIR= +SUDO= + +onexit() +{ + if [ ! "$TMPDIR" = "" ]; then + rm -rf $TMPDIR + fi +} + +uid() +{ + id | cut -f2 -d = | cut -f1 -d \(; +} + +PKGNAME=@PKGNAME@ +VERSION=@VERSION@ +ARCH=@CPU_TYPE@ +OS=@CMAKE_SYSTEM_NAME@ +PREFIX=@CMAKE_INSTALL_PREFIX@ + +umask 022 +rm -f $PKGNAME-$VERSION-$OS-$ARCH.tar.bz2 +TMPDIR=`mktemp -d /tmp/$PKGNAME-build.XXXXXX` +mkdir -p $TMPDIR/install + +make install DESTDIR=$TMPDIR/install +echo tartest >$TMPDIR/tartest +GNUTAR=0 +BSDTAR=0 +tar cf $TMPDIR/tartest.tar --owner=root --group=root -C $TMPDIR tartest >/dev/null 2>&1 && GNUTAR=1 +if [ "$GNUTAR" = "1" ]; then + tar cf - --owner=root --group=root -C $TMPDIR/install .$PREFIX | bzip2 -c >$PKGNAME-$VERSION-$OS-$ARCH.tar.bz2 +else + tar cf $TMPDIR/tartest.tar --uid 0 --gid 0 -C $TMPDIR tartest >/dev/null 2>&1 && BSDTAR=1 + if [ "$BSDTAR" = "1" ]; then + tar cf - --uid=0 --gid=0 -C $TMPDIR/install .$PREFIX | bzip2 -c >$PKGNAME-$VERSION-$OS-$ARCH.tar.bz2 + else + tar cf - -C $TMPDIR/install .$PREFIX | bzip2 -c >$PKGNAME-$VERSION-$OS-$ARCH.tar.bz2 + fi +fi + +exit diff --git a/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/rpm.spec.in b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/rpm.spec.in new file mode 100644 index 00000000..6b5cd2be --- /dev/null +++ b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/rpm.spec.in @@ -0,0 +1,221 @@ +%global _docdir %{_defaultdocdir}/%{name}-%{version} +%define _prefix @CMAKE_INSTALL_PREFIX@ +%define _bindir @CMAKE_INSTALL_FULL_BINDIR@ +%define _datarootdir @CMAKE_INSTALL_FULL_DATAROOTDIR@ +%define _includedir @CMAKE_INSTALL_FULL_INCLUDEDIR@ +%define _javadir @CMAKE_INSTALL_FULL_JAVADIR@ +%define _mandir @CMAKE_INSTALL_FULL_MANDIR@ +%define _enable_static @ENABLE_STATIC@ +%define _enable_shared @ENABLE_SHARED@ +%define _with_turbojpeg @WITH_TURBOJPEG@ +%define _with_java @WITH_JAVA@ + +%if "%{?__isa_bits:1}" == "1" +%define _bits %{__isa_bits} +%else +# RPM < 4.6 +%if "%{_lib}" == "lib64" +%define _bits 64 +%else +%define _bits 32 +%endif +%endif + +#-->%if 1 +%if "%{_bits}" == "64" +%define _libdir %{_exec_prefix}/lib64 +%else +%if "%{_prefix}" == "/opt/libjpeg-turbo" +%define _libdir %{_exec_prefix}/lib32 +%endif +%endif +#-->%else +%define _libdir @CMAKE_INSTALL_FULL_LIBDIR@ +#-->%endif + +Summary: A SIMD-accelerated JPEG codec that provides both the libjpeg and TurboJPEG APIs +Name: @PKGNAME@ +Version: @VERSION@ +Vendor: @PKGVENDOR@ +URL: @PKGURL@ +Group: System Environment/Libraries +#-->Source0: http://prdownloads.sourceforge.net/@CMAKE_PROJECT_NAME@/@CMAKE_PROJECT_NAME@-%{version}.tar.gz +Release: @BUILD@ +License: BSD-style +BuildRoot: %{_blddir}/%{name}-buildroot-%{version}-%{release} +Requires: /sbin/ldconfig +%if "%{_bits}" == "64" +Provides: %{name} = %{version}-%{release}, @CMAKE_PROJECT_NAME@ = %{version}-%{release}, libturbojpeg.so()(64bit) +%else +Provides: %{name} = %{version}-%{release}, @CMAKE_PROJECT_NAME@ = %{version}-%{release}, libturbojpeg.so +%endif + +%description +libjpeg-turbo is a JPEG image codec that uses SIMD instructions to accelerate +baseline JPEG compression and decompression on x86, x86-64, Arm, PowerPC, and +MIPS systems, as well as progressive JPEG compression on x86 and x86-64 +systems. On such systems, libjpeg-turbo is generally 2-6x as fast as libjpeg, +all else being equal. On other types of systems, libjpeg-turbo can still +outperform libjpeg by a significant amount, by virtue of its highly-optimized +Huffman coding routines. In many cases, the performance of libjpeg-turbo +rivals that of proprietary high-speed JPEG codecs. + +libjpeg-turbo implements both the traditional libjpeg API as well as the less +powerful but more straightforward TurboJPEG API. libjpeg-turbo also features +colorspace extensions that allow it to compress from/decompress to 32-bit and +big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java +interface. + +libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated +derivative of libjpeg v6b developed by Miyasaka Masaru. The TigerVNC and +VirtualGL projects made numerous enhancements to the codec in 2009, and in +early 2010, libjpeg-turbo spun off into an independent project, with the goal +of making high-speed JPEG compression/decompression technology available to a +broader range of users and developers. + +#-->%prep +#-->%setup -q -n @CMAKE_PROJECT_NAME@-%{version} + +#-->%build +#-->cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=@CMAKE_BUILD_TYPE@ \ +#--> -DBUILD=%{release} \ +#--> -DCMAKE_INSTALL_BINDIR=%{_bindir} \ +#--> -DCMAKE_INSTALL_DATAROOTDIR=%{_datarootdir} \ +#--> -DCMAKE_INSTALL_DOCDIR=%{_docdir} \ +#--> -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \ +#--> -DCMAKE_INSTALL_JAVADIR=%{_javadir} \ +#--> -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ +#--> -DCMAKE_INSTALL_MANDIR=%{_mandir} \ +#--> -DCMAKE_INSTALL_PREFIX=%{_prefix} \ +#--> -DCMAKE_POSITION_INDEPENDENT_CODE=@CMAKE_POSITION_INDEPENDENT_CODE@ \ +#--> -DENABLE_SHARED=@ENABLE_SHARED@ -DENABLE_STATIC=@ENABLE_STATIC@ \ +#--> -DSO_MAJOR_VERSION=@SO_MAJOR_VERSION@ \ +#--> -DSO_MINOR_VERSION=@SO_MINOR_VERSION@ \ +#--> -DJPEG_LIB_VERSION=@JPEG_LIB_VERSION@ \ +#--> -DREQUIRE_SIMD=@REQUIRE_SIMD@ \ +#--> -DWITH_12BIT=@WITH_12BIT@ -DWITH_ARITH_DEC=@WITH_ARITH_DEC@ \ +#--> -DWITH_ARITH_ENC=@WITH_ARITH_ENC@ -DWITH_JAVA=@WITH_JAVA@ \ +#--> -DWITH_JPEG7=@WITH_JPEG7@ -DWITH_JPEG8=@WITH_JPEG8@ \ +#--> -DWITH_MEM_SRCDST=@WITH_MEM_SRCDST@ -DWITH_SIMD=@WITH_SIMD@ \ +#--> -DWITH_TURBOJPEG=@WITH_TURBOJPEG@ . +#-->make DESTDIR=$RPM_BUILD_ROOT + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT +/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir} + +#-->%if 0 + +# This is only needed to support in-tree RPM generation via 'make rpm'. When +# building from a SRPM, we control where things are installed via CMake +# variables. + +safedirmove () +{ + if [ "$1" = "$2" ]; then + return 0 + fi + if [ "$1" = "" -o ! -d "$1" ]; then + echo safedirmove: source dir $1 is not valid + return 1 + fi + if [ "$2" = "" -o -e "$2" ]; then + echo safedirmove: dest dir $2 is not valid + return 1 + fi + if [ "$3" = "" -o -e "$3" ]; then + echo safedirmove: tmp dir $3 is not valid + return 1 + fi + mkdir -p $3 + mv $1/* $3/ + rmdir $1 + mkdir -p $2 + mv $3/* $2/ + rmdir $3 + return 0 +} + +LJT_DOCDIR=@CMAKE_INSTALL_FULL_DOCDIR@ +if [ ! "$LJT_DOCDIR" = "%{_docdir}" ]; then + safedirmove $RPM_BUILD_ROOT/$LJT_DOCDIR $RPM_BUILD_ROOT/%{_docdir} $RPM_BUILD_ROOT/__tmpdoc +fi + +#-->%endif + +LJT_DOCDIR=@CMAKE_INSTALL_FULL_DOCDIR@ +if [ "%{_prefix}" = "@CMAKE_INSTALL_DEFAULT_PREFIX@" -a "$LJT_DOCDIR" = "@CMAKE_INSTALL_DEFAULT_PREFIX@/doc" ]; then + ln -fs %{_docdir} $RPM_BUILD_ROOT/$LJT_DOCDIR +fi + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%dir %{_docdir} +%doc %{_docdir}/* +%dir %{_prefix} +%if "%{_prefix}" == "@CMAKE_INSTALL_DEFAULT_PREFIX@" && "%{_docdir}" != "%{_prefix}/doc" + %{_prefix}/doc +%endif +%dir %{_bindir} +%{_bindir}/cjpeg +%{_bindir}/djpeg +%{_bindir}/jpegtran +%if "%{_with_turbojpeg}" == "1" + %{_bindir}/tjbench +%endif +%{_bindir}/rdjpgcom +%{_bindir}/wrjpgcom +%dir %{_libdir} +%if "%{_enable_shared}" == "1" + %{_libdir}/libjpeg.so.@SO_MAJOR_VERSION@.@SO_AGE@.@SO_MINOR_VERSION@ + %{_libdir}/libjpeg.so.@SO_MAJOR_VERSION@ + %{_libdir}/libjpeg.so +%endif +%if "%{_enable_static}" == "1" + %{_libdir}/libjpeg.a +%endif +%dir %{_libdir}/pkgconfig +%{_libdir}/pkgconfig/libjpeg.pc +%if "%{_with_turbojpeg}" == "1" + %if "%{_enable_shared}" == "1" || "%{_with_java}" == "1" + %{_libdir}/libturbojpeg.so.@TURBOJPEG_SO_VERSION@ + %{_libdir}/libturbojpeg.so.@TURBOJPEG_SO_MAJOR_VERSION@ + %{_libdir}/libturbojpeg.so + %endif + %if "%{_enable_static}" == "1" + %{_libdir}/libturbojpeg.a + %endif + %{_libdir}/pkgconfig/libturbojpeg.pc +%endif +%dir %{_includedir} +%{_includedir}/jconfig.h +%{_includedir}/jerror.h +%{_includedir}/jmorecfg.h +%{_includedir}/jpeglib.h +%if "%{_with_turbojpeg}" == "1" + %{_includedir}/turbojpeg.h +%endif +%dir %{_mandir} +%dir %{_mandir}/man1 +%{_mandir}/man1/cjpeg.1* +%{_mandir}/man1/djpeg.1* +%{_mandir}/man1/jpegtran.1* +%{_mandir}/man1/rdjpgcom.1* +%{_mandir}/man1/wrjpgcom.1* +%if "%{_prefix}" != "%{_datarootdir}" + %dir %{_datarootdir} +%endif +%if "%{_with_java}" == "1" + %dir %{_javadir} + %{_javadir}/turbojpeg.jar +%endif + +%changelog diff --git a/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/uninstall.in b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/uninstall.in new file mode 100644 index 00000000..cf1ba777 --- /dev/null +++ b/thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/release/uninstall.in @@ -0,0 +1,113 @@ +# Copyright (C)2009-2011, 2013, 2016 D. R. Commander. All Rights Reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# - Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# - Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# - Neither the name of the libjpeg-turbo Project nor the names of its +# contributors may be used to endorse or promote products derived from this +# software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +#!/bin/sh + +if [ ! "`id -u`" = "0" ]; then + echo "ERROR: This script must be executed as root" + exit -1 +fi + +PKGNAME=@PKGNAME@ +PKGID=@PKGID@ +RECEIPT=/Library/Receipts/$PKGNAME.pkg + +LSBOM= +if [ -d $RECEIPT ]; then + LSBOM='lsbom -s -f -l '$RECEIPT'/Contents/Archive.bom' +else + LSBOM='pkgutil --files '$PKGID +fi + +mylsbom() +{ + $LSBOM || (echo "ERROR: Could not list package contents"; exit -1) +} + +echo Removing package files ... +EXITSTATUS=0 +pushd / +mylsbom | while read file; do + if [ ! -d "$file" ]; then rm "$file" 2>&1 || EXITSTATUS=-1; fi +done +popd + +echo Removing package directories ... +PREFIX=@CMAKE_INSTALL_PREFIX@ +BINDIR=@CMAKE_INSTALL_FULL_BINDIR@ +DATAROOTDIR=@CMAKE_INSTALL_FULL_DATAROOTDIR@ +INCLUDEDIR=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +JAVADIR=@CMAKE_INSTALL_FULL_JAVADIR@ +LIBDIR=@CMAKE_INSTALL_FULL_LIBDIR@ +MANDIR=@CMAKE_INSTALL_FULL_MANDIR@ + +if [ -d $BINDIR ]; then + rmdir $BINDIR 2>&1 || EXITSTATUS=-1 +fi +if [ -d $LIBDIR/pkgconfig ]; then + rmdir $LIBDIR/pkgconfig 2>&1 || EXITSTATUS=-1 +fi +if [ -d $LIBDIR ]; then + rmdir $LIBDIR 2>&1 || EXITSTATUS=-1 +fi +if [ -d $INCLUDEDIR ]; then + rmdir $INCLUDEDIR 2>&1 || EXITSTATUS=-1 +fi +if [ "$PREFIX" = "@CMAKE_INSTALL_DEFAULT_PREFIX@" -a "$LIBDIR" = "@CMAKE_INSTALL_DEFAULT_PREFIX@/lib" ]; then + if [ -h $LIBDIR\32 ]; then + rm $LIBDIR\32 2>&1 || EXITSTATUS=-1 + fi + if [ -h $LIBDIR\64 ]; then + rm $LIBDIR\64 2>&1 || EXITSTATUS=-1 + fi +fi +if [ -d $MANDIR/man1 ]; then + rmdir $MANDIR/man1 2>&1 || EXITSTATUS=-1 +fi +if [ -d $MANDIR ]; then + rmdir $MANDIR 2>&1 || EXITSTATUS=-1 +fi +if [ -d $JAVADIR ]; then + rmdir $JAVADIR 2>&1 || EXITSTATUS=-1 +fi +if [ -d $DATAROOTDIR -a "$DATAROOTDIR" != "$PREFIX" ]; then + rmdir $DATAROOTDIR 2>&1 || EXITSTATUS=-1 +fi +if [ "$PREFIX" = "@CMAKE_INSTALL_DEFAULT_PREFIX@" -a -h "$PREFIX/doc" ]; then + rm $PREFIX/doc 2>&1 || EXITSTATUS=-1 +fi +rmdir $PREFIX 2>&1 || EXITSTATUS=-1 +rmdir /Library/Documentation/$PKGNAME 2>&1 || EXITSTATUS=-1 + +if [ -d $RECEIPT ]; then + echo Removing package receipt ... + rm -r $RECEIPT 2>&1 || EXITSTATUS=-1 +else + echo Forgetting package $PKGID ... + pkgutil --forget $PKGID +fi + +exit $EXITSTATUS diff --git a/thirdparty/libpng-1.6.21/lib/libpng16_2019.lib b/thirdparty/libpng-1.6.21/lib/libpng16_2019.lib new file mode 100644 index 00000000..34c86b64 --- /dev/null +++ b/thirdparty/libpng-1.6.21/lib/libpng16_2019.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b68ebbac82e481754b005e96947ab26f5b7f6f48c3027d4f8335aa8218000d3 +size 1663666 diff --git a/thirdparty/libpng-1.6.21/lib/libpng16_2019_64.lib b/thirdparty/libpng-1.6.21/lib/libpng16_2019_64.lib new file mode 100644 index 00000000..a8e58759 --- /dev/null +++ b/thirdparty/libpng-1.6.21/lib/libpng16_2019_64.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:303effccaa3ae593b8831775a3a10e9468064d7253d1477f0a088962b8334db1 +size 1685268 diff --git a/thirdparty/libpng-1.6.21/lib/libpng16_2019_64d.lib b/thirdparty/libpng-1.6.21/lib/libpng16_2019_64d.lib new file mode 100644 index 00000000..cde5a315 --- /dev/null +++ b/thirdparty/libpng-1.6.21/lib/libpng16_2019_64d.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf1d4e85737c2e4e5f06fc219653cfcd7768333a9390b97eca7cf933db5319b5 +size 1314042 diff --git a/thirdparty/libpng-1.6.21/lib/libpng16_2019d.lib b/thirdparty/libpng-1.6.21/lib/libpng16_2019d.lib new file mode 100644 index 00000000..fc74a2f6 --- /dev/null +++ b/thirdparty/libpng-1.6.21/lib/libpng16_2019d.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26ff075c51dee355cab1029c43c84cda096bb5e65f657b6188edb8215158b5b2 +size 1120054 diff --git a/thirdparty/libpng-1.6.21/projects/vstudio/libpng/libpng.vcxproj b/thirdparty/libpng-1.6.21/projects/vstudio/libpng/libpng.vcxproj index c1ab30f8..9047870d 100644 --- a/thirdparty/libpng-1.6.21/projects/vstudio/libpng/libpng.vcxproj +++ b/thirdparty/libpng-1.6.21/projects/vstudio/libpng/libpng.vcxproj @@ -45,45 +45,45 @@ DynamicLibrary MultiByte true - v140 + v142 DynamicLibrary MultiByte true - v140 + v142 StaticLibrary MultiByte - v140 + v142 StaticLibrary MultiByte - v140 + v142 DynamicLibrary true MultiByte - v140 + v142 DynamicLibrary true MultiByte - v140 + v142 StaticLibrary MultiByte - v140 + v142 StaticLibrary MultiByte - v140 + v142 diff --git a/thirdparty/libpng-1.6.21/projects/vstudio/pnglibconf/pnglibconf.vcxproj b/thirdparty/libpng-1.6.21/projects/vstudio/pnglibconf/pnglibconf.vcxproj index e2417492..ff634341 100644 --- a/thirdparty/libpng-1.6.21/projects/vstudio/pnglibconf/pnglibconf.vcxproj +++ b/thirdparty/libpng-1.6.21/projects/vstudio/pnglibconf/pnglibconf.vcxproj @@ -20,14 +20,14 @@ false true MultiByte - v140 + v142 Application false true MultiByte - v140 + v142 diff --git a/thirdparty/libpng-1.6.21/projects/vstudio/pngstest/pngstest.vcxproj b/thirdparty/libpng-1.6.21/projects/vstudio/pngstest/pngstest.vcxproj index 45c83687..6609877d 100644 --- a/thirdparty/libpng-1.6.21/projects/vstudio/pngstest/pngstest.vcxproj +++ b/thirdparty/libpng-1.6.21/projects/vstudio/pngstest/pngstest.vcxproj @@ -44,42 +44,42 @@ Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 diff --git a/thirdparty/libpng-1.6.21/projects/vstudio/pngtest/pngtest.vcxproj b/thirdparty/libpng-1.6.21/projects/vstudio/pngtest/pngtest.vcxproj index dcbbb4cc..1cad9d61 100644 --- a/thirdparty/libpng-1.6.21/projects/vstudio/pngtest/pngtest.vcxproj +++ b/thirdparty/libpng-1.6.21/projects/vstudio/pngtest/pngtest.vcxproj @@ -44,42 +44,42 @@ Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 diff --git a/thirdparty/libpng-1.6.21/projects/vstudio/pngunknown/pngunknown.vcxproj b/thirdparty/libpng-1.6.21/projects/vstudio/pngunknown/pngunknown.vcxproj index c5b9da66..4e03482f 100644 --- a/thirdparty/libpng-1.6.21/projects/vstudio/pngunknown/pngunknown.vcxproj +++ b/thirdparty/libpng-1.6.21/projects/vstudio/pngunknown/pngunknown.vcxproj @@ -44,42 +44,42 @@ Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 diff --git a/thirdparty/libpng-1.6.21/projects/vstudio/pngvalid/pngvalid.vcxproj b/thirdparty/libpng-1.6.21/projects/vstudio/pngvalid/pngvalid.vcxproj index 2ab56b26..589c9caa 100644 --- a/thirdparty/libpng-1.6.21/projects/vstudio/pngvalid/pngvalid.vcxproj +++ b/thirdparty/libpng-1.6.21/projects/vstudio/pngvalid/pngvalid.vcxproj @@ -44,42 +44,42 @@ Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 Application Unicode - v140 + v142 diff --git a/thirdparty/libpng-1.6.21/projects/vstudio/zlib/zlib.vcxproj b/thirdparty/libpng-1.6.21/projects/vstudio/zlib/zlib.vcxproj index 973cb471..f3109eb9 100644 --- a/thirdparty/libpng-1.6.21/projects/vstudio/zlib/zlib.vcxproj +++ b/thirdparty/libpng-1.6.21/projects/vstudio/zlib/zlib.vcxproj @@ -56,27 +56,27 @@ StaticLibrary - v140 + v142 StaticLibrary - v140 + v142 StaticLibrary - v140 + v142 StaticLibrary - v140 + v142 StaticLibrary - v140 + v142 StaticLibrary - v140 + v142 StaticLibrary @@ -86,11 +86,11 @@ StaticLibrary - v140 + v142 StaticLibrary - v140 + v142 diff --git a/thirdparty/superlu/SuperLU_2019_32.d.lib b/thirdparty/superlu/SuperLU_2019_32.d.lib new file mode 100644 index 00000000..a336d020 --- /dev/null +++ b/thirdparty/superlu/SuperLU_2019_32.d.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:599cbc3110c8df7c3cecfc80a45ba67cb5af20d075dfd34fa1730196460ba6b8 +size 2056124 diff --git a/thirdparty/superlu/SuperLU_2019_32.lib b/thirdparty/superlu/SuperLU_2019_32.lib new file mode 100644 index 00000000..88eb05b4 --- /dev/null +++ b/thirdparty/superlu/SuperLU_2019_32.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15090224a424ccf7e95c149b3489c98515d026b6879b98ae8250b722496685eb +size 15480932 diff --git a/thirdparty/superlu/SuperLU_2019_64.d.lib b/thirdparty/superlu/SuperLU_2019_64.d.lib new file mode 100644 index 00000000..72394794 --- /dev/null +++ b/thirdparty/superlu/SuperLU_2019_64.d.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2117ba036dbdd6e02fa43bae0afb25b38aed02ca287fae74204002282ce71f9e +size 2448486 diff --git a/thirdparty/superlu/SuperLU_2019_64.lib b/thirdparty/superlu/SuperLU_2019_64.lib new file mode 100644 index 00000000..4943a337 --- /dev/null +++ b/thirdparty/superlu/SuperLU_2019_64.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fefabb9e4c5d5ad57ce65314bb9d20c39c6631daefbd4d7093557f88bcbd9105 +size 15021212 diff --git a/thirdparty/superlu/SuperLU_4.1/prj/SuperLU/SuperLU.sln b/thirdparty/superlu/SuperLU_4.1/prj/SuperLU/SuperLU.sln index 2de7bfb6..29a6ce1f 100644 --- a/thirdparty/superlu/SuperLU_4.1/prj/SuperLU/SuperLU.sln +++ b/thirdparty/superlu/SuperLU_4.1/prj/SuperLU/SuperLU.sln @@ -1,28 +1,31 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Express 14 for Windows Desktop -VisualStudioVersion = 14.0.25123.0 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.32407.337 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SuperLU", "SuperLU.vcxproj", "{CE6D481F-D1A9-45D9-B1BC-31723CC03F82}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 + Debug|x86 = Debug|x86 Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Debug|Win32.ActiveCfg = Debug|Win32 - {CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Debug|Win32.Build.0 = Debug|Win32 {CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Debug|x64.ActiveCfg = Debug|x64 {CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Debug|x64.Build.0 = Debug|x64 - {CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Release|Win32.ActiveCfg = Release|Win32 - {CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Release|Win32.Build.0 = Release|Win32 + {CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Debug|x86.ActiveCfg = Debug|Win32 + {CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Debug|x86.Build.0 = Debug|Win32 {CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Release|x64.ActiveCfg = Release|x64 {CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Release|x64.Build.0 = Release|x64 + {CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Release|x86.ActiveCfg = Release|Win32 + {CE6D481F-D1A9-45D9-B1BC-31723CC03F82}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {94E9E6F5-434B-4C8C-B7DD-9BC609715756} + EndGlobalSection EndGlobal diff --git a/thirdparty/superlu/SuperLU_4.1/prj/SuperLU/SuperLU.vcproj b/thirdparty/superlu/SuperLU_4.1/prj/SuperLU/SuperLU.vcproj deleted file mode 100644 index 1be6c7b2..00000000 --- a/thirdparty/superlu/SuperLU_4.1/prj/SuperLU/SuperLU.vcproj +++ /dev/null @@ -1,1056 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/thirdparty/superlu/SuperLU_4.1/prj/SuperLU/SuperLU.vcxproj b/thirdparty/superlu/SuperLU_4.1/prj/SuperLU/SuperLU.vcxproj new file mode 100644 index 00000000..27d8fcd5 --- /dev/null +++ b/thirdparty/superlu/SuperLU_4.1/prj/SuperLU/SuperLU.vcxproj @@ -0,0 +1,338 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {CE6D481F-D1A9-45D9-B1BC-31723CC03F82} + SuperLU + + + + StaticLibrary + v142 + MultiByte + true + + + StaticLibrary + v142 + MultiByte + + + StaticLibrary + v142 + MultiByte + true + + + StaticLibrary + v142 + MultiByte + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>16.0.32002.118 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + Disabled + USE_VENDOR_BLAS;%(PreprocessorDefinitions) + false + EnableFastChecks + MultiThreadedDebugDLL + true + Level3 + ProgramDatabase + + + $(OutDir)$(ProjectName).d.lib + + + + + MaxSpeed + true + USE_VENDOR_BLAS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + Level3 + ProgramDatabase + + + + + X64 + + + Disabled + USE_VENDOR_BLAS;%(PreprocessorDefinitions) + false + EnableFastChecks + MultiThreadedDebugDLL + true + Level3 + ProgramDatabase + + + $(OutDir)$(ProjectName).d.lib + + + + + X64 + + + MaxSpeed + true + USE_VENDOR_BLAS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + Level3 + ProgramDatabase + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/superlu/SuperLU_4.1/prj/SuperLU/SuperLU.vcxproj.filters b/thirdparty/superlu/SuperLU_4.1/prj/SuperLU/SuperLU.vcxproj.filters new file mode 100644 index 00000000..115ac406 --- /dev/null +++ b/thirdparty/superlu/SuperLU_4.1/prj/SuperLU/SuperLU.vcxproj.filters @@ -0,0 +1,591 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/thirdparty/tiff-4.0.3/.gitignore b/thirdparty/tiff-4.0.3/.gitignore deleted file mode 100644 index cd2f7d42..00000000 --- a/thirdparty/tiff-4.0.3/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -libtiff/tif_config.h -libtiff/tiffconf.h diff --git a/thirdparty/tiff-4.0.3/ChangeLog b/thirdparty/tiff-4.0.3/ChangeLog deleted file mode 100644 index a537f71b..00000000 --- a/thirdparty/tiff-4.0.3/ChangeLog +++ /dev/null @@ -1,5835 +0,0 @@ -2012-09-22 Bob Friesenhahn - - * libtiff 4.0.3 released. - -2012-09-20 Bob Friesenhahn - - * Makefile.am: Update to Automake 1.12.4 - -2012-08-19 Bob Friesenhahn - - * Makefile.in: Update to Automake 1.12.3 - - * libtiff{tiff.h, tif_print.c, tif_dirinfo.c, tif_dirread.c}: Add - some TIFF/FX support in libtiff. Add the tag definitions to - tiff.h. Add the related TIFF field definitions to tif_dirinfo.c, - and also fixes an error in a comment. Adds the photometric values - to tif_print.c, and fixes a bug. These changes are by Steve - Underwood. - -2012-08-13 Frank Warmerdam - - * libtiff/tif_write.c: Fix bug rewriting image tiles in a - compressed file: http://trac.osgeo.org/gdal/ticket/4771 - -2012-08-02 Frank Warmerdam - - * libtiff/tif_dirread.c: report error in case of mismatch value - counts for tags (ie. DotRange). - -2012-07-26 Tom Lane - - * libtiff/{tiffio.h, tif_dirinfo.c, libtiff.def}: Add six new - functions TIFFFieldTag(), TIFFFieldName(), TIFFFieldDataType(), - TIFFFieldPassCount(), TIFFFieldReadCount(), TIFFFieldWriteCount() - as external accessors for the opaque type TIFFField. - - * tools/tiffset.c: Make tiffset use the above functions instead of - relying on library private headers. - -2012-07-19 Tom Lane - - * tools/tiff2pdf.c: Fix two places where t2p_error didn't get set - after a malloc failure. No crash risk AFAICS, but the program - might not report exit code 1 as desired. h/t mancha@mac.hush.com - -2012-07-18 Tom Lane - - * tools/tiff2pdf.c: Fail when TIFFSetDirectory() fails. This - prevents core dumps or perhaps even arbitrary code execution when - processing a corrupt input file (CVE-2012-3401). - -2012-07-06 Bob Friesenhahn - - * test/raw_decode.c (main): Test fixes to work with IJG JPEG 7+. - IJG JPEG 7+ uses a different upsampling algorithm which produces - different numeric results. - - * libtiff/tif_jpeg.c (JPEGPreDecode): Patch from Even Rouault to - work with IJG JPEG 7+. - -2012-07-04 Bob Friesenhahn - - * test/raw_decode.c: Add changes so that test can run with build - directory outside of source directory. - -2012-07-02 Frank Warmerdam - - * libtiff/tif_jpeg.c: Fix handling when writing RGBA jpeg compressed - imagery (http://trac.osgeo.org/gdal/ticket/4732) - -2012-06-20 Frank Warmerdam - - * libtiff/tif_fax3.c: fix memory initialization of runs, only - partly done. - - * libtiff/tif_pixarlog.c: Make sure tbuf is large enough for one - full "stride" past the end. - -2012-06-19 Frank Warmerdam - - * libtiff/tif_packbits.c: fix read past end of data buffer. - -2012-06-15 Frank Warmerdam - - * libtiff 4.0.2 released. - - * tools/tif2pdf.c, tools/tifdump.c: avoid unitialized variable - warnings with clang. - -2012-06-15 Tom Lane - - * tools/tiff2pdf.c: Defend against integer overflows while - calculating required buffer sizes (CVE-2012-2113). - -2012-06-12 Frank Warmerdam - - * libtiff/tif_print.c: Be careful about printing corrupt inknames. - - * libtiff/tif_fax3.c: Ensure runs array is initialized to zeros. - -2012-06-07 Frank Warmerdam - - * libtiff/tif_print.c: avoid pretty printing other fields when - we don't have the proper amount and type of data or if the field - is actually autodefined. - -2012-06-05 Frank Warmerdam - - * libtiff/tif_tile.c, libtiff/tif_strip.c: Ensure that illegal - ycbcrsubsampling values result in a runtime error, not just an - assertion. - - * tests/custom_dir.c: Add testing of EXIF and custom directory - reading and writing. - - * libtiff/tif_dir.c, libtiff/tiffio.h: Add TIFFCreateCustomDirectory() - and TIFFCreateEXIFDirectory() functions. - - * libtiff/tif_dir.c, tif_print.c : Remove FIELD_CUSTOM handling for - PAGENUMBER, HALFTONEHINTS, and YCBCRSUBSAMPLING. Implement DOTRANGE - differently. This is to avoid using special TIFFGetField/TIFFSetField - rules for these fields in non-image directories (like EXIF). - -2012-06-04 Frank Warmerdam - - * libtiff/tif_jpeg.c: Remove code for fixing up h_sampling and v_sampling - in JPEGPreDecode(). If a fixup will be done it needs to be done sooner - in JPEGFixupTagsSubsampling() or else buffer sized may be wrong. - -2012-06-01 Frank Warmerdam - - * tools/tiffinfo.c: Do not try to read image data in EXIF directories. - - * libtiff/tif_getimage.c: added support for _SEPARATED CMYK images. - http://bugzilla.maptools.org/show_bug.cgi?id=2379 - - * libtiff/tif_unix.c: use strerror() to return a more specific error message - on failed open. - http://bugzilla.maptools.org/show_bug.cgi?id=2341 - - * libtiff/tif_jpeg.c: Fix JPEGDecodeRaw() bugs. - http://bugzilla.maptools.org/show_bug.cgi?id=2386 - - * tests/decode_raw.c, tests/images/quad-tile.jpg.tiff: add limited support - for testing jpeg in tiff image decoding including the "raw" decode interface. - -2012-05-31 Frank Warmerdam - - * libtiff/tif_jpeg.c: avoid overrunning the end of the output buffer in - JPEGDecodeRaw() - mostly likely to occur when there is confusion about - sampling values. - - * libtiff/tif_read.c: Make sure tif_rawdatasize is cleared when tif_rawdata is freed. - - * libtiff/tif_getimage.c: Add support for greyscale+alpha c/o Jérémie Laval. - http://bugzilla.maptools.org/show_bug.cgi?id=2398 - -2012-05-29 Frank Warmerdam - - * libtiff/tif_dir.c: avoid using specific set/get logic to process fields in custom directories, - like EXIF directories. This fixes problems like a tag "320" existing in a custom directory getting - processed as if it were a colormap when it isn't really. Damn the wide variety of argument formulations - to get/set functions for different tags! - - * libtiff/tif_dir.c: Ensure that we keep track of when tif_rawdata - is a pointer into an mmap()ed file via TIFF_BUFFERMMAP flag. - -2012-05-24 Frank Warmerdam - - * libtiff/tif_pixarlog.c: Allocate working buffer one word larger since we "forward - accumulate" and overwrite the end by one word in at least some cases. - -2012-05-23 Frank Warmerdam - - * libtiff/tif_pixarlog.c: avoid accessing out of the lookup arrays for out of range inputs. - - * tools/tiffinfo.c: initialize h=0 to avoid undefined variable for degenerate files. - - * libtiff/tif_ojpeg.c: if OJPEGWriteHeader() fails once do not bother trying again on - the same image. - - * libtiff/tif_ojpeg.c: make things more resilient in the face of files without - stripbytecounts or stripoffsets or where loading these fails. - - * libtiff/tif_print.c: be careful about whether min/max values are singular - or one per sample. - - * libtiff/tif_print.c: Avoid confusion about count size when printing custom fields. - May affect things like ISOSpeedRatings. - - * libtiff/tif_dir.c: avoid one byte past end of ink names reading - in some cases. - -2012-05-19 Bob Friesenhahn - - * man/TIFFGetField.3tiff: Correct the 'count' field type in the - example for how to retreive the value of unsupported tags. - -2012-03-30 Frank Warmerdam - - * tif_getimage.c: Fix size overflow (zdi-can-1221,CVE-2012-1173) - care of Tom Lane @ Red Hat. - -2012-02-18 Bob Friesenhahn - - * libtiff 4.0.1 released. - - * Update automake used to 1.11.3. - - * libtiff/tiffio.h: Use double-underbar syntax in GCC printf - attribute specification to lessen the risk of accidental macro - substitution. Patch from Vincent Torri. - -2012-01-31 Frank Warmerdam - - * libtiff/tif_dir.c, libtiff/tif_dirread.c: Extra caution around - assumption tag fetching is always successful. - - * libtiff/tif_jpeg.c: Extra caution for case where sp is NULL. - -2012-01-22 Bob Friesenhahn - - * configure.ac: Add support for using library symbol versioning on - ELF systems with the GNU linker. Support is enabled via - --enable-ld-version-script. Disabled by default for now until - there is a decision for how to deploy a libtiff with versioned - symbols after libtiff 4.0.0 was already released. - -2011-12-22 Bob Friesenhahn - - * libtiff/tif_win32.c: Eliminate some minor 64-bit warnings in - - tif_win32.c. Patch by Edward Lam. - - * configure.ac: Add libtiff private dependency on -llzma for - pkg-config. Patch by Mark Brand. - Updated Automake to 1.11.2. - -2011-12-21 Bob Friesenhahn - - * libtiff 4.0.0 released. - -2011-12-08 Frank Warmerdam - - * libtiff/tif_dirread.c, libtiff/tif_read.c: more cautious checking - of _TIFFFillStriles() results (#gdal 4372) - -2011-12-07 Frank Warmerdam - - * libtiff/tif_dirread.c: fixes to deal with invalid files where - _TIFFFillStriles() fails, and we try to chop up strips (gdal #4372) - - * libtiff/tif_dirread.c: fix error reporting when there is no - tag information struct and name (gdal #4373) - -2011-10-22 Bob Friesenhahn - - * Update GNU libtool to 2.4.2. - - * tools/tiffsplit.c (tiffcp): TIFFGetField count field should be - uint32 type for TIFFTAG_JPEGTABLES. Patch by Christophe - Deroulers. - -2011-06-21 Frank Warmerdam - - * libtiff/libtiff.def: Restore TIFFMergeFieldInfo. - -2011-05-31 Jim Meyering - - * libtiff/tif_dirread.c (TIFFFetchStripThing): Free "data" also - upon failure to allocate "resizeddata". - * tools/tiff2ps.c (PSDataBW): Zero buffer *after* checking for - allocation failure, not before. - * libtiff/tif_ojpeg.c: plug leaks on OJPEG read failure path - * tools/rgb2ycbcr.c (cvtRaster): unchecked malloc - * libtiff/tif_jpeg.c, tools/tiff2pdf.c, tools/tiff2ps.c: mark - NULL-deref and possible overflow - * tools/tiff2pdf.c: remove decl+set of set-but-not-used local, "written" - * libtiff/tif_jpeg.c (JPEGInitializeLibJPEG): Remove declaration - and set of otherwise unused local, data_is_empty. - * libtiff/tif_jpeg.c (JPEGDecodeRaw) [JPEG_LIB_MK1_OR_12BIT]: - Diagnose out-of-memory failure and return 0 rather than - dereferencing NULL. - -2011-05-24 Frank Warmerdam - - * libtiff/tif_dirread.c: produce special error message for zero tag - directories instead of error out on the malloc(0) failure. - -2011-05-16 Frank Warmerdam - - * libtiff/tif_dirinfo.c: Restore TIFFMergeFieldInfo() and - related declarations as they are in active use by libraries - such as libgeotiff, and work just fine. (#2315) - -2011-04-20 Frank Warmerdam - - * libtiff/tif_dirinfo.c,tiffio.h: Remove the obsolete - TIFFMergeFieldInfo/TIFFFindFieldInfo/TIFFFindFieldInfoByName API. - http://bugzilla.maptools.org/show_bug.cgi?id=2315 - - * libtiff/libtiff.def: add some missing (64bit) APIs. - http://bugzilla.maptools.org/show_bug.cgi?id=2316 - -2011-04-09 Bob Friesenhahn - - * libtiff 4.0.0beta7 released. - -2011-04-09 Bob Friesenhahn - - * configure.ac: Should use AC_CANONICAL_HOST since host specifies - the run-time target whereas target is used to specify the final - output target if the package is a build tool (like a compiler), - which libtiff is not. Resolves libtiff bug 2307 "Use - AC_CANONICAL_HOST macro". - -2011-04-02 Bob Friesenhahn - - * configure.ac: Support configuring TIFF_INT64_FORMAT and - TIFF_UINT64_FORMAT appropriately for MinGW32. - - * tools/tiffdump.c (ReadDirectory): MinGW32 needs to use WIN32 - printf conventions for 64-bit types because it uses the WIN32 CRT. - - * libtiff/{tif_dumpmode.c,tif_luv.c,tif_lzw.c,tif_print.c, - tif_read.c,tif_strip.c,tif_thunder.c}: MinGW32 needs to use WIN32 - printf conventions for 64-bit types because it uses the WIN32 CRT. - - * tools/tiff2pdf.c (t2p_write_pdf_string): Fix printf syntax not - understood by WIN32 CRT. - - * libtiff/tif_ojpeg.c: Fixes to compile with MinGW32 GCC. - - * tools/fax2ps.c (main): Use tmpfile() rather than mkstemp() since - it is much more portable. Tmpfile is included in ISO/IEC - 9899:1990 and the WIN32 CRT. - -2011-03-26 Frank Warmerdam - - * tools/tiffset.c: add -d and -sd switches to allow operation on - a particular directory, not just the first (jef). - -2011-03-21 Frank Warmerdam - - * libtiff/tif_thunder.c: Correct potential buffer overflow with - thunder encoded files with wrong bitspersample set. The libtiff - development team would like to thank Marin Barbella and TippingPoint's - Zero Day Initiative for reporting this vulnerability (ZDI-CAN-1004, - CVE-2011-1167). - http://bugzilla.maptools.org/show_bug.cgi?id=2300 - -2011-03-10 Frank Warmerdam - - * libtiff/tif_fax3.h: Fix to last change allowing zero length - runs at the start of a scanline - needed for legal cases. - -2011-03-02 Frank Warmerdam - - * libtiff/tif_fax3.h: Protect against a fax VL(n) codeword commanding - a move left. Without this, a malicious input file can generate an - indefinitely large series of runs without a0 ever reaching the right - margin, thus overrunning our buffer of run lengths. Per CVE-2011-0192. - This is a modified version of a patch proposed by Drew Yao of Apple - Product Security. It adds an unexpected() report, and disallows the - equality case, since emitting a run without increasing a0 still allows - buffer overrun. - -2011-02-23 Frank Warmerdam - - * libtiff/tif_jpeg.c: avoid divide by zero in degenerate case (#2296) - - * tools/tiff2rgba.c: close source file on error to make leak - detection easier. - - * libtiff/tif_getimage.c: avoid leaks if TIFFRGBAImageBegin() fails. - - http://bugzilla.maptools.org/show_bug.cgi?id=2295 - -2011-02-22 Frank Warmerdam - - * libtiff/tif_lzma.c: Maintain tif_rawcc/tif_rawcp (CHUNKY_STRING_READ - _SUPPORT) - -2011-02-18 Frank Warmerdam - - * configure.ac, configure: Added support for --enable-chunky-strip-read - configure option to enable the experimental feature from a couple - months ago for reading big strips in chunks. - - * configure.ac, tif_read.c, tif_readdir.c, tif_dir.h, tiffiop.h, - tif_write.c, tif_print.c, tif_jpeg.c, tif_dirwrite.c, tif_write.c: - Implement optional support for deferring the load of strip/tile - offset and size tags for optimized scanning of directories. Enabled - with the --enable-defer-strile-load configure option (DEFER_STRILE_LOAD - #define in tif_config.h). - -2011-02-11 Frank Warmerdam - - * libtiff/tif_print.c: remove unused variable. - -2011-02-09 Frank Warmerdam - - * libtiff/tif_win32.c: avoid error/warning buffer overrun problem - with non-console (popup message) builds on win32. - - http://bugzilla.maptools.org/show_bug.cgi?id=2293 - -2011-01-24 Olivier Paquet - - * libtiff/{tif_dir.{h,c}, tif_dirinfo.c, tif_dirread.c, tif_dirwrite.c, - tif_print.c, tiff.h, tiffiop.h} : Added support for - TIFFTAG_SMINSAMPLEVALUE and TIFFTAG_SMAXSAMPLEVALUE to have different - values for each sample. Presents the min/max of all samples by default for - compatibility. TIFFSetField/TIFFGetField can be made to handle those tags - as arrays by changing the new TIFFTAG_PERSAMPLE pseudo tag. - http://www.asmail.be/msg0055458208.html - -2011-01-06 Frank Warmerdam - - * libtiff/tif_pixarlog.c: Note that tif_rawcc/tif_rawcp are not - maintained. - - * libtiff/tif_zip.c: Maintain tif_rawcc/tif_rawcp when decoding - for CHUNKY_STRIP_READ_SUPPORT. - - * libtiff/tif_jpeg.c: ensure that rawcc and rawcp are maintained - during JPEGPreDecode and JPEGDecode calls. - * libtiff/tif_read.c: larger read ahead for CHUNKY_STRIP_READ_SUPPORT, - as compression formats like JPEG keep 16 lines interleaved in a sense - and might need to touch quite a bit of data. - - http://trac.osgeo.org/gdal/ticket/3894 - -2011-01-03 Lee Howard - - * libtiff/tif_jpeg.c: Fix regressions with 2 and 3 band images - caused by commit on 2010-12-14. Submitted by e-mail from - Even Rouault - -2010-12-31 Olivier Paquet - - * libtiff/tif_dirwrite.c: Fixed writing of TIFFTAG_REFERENCEBLACKWHITE. - http://bugzilla.maptools.org/show_bug.cgi?id=2266 - -2010-12-23 Andrey Kiselev - - * tools/tiffcp.c, man/tiffcp.1: Added support for specifying the - compression level parameter (preset) for Deflate and LZMA encoders, - e.g "-c lzma:p1" or "-c zip:p9". - - * libtiff/tif_lzma.c: Properly set the LZMA2 compression level - (preset) in LZMAVSetField(). - -2010-12-18 Bob Friesenhahn - - * libtiff/Makefile.am (libtiff_la_SOURCES): Added tif_lzma.c to - Makefile. - -2010-12-14 Andrey Kiselev - - * configure.ac, libtiff/{tif_codec.c, tif_config.h.in, tiff.h, - tiffiop.h, tif_lzma.c}, tools/tiffcp.c, man/tiffcp.1: Implement a new - TIFF compression scheme LZMA reserving a new value 34925 for - Compression tag. As per - bug http://bugzilla.maptools.org/show_bug.cgi?id=2221 - -2010-12-14 Lee Howard - - * libtiff/tif_dirread.c: tolerate some cases where - FIELD_COLORMAP is missing - http://bugzilla.maptools.org/show_bug.cgi?id=2189 - -2010-12-14 Lee Howard - - * libtiff/tif_read.c: change read_ahead to tmsize_t - http://bugzilla.maptools.org/show_bug.cgi?id=2222 - -2010-12-14 Lee Howard - - * configure.ac, libtiff/Makefile.am: Build tif_win32.c on - Windows except on Cygwin - http://bugzilla.maptools.org/show_bug.cgi?id=2224 - -2010-12-14 Lee Howard - - * tools/gif2tiff.c: fix buffer overrun - http://bugzilla.maptools.org/show_bug.cgi?id=2270 - -2010-12-14 Lee Howard - - * libtiff/tif_jpeg.c: reduce usage of JCS_UNKNOWN in order - to improve compatibility with various viewers - submitted by e-mail from Dwight Kelly - -2010-12-13 Lee Howard - - * tools/fax2ps.c: be consistent with page-numbering - http://bugzilla.maptools.org/show_bug.cgi?id=2225 - -2010-12-13 Lee Howard - - * libtiff/tif_color.c: prevent crash in handling bad TIFFs - resolves CVE-2010-2595 - http://bugzilla.maptools.org/show_bug.cgi?id=2208 - -2010-12-13 Lee Howard - - * tools/tiffcrop.c: new release by Richard Nolde - http://bugzilla.maptools.org/show_bug.cgi?id=2004 - -2010-12-12 Lee Howard - - * tools/tiff2pdf.c: fix colors for images with RGBA - interleaved data - http://bugzilla.maptools.org/show_bug.cgi?id=2250 - -2010-12-12 Lee Howard - - * libtiff/tif_dirread.c: fix for Zeiss LSM and Canon CR2 files - http://bugzilla.maptools.org/show_bug.cgi?id=2164 - -2010-12-11 Lee Howard - - * tools/tiff2pdf.c: remove invalid duplication for Lab - http://bugzilla.maptools.org/show_bug.cgi?id=2162 - -2010-12-11 Lee Howard - - * libtiff/tif_jpeg.c: fix use of clumplines calculation - http://bugzilla.maptools.org/show_bug.cgi?id=2149 - -2010-12-11 Lee Howard - - * tools/fax2ps.c: replace unsafe tmpfile() with mkstemp() - http://bugzilla.maptools.org/show_bug.cgi?id=2118 - -2010-12-11 Lee Howard - - * libtiff/tif_ojpeg.c, libtiff/tif_pixarlog.c, - libtiff/tif_zip.c: fix build errors for VC6 - http://bugzilla.maptools.org/show_bug.cgi?id=2105 - -2010-12-11 Lee Howard - - * libtiff/tif_stream.cxx: warnings cleanup - http://bugzilla.maptools.org/show_bug.cgi?id=2091 - * libtiff/tif_dirread.c: warnings cleanup - http://bugzilla.maptools.org/show_bug.cgi?id=2092 - -2010-12-11 Lee Howard - - * tools/tiff2pdf.c: add fill-page option - http://bugzilla.maptools.org/show_bug.cgi?id=2051 - -2010-12-11 Lee Howard - - * libtiff/tif_dirread.c: modify warnings - http://bugzilla.maptools.org/show_bug.cgi?id=2016 - -2010-12-11 Lee Howard - - * libtiff/tif_ojpeg.c: fix buffer overflow on problem data - http://bugzilla.maptools.org/show_bug.cgi?id=1999 - -2010-12-11 Lee Howard - - * tools/tiffinfoce.c: strip byte counts are uint64* now - -2010-12-11 Lee Howard - - * libtiff/tif_ojpeg.c: fix crash when reading a TIFF with a zero - or missing byte-count tag - * tools/tiffsplit.c: abort when reading a TIFF without a byte-count - per http://bugzilla.maptools.org/show_bug.cgi?id=1996 - -2010-12-08 Lee Howard - - * libtiff/tif_dirread.c: fix crash when reading a badly-constructed - TIFF per http://bugzilla.maptools.org/show_bug.cgi?id=1994 - -2010-12-06 Lee Howard - - * libtiff/tif_open.c: Fix mode check before opening a file. - http://bugzilla.maptools.org/show_bug.cgi?id=1906 - -2010-11-27 Bob Friesenhahn - - * libtiff-4.pc.in: Added libtiff pkg-config .pc file support. - Patch by Vincent Torri. - -2010-10-21 Frank Warmerdam - - * tools/tiffinfo.c: avoid direct reference to _TIFFerrorHandler. - - * libtiff/tif_config.vc.h: define snprintf to _snprintf for tiff2pdf. - - * libtiff/libtiff.def: export _TIFFCheckMalloc for tools. - -2010-09-25 Lee Howard - - * tools/tiff2ps.c: improvements and enhancements from Richard Nolde - with additional command line options for Document Title, - Document Creator, and Page Orientation - -2010-07-13 Bob Friesenhahn - - * tools/tiffcrop.c: Patch from Richard Nolde to avoid a - potentially unterminated buffer due to using an exceptionally long - file name. - -2010-07-08 Andrey Kiselev - - * tools/tiff2pdf.c: Fixed ID buffer filling in - t2p_write_pdf_trailer(), thanks to Dmitry V. Levin. - -2010-07-07 Andrey Kiselev - - * libtiff/tif_dirread.c: Really reset the tag count in CheckDirCount() - to expected value as the warning message suggests. As per bug - http://bugzilla.maptools.org/show_bug.cgi?id=1963 - -2010-07-06 Andrey Kiselev - - * tools/tiffset.c: Properly handle TIFFTAG_PAGENUMBER, - TIFFTAG_HALFTONEHINTS, TIFFTAG_YCBCRSUBSAMPLING, TIFFTAG_DOTRANGE - which should be set by value. - - * libtiff/tif_dirinfo.c: Don't use assertions in _TIFFFieldWithTag() - and _TIFFFieldWithName() if the tag is not found in the tag table. - This should be normal situation and returned NULL value should be - properly handled by the caller. - -2010-07-02 Andrey Kiselev - - * libtiff/tif_getimage.c: Avoid wrong math du to the signed/unsigned - integer type conversions. As per bug - http://bugzilla.maptools.org/show_bug.cgi?id=2207 - - * tools/{tiff2bw.c, thumbnail.c, pal2rgb.c}: Fix the count for - WhitePoint tag as per bug - http://bugzilla.maptools.org/show_bug.cgi?id=2042 - - * libtiff/tif_getimage.c: Check the number of samples per pixel when - working with YCbCr image in PickContigCase(). As per bug - http://bugzilla.maptools.org/show_bug.cgi?id=2216 - - * libtiff/tif_dir.c: Set the bogus post-decoding hook when processing - TIFFTAG_BITSPERSAMPLE in _TIFFVSetField() for the case of 8 bit when - we don't need any post-processing. That helps to reset the hook if we - previously set this field to some other value and the hook was - initialized accordingly. As per bug - http://bugzilla.maptools.org/show_bug.cgi?id=2035 - -2010-07-01 Andrey Kiselev - - * tools/tiffgt.c: Properly check the raster buffer allocations for - integer overflows. As per bug - http://bugzilla.maptools.org/show_bug.cgi?id=2108 - - * m4/acinclude.m4: Update GL/GLU/GLUt/Pthread macros from the - upstream. - - * libtiff/{tif_aux.c, tif_strip.c, tif_tile.c, tiffiop.h}: Move - multiply_32() and multiply_64() functions into tif_aux.c file and - rename them into _TIFFMultiply32() and _TIFFMultiply64() respectively. - -2010-06-30 Andrey Kiselev - - * tools/tiff2pdf.c: Better generation of ID field in - t2p_write_pdf_trailer(). Get rid of GCC aliasing warnings. - - * tools/tiff2pdf.c: Fixed computation of the tile buffer size when - converting JPEG encoded tiles. - - * tools/tiff2pdf.c: Better handling of string fields, use static - string buffers instead of dynamically allocated, use strncpy() instead - of strcpy(), control the string lengths. - -2010-06-25 Andrey Kiselev - - * tools/tiffcp.c: Initialize buffer arrays with zero to avoid - referencing to uninitialized memory in some cases (e.g. when tile size - set bigger than the image size). - -2010-06-15 Bob Friesenhahn - - * tools/tiffcrop.c: Patch from Richard Nolde. Reject YCbCr - subsampled data since tiffcrop currently doesn't support it. Fix - JPEG support. - -2010-06-13 Frank Warmerdam - - * libtiff/tif_dirinfo.c: Fix invocation of tag compare function (#2201) - - * tools/tiff2pdf.c: Fix assorted bugs in tiff2pdf: missing "return" - in t2p_read_tiff_size() causes t2p->tiff_datasize to be set entirely - wrong for COMPRESSION_JPEG case, resulting in memory stomp if actual - size is larger. Also, there are a bunch of places that try to - memset() a malloc'd buffer before checking for malloc failure, which - would result in core dump if there actually were a failure. (#2211) - -2010-06-11 Bob Friesenhahn - - * libtiff/tiffiop.h (TIFFSafeMultiply): Need more castings to - avoid compiler warnings if parameter types are not sign - consistent. - - * libtiff 4.0.0alpha6 released. - - * tools/tiffcrop.c: Applied patch from Richard Nolde: Corrected - European page size dimensions. Added an option to allow the user - to specify a custom page size on the command line. Fix the case - where a page size specified with a fractional part was being - coerced to an integer by retyping the variables that define the - paper size. - - * html/index.html: Update for the 3.9.3 release. - - * tools/tiffcp.c (tiffcp): Applied Tom Lane's patch to reject - YCbCr subsampled data since tiffcp currently doesn't support it. - http://bugzilla.maptools.org/show_bug.cgi?id=2097 - - * Update libtool to version 2.2.10. - -2010-06-10 Bob Friesenhahn - - * libtiff/tiffiop.h (TIFFSafeMultiply): Work properly if - multiplier is zero. - -2010-06-09 Bob Friesenhahn - - * libtiff/tif_fax3.c (Fax3SetupState): Yesterday's fix for - CVE-2010-1411 was not complete. - - * libtiff/tiffiop.h (TIFFSafeMultiply): New macro to safely - multiply two integers. Returns zero if there is an integer - overflow. - - * tools/tiffcp.c (main): tiffcp should not leak memory if an error - is reported when reading the input file. - -2010-06-08 Bob Friesenhahn - - * Update libtool to version 2.2.8. - - * libtiff/tif_fax3.c (Fax3SetupState): Avoid under-allocation of - buffer due to integer overflow in TIFFroundup() and several other - potential overflows. In conjunction with the fix to TIFFhowmany(), - fixes CVE-2010-1411. - - * libtiff/tiffiop.h (TIFFhowmany): Return zero if parameters would - result in an integer overflow. This causes TIFFroundup() to also - return zero if there would be an integer overflow. - - * contrib: Add an emacs formatting mode footer to all source files - so that emacs can be effectively used. - -2010-06-03 Oliver Chen Feng - - * libtiff/tools/tiffcp.c: add a new option -x to force merged tiff - file PAGENUMBER value in sequence for users who care the page - sequence, this will also prevent tiff2pdf from creating pdf file from - the merged tiff file with wrong page sequence. - -2010-05-08 Olivier Paquet - - * libtiff/tif_dirread.c: Restored TIFFReadDirEntryFloat function in order - to add missing TIFF_SETGET_FLOAT case to TIFFFetchNormalTag. - * libtiff/tif_dirinfo.c: Use correct set_field_type for - TIFFTAG_PIXAR_FOVCOT so it is readable again (regression from 3.9.2). - http://bugzilla.maptools.org/show_bug.cgi?id=2192 - -2010-05-07 Frank Warmerdam - - * libtiff/tif_jpeg.c: Ensure that quality is always set in - JPEGPreEncode(), not just when we want to output local tables. - Otherwise the quality used during compression may not be right and - might not match the tables in the tables tag. This bug only occurs - when seeking between directories in the midst of writing blocks. - http://trac.osgeo.org/gdal/ticket/3539 - -2010-05-06 Andrey Kiselev - - * html/man/TIFFGetField.3tiff.html, html/man/TIFFSetField.3tiff.html: - Regenerated from the source. - -2010-05-05 Olivier Paquet - - * libtiff/tif_print.c: Fixed printing of TIFFTAG_REFERENCEBLACKWHITE which - had stopped working. Also made it always print 6 floats instead of - 2*SamplesPerPixel. - http://bugzilla.maptools.org/show_bug.cgi?id=2191 - http://bugzilla.maptools.org/show_bug.cgi?id=2186 - * man/TIFFGetField.3tiff, man/TIFFSetField.3tiff: Fixed doc to reflect the - fact that libtiff considers TIFFTAG_REFERENCEBLACKWHITE to be 6 floats. - -2010-05-05 Frank Warmerdam - - * libtiff/tif_jpeg.c: Fix to use memcmp(), not memcpy() when checking - if the jpeg table was written. This is a fix for the last fix on 04-21. - -2010-04-21 Frank Warmerdam - - * libtiff/tif_jpeg.c: avoid preparing jpeg tables everytime - JPEGSetupEncode() is called if the tables already seem to be - established. This prevents spurious updates and rewriting of - directories with jpegtables when doing updates to existing images. - http://trac.osgeo.org/gdal/ticket/3539 - -2010-04-20 Olivier Paquet - - * libtiff/tif_dirinfo.c: Use correct set_field_type for - TIFFTAG_PIXAR_IMAGEFULLWIDTH, TIFFTAG_PIXAR_IMAGEFULLLENGTH, - TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN and TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA. - They were unreadable with TIFF_SETGET_UNDEFINED, a regression from 3.9.2. - http://bugzilla.maptools.org/show_bug.cgi?id=2139 - -2010-04-10 Bob Friesenhahn - - * libtiff/tif_dir.c (_TIFFVSetField): Add a special error case for - when the tag count value is zero. Error handling is still a - regression since in 3.9.2, empty tags are skipped (with a warning) - rather than returning a hard error and refusing to read the file. - - * tools/ppm2tiff.c (main): While case for parsing comment line - requires extra parenthesis to work as expected. Reported by - Thomas Sinclair. - -2010-04-02 Frank Warmerdam - - * libtiff/tif_read.c (primarily): Add support for - CHUNKY_STRIP_READ_SUPPORT where large strips are - read in chunks for applications using TIFFReadScanline(). - This is intended to make it more practical work with very - large compressed one-strip files. Feature is off by default. - Enable by defining CHUNK_STRIP_READ_SUPPORT as a macro. - http://trac.osgeo.org/gdal/ticket/3514 - -2010-03-31 Frank Warmerdam - - * libtiff/tif_flush.c: Use TIFFRewriteDirectory() when flushing - directories so previously placed directories will be migrated to - the end of file if needed. - -2010-03-30 Frank Warmerdam - - * libtiff/tif_lzw.c: change type of dec_bitsleft field to uint64 - to support operating on strips/tiles of more than 256MB. - http://trac.osgeo.org/gdal/ticket/3512 - -2010-03-10 Bob Friesenhahn - - * libtiff/tif_aux.c (_TIFFCheckRealloc): Improve error message so - that it is clearly a memory allocation error message, and also - includes the size of the allocation request. - -2010-02-22 Lee Howard - - * libtiff/tif_jpeg.c: Do not generate a JPEGTables tag when creating - the JPEG TIFF as is is not required in order to prevent it from - being unused and filled with invalid data. (Leave it to be - generated by later activity.) - http://bugzilla.maptools.org/show_bug.cgi?id=2135 - * tools/tiff2pdf.c: Write the JPEG SOI headers into the TIFF strip - data rather than skipping them. This fixes the ability to view in - Acrobat Reader, Evince, and Ghostscript. - http://bugzilla.maptools.org/show_bug.cgi?id=2135 - * libtiff/tif_fax3.c: Don't return error on badly-terminated MMR - strips. - http://bugzilla.maptools.org/show_bug.cgi?id=2029 - -2009-12-03 Frank Warmerdam - - * libtiff/tif_jpeg.c: Made JPEGDecodeRaw() check for buffer overruns. - Made so that when working with downsampled images a stub function - reporting an error is used for tif_decoderow. We cannot meaningfully - support reading scanlines in this situation. (#1936) - - * libtiff/tif_jpeg.c: Ensure that tif_scanlinesize is computed after - resetting of the upsampling values (gdal:#3259). - http://bugzilla.maptools.org/show_bug.cgi?id=1936 - -2009-11-30 Frank Warmerdam - - * contrib/dbs/tiff-grayscale.c, contrib/tif-palette.c, - tools/ras2tiff.c: Fix resource leaks on error. - http://bugzilla.maptools.org/show_bug.cgi?id=2121 - - * libtiff/tif_{aux.c,dir.c,dir.h,dirinfo.c}: Return to handling - TIFFTAG_REFERENCEBLACKWHITE as a field in the TIFF directory instead - of as a custom(generic) field to avoid a potential reentrancy problem. - http://bugzilla.maptools.org/show_bug.cgi?id=2125 - - * libtiff/tif_color.c, libtiff/tif_getimage.c, libtiff/tiffio.h, - man/TIFFcolor.3tiff: Make TIFFDisplay argument in TIFFCIELabToRGBInit - const, and display_sRGB static and const. - http://bugzilla.maptools.org/show_bug.cgi?id=2124 - -2009-11-04 Bob Friesenhahn - - * libtiff 4.0.0alpha5 released. - -2009-11-03 Bob Friesenhahn - - * tools/tiffcrop.c: Updated tiffcrop from Richard Nolde. This - version has undergone substantial testing with arbitrary sample - bit depths. Also eliminates GCC compilation warnings. - -2009-11-02 Bob Friesenhahn - - * port/libport.h: Add extern declarations for getopt standard - globals. - -2009-10-31 Bob Friesenhahn - - * libtiff/tif_lzw.c (LZWDecode, LZWDecodeCompat): Fix warnings - noticed in 64-bit build of libtiff with Visual Studio 2005. - Resolves "Bug 2067 - Visual Studio 2005 64-bit warnings in - tif_lzw.c", http://bugzilla.maptools.org/show_bug.cgi?id=2067 - - * libtiff/tif_pixarlog.c (PixarLogEncode): Fix non-important - warning noticed in Visual Studio 2005 build. Resolves "Bug 2068 - - Visual Studio 2005 64-bit warning in tif_pixarlog.c", - http://bugzilla.maptools.org/show_bug.cgi?id=2068 - -2009-10-29 Bob Friesenhahn - - * libtiff/tif_dirread.c: Eliminate GCC "dereferencing type-punned - pointer" warnings. - -2009-10-28 Bob Friesenhahn - - * html/tools.html: Add manual page links, and a summary - description of tiffcrop. - -2009-10-07 Bob Friesenhahn - - * configure.ac: x86_64 should use the same fill order as i386. - -2009-09-24 Bob Friesenhahn - - * tools/tiffcrop.c, man/tiffcrop.1: New tiffcrop from Richard - Nolde. Major updates to add significant functionality for reading - and writing tile based images with bit depths not a multiple of 8 - which cannot be handled by tiffcp. - -2009-09-03 Bob Friesenhahn - - * libtiff/tif_ojpeg.c (OJPEGWriteHeaderInfo): IJG JPEG 7 needs - do_fancy_upsampling=FALSE in order to read raw data. Resolves - "Bug 2090 - OJPEG crash with libjpeg v7". - http://bugzilla.maptools.org/show_bug.cgi?id=2090 - -2009-09-03 Frank Warmerdam - - * libtiff/tif_getimage.c: Fixed error recognition handling in RGBA - interface when stoponerror is set. - http://bugzilla.maptools.org/show_bug.cgi?id=2071 - -2009-08-30 Bob Friesenhahn - - * tools/{tiffcrop.c,tiffgt.c}: Applied patch from Oden Eriksson to - fix build with gcc when using the "-Wformat - -Werror=format-security" flags. - -2009-08-29 Bob Friesenhahn - - * test/{bmp2tiff_palette.sh, bmp2tiff_rgb.sh, gif2tiff.sh, - ppm2tiff_pbm.sh, ppm2tiff_pgm.sh, ppm2tiff_ppm.sh}: Additional - utilities tests. - -2009-08-28 Bob Friesenhahn - - * tools/tiffinfo.c: tiffinfo should return error status to the - caller. Register a private error callback to accomplish that. - - * test/Makefile.am (TIFFIMAGES): Add test images in BMP, GIF, and - PNM formats so that we will be able to test more of the tools. - While adding these test images I notice that bmp2tiff and gif2tiff - only support ancient versions of their respective formats. - -2009-08-27 Bob Friesenhahn - - * libtiff 4.0.0alpha4 released. - - * HOWTO-RELEASE: Improved release instructions. - -2009-08-24 Bob Friesenhahn - - * man/{TIFFClose.3tiff,raw2tiff.1,tiffcmp.1,tiffsplit.1}: Applied - fixes for "Bug 2023 - nroff errors in manual pages". - http://bugzilla.maptools.org/show_bug.cgi?id=2023 - - * tools/{rgb2ycbcr.c, tiff2rgba.c}: Applied fixes for "Bug 2079 - - CVE-2009-2347 libtiff: integer overflows in various inter-color - space conversion tools". - http://bugzilla.maptools.org/show_bug.cgi?id=2079 - - * libtiff/tif_print.c (TIFFPrintDirectory): Apply fix from Jay - Berkenbilt for "Bug 2024 - possible null pointer dereference with - one-line fix". - http://bugzilla.maptools.org/show_bug.cgi?id=2024 - - * libtiff/tif_dirread.c (TIFFReadCustomDirectory): Apply patch - from Jay Berkenbilt for "Bug 1895 - logic error in tif_dirread.c: - segfault after setting tdir_tag = IGNORE". - http://bugzilla.maptools.org/show_bug.cgi?id=1895 - -2009-08-23 Bob Friesenhahn - - * test/Makefile.am, test/tiffcrop*.sh: Split previously existing - tiffcrop.sh into a collection of many specific tests. Re-wrote - all of the existing tests to be based on some simple shell - functions. Make distcheck works again. - - Export certain variables (MAKE, MAKEFLAGS, MEMCHECK) to tests and - added 'memcheck' and 'ptrcheck' targets to make it easy to run the - tests under valgrind. - -2009-08-21 Bob Friesenhahn - - * test/tiffcp-logluv.sh: Fix test so that it works with a VPATH - build. - - * test/Makefile.am (AUTOMAKE_OPTIONS): Colorized tests was not - actually activated since it needed to be enabled in this - Makefile.am. Also activated parallel-tests mode since it offers - useful features such as per-test .log files and a summary test - report .log file. - -2009-08-20 Bob Friesenhahn - - * configure.ac: Updated autotools. Autoconf 2.64, Automake 1.11, - libtool 2.2.6. Enabled support for silent build rules - (--enable-silent-rules or 'make V=0') and colorized tests. - - * html/{index.html, v3.9.0.html}: Update for 3.9.0 release. - -2009-06-30 Frank Warmerdam - - * tests/tiffcp-logluv.sh: minimal testing of sgilog compression. - - * tools/tiffcp.c: add -c sgilog support. - - * libtiff/tif_luv.c: correct return codes from encoderow to be - 1 on success instead of zero. - http://bugzilla.maptools.org/show_bug.cgi?id=2069 - - * libtiff/tif_lzw.c: back out patch from #2065 and apply patch from - #1085 for a better underflow fix that errors properly. - http://bugzilla.maptools.org/show_bug.cgi?id=2065 - http://bugzilla.maptools.org/show_bug.cgi?id=1985 - -2009-06-26 Frank Warmerdam - - * libtiff/tif_strip.c: Remove an inappropriate assertion that often - fails on oddly sized 12bit jpeg compressed ycbcr images. - -2009-06-22 Frank Warmerdam - - * libtiff/tif_lzw.c: Fix buffer underflow bug. - http://bugzilla.maptools.org/show_bug.cgi?id=2065 - -2009-06-21 Frank Warmerdam - - * configure.ac, libtiff/tif_jpeg.c, libtiff/tif_jpeg_12.c: add support - for dual mode 8/12 bit jpeg support. - -2009-06-03 Frank Warmerdam - - * libtiff/tif_write.c: do not override the planar configuration to be - contig for one sample files if planar configuration is already set. - http://bugzilla.maptools.org/show_bug.cgi?id=2057 - -2009-06-02 Frank Warmerdam - - * libtiff/libtiff.def: Add TIFFUnsetField. - -2009-05-03 Frank Warmerdam - - * libtiff/{tif_jpeg.c,tif_ojpeg.c,tif_getimage.c}: Fixed various - error reports to use "%s" as format string. - http://trac.osgeo.org/gdal/ticket/2976 - -2009-03-12 Frank Warmerdam - - * libtiff/{tif_fax3.c,tif_jpeg.c,tif_ojpeg.c}: Fix printdir chaining - for some codecs (#2020). - -2009-02-12 Frank Warmerdam - - * libtiff/tif_luv.c: Fix handling of tiled logluv images. - http://bugzilla.maptools.org/show_bug.cgi?id=2005 - -2009-02-09 Frank Warmerdam - - * libtiff/tif_dirread.c: Improve allocation safety when allocated - buffer for large tags. (#1998) Related to (#1993) - -2009-02-06 Frank Warmerdam - - * tools/tiffcrop.c: Don't default image->res_unit to INCH. Now the - test suite should pass. - -2009-02-05 Frank Warmerdam - - * libtiff/tif_dirread.c: Re-incorporated a sanity check on tag size, - but at the 2GB boundary to avoid overflow on 32bit systems. - http://bugzilla.maptools.org/show_bug.cgi?id=1993 - - * libtiff/tif_dirread.c: Remove some assertions that blow due to - corrupt files rather than in response to library internal - inconsistencies. - http://bugzilla.maptools.org/show_bug.cgi?id=1995 - http://bugzilla.maptools.org/show_bug.cgi?id=1991 - - * libtiff/tif_dirread.c: Fixed testing for failed result from - TIFFReadDirectoryFindFieldInfo(). - http://bugzilla.maptools.org/show_bug.cgi?id=1992 - -2009-01-23 Frank Warmerdam - - * libtiff/tif_predict.c: Add support for 32bit integer horz. predictors. - http://bugzilla.maptools.org/show_bug.cgi?id=1911 - - * libtiff/tif_dirwrite.c: Fix byte swapping of next directory offset. - - http://bugzilla.maptools.org/show_bug.cgi?id=1924 - - * tools/tiffcrop.c: initialize xres/yres values. - - * test/*.sh - default ${srcdir} to local directory. - - * test/common.sh - start verbose mode after common settings. - - * libtiff/tif_dirinfo.c: Replace lfind() with local equivelent to - avoid type mismatches on different platforms. - http://bugzilla.maptools.org/show_bug.cgi?id=1889 - -2009-01-22 Frank Warmerdam - - * tools/{fax2tiff.c,thumbnail.c,tiff2pdf.c,tiff2ps.c,tiffdump.c, - tiffsplit.c}: avoid warnings, mostly 32bit/64bit casting issues. - - * port,tools: Introduce libport.h, and include in tools if NEED_LIBPORT - defined, primarily to reduce prototype warnings on windows. - - * libtiff/tif_dirinfo.c,tif_dirread.c: Avoid warnings - about unused parameters, and uninitialized variables. - -2009-01-21 Bob Friesenhahn - - * test/common.sh: Execute tests like 'make VERBOSE=TRUE check' in - order to trace full execution detail while executing the test suite. - -2009-01-20 Frank Warmerdam - - * tools/tiffsplit.c: fix sampleformat to be shortv instead of longv. - -2009-01-20 Bob Friesenhahn - - * test/Makefile.am (CLEANFILES): Make sure that test output files - are removed by 'make clean' - - * Update autotools for 4.0.0 beta3 - - * 4.0.0 beta3 produced. - -2009-01-12 Bob Friesenhahn - - * test/tiffcrop.sh: New test script for tiffcrop from Richard - Nolde. - - * tools/tiff2ps.c: Remove spurious message to stderr. - -2009-01-11 Bob Friesenhahn - - * tools/tiff2ps.c: Incorporated significant functionality update - from Richard Nolde. In particular, support for rotating the image - by 90, 180, 270, and 'auto' has been added. - - * man/tiffcrop.1: Incorporated documentation updates from Richard - Nolde. - - * tools/tiffcrop.c: Incorporated significant functionality update - from Richard Nolde. - -2008-12-31 Bob Friesenhahn - - * libtiff/tiffio.h: GCC will now validate format specifications - for TIFFError(), TIFFErrorExt(), TIFFWarning(), and - TIFFWarningExt() in order to reveal bugs. - - * Many fixes throughout to work better as a 64-bit build. - -2008-12-30 Bob Friesenhahn - - * tools/{tiff2pdf.c, tiff2ps.c, tiffinfo.c}: Offset and length - tags now require 64-bit parameter rather than 32-bit. - - * libtiff/tif_dirread.c: Fixed issues with unaligned access to - 64-bit values. - - * tools/thumbnail.c: Eliminate crash noticed while running test - suite. - -2008-12-29 Bob Friesenhahn - - * libtiff/tif_ojpeg.c (OJPEGLibjpegJpegSourceMgrFillInputBuffer): - Initialize stack variables to avoid compiler warning. - - * tools/tiffinfoce.c (main): Use toff_t for offset type when - retrieving offset of EXIF IFD. - - * libtiff/tiffio.h: Undeprecate toff_t and restore its use in the - TIFFClientOpen() callback and other external function definitions. - - * tools/tiffinfo.c (main): Offset to EXIF IFD requires a 64-bit - type now. Fixes crash when dumping files containing an EXIF IFD. - - * m4/libtool.m4: Update to libtool 2.2.6. - -2008-12-21 Frank Warmerdam - - * libtiff/tif_dir.c, tiffio.h: Introduce TIFFUnsetField() function. - - * libtiff/tif_jpeg.c: Avoid errors if the application writes a full - strip for the last partial strip in a jpeg compressed file. - http://bugzilla.maptools.org/show_bug.cgi?id=1981 - -2008-10-29 Frank Warmerdam - - * libtiff/tif_flush.c: Make sure that BEENWRITING is cleared when - we take the shortcut to only update the strip/tile offsets in place. - http://trac.osgeo.org/gdal/ticket/2621 - -2008-10-21 Andrey Kiselev - - * libtiff/tif_jbig.c: Support the JBIG-KIT 2.0 (compatibility with - the older versions retained). - -2008-10-09 Frank Warmerdam - - * libtiff/tif_jpeg.c: Add #ifdefs for changes needed if using - IPP enabled version of libjpeg from Intel. - http://bugzilla.maptools.org/show_bug.cgi?id=1951 - -2008-09-05 Andrey Kiselev - - * tools/tiffsplit.c: Use byte counts of proper size (uint64). - Required for libtiff 4.0. - - * tools/tiffsplit.c: Use dynamically allocated array instead of static - when constructing output file names. - -2008-09-03 Andrey Kiselev - - * tools/tiffsplit.c: Get rid of unsafe strcpy()/strcat() calls when - doing the filename/path construction. - - * tools/tiff2pdf.c: More appropriate format string in - t2p_write_pdf_string(); avoid signed/unsigned mismatch. - - * libtiff/tif_lzw.c: Properly zero out the codetable. As per bug - - http://bugzilla.maptools.org/show_bug.cgi?id=1929 - - * libtiff/tif_lzw.c: Properly zero out the string table. Fixes - CVE-2008-2327 security issue. - -2008-09-01 Frank Warmerdam - - * libtiff/tif_dirread.c: Avoid unused TIFFReadDirEntryFloat() function. - - * libtiff/tif_dirwrite.c: modified to write IFDs as either IFD8 or IFD - depending on whether the file is bigtiff or classic tiff. - http://bugzilla.maptools.org/show_bug.cgi?id=1917 - -2008-08-12 Edward Lam - - * tools/tiffdump.c: When compiling for Microsoft Windows, apply - consistent (__int64) casting when testing if _lseeki64 has - successfully seeked as requested. This is necessary for large - file support to work since off_t is only 32-bit. - -2008-07-29 Frank Warmerdam - - * tif_strip.c: Replace assertions related to samplesperpixel != 3 or - the subsampling values not being 1, 2 or 4 (for jpeg compressed images) - with control logic to return runtime errors (c/o Even Rouault) (#1927). - -2008-06-17 Frank Warmerdam - - * tools/tiffcrop.c: Fix some portability problems. - - * libtiff/tif_ojpeg.c: Use same jpeg/win32 boolean/FAR hacks as are - used in tif_jpeg.c. - - * libtiff/tif_win32.c: Ensure TIFFOpenW() uses same FILE_SHARE flags - as TIFFOpen(). - -2008-06-01 Frank Warmerdam - - * libtiff/tif_dirwrite.c: Fix alignment problems affecting architectures - like Sparc/Solaris. - http://bugzilla.maptools.org/show_bug.cgi?id=1892 - -2008-05-27 Frank Warmerdam - - * libtiff.def: Add TIFFFindField - http://bugzilla.maptools.org/show_bug.cgi?id=1891 - -2008-05-26 Frank Warmerdam - - * tif_config.*.h, tiffconf.*.h: Remove SIZEOF_LONG definition, unused. - - * li2008-04-15 Andrey Kiselev - -btiff/tif_win32.c: Replace custom Win32 memory api with generic - POSIX one. No apparent value to use of GlobalAlloc() in the modern - age. http://bugzilla.maptools.org/show_bug.cgi?id=1885 - - * libtiff/tiffconf.vc.h: Added JBIG_SUPPORT and MDI_SUPPORT items - in windows version (care of Edward Lam). - -2008-05-24 Frank Warmerdam - - * tif_codec.c: Avoid NULL pointer dereferencing for exotic - compression codec codes. - - * tif_dirwrite.c: fix potential memory leak. - - * tif_dirread.c: Fix unchecked malloc result. - -2008-05-24 Bob Friesenhahn - - * test {tiff2pdf.sh tiff2ps-EPS1.sh tiff2ps-PS1.sh tiff2ps-PS2.sh - tiff2ps-PS3.sh tiffcp-g3-1d-fill.sh tiffcp-g3-1d.sh - tiffcp-g3-2d-fill.sh tiffcp-g3-2d.sh tiffcp-g3.sh tiffcp-g4.sh - tiffcp-split-join.sh tiffcp-split.sh tiffcp-thumbnail.sh - tiffdump.sh tiffinfo.sh}: Added more test scripts based on - suggestions from Lee Howard posted to the tiff list on 13 Sep - 2007. - -2008-05-23 Frank Warmerdam - - * libtiff/tif_fax3.c: Add an assert in an effort to detect a - possible runtime problem reported by coverity. - - * contrib/iptcutil/iptcutil.c: Fixed memory leak of str. - - * tools/tiffcrop.c, man/tiffcrop.1: Major update from Richard Nolde. - http://bugzilla.maptools.org/show_bug.cgi?id=1888 - - * tools/tiffdither.c: remove dead onestrip code. avoid memory leak. - - * tools/rgb2ycbcr.c: fix memory leak of raster buffer. - - * tools/tiffcp.c: Simplify inknames code to avoid pointless test. - Cleanup scanline allocation to avoid coverity warning. - - * tools/thumbnail.c: Check for TIFFOpen() failure. - -2008-05-18 Frank Warmerdam - - * libtiff/tif_dirinfo.c: Use TIFF_SETGET_ASCII for PIXAR_TEXTUREFORMAT - and PIXAR_WRAPMODES instead of TIFF_SETGET_UNDEFINED. Not exactly clear - why this is needed. - -2008-05-09 Bob Friesenhahn - - * Makefile.am (ACLOCAL_AMFLAGS): Libtool 2.2.4 does not like - "ACLOCAL_AMFLAGS=-I ./m4". It wants "ACLOCAL_AMFLAGS=-I m4". - -2008-04-15 Andrey Kiselev - - * test/: Test suite updated. Everything is passed now. - - * libtiff/tif_dirinfo.c: Fixed description of the - TIFFTAG_NUMBEROFINKS tag. - -2008-04-14 Andrey Kiselev - - * libtiff/{tif_dirread.c, tif_dirwrite.c, tiffiop.h}: - Get rid of some of "dereferencing type-punned" warnings by converting - tdir_offset field of TIFFDirEntry structure into union. - -2008-04-10 Andrey Kiselev - - * libtiff/{tif_flush.c, tif_dirwrite.c, tiffio.h, tiffiop.h}: - TIFFRewriteField() renamed into _TIFFRewriteField() and moved out - from the public interface. Type of its 'count' parameter changed - from uint32 to tmsize_t. - - * /libtiff/tiffiop.h: Make tif_nfields and tif_nfieldscompat fields - of the tiff structure have the size_t type instead of uint32. - -2008-04-09 Andrey Kiselev - - * tools/tiffdump.c: Added support for MSVS 6.0. - - * libtiff/tif_dirread.c: Use custom functions _TIFFUInt64ToFloat() - and _TIFFUInt64ToDouble() to convert 64-bit integers into floating - point values on MSVS 6.0 platform. - -2008-03-14 Frank Warmerdam - - * tif_dirread.c: Removed sanity checks on tags larger than 4MB in - TIFFReadDirEntryArray() since they are interfering with seemingly - legitimate files. http://trac.osgeo.org/gdal/ticket/2005 - -2008-02-09 Joris Van Damme - - * tif_dirread.c: Added handling for the case of number of values for - PageNumber tag different from 2 (previously resulted in an assert - indicating lack of handling and was forgotten about) - -2008-02-01 Frank Warmerdam - - * libtiff/tif_jpeg.c: Do not try to fixup subsampling tags based on - the actual jpeg data stream if the first strip/tile has zero size. - This is the case when GDAL creates a new file with zero sizes, closes - and reopens it. - -2008-01-07 Frank Warmerdam - - * tools/tiff2ps.c: fix up 64bit issues (from Edward Lam). - -2008-01-01 Frank Warmerdam - - * libtiff/tif_dirwrite.c: #ifdef out lots of unused functions. - - * Makefile.vc, libtiff/Makefile.vc, tools/Makefile.vc: Improve clean - targets. - - * tools/tiffinfo.c, tools/tiffcmp.c, tools/gif2tiff.c, tools/bmp2tiff.c - tools/tiff2pdf.c: Fix 64-bit warnings when compiling under MSVC 2005 - (x64). - - * tools/tiffset.c: Changes to reflect the fact that TIFFFieldWithTag() - and TIFFFieldWithName() now return TIFFField pointers instead of - TIFFFieldInfo pointers. - - * tools/tiffdump.c: Added ssize_t typedef on Windows since it doesn't - exist. This makes it compile again on Windows - - * tif_aux.c, tif_getimage.c, tif_next.c, tif_predict.c, tif_win32.c, - tiffconf.vc.h: Various 64bit fixes from Edward Lam identified on win64. - - * test/rewrite_tag.c: New test for TIFFRewriteField(). - -2007-12-31 Frank Warmerdam - - * tif_dirwrite.c: Added TIFFRewriteField(). This new function - rewrites one field "on disk" updating an existing directory - entry. Lots of limitations still... - - * tiffiop.h, tif_write.c, tif_dirread.c, tif_flush.c: Keep track of - TIFF_DIRTYSTRIP separately from TIFF_DIRTYDIRECT to indicate that - the strip offset/size values are dirty but nothing else about the - directory is dirty. In flush handle "just stripmaps dirty" as a - special case that just rewrites these values without otherwise - modifying the directory on disk using TIFFRewriteField(). - - We also modify logic so that in update mode the directory is not - marked dirty on read, but only when something is changed. This - means we need to keep track of updates to the stripmap stuff in - TIFFAppendToStrip(). - -2007-12-10 Frank Warmerdam - - * tif_jpeg.c: Improve ability to switch between encoding and decoding - in the jpeg code (gdal bug #2033). - -2007-11-23 Frank Warmerdam - - * tif_dir.c, tif_dirread.c, tif_dirwrite.c, tif_read.c, tif_write.c, - tiffiop.h: Added TIFF_BUF4WRITE flag to indicate if contents of the - rawcp/rawcc buffer are for writing and thus may require flushing. - Necessary to distinguish whether they need to be written to disk when - in mixed read/write mode and doing a mixture of writing followed by - reading. http://trac.osgeo.org/gdal/ticket/1758 - -2007-11-23 Andrey Kiselev - - * configure.com, libtiff/tif_vms.c: Better OpenVMS support. Patches - from Alexey Chupahin. - -2007-11-02 Frank Warmerdam - - * tif_write.c: Rip out the fancy logic in TIFFAppendToStrip() for - establishing if an existing tile can be rewritten to the same location - by comparing the current size to all the other blocks in the same - directory. This is dangerous in many situations and can easily - corrupt a file. (observed in esoteric GDAL situation that's hard to - document). This change involves leaving the stripbytecount[] values - unaltered till TIFFAppendToStrip(). Now we only write a block back - to the same location it used to be at if the new data is the same - size or smaller - otherwise we move it to the end of file. - - * tif_dirwrite.c: Try to avoid writing out a full readbuffer of tile - data when writing the directory just because we have BEENWRITING at - some point in the past. This was causing odd junk to be written out - in a tile of data when a single tile had an interleaving of reading - and writing with reading last. (highlighted by gdal - autotest/gcore/tif_write.py test 7. - - * tif_predict.c: use working buffer in PredictorEncodeTile to avoid - modifying callers buffer. - http://trac.osgeo.org/gdal/ticket/1965 - - * tif_predict.c/h: more fixes related to last item, keeping a - distinct pfunc for encode and decode cases as these were getting - mixed up sometimes. - http://trac.osgeo.org/gdal/ticket/1948 - -2007-11-01 Frank Warmerdam - - * tif_predict.c/h, tif_lzw.c, tif_zip.c: Improvements so that - predictor based encoding and decoding works in read-write update - mode properly. - http://trac.osgeo.org/gdal/ticket/1948 - -2007-10-24 Joris Van Damme - - * tif_dirread.c: Fixed problem with bogus file triggering - assert(td->td_planarconfig == PLANARCONFIG_CONTIG) in - ChopUpSingleUncompressedStrip - -2007-10-22 Joris Van Damme - - * tif_jpeg.c: Resolved buffer incrementation bug that lead to faulty images - at best, access violation at worst, when subsampled JPEG compressed imagery - is decoded without the JPEG_COLORMODE feature - -2007-10-11 Frank Warmerdam - - * html/index.html: Update "people responsible" section. - -2007-10-05 Frank Warmerdam - - * tools/tiff2pdf.c: Fix problem with alpha setting in some cases - as reported on the mailing list. - -2007-10-01 Joris Van Damme - - * changed some more incorrect %lud printf flags to %lu - -2007-09-29 Joris Van Damme - - * tif_dirread.c: Strip chopping interfered badly with uncompressed - subsampled images because it tried to divide subsampled rowblocks, - leading to all sorts of errors throughout the library for these - images. Fixed by making strip chopping divide in row counts that - are a multiple of vertical subsampling value. - -2007-09-28 Joris Van Damme - - * tif_dirread.c: Logical cast working around compiler warning - - * tif_read.c: Correction of some error flags and parameter lists - -2007-09-27 Joris Van Damme - - * tif_dirread.c: Made calculation of td_maxsamplevalue more robust - when dealing with large bitspersample values, shutting up purification - tools that warn about truncation, though it remains incorrect and - indicates a conceptual problem there. - - * tif_open.c: Moved early exit in case of 'h' flag (to disable reading - of first IFD) to proper place because it badly interfered with memory - mapping, resulting in mapping flag even with dummy mapping functions - that returned 0 whilst at the same time the mapping tif_size wasn't - set, thus resulting in continuous incorrect beyond-eof errors. - -2007-09-24 Joris Van Damme - - * tif_dirinfo.c: Fixed (MSVC) compiler reports about - inconsistent use of const in tiffFields and exifFields definition - -2007-09-20 Frank Warmerdam - - * tif_dirwrite.c: Always write tile/strip offsets and sizes - using LONG8 type when output format is BigTIFF. The - TIFFWriteDirectoryTagLongLong8Array() function was restructured - accordingly. - - * tif_dirread.c: Improvements to error reporting text in - TIFFFetchDirectory(). - -2007-09-19 Bob Friesenhahn - - * test/images: Added a small collection of test images for use by - test programs and scripts. - * test/tiffinfo.sh: A trivial example test script. - * test/common.sh: Added small script for setting the environment - used by script-based tests. - -2007-08-24 Frank Warmerdam - - * tif_dirwrite.c: Write the tif_nextdiroff value instead of a fixed - zero when writing directory contents to preserve the ability to - rewrite directories in place, even in the middle of a directory - chain. - - * tif_dirinfo.c: _TIFFMergeFields() now only merges in field - definitions that are missing. Existing definitions are silently - ignored. - - * tif_dirread.c: Add runtime error for fields for which no definition - is found (in addition to an assert for developers) in - TIFFFetchNormalTag(). Not sure if this is needed, but it seems - prudent. - -2007-08-10 Joris Van Damme - - * libtiff/tif_getimage.c: removed SubsamplingHor and SubsamplingVer - from _TIFFRGBAImage structure to revert unwanted ABI change. - -2007-08-10 Joris Van Damme - - * libtiff/tif_win32.c: use SetFilePointer instead of - SetFilePointerEx, as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1580 - -2007-07-19 Andrey Kiselev - - * libtiff/tif_stream.cxx: Put all callback functions declarations - inside extern "C" block. - - * libtiff/{tif_lzw.c, tif_luv.c, tif_dumpmode.c, tif_print.c, - tif_read.c, tif_strip.c, tif_thunder.c}: Use "%I64d" printf() - formatter instead of "%lld" with MSVC compiler. - - * libtiff/{tiffiop.h, tif_aux.c}: Added _TIFFUInt64ToFloat() and - _TIFFUInt64ToDouble() functions. - -2007-07-18 Andrey Kiselev - - * libtiff/tif_dirread.c: Handle the case of MSVC 6 when using 64-bit - integer constants. - - * libtiff/{Makefile.am, Makefile.v}: Do not distribute tiffconf.h, - remove tif_config.h/tiffconf.h during cleaning. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1573 - - * libtiff/tif_unix.c: Do not use O_LARGEFILE. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1577 - -2007-07-13 Andrey Kiselev - - * libtiff 4.0.0alpha released. - -2007-07-12 Andrey Kiselev - - * tools/tiff2pdf.c: Added missed extern optind as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1567 - - * libtiff/{tif_close.c, tif_dirinfo.c, tiffiop.c, tif_dirread.c, - tif_dir.h, tif_dir.c, tiffio.h}: Transition to the new-style tag - extending scheme completed. - -2007-07-11 Bob Friesenhahn - - * libtiff/tif_stream.cxx: Adapt to use toff_t again. Update to - use standard C++ library size types and attempt to detect overflow - cases. - -2007-07-08 Andrey Kiselev - - * libtiff/{tif_jpeg.c, tif_dir.h, tif_dir.c, tif_dirinfo.c, tiffio.h, - tif_ojpeg.c, tif_print.c, tif_fax3.c, tif_dirread.c}: More work on new - tag extending scheme. Use the new scheme everywhere. - - * libtiff/{tif_zip.c, tif_predict.c, tif_pixarlog.c, tif_luv.c, - tif_fax3.c, tif_dirread.c, tif_dirwrite.c, tif_close.c, tif_ojpeg.c, - tif_jpeg.c, tif_dirinfo.c, tif_dir.h, tiffio.h, tiffiop.h}: - TIFFFIeldInfo structure replaced with TIFFField structure. - TIFFFieldInfo retained for the backward compatibility. - -2007-07-05 Bob Friesenhahn - - * tools/tiff2pdf.c: Fix a compile problem when JPEG_SUPPORT is not - defined. - -2007-07-04 Andrey Kiselev - - * libtiff/{tif_dir.c, tiff.h, tiffio.h, libtiff.def}: Unused - TIFFReassignTagToIgnore() function and TIFFIgnoreSense enumeration - removed. - - * libtiff/{tif_dirinfo.c, tif_fax3.c, tif_jbig.c, tif_jpeg.c}: Move - tags TIFFTAG_FAXRECVPARAMS, TIFFTAG_FAXSUBADDRESS, - TIFFTAG_FAXRECVTIME and TIFFTAG_FAXDCS to the common tag directory. - These tags are not codec-specific and relate to image content, so - process them as other normal tags. - - * libtiff/{tiffio.h, tif_dir.h}: TIFFTagValue structure moved from the - public tiffio.h to private tif_dir.h. - - * contrib/{acorn, mac-cw, mac-mpw}: Removed as unmaintained and - outdated. - -2007-07-03 Andrey Kiselev - - * libtiff{tif_acorn.c, tif_apple.c, tif_atari.c, tif_msdos.c, - tif_win3.c}: Obsoleted portability stuff removed. - - * tools/tiff2ps.c: Added support 16-bit images as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1566 - - Patch from William Bader. - - * tools/tiff2pdf.c: Fix for TIFFTAG_JPEGTABLES tag fetching and - significant upgrade of the whole utility as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1560 - - Now we don't need tiffiop.h in tiff2pdf anymore and will open output - PDF file using TIFFClientOpen() machinery as it is implemented - by Leon Bottou. - -2007-06-26 Bob Friesenhahn - - * configure.ac: Fix typo when substituting value for unsigned 8 bit type. - Added support for a TIFF_PTRDIFF_T type to use when doing pointer arithmetic. - Added support for a TIFF_SSIZE_T in order to return memory sizes but still - allow returning -1 for errors. - * libtiff/tiffconf.vc.h: Add porting type defintions for WIN32. - -2007-06-25 Bob Friesenhahn - - * port/strtoull.c: New porting function in case strtoull() is not - available on the target system. - * configure.ac: Add configure support for determining sized types - in a portable way and performing necessary substitutions in - tif_config.h and tiffconf.h. Updated tiff.h to use the new - definitions. - -2007-04-27 Andrey Kiselev - - * tools/tiff2pdf.c: Check the tmpfile() return status as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=154 - -2007-04-07 Andrey Kiselev - - * libtiff/{tif_dir.h, tif_dirread.c, tif_dirinfo.c, tif_jpeg.c, - tif_fax3.c, tif_jbig.c, tif_luv.c, tif_ojpeg.c, tif_pixarlog.c, - tif_predict.c, tif_zip.c}: Finally fix bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1274 - - by introducing _TIFFMergeFieldInfo() returning integer error status - instead of void in case of problems with field merging (e.g., if the - field with such a tag already registered). TIFFMergeFieldInfo() in - public API remains void. Use _TIFFMergeFieldInfo() everywhere and - check returned value. - -2007-04-07 Frank Warmerdam - - * contrib/addtiffo/tif_overview.c: Fix problems with odd sized output - blocks in TIFF_DownSample_Subsampled() (bug 1542). - -2007-04-06 Frank Warmerdam - - * libtiff/tif_jpeg.c: Changed JPEGInitializeLibJPEG() so that it - will convert from decompressor to compressor or compress to decompress - if required by the force arguments. This works around a problem in - where the JPEGFixupTestSubsampling() may cause a decompressor to - be setup on a directory when later a compressor is required with the - force flag set. Occurs with the addtiffo program for instance. - -2007-04-06 Andrey Kiselev - - * tools/tiffcrop.c, man/tiffcrop.1: Significant update in - functionality from Richard Nolde. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1525 - -2007-03-28 Frank Warmerdam - - * libtiff/tif_fax3.c: "inline static" -> "static inline" for IRIC CC. - -2007-03-17 Joris Van Damme - - * start of BigTIFF upgrade - CVS HEAD unstable until further notice - -2007-03-07 Joris Van Damme - - * libtiff/tif_getimage.c: workaround for 'Fractional scanline' error reading - OJPEG images with rowsperstrip that is not a multiple of vertical subsampling - factor. This bug is mentioned in: - http://bugzilla.remotesensing.org/show_bug.cgi?id=1390 - http://www.asmail.be/msg0054766825.html - -2007-03-07 Joris Van Damme - - * libtiff/tif_win32.c: made inclusion of windows.h unconditional - - * libtiff/tif_win32.c: replaced preprocessor indication for consiously - unused arguments by standard C indication for the same - -2007-02-27 Andrey Kiselev - - * libtiff/tif_dirread.c: Use uint32 type instead of tsize_t in byte - counters in TIFFFetchData(). Should finally fix the issue - - http://bugzilla.remotesensing.org/show_bug.cgi?id=890 - -2007-02-24 Andrey Kiselev - - * tools/tiffset.c: Properly handle tags with TIFF_VARIABLE writecount. - As per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1350 - - * libtiff/tif_dirread.c: Added special function to handle - SubjectDistance EXIF tag as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1362 - - * tools/tiff2pdf.c: Do not assume inches when the resolution units - do not specified. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1366 - - * tools/{tiffcp.c, tiffcrop.c}: Do not change RowsPerStrip value if - it was set as infinite. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1368 - - * tools/tiffcrop.c, man/tiffcrop.1: New tiffcrop utility contributed - by Richard Nolde. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1383 - -2007-02-22 Andrey Kiselev - - * libtiff/tif_dir.c: Workaround for incorrect TIFFs with - ExtraSamples == 999 produced by Corel Draw. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1490 - - * libtiff/{tif_dirread.c, tif_read.c}: Type of the byte counters - changed from tsize_t to uint32 to be able to work with data arrays - larger than 2GB. Fixes bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=890 - - Idea submitted by Matt Hancher. - -2007-01-31 Andrey Kiselev - - * tools/tif2rgba.c: This utility does not work properly on big-endian - architectures. It was fixed including the bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1149 - -2007-01-15 Mateusz Loskot - - * Submitted libtiff port for Windows CE platform - * libtiff/tif_config.wince.h: Added configuration header for WinCE. - * libtiff/tiffconf.wince.h: Ported old configuration header for WinCE. - * libtiff/tif_wince.c: Added WinCE-specific implementation of some - functons from tif_win32.c. - * libtiff/tif_win32.c: Disabled some functions already reimplemented in tif_wince.c. - * libtiff/tiffiop.h, port/lfind.c: Added conditional include of some - standard header files for Windows CE build. - * tools/tiffinfoce.c: Ported tiffinfo utility for Windows CE. - -2006-11-19 Frank Warmerdam - - * libtiff/tif_write.c: TIFFAppendToStrip() - clear sorted flag if - we move a strip. - http://bugzilla.remotesensing.org/show_bug.cgi?id=1359 - -2006-10-13 Andrey Kiselev - - * libtiff/tif_dir.c: More fixes for vulnerabilities, reported - in Gentoo bug (): - - http://bugs.gentoo.org/show_bug.cgi?id=142383 - - * libtiff/contrib/dbs/xtiff/xtiff.c: Make xtiff utility compilable. - Though it is still far from the state of being working and useful. - -2006-10-12 Andrey Kiselev - - * libtiff/tif_fax3.c: Save the state of printdir codec dependent - method. - - * libtiff/tif_jpeg.c: Save the state of printdir codec dependent method - as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1273 - - * libtiff/tif_win32.c: Fixed problem with offset value manipulation - as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1322 - - * libtiff/{tif_read.c, tif_jpeg.c, tif_dir.c}: More fixes for - vulnerabilities, reported in Gentoo bug (): - - http://bugs.gentoo.org/show_bug.cgi?id=142383 - -2006-09-28 Andrey Kiselev - - * libtiff/{tif_fax3.c, tif_next.c, tif_pixarlog.c}: Fixed multiple - vulnerabilities, as per Gentoo bug (): - - http://bugs.gentoo.org/show_bug.cgi?id=142383 - -2006-09-27 Frank Warmerdam - - * libtiff/tif_lzw.c, libtiff/tif_zip.c: Fixed problems with mixing - encoding and decoding on the same read-write TIFF handle. The LZW - code can now maintain encode and decode state at the same time. The - ZIP code will switch back and forth as needed. - http://bugzilla.remotesensing.org/show_bug.cgi?id=757 - -2006-09-20 Frank Warmerdam - - * libtiff: Rename config.h.vc and tif_config.h.vc to config.vc.h and - tif_config.vc.h for easier identification by folks using an IDE. - -2006-07-25 Frank Warmerdam - - * tif_msdos.c: Avoid handle leak for failed opens. c/o Thierry Pierron - -2006-07-19 Frank Warmerdam - - * tif_dirwrite.c: take care not to flush out buffer of strip/tile - data in _TIFFWriteDirectory if TIFF_BEENWRITING not set. Relates - to bug report by Peng Gao with black strip at bottom of images. - -2006-07-12 Frank Warmerdam - - * tif_dirwrite.c: make sure to use uint32 for wordcount in - TIFFWriteNormanTag if writecount is VARIABLE2 for ASCII fields. - It already seems to have been done for other field types. Needed - for "tiffset" on files with geotiff ascii text. - -2006-07-04 Bob Friesenhahn - - * {configure.ac, libtiff/tif_config.h.vc, libtiff/tif_jbig.c} - (JBIGDecode): jbg_newlen is not available in older JBIG-KIT and - its use does not appear to be required, so use it only when it is - available. - -2006-06-24 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Added missed EXIF tag ColorSpace (40961). - - * libtiff/tif_dirread.c: Move IFD fetching code in the separate - function TIFFFetchDirectory() avoiding code duplication in - TIFFReadDirectory() and TIFFReadCustomDirectory(). - -2006-06-19 Frank Warmerdam - - * tools/tiff2pdf.c: Fix handling of -q values. - http://bugzilla.remotesensing.org/show_bug.cgi?id=587 - -2006-06-17 Frank Warmerdam - - * tif_readdir.c: Added case in EstimateStripByteCounts() for tiled - files. Modified TIFFReadDirectory() to not invoke - EstimateStripByteCounts() for case where entry 0 and 1 are unequal - but one of them is zero. - http://bugzilla.remotesensing.org/show_bug.cgi?id=1204 - -2006-06-08 Andrey Kiselev - - * libtiff/{tif_open.c, tif_dirread.c, tiffiop.h}: Move IFD looping - checking code in the separate function TIFFCheckDirOffset(). - - * libtiff/tif_aux.c: Added _TIFFCheckRealloc() function. - - * tools/tiffcmp.c: Fixed floating point comparison logic as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1191 - - * libtiff/tif_fax3.c: Fixed problems in fax decoder as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1194 - - * tools/tiff2pdf.c: Fixed buffer overflow condition in - t2p_write_pdf_string() as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1196 - -2006-06-07 Andrey Kiselev - - * {configure, configure.ac, libtiff/tif_jbig.c, tools/tiffcp.c}: Added - support for JBIG compression scheme (34661 code) contributed by Lee - Howard. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=896 - - * configure, configure.ac: OJPEG support enabled by default. - - * contrib/ojpeg/: Removed. New OJPEG support does not need this patch. - -2006-06-03 Bob Friesenhahn - - * libtiff/{tif_dirinfo.c, tif_print.c} : Fix crash in - TIFFPrintDirectory(). Joris Van Damme authored the fix. - -2006-04-21 Andrey Kiselev - - * tools/tiff2pdf.c: Unified line ending characters (always use '\n') - as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1163 - - * README.vms, Makefile.am, configure.com, libtiff/{Makefile.am, - tif_config.h-vms, tif_stream.cxx, tif_vms.c, tiffconf.h-vms}: - Added support for OpenVMS by Alexey Chupahin, elvis_75@mail.ru. - -2006-04-20 Andrey Kiselev - - * tools/{fax2ps.c, fax2tiff.c, ppm2tiff.c, ras2tiff.c, tiff2pdf.c}: - Properly set the binary mode for stdin stream as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1141 - - * man/{bmp2tiff.1, fax2ps.1, fax2tiff.1, gif2tiff.1, ras2tiff.1, - raw2tiff.1, rgb2ycbcr.1, sgi2tiff.1, tiff2bw.1, tiff2pdf.1, tiff2ps.1, - tiff2rgba.1, tiffcmp.1, tiffcp.1, tiffdither.1, tiffdump.1, tiffgt.1, - tiffset.1}: Improvements in page formatting as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1140 - - * html/tools.html, html/man/Makefile.am, tools/tiff2pdf.c: Fixed - typos as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1139 - -2006-04-18 Frank Warmerdam - - * nmake.opt: use /EHsc for VS2005 compatibility. Also define - _CRT_SECURE_NO_DEPRECATE to avoid noise on VS2005. - -2006-04-12 Joris Van Damme - - * libtiff/tif_getimage.c: Added support for planarconfig separate - non-subsampled YCbCr (i.e. separate YCbCr with subsampling [1,1]) - -2006-04-11 Joris Van Damme - - * libtiff/tif_getimage.c: Revision of all RGB(A) put routines - - Conversion of unassociated alpha to associated alpha now done with - more performant LUT, and calculation more correct - - Conversion of 16bit data to 8bit data now done with - more performant LUT, and calculation more correct - - Bugfix of handling of 16bit RGB with unassociated alpha - -2006-04-11 Joris Van Damme - - * libtiff/tif_getimage.c: - - When there is no alpha, gtTileSeparate and gtStripSeparate allocated - buffer for alpha strile and filled it, only to never read it back. - Removed allocation and fill. - - Minor rename of vars in gtTileSeparate and gtStripSeparate - anticipating planned functionality extension - -2006-04-08 Joris Van Damme - - * libtiff/tif_getimage.c: renamed pickTileContigCase to PickContigCase - and pickTileSeparateCase to PickSeparateCase as both work on strips as - well - - * libtiff/tif_getimage.c: moved img->get selection from - TIFFRGBAImageBegin into PickContigCase and PickSeparateCase to create - logical hook for planned functionality extension - -2006-04-08 Joris Van Damme - - * libtiff/tif_ojpeg.c: resolved memory leak that was a consequence - of inappropriate use of jpeg_abort instead of jpeg_destroy - -2006-04-07 Joris Van Damme - - * libtiff/tif_getimage.c: replaced usage of TIFFScanlineSize in - gtStripContig with TIFFNewScanlineSize so as to fix buggy behaviour - on subsampled images - this ought to get sorted when we feel brave - enough to replace TIFFScanlineSize alltogether - - * libtiff/tif_ojpeg.c: fixed bug in OJPEGReadSkip - -2006-04-04 Joris Van Damme - - * libtiff/tiffio.h: added new type tstrile_t - - * libtiff/tif_dir.h: changed types of td_stripsperimage and td_nstrips - to new tstrile_t, types of td_stripoffset and td_stripbytecount to - toff_t* - - * libtiff/tif_ojpeg.c: totally new implementation - - * libtiff/tif_dirread.c: added several hacks to suit new support of - OJPEG - - * libtiff/tif_getimage.c: removed TIFFTAG_JPEGCOLORMODE handling - of OJPEG images in favor of tif_getimage.c native handling of - YCbCr and desubsampling - -2006-03-29 Frank Warmerdam - - * libtiff/tif_jpeg.c: JPEGVSetField() so that altering the photometric - interpretation causes the "upsampled" flag to be recomputed. Fixes - peculiar bug where photometric flag had to be set before jpegcolormode - flag. - -2006-03-25 Joris Van Damme - - * libtiff/tif_jpeg.c: strip size related bugfix in encode raw - - * libtiff/tif_strip.c: temporarilly added two new versions of - TIFFScanlineSize - - TIFFNewScanlineSize: proposed new version, after all related - issues and side-effects are sorted out - - TIFFOldScanlineSize: old version, from prior to 2006-03-21 change - This needs further sorting out. - -2006-03-25 Joris Van Damme - - * contrib/addtiffo/tif_ovrcache.c: bugfix to correctly pass size - of last truncated strip data to TIFFWriteEncodedStrip - -2006-03-25 Joris Van Damme - - * libtiff/{tif_jpeg.c, tif_strip.c}: bugfix of tif_jpeg decode raw - -2006-03-25 Joris Van Damme - - * libtiff/tif_getimage.c: bugfix/rewrite of putcontig8bitYCbCr22tile - - * libtiff/tif_getimage.c: added putcontig8bitYCbCr12tile - - * libtiff/tif_read.c: added support for new TIFF_NOREADRAW flag to - prepare the path for new tif_ojpeg.c - -2006-03-23 Andrey Kiselev - - * libtiff 3.8.2 released. - - * tools/Makefile.am: Use runtime paths linker flags when rpath - option enabled. - -2006-03-21 Andrey Kiselev - - * libtiff/libtiff.def: Added missed exports as per bug - http://bugzilla.remotesensing.org/attachment.cgi?id=337 - - * contrib/addtiffo/Makefile.vc, libtiff/Makefile.vc, port/Makefile.vc, - tools/Makefile.vc: Makefiles improvements as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1128 - - * nmake.opt libtiff/{tif_config.h.vc, tif_unix.c, tiffio.h}, - tools/{fax2ps.c, fax2tiff.c, tiff2pdf.c}: Fixed win32 I/O functions - usage as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1127 - - * libtiff/tif_strip.c: Take subsampling in account when calculating - TIFFScanlineSize(). - - * tools/tiffcp.c: Do not set RowsPerStrip bigger than image length. - -2006-03-17 Andrey Kiselev - - * tools/fax2tiff.c: Fixed wrong TIFFerror() invocations as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1125 - - * tools/fax2ps.c: Fixed reading the input stream from stdin as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1124 - -2006-03-16 Andrey Kiselev - - * libtiff/tiffiop.h: Added decalration for - _TIFFSetDefaultCompressionState(). - - * libtiff/{tif_jpeg.c, tif_fax3.c, tif_zip.c, tif_pixarlog.c, - tif_lzw.c, tif_luv.c}: Use _TIFFSetDefaultCompressionState() in all - codec cleanup methods. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1120 - -2006-03-15 Andrey Kiselev - - * libtiff/tif_jpeg.c: Do not cleanup codec state in TIFFInitJPEG(). As - per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1119 - - * tools/raw2tiff.c: Do not set RowsPerStrip larger than ImageLength. - As per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1110 - - * libtiff/tiffiop.h: dblparam_t typedef removed; GLOBALDATA macro - removed; move here the STRIP_SIZE_DEFAULT macro definition. - - * libtiff/{tif_dirread.c, tif_strip.c}: Removed STRIP_SIZE_DEFAULT - macro definition. - - * libtiff/tif_dir.c: Use double type instead of dblparam_t. - -2006-03-14 Andrey Kiselev - - * libtiff/tif_dirread.c: Do not check the PlanarConfig tag presence - in TIFFReadDirectory, because it is always set at the start of - function and we allow TIFFs without that tag set. - -2005-03-13 Andrey Kiselev - - * libtiff 3.8.1 released. - -2006-03-07 Andrey Kiselev - - * libtiff/tif_dirread.c: Fixed error reporting in TIFFFetchAnyArray() - function as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 - - * libtiff/tif_dirread.c: More wise check for integer overflow - condition as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 - - * libtiff/{tif_jpeg.c, tif_pixarlog.c, tif_fax3.c, tif_zip.c}: - Properly restore setfield/getfield methods in cleanup functions. As - per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 - -2006-03-03 Andrey Kiselev - - * libtiff/{tif_predict.c, tif_predict.h}: Added new function - TIFFPredictorCleanup() to restore parent decode/encode/field methods. - - * libtiff/{tif_lzw.c, tif_pixarlog.c, tif_zip.c}: Use - TIFFPredictorCleanup() in codec cleanup methods. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 - - * libtiff/tif_dirread.c: Fixed integer overflow condition in - TIFFFetchData() function. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 - -2006-03-01 Andrey Kiselev - - * libtiff/tif_ojpeg.c: Set the ReferenceBlackWhite with the - TIFFSetField() method, not directly. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1043 - - * tools/ppm2tiff.c: Added support for PBM files as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1044 - -2006-02-27 Andrey Kiselev - - * libtiff/tif_write.c: Small code rearrangement in TIFFWriteScanline() - to avoid crash as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1081. - -2006-02-26 Andrey Kiselev - - * tools/tiff2pdf.c: Functions t2p_sample_rgbaa_to_rgb() and - t2p_sample_rgba_to_rgb() was used in place of each other, that was - resulted in problems with RGBA images with associated alpha. - As per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1097 - -2006-02-23 Andrey Kiselev - - * libtiff/tif_dirwrite.c: Properly write TIFFTAG_DOTRANGE tag as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1088. - - * libtiff/tif_print.c: Properly read TIFFTAG_PAGENUMBER, - TIFFTAG_HALFTONEHINTS, TIFFTAG_YCBCRSUBSAMPLING and TIFFTAG_DOTRANGE - tags as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1088. - - * tools/tiff2ps.c: Properly scale all the pages when converting - multipage TIFF with /width/height/center options set. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1080 - -2006-02-15 Andrey Kiselev - - * tools/tiff2pdf.c: Do not create output file until all option checks - will be done. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1072 - - * tools/bmp2tiff.c: Added ability to create multipage TIFFs from the - list of input files as per bug: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1077 - -2006-02-09 Andrey Kiselev - - * libtiff/tif_tile.c: Fix error reporting in TIFFCheckTile() as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1063. - - * tools/tiffgt.c: Avoid crashing in case of image unsupported by - TIFFRGBAImage interface. - - * libtiff/tif_color.c: Avoid overflow in case of wrong input as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1065. - -2006-02-07 Frank Warmerdam - - * tools/tiff2pdf.c: Fixed support for non-YCbCr encoded JPEG - compressed TIFF files, per submission from Dan Cobra. - -2006-02-07 Andrey Kiselev - - * libtiff/{tif_dirread.c, tif_packbits.c, tif_win32.c}: Properly - cast values to avoid warnings. As per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1033. - - * libtiff/tif_dirinfo.c: Use TIFF_NOTYPE instead of 0 when - appropriate. As per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1033. - - * libtiff/tif_aux.c: Fixed type of temporary variable in - _TIFFCheckMalloc() as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=1033. - -2006-02-06 Andrey Kiselev - - * libtiff/tif_aux.c: Return static array when fetching default - YCbCrCoefficients (another problem, reported a the - http://bugzilla.remotesensing.org/show_bug.cgi?id=1029 entry). - -2006-02-03 Andrey Kiselev - - * libtiff/tif_dir.c: Special handling for PageNumber, HalftoneHints, - YCbCrSubsampling and DotRange tags as per bugs - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1029 - http://bugzilla.remotesensing.org/show_bug.cgi?id=1034 - - * libtiff/tif_dirread.c: Use _TIFFGetExifFieldInfo() instead of - _TIFFGetFieldInfo() in TIFFReadEXIFDirectory() call as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1026. - -2006-01-23 Andrey Kiselev - - * libtool related stuff updated from the 2.1a branch. - -2006-01-11 Frank Warmerdam - - * tools/bmp2tiff,pal2rgb,ppm2tiff,ras2tiff,raw2tiff,sgi2tiff, - tiff2bw,tiffcp: Fixed jpeg option processing so -c jpeg:r:50 works - properly as per bug: - http://bugzilla.remotesensing.org/show_bug.cgi?id=1025 - -2006-01-09 Bob Friesenhahn - - * configure.ac: Fix with_default_strip_size comparison as reported - by Norihiko Murase. - -2006-01-08 Bob Friesenhahn - - * test/Makefile.am (LIBTIFF): Due to linking against libtiff - incorrectly, tests were not actually testing the uninstalled - libtiff. Now they are. - -2006-01-04 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Change definitions for TIFFTAG_ICCPROFILE, - TIFFTAG_PHOTOSHOP, TIFFTAG_RICHTIFFIPTC, TIFFTAG_XMLPACKET: readcount - should be uint32 value. - -2006-01-02 Bob Friesenhahn - - * html/man/Makefile.am (htmldoc): Fix htmldoc rule so that it can - be used if build directory is not the same as source directory. - * man/{TIFFGetField.3tiff, TIFFSetField.3tiff}: Documented - TIFFTAG_PHOTOSHOP, TIFFTAG_RICHTIFFIPTC, and TIFFTAG_XMLPACKET, - and re-sorted tag names in alphabetical order. - -2005-12-29 Andrey Kiselev - - * libtiff 3.8.0 released. - -2005-12-28 Bob Friesenhahn - - * tools/bmp2tiff.c (main): Fixed warning regarding returning - inconsistent types from a condition. - * tools/tiffcmp.c (CheckLongTag): Eliminate warning due to printf - format. - * tools/bmp2tiff.c: Reduce compilation warnings on big-endian CPUs. - -2005-12-28 Joris Van Damme - - * html/{index.html, support.hml, libtiff.html}: Cleaned up HTML - -2005-12-27 Andrey Kiselev - - * libtiff/tiffio.h: Added VC_EXTRALEAN definition before including - windows.h, to reduce the compile time. - -2005-12-26 Bob Friesenhahn - - * libtiff/tif_jpeg.c: Improve compilation under MinGW. - -2005-12-26 Andrey Kiselev - - * libtiff/{tif_dir.c, tif_dir.h, tif_dirread.c, tif_dirinfo.c}: - tiffFieldInfo and exifFieldInfo arrays definitions moved back to - tif_dirinfo.c; added _TIFFGetFieldInfo() and _TIFFGetExifFieldInfo() - private functions to retrieve FieldInfo arrays. - -2005-12-24 Bob Friesenhahn - - * html/build.html: Added some additional instructions for when - building using MSVC under Windows. Also fixed two HTML syntax - errors and used HTML Tidy to tidy up the HTML syntax and - formatting. - -2005-12-24 Andrey Kiselev - - * libtiff/{tif_aux.c, tif_dir.c, tif_dir.h, tif_dirwrite.c, - tif_print.c, tif_getimage.c}: Make InkSet, NumberOfInks, DotRange and - StoNits tags custom. - -2005-12-23 Andrey Kiselev - - * libtiff/{tif_aux.c, tif_dir.c, tif_dir.h, tif_print.c}: Make - WhitePoint tag custom. - - * libtiff/{tif_dir.h, tiff.h}: More EXIF tags added. - -2005-12-23 Joris Van Damme - - * libtiff/tiffio.h: fixed typo that potentially resulted in - redefininition of USE_WIN32_FILEIO - - * libtiff/*: Added more 'dual-mode' error handling: Done TIFFWarning - calls in core LibTiff. - -2005-12-21 Andrey Kiselev - - * libtiff/{tif_dir.c, tif_dir.h, tif_print.c}: Make RichTIFFIPTC, - Photoshop and ICCProfile tags custom. - -2005-12-21 Joris Van Damme - - * libtiff/*, contrib/*: Added 'dual-mode' error handling, enabling - newer code to get context indicator in error handler and still - remain compatible with older code: Done TIFFError calls everywhere - except in tools - -2005-12-20 Andrey Kiselev - - * tools/tiffcp.c: Added many error reporting messages; fixed integer - overflow as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=789 - -2005-12-16 Frank Warmerdam - - * contrib/addtiffo/*: Major upgrade by Joris to support subsampled - YCbCr images in jpeg compressed TIFF files. - -2005-12-14 Andrey Kiselev - - * tools/tiffcp.c: Return non-zero status when reading fails (again). - -2005-12-13 Andrey Kiselev - - * tools/tiffcp.c: Return non-zero status when reading fails. - -2005-12-12 Andrey Kiselev - - * libtiff/{tif_dir.h, tiff.h}: Added more EXIF tags. - -2005-12-09 Andrey Kiselev - - * libtiff/{tif_dir.c, tif_dir.h, tif_print.c}: Make XMLPacket tag - custom. - - * tools/tiffinfo.c: Print EXIF directory contents if exist. - - * libtiff/tiff.h: Few EXIF tag numbers added. - - * libtiff/{tif_dirinfo.c, tif_dirread.c, tif_dir.h, tif_dir.c, - tiffio.h}: Preliminary support to read custom directories. New - functions: TIFFReadCustomDirectory() and TIFFReadEXIFDirectory(). - -2005-12-07 Andrey Kiselev - - * libtiff/{tif_dirinfo.c, tif_dirread.c, tif_dir.h, tif_dir.c}: - More work to implement custom directory read support. - - * libtiff/{tif_aux.c, tif_dirinfo.c, tif_dirread.c, tif_dir.h, - tif_dir.c, tif_print.c}: Make YCbCrCoefficients and ReferenceBlackWhite - tags custom. - -2005-12-05 Andrey Kiselev - - * libtiff/tif_dirread.c: One more workaround for broken - StripByteCounts tag. Handle the case when StripByteCounts array filled - with completely wrong values. - -2005-11-30 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Release file descriptor in case of failure - in the TIFFOpenW() function as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1003 - - * libtiff/tif_dirinfo.c: Correctly yse bsearch() and lfind() - functions as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=1008 - -2005-11-20 Frank Warmerdam - - * tif_open.c, tiff.h, tiffdump.c: Incorporate preliminary support - for MS MDI format. - http://bugzilla.remotesensing.org/show_bug.cgi?id=1002 - - * .cvsignore: many files added, and a few update according - to suggestion of Brad HArds on tiff mailing list. - -2005-11-03 Frank Warmerdam - - * libtiff/libtiff.def, tiffiop.h, tiffio.h: Made TIFFFreeDirectory - public. - -2005-10-31 Andrey Kiselev - - * tools/fax2tiff.c: Properly calculate sizes of temporary arrays - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=943 - - * tools/fax2tiff.c: Added option '-r' to set RowsPerStrip parameter - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=944 - - * tools/tiffdump.c: Fixed typeshift and typemask arrays initialization - problem as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=946 - - * tools/bmp2tiff.c: Fixed possible integer overflow error as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=965 - - * libtiff/tif_dirinfo.c: Make XResolution, YResolution and - ResolutionUnit tags modifiable during write process. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=977 - - * tools/tiffsplit.c: Copy fax related fields over splitted parts - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=983 - -2005-10-21 Frank Warmerdam - - * tif_dirread.c: Don't try and split single strips into "0" strips - in ChopUpSingleUncompressedStrip. This happens in some degenerate - cases (like 1x1 files with stripbytecounts==0 (gtsmall.jp2 embed tiff) - -2005-10-20 Joris Van Damme - - * tif_fax3.c: changed 'at scanline ...' style warning/errors - with incorrect use of tif_row, to 'at line ... of - strip/tile ...' style - -2005-10-15 Frank Warmerdam - - * tif_write.c: fixed setting of planarconfig as per bug report - on the mailing list from Joris. - -2005-10-07 Andrey Kiselev - - * configure.ac, configure, nmake.opt, libtiff/{tif_config.h, - tif_dirread.c}: Make the default strip size configurable via the - --with-default-strip-size and STRIP_SIZE_DEFAULT options. - -2005-09-30 Bob Friesenhahn - - * html/support.html: Fixed link to documentation on Greg Ward's - LogLuv TIFF format. - -2005-09-28 Andrey Kiselev - - * tools/tiffdump.c: Fixed crash when reading malformed tags. - -2005-09-20 Andrey Kiselev - - * tools/tiff2pdf.c: Added missed 'break' statement as per bug - http://bugzilla.remotesensing.org/show_bug.cgi?id=932 - -2005-09-12 Andrey Kiselev - - * libtiff 3.7.4 released. - - * {configure, configure.ac, Makefile.am, autogen.sh}: Applied patch - from Patrick Welche (all scripts moved in the 'config' and 'm4' - directories). - -2005-09-12 Frank Warmerdam - - * libtiff/tif_open.c: reintroduce seek to avoid problem on solaris. - -2005-09-05 Frank Warmerdam - - * libtiff/tif_dir.c: When prefreeing tv->value in TIFFSetFieldV - also set it to NULL to avoid double free when re-setting custom - string fields as per: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=922 - -2005-08-12 Frank Warmerdam - - * libtiff/tif_print.c: avoid signed/unsigned warning. - - * libtiff/tif_dirread.c: removed unused variable. - -2005-07-30 Frank Warmerdam - - * libtiff/tif_dir.c: Fixed up support for swapping "double complex" - values (128 bits as 2 64 bits doubles). GDAL gcore tests now - pass on bigendian (macosx) system. - -2005-07-28 Andrey Kiselev - - * libtiff/{tif_aux.c, tif_dirread.c, tif_fax3.c, tiffiop.h}: Rename - CheckMalloc() function to _TIFFCheckMalloc() and make it available - globally as an internal helper routine. - -2005-07-27 Andrey Kiselev - - * libtiff/tif_dir.c: More improvements in the "pass by value" part of - the custom tags handling code. - -2005-07-26 Andrey Kiselev - - * libtiff/{tif_dirread.c, tif_dirinfo.c}: Do not upcast BYTEs to - SHORTs in the TIFFFetchByteArray(). Remove TIFFFetchExtraSamples() - function, use TIFFFetchNormalTag() instead as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=831 - - Remove TIFFFetchExtraSamples() function, use TIFFFetchNormalTag() - instead. - - * libtiff/tiffconf.h.in: One more attempt to fix the AIX bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=39 - -2005-07-25 Andrey Kiselev - - * libtiff/tif_print.c: Fixed printing of the BYTE and SBYTE arrays. - - * tools/tiffdump.c: Added support for TIFF_IFD datatype. - -2005-07-21 Andrey Kiselev - - * libtiff/tif_write.c: Do not check the PlanarConfiguration field in - the TIFFWriteCheck() function in case of single band images (as per - TIFF spec). - -2005-07-12 Andrey Kiselev - - * SConstruct, libtiff/SConstruct: Added the first very preliminary - support for SCons software building tool (http://www.scons.org/). - This is experimental infrastructure and it will exist along with the - autotools mechanics. - -2005-07-07 Andrey Kiselev - - * port/{getopt.c, strcasecmp.c, strtoul.c}: Update modules from - the NetBSD source tree (the old 4-clause BSD license changed to - the new 3-clause one). - - * configure.ac, port/lfind.c, libtiff/tiffiop.h: Added lfind() - replacement module. - - * port/dummy.c: Make the dummy function static. - -2005-07-06 Andrey Kiselev - - * tools/tiffcp.c: Fixed WhitePoint tag copying. - - * libtiff/{tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_print.c}: - Make FieldOfViewCotangent, MatrixWorldToScreen, MatrixWorldToCamera, - ImageFullWidth, ImageFullLength and PrimaryChromaticities tags custom. - -2005-07-04 Andrey Kiselev - - * libtiff 3.7.3 released. - - * configure, configure.ac: Do not use empty -R option when linking - with --enable-rpath. - -2005-07-01 Andrey Kiselev - - * libtiff/{tiffiop.h, tif_open.c}: Added open option 'h' to avoid - reading the first IFD when needed. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=875 - - * libtiff/tif_color.c: Better use of TIFFmin() macro to avoid side - effects. - -2005-06-23 Andrey Kiselev - - * tools/tiff2pdf.c: Print two characters per loop in the - t2p_write_pdf_trailer(). As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=594 - - * tools/tiffgt.c: Use MacOS X OpenGL framework when appropriate. As - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=844 - - * acinclude.m4: Updated to latest OpenGL test macros versions. - - * libtiff/tiff.h: Use correct int size on Sparc 64bit/Sun compiler - platform. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=855 - -2005-06-14 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Added support for ClipPath, XClipPathUnits - and YClipPathUnits tags. - -2005-06-07 Andrey Kiselev - - * contrib/addtiffo/tif_ovrcache.c: Properly extract tile/strip size; - use pixel sized shift in contigous case. - -2005-06-06 Andrey Kiselev - - * contrib/addtiffo/{tif_overview.c, tif_ovrcache.c, tif_ovrcache.h}: - Make overviews working for contiguos images. - -2005-06-03 Andrey Kiselev - - * libtiff/tif_open.c: Replace runtime endianess check with the compile - time one. - - * libtiff/tif_predict.c: Floating point predictor now works on - big-endian hosts. - -2005-06-01 Andrey Kiselev - - * libtiff/tif_dir.c: Use _TIFFsetString() function when read custom - ASCII values. - - * libtiff/{tif_dirinfo.c, tif_dir.h, tif_dir.c, tif_print.c}: Make - DocumentName, Artist, HostComputer, ImageDescription, Make, Model, - Copyright, DateTime, PageName, TextureFormat, TextureWrapModes and - TargetPrinter tags custom. - - * libtiff/tif_jpeg.c: Cleanup the codec state depending on - TIFF_CODERSETUP flag (to fix memry leaks). - - * libtiff/tif_jpeg.c: Initialize JPEGTables array with zero after - allocating. - -2005-05-26 Andrey Kiselev - - * configure.ac, libtiff/Makefile.am: Added workaround for - OpenBSD/MirOS soname problem as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=838 - - * libtiff/tif_dirwrite.c: Use tdir_count when calling - TIFFCvtNativeToIEEEDouble() in the TIFFWriteDoubleArray() function as - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=845 - -2005-05-25 Andrey Kiselev - - * tools/ppm2tiff.c: Fixed format string when read PPM file header with - the fscanf() function. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=861 - - * libtiff/{tif_dirinfo.c, tif_print.c}: TIFFFetchByteArray() returns - uint16 array when fetching the BYTE and SBYTE filds, so we should - consider result as pointer to uint16 array and not as array of chars. - As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=831 - - * libtiff/tif_dir.c: More efficient custom tags retrieval as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=830 - - * libtiff/tif_win32.c: Use FILE_SHARE_READ | FILE_SHARE_WRITE share - mode in CreateFile() call as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=829 - - * libtiff/Makefile.am: Fixed parallel compilation of the libtiff and - libtiffxx libraries as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=826 - - * contrib/addtiffo/{tif_overview.c, tif_ovrcache.h}: Sinchronized with - GDAL. - -2005-05-23 Frank Warmerdam - - * libtiff/tif_jpeg.c: Substantial fix for addtiffo problems with - JPEG encoded TIFF files. Pre-allocate lots of space for jpegtables - in directory. - -2005-05-22 Frank Warmerdam - - * libtiff/tif_dirread.c: Changed the code that computes - stripbytecount[0] if it appears bogus to ignore if stripoffset[0] is - zero. This is a common case with GDAL indicating a "null" tile/strip. - -2005-05-17 Andrey Kiselev - - * tools/tiffsplit.c: Check for JPEGTables tag presence before copying. - -2005-05-06 Frank Warmerdam - - * libtiff/tif_dirread.c: Applied similar change to - TIFFFetchPerSampleLongs and TIFFFetchPerSampleAnys. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=843 - - * libtiff/tif_jpeg.c: added LIB_JPEG_MK1 support in JPEGDecodeRaw(). - -2005-05-06 Andrey Kiselev - * tools/tiff2pdfr.c, man/tiff2pdf.1: Calculate the tile width properly; - added new option '-b' to use interpolation in output PDF files (Bruno - Ledoux). - -2005-05-05 Frank Warmerdam - - * libtiff/tif_dirread.c: Ensure that broken files with too many - values in PerSampleShorts work ok instead of crashing. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=843 - -2005-04-27 Andrey Kiselev - - * tools/tiffdither.c: Copy the PhotometricInterpretation tag from the - input file. - -2005-04-15 Andrey Kiselev - - * libtiff/tif_predict.c: Added ability to encode floating point - predictor, as per TIFF Technical Note 3. - -2005-04-14 Andrey Kiselev - - * libtiff/{tif_predict.h, tif_predict.c}: Added ability to decode - floating point predictor, as per TIFF Technical Note 3. - -2005-04-13 Andrey Kiselev - - * libtiff/{tiffio.h, tiffiop.h, tif_dir.c, tif_read.c, tif_swab.c}: - Added _TIFFSwab24BitData() and TIFFSwabArrayOfLong() functions used to - swap 24-bit floating point values. - - * libtiff/tiff.h: Added predictor constants. - -2005-04-08 Andrey Kiselev - - * libtiff/{tiffiop.h, tif_dir.c}: Use uint32 type for appropriate - values in _TIFFVSetField() function. Inspired by the bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=816 - - * man/TIFFSetField.3tiff: Fixed definition of the TIFFTAG_INKNAMES tag - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=816 - -2005-03-30 Andrey Kiselev - - * libtiff/tif_open.c: Do not read header in case the output file - should be truncated (Ron). - - * libtiff/{tif_dirinfo.c, tif_config.h.vc}: Use lfind() instead - of bsearch() in _TIFFFindFieldInfoByName() function (Ron). - - * libtiff/{tiff.h, tif_dirinfo.c}: Fixes in EXIF tag ordering (Ron). - -2005-03-22 Andrey Kiselev - - * configure.ac, libtiff/Makefile.am: Use libtool machinery to pass - rpath option. - -2005-03-21 Andrey Kiselev - - * libtiff/{tif_dir.c, tif_print.c}: Handle all data types in custom - tags. - -2005-03-18 Andrey Kiselev - - * libtiff/dirinfo.c: Added DNG tags. - - * libtiff/{tif_dir.c, tif_print.c}: More improvements in custom tag - handling code. - - * libtiff/tiff.h: More comments; added missed DNG tag (LensInfo); - added DNG 1.1.0.0 tags. - - * tools/tif2pdf.c: Fixed problem with alpha channel handling as per - bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=794 - - * man/TIFFGetField.3tiff: Add a note about autoregistered tags. - -2005-03-17 Andrey Kiselev - - * nmake.opt: Build with Win32 CRT library by default. - - * tools/tiff2ps.c: Fixed typo in page size handling code. - - * libtiff/{tif_dir.c, tif_print.c}: Support for custom tags, passed - by value. - - * libtiff/{tiff.h, tif_dirinfo.c, tiffiop.h}: Added EXIF related tags. - -2005-03-15 Andrey Kiselev - - * libtiff 3.7.2 released. - -2005-03-09 Andrey Kiselev - - * tools/tiffcmp.c: Added ability to compare the 32-bit integer and - floating point data; complain on unsupported bit depths. - -2005-03-05 Andrey Kiselev - - * tif_stream.cxx: Use ios namespace instead of ios_base to support - GCC 2.95. - - * libtiff/{tiff.h, tif_fax3.tif, tif_jpeg.c}: Applied correct patch from - Lee Howard for HylaFax DCS tag - (see http://bugzilla.remotesensing.org/show_bug.cgi?id=771) - -2005-03-04 Andrey Kiselev - - * configure, configure.ac: Use -rpath option instead of -R as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=732 - - * libtiff/{tiff.h, tif_fax3.tif, tif_jpeg.c}: Applied patch from Lee - Howard to support a new tag TIFFTAG_FAXDCS (34911) used in HylaFax - software. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=771 - - * nmake.opt, html/build.html: Add more comments, change the config - file organization a bit as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=764 - - * tools/tiffcmp.c: Use properly sized buffer in short arrays comparison - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=785 - -2005-03-03 Andrey Kiselev - - * libtiff/tif_dirread.c: More logic to guess missed strip size as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=705 - - * tools/fax2ps.c: Replace insecure mktemp() function with the - tmpfile() as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=786 - -2005-02-04 Andrey Kiselev - - * libtiff/tiff.h: Changed the int8 definition to be always signed char - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=727 - - * libtiff/tiffio.h: Move TIFFOpenW() function into the extern "C"{} - block as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=763 - -2005-02-03 Bob Friesenhahn - - * tools/tiffgt.c: Fix problem on big-endian CPUs so that images - display more correctly. Images display brighter than they should - on a Sun workstation. - -2005-02-03 Andrey Kiselev - - * libtiff/tif_dirread.c: Estimate strip size in case of wrong or - suspicious values in the tags. As per bugs - - http://bugzilla.remotesensing.org/show_bug.cgi?id=705 - - and - - http://bugzilla.remotesensing.org/show_bug.cgi?id=320 - - * tools/tiff2ps.c: Fixed problem with page sizes as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=742 - -2005-01-31 Bob Friesenhahn - - * libtiff/tiff.h (TIFFTAG_TILEWIDTH): Corrected description. - (TIFFTAG_TILELENGTH): Corrected description. - -2005-01-30 Andrey Kiselev - - * configure.ac: Fixes for --with-docdir option as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=759 - - * libtiff/tif_open.c: Remove unnesessary TIFFSeekFile() call as per - bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=756 - - * libtiff/tif_stream.cxx: Fixes for C++ stream interface from - Michael Rinne and Edward Lam. - -2005-01-15 Andrey Kiselev - - * configure.ac: Make the documentation directory location configurable - via the --with-docdir option (as suggested by Jeremy C. Reed). - - * libtiff/tif_color.c: Use double as the second argument of pow() - function in TIFFCIELabToRGBInit(). As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=741 - - * libtiff/tif_pixarlog.c: Avoid warnings when converting float to - integer as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=740 - - * libtiff/tif_getimage.c: Always fill the error message buffer in - TIFFRGBAImageBegin() as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=739 - -2005-01-12 Andrey Kiselev - - * libtiff/tif_jpeg.c: Added ability to read/write the fax specific - TIFFTAG_FAXRECVPARAMS, TIFFTAG_FAXSUBADDRESS and TIFFTAG_FAXRECVTIME - tags as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=736 - - * libtiff/tif_win32.c: Fixed message formatting in functions - Win32WarningHandler() and Win32ErrorHandler() as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=735 - - * tools/tiff2ps.c: Interpret the -w and -h options independently. As - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=689 - -2005-01-11 Andrey Kiselev - - * libtiff/tiffio.h: Move the color conversion routines in the 'extern - "C"' section as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=727 - - * libtiff/tiff.h: Restore back the workaround for AIX Visual Age C - compiler to avoid double definition of BSD types as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=39 - - * libtiff/Makefile.am: Place the C++ stream API in the separate - library called libtiffxx to avoid unneeded dependencies. Probably - there will be more C++ API in the future. As per bugs - - http://bugzilla.remotesensing.org/show_bug.cgi?id=733 - - and - - http://bugzilla.remotesensing.org/show_bug.cgi?id=730 - -2005-01-05 Andrey Kiselev - - * tools/tiffdump.c: Fixed problem when read broken TIFFs with the - wrong tag counts (Dmitry V. Levin, Martin Pitt). - - * configure.ac: Replace --disable-c++ with the --disable-cxx option as - per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=730 - -2004-12-25 Andrey Kiselev - - * libtiff/tif_getimage.c: More fixes for multiple-alpha-channelled - RGB-images as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=713 - - - * tools/tiffset.c: Convert character option to integer value as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=725 - -2004-12-20 Andrey Kiselev - - * libtiff 3.7.1 released. - - * html/tiffset.1.html: Add missed manual page as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=678 - - * libtiff/tiff.h: Revert back libtiff data type definitions as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=687 - -2004-12-19 Andrey Kiselev - - * libtiff/tif_dirread.c: Do not forget about TIFF_VARIABLE2 when - checking for tag count in TIFFReadDirectory() function. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=713 - - * libtiff/{tif_dirread.c, tif_fax3.c}: More argument checking in - CheckMallock() function. - - * libtiff/tif_getimage.c: Support for multiple-alpha-channelled - RGB-images as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=718 - -2004-12-15 Frank Warmerdam - - * libtiff/tif_getimage.c: #define A1 bracketing for clean build on - SunPro compiler. - -2004-12-11 Bob Friesenhahn - - * autogen.sh: aclocal and autoheader should be executed after - libtoolize. Also add '-I .' to aclocal invocation to check - current directory for macros. - -2004-12-10 Andrey Kiselev - - * libtiff/tif_dirwrite.c: Always write TIFFTAG_SUBIFD using LONG type - as per bugs - - http://bugzilla.remotesensing.org/show_bug.cgi?id=703 - - and - - http://bugzilla.remotesensing.org/show_bug.cgi?id=704 - -2004-12-04 Andrey Kiselev - - * nmake.opt: Link with the user32.lib in windowed mode. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=697 - - * libtiff/tif_win32.c: Use char* strings instead of TCHAR in windowed - mode as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=697 - - * libtiff/tif_config.in.vc: Removed unneded definitions for - read/open/close/lseek functions to fix the - - http://bugzilla.remotesensing.org/show_bug.cgi?id=680 - -2004-12-03 Andrey Kiselev - - * libtiff/{tif_dir.c, tif_dirread.c}: Remove TIFFReassignTagToIgnore() - call from the TIFFReadDirectory() function. TIFFReassignTagToIgnore - must be removed in the future, as it was never used properly. As per - bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=692 - -2004-11-30 Bob Friesenhahn - - * libtiff/tif_jpeg.c: Added a work-around in order to allow - compilation with the heavily modified version of libjpeg delivered - with Cygwin. - -2004-11-29 Andrey Kiselev - - * libtiff/tif_dir.c: Properly handle tags, which have the uint32 - counts. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=693 - - * tools/fax2ps.c: Be able to extract the first page (#0). As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=690 - -2004-11-28 Andrey Kiselev - - * libtiff/tif_unix.c: Make UNIX module compilable (and usable) - on Windows. - - * nmake.opt: Add missed DLLNAME variable. - -2004-11-26 Frank Warmerdam - - * libtiff/makefile.vc: make it easier to rename the libtiff DLL. - -2004-11-24 Andrey Kiselev - - * man/libtiff.3tiff: Improvements in the "LIST OF ROUTINES" table as - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=545 - - * man/tiffset.1: Added manual page for tiffset tool written by Jay - Berkenbilt. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=678 - -2004-11-23 Frank Warmerdam - - * libtiff/tif_error.c: fixed TIFFerror call to be TIFFError. - -2004-11-21 Frank Warmerdam - - * html/document.html: Updated Adobe web links as per email from Joris. - -2004-11-21 Andrey Kiselev - - * libtiff/{tiffio.hxx, tiffio.h}: C++ stream interface moved to new - file tiffio.hxx. We don't have any C++ in tiffio.h, those who want to - use C++ streams should #include . - -2004-11-13 Andrey Kiselev - - * libtiff/tiff.h: Added Adobe DNG tags. - - * libtiff/tif_win32.c: Typo fixed. - - * libtiff/{tif_stream.cxx, tiffio.h}: C++ stream interface updated to - be compliant with the latest standard. Appropriate additions in - makefiles now completed. - -2004-11-11 Andrey Kiselev - - * tools/tiffset.c, libtiff/tif_dirinfo.c: Properly handle the - different tag types. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=600 - -2004-11-10 Andrey Kiselev - - * libtiff/tif_aux.c: Set the appropriate ReferenceBlackWhite array for - YCbCr image which lacks that tag (noted by Hans Petter Selasky). - -2004-11-09 Andrey Kiselev - - * libtiff/tif_color.c: Division by zero fixed (Hans Petter Selasky). - -2004-11-07 Andrey Kiselev - - * libtiff/{tif_stream.cxx, tiffio.h}: Added C++ stream interface - contributed by Edward Lam (see - http://bugzilla.remotesensing.org/show_bug.cgi?id=654 for details). - Though no changes in any makefiles yet. - -2004-11-05 Frank Warmerdam - - * libtiff/tif_open.c: Removed close() in TIFFClientOpen() if file - is bad. This is the callers responsibility. - http://bugzilla.remotesensing.org/show_bug.cgi?id=651 - -2004-11-05 Andrey Kiselev - - * libtiff/{tiffio.h, tif_win32.c, libtiff.def}: Added TIFFOpenW() - function to work with the double byte strings (used to represent - filenames in some locales). As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=625 - - * libtiff/tif_dirread.c: Fixed problem when fetching BitsPerSample and - Compression tags of type LONG from broken TIFFS as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=662 - - * libtiff/tif_dirinfo.c: Fixed definition for TIFFTAG_RICHTIFFIPTC, - the writecount should have uint32 type. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=662 - - * libtiff/tif_write.c: Fixed wrong if() statement in - TIFFAppendToStrip() function as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=660 - -2004-11-04 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Change definition for TIFFTAG_EXTRASAMPLES - field. The caller should supply a count when setting this field. As - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=648 - - * libtiff/{tif_jpeg.c, tif_ojpeg.c}: TIFFTAG_JPEGTABLES should have - uint32 count. Use this type everywhere. - -2004-11-03 Frank Warmerdam - - * libtiff/tif_next.c: avoid use of u_long and u_char types. Bug 653. - -2004-11-02 Frank Warmerdam - - * tools/tiff2rgba.c: removed extra newlines in usage message. - -2004-10-30 Andrey Kiselev - - * libtiff/tif_dirwrite.c: Improvements in tag writing code. - - * tools/tiff2ps.c: Fixed wrong variable data type when read Position - tags (Tristan Hill). - -2004-10-30 Frank Warmerdam - - * libtiff/tiffiop.h: added fallback definition of assert() if we - don't have assert.h. - -2004-10-29 Andrey Kiselev - - * libtiff/tif_fax3.c: Fixed case with the wrong decode routines - choosing when the incorrect Group4Options tag set. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=323 - - * libtiff/tif_dirwrite.c: Fixed problem with passing count variable of - wrong type when writing the TIFF_BYTE/TIFF_SBYTE tags in - TIFFWriteNormalTag(). - -2004-10-28 Andrey Kiselev - - * tools/tiff2ps.c: Fixed wrong variable data type when read Resolution - tags (Peter Fales). - - * tools/{bmp2tiff.c, raw2tiff.c}: Get rid of stream I/O functions. - -2004-10-28 Frank Warmerdam - - * tools/tiff2pdf.c: added casts to avoid warnings. - - * libtiff/libtiff.def: Added several more entry points required - to link fax2tiff.c against the DLL on windows. - -2004-10-27 Andrey Kiselev - - * configure, configure.ac: Added --enable-rpath option to embed linker - paths into library binary. - -2004-10-26 Andrey Kiselev - - * tools/tiffset.c: Check the malloc return value (Dmitry V. Levin). - - * libtiff/{tif_strip.c, tif_tile.c}: Zero division problem fixed - (Vladimir Nadvornik, Dmitry V. Levin). - -2004-10-16 Andrey Kiselev - - * libtiff 3.7.0 released. - -2004-10-15 Bob Friesenhahn - - * libtiff/tif_jpeg.c: There seems to be no need to include stdio.h - in this file so its inclusion is removed. Including stdio.h - sometimes incurs an INT32 typedef conflict between MinGW's - basetsd.h and libjpeg's jmorecfg.h. - -2004-10-15 Andrey Kiselev - - * man/bmp2tiff.1: Added manual page for bmp2tiff utility. - -2004-10-13 Bob Friesenhahn - - * tools/tiffcmp.c (leof): Renamed from 'eof' in order to avoid - conflict noticed under MinGW. - * ltmain.sh: Fix for MinGW compilation. - -2004-10-13 Frank Warmerdam - - * man/tiffsplit.1: Fixed to indicate using aaa-zzz, not aa-zz. - http://bugzilla.remotesensing.org/show_bug.cgi?id=635 - -2004-10-12 Andrey Kiselev - - * libtiff/{tif_dirread.c, tif_jpeg.c, tif_luv.c, tif_ojpeg.c, - tif_pixarlog.c, tif_write.c}: Handle the zero strip/tile sizes - properly (Dmitry V. Levin, Marcus Meissner). - -2004-10-11 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Type of the TIFFTAG_SUBIFD field changed - to TIFF_IFD. - -2004-10-10 Andrey Kiselev - - * tools/bmp2tif.c: Check the space allocation results. - -2004-10-09 Andrey Kiselev - - * libtiff/tif_dir.c: Initialize td_tilewidth and td_tilelength fields - of the TIFFDirectory structure with the 0 instead of -1 to avoid - confusing integer overflows in TIFFTileRowSize() for striped images. - - * tools/tiff2pdf.c: Fixed TransferFunction tag handling reported - by Ross A. Finlayson. - - * libtiff/tif_dir.c: Fixed custom tags handling as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=629 - -2004-10-08 Frank Warmerdam - - * libtiff/tif_dirinfo.c: Fix bug with tif_foundfield and reallocation - of tif_fieldinfo. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=630 - -2004-10-04 Bob Friesenhahn - - * contrib/iptcutil/README: Added the missing README which goes - along with iptcutil. - -2004-10-03 Andrey Kiselev - - * libtiff/tif_compress.c: Improved error reporting in - TIFFGetConfiguredCODECs() (Dmitry V. Levin). - -2004-10-02 Andrey Kiselev - - * libtiff 3.7.0beta2 released. - - * libtiff/{tif_aux.c, tif_compress.c, tif_dirinfo.c, tif_dirwrite.c, - tif_extension.c, tif_fax3.c, tif_luv.c, tif_packbits.c, - tif_pixarlog.c, tif_write.c}: Added checks for failed memory - allocations and integer overflows (Dmitry V. Levin). - - * libtiff/tiff.h: Missed TIFF_BIGTIFF_VERSION constant added. - -2004-10-01 Frank Warmerdam - - * libtiff/tif_open.c: added a more informative message if a BigTIFF - file is opened. - -2004-09-30 Frank Warmerdam - - * libtiff/tif_dirinfo.c: changed type of XMLPacket (tag 700) to - TIFFTAG_BYTE instead of TIFFTAG_UNDEFINED to comply with the info - in the Adobe XMP Specification. - -2004-09-29 Andrey Kiselev - - * libtiff/{tif_jpeg.c, tif_pixarlog.c}: Use _TIFFmemset() instead of - memset(). - - * libtiff/{tif_dirread.c, tif_strip.c, tif_tile.c}: Applied patches - from Dmitry V. Levin to fix possible integer overflow problems. - -2004-09-28 Andrey Kiselev - - * libtiff/tif_getimage.c: Check for allocated buffers before clearing - (Dmitry V. Levin). - -2004-09-26 Andrey Kiselev - - * libtiff/{tif_dir.h, tif_dir.c, tif_dirread.c, tif_write.c}: - Optimize checking for the strip bounds. - - * libtiff/{tif_dirread.c, tif_strip.c}: TIFFScanlineSize() and - TIFFRasterScanlineSize() functions report zero in the case of integer - overflow now. Properly handle this case in TIFFReadDirectory() - (patches from Dmitry V. Levin). - -2004-09-25 Andrey Kiselev - - * libtiff/{tif_dirinfo.c, tif_strip.c, tif_tile.c}: Use TIFFhowmany8() - macro where appropriate. - - * tools/tiff2bw.c: Write ImageWidth/Height tags to output file, as - noted by Gennady Khokhorin. - - * libtiff/tif_dirread.c: Always check the return values, returned - by the _TIFFmalloc() (Dmitry V. Levin). - - * libtiff/tif_dir.c: Fixed possible integer overflow _TIFFset*Array() - functions (Dmitry V. Levin). - - * libtiff/{tif_dirread.c, tif_dir.c, tif_write.c}: - Potential memory leak fixed in TIFFReadDirectory(), _TIFFVSetField(), - TIFFGrowStrips() (found by Dmitry V. Levin). - -2004-09-24 Andrey Kiselev - - * libtiff/{tiffio.h, tif_compress.c}: Added TIFFGetConfiguredCODECs() - to get the list of configured codecs. - - * libtiff/{tiffiop.h, tif_dirread.c}: More overflow fixes from - Dmitry V. Levin. - -2004-09-23 Andrey Kiselev - - * libtiff/tif_dirread.c: Applied patch from Dmitry V. Levin to fix - possible integer overflow in CheckMalloc() function. - -2004-09-22 Andrey Kiselev - - * libtiff/{tiffiop.h, tif_strip.c}: Use TIFFhowmany8() macro instead - of plain TIFFhowmany() where appropriate. - -2004-09-21 Andrey Kiselev - - * libtiff/tif_getimage.c: Initialize arrays after space allocation. - -2004-09-19 Andrey Kiselev - - * libtiff 3.7.0beta released. - - * libtiff/{tif_luv.c, tif_next.c, tif_thunder.c}: Several buffer - overruns fixed, as noted by Chris Evans. - -2004-09-14 Bob Friesenhahn - - * commit: Added a script to make it more convenient to commit - updates. The CVS commit message is extracted from this ChangeLog - file. - -2004-09-14 Andrey Kiselev - - * configure.ac, configure, aclocal.m4, libtiff/{mkspans.c, tif_fax3.c, - tif_getimage.c, tif_luv.c, tif_lzw.c, tif_ojpeg.c, tif_packbits.c, - tif_predict.c, tif_read.c, tif_swab.c, tif_thunder.c, tif_write.c, - tif_dir.c, tif_dirread.c, tif_dirwrite.c, tif_jpeg.c, tif_dirinfo.c, - tif_vms.c, tif_print.c, tif_strip.c, tif_tile.c, tif_dir.h, - tif_config.h.in, tiffiop.h}: - Get rid of BSD data types (u_char, u_short, u_int, u_long). - -2004-09-13 Bob Friesenhahn - - * libtiff/tiff.h: Fix column tagging. Reference current Adobe XMP - specification. Reference libtiff bug tracking system to submit - private tag additions. - -2004-09-12 Bob Friesenhahn - - * tools/tiffgt.c: Include "tif_config.h". - - * configure.ac: Use AM_PROG_CC_C_O since it is now needed to build - tiffgt. This results in the 'compile' script being added to the - project. - - * tools/Makefile.am (tiffgt_CFLAGS): Add extra build options - required to find OpenGL headers necessary to build tiffgt. Also - ensure that the libtiff that we built is used rather than some other - libtiff installed on the system. - -2004-09-12 Andrey Kiselev - - * configure.ac, acinclude.m4, aclocal.m4: New macros to detect GLUT - libraries. - -2004-09-11 Bob Friesenhahn - - * configure.ac: Pass library configuration defines via - tif_config.h rather than extending CPPFLAGS. Configure a - libtiff/tiffconf.h in order to satisfy application requirements - (not used by library build). Do not define _POSIX_C_SOURCE=2 since - this causes failure to build on systems which properly respect - this request. - - * libtiff/tiffconf.h.in: New file to act as the template for the - configured tiffconf.h - - * libtiff/files.lst (HDRS): Install the configured tiffconf.h. - -2004-09-10 Frank Warmerdam - - * html/internals.html: Split off a discussion of adding new tags - into addingtags.html. - -2004-09-10 Andrey Kiselev - - * test/{ascii_tag.c, long_tag.c}: Preliminary test suite added. - - * tools/tiff2pdf.c: Fixed reading TransferFunction tag as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=590 - - * libtiff/tif_print.c: Fixes in InkNames and NumberOfInks reporting. - - * libtiff/tif_dirread.c: Don't reject to read tags of the - SamplesPerPixel size when the tag count is greater than number of - samples as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=576 - - * libtiff/tiff.h: Use _TIFF_DATA_TYPEDEFS_ guardian to switch off - defining int8/uint8/... etc. types. As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=607 - -2004-09-09 Frank Warmerdam - - * tools/tiff2ps.c, tools/tiffmedian.c: fiddle with include files - to avoid compile warnings about getopt() and a few other things. - -2004-09-02 Andrey Kiselev - - * libtiff/tif_dirread.c: Use memcpy() function instead of pointer - assigning magic in TIFFFetchFloat(). - -2004-09-01 Andrey Kiselev - - * libtiff/{tiffio.h, tif_open.c}: Applied patches from Joris Van Damme - to avoid requirement for tiffiop.h inclusion in some applications. See - here - - http://www.asmail.be/msg0054799560.html - - for details. - - * tools/fax2tiff.c: Use the new functions in the code. - -2004-08-25 Andrey Kiselev - - * tools/tiff2pdf.c: Initialize arrays properly. - - * tools/tiff2ps.c: Avoid zero division in setupPageState() function; - properly initialize array in PSDataBW(). - -2004-08-24 Andrey Kiselev - - * tools/tiff2pdf.c: More fixes for bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=590 - - from Ross Finlayson. - -2004-08-23 Andrey Kiselev - - * tools/tiff2ps.c: Fixed problem with uninitialized values. - - * libtiff/tif_dir.c: Initialize tif_foundfield data member in the - TIFFDefaultDirectory() (in addition to 2004-08-19 fix). - - * tools/tiff2pdf.c: Fixed a bunch of problems as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=590 - -2004-08-20 Andrey Kiselev - - * tools/tiff2pdf.c: Applied patch from Ross Finlayson that checks - that the input file has compression, photometric interpretation, - etcetra, tags or if not than a more descriptive error is returned. - - * libtiff/tif_dirread.c: Fixed problem in TIFFReadDirectory() in the - code, responsible for tag data type checking. - -2004-08-19 Andrey Kiselev - - * libtiff/{tiffiop.h, tif_dirinfo.c}: Fixed problem with the static - variable as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=593 - -2004-08-16 Andrey Kiselev - - * tools/ras2tiff.c: Fixed issue with missed big-endian checks as per - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=586 - -2004-08-01 Andrey Kiselev - - * libtiff/{tif_config.h.in, tif_config.h.vc}: config.h.in and - config.h.vc files renamed in the tif_config.h.in and tif_config.h.vc. - -2004-07-24 Andrey Kiselev - - * libtiff/tif_lzw.c: LZW compression code is merged back from the - separate package. All libtiff tools are updated to not advertise an - abcence of LZW support. - -2004-07-12 Andrey Kiselev - - * libtiff/tiffio.h: Revert thandle_t back to void* type. - -2004-07-11 Andrey Kiselev - - * libtiff/{tif_read.c, tif_tile.c, tif_strip.c}: Fixes in error - messages, as suggested by Bernd Herd. - -2004-07-03 Andrey Kiselev - - * libtiff/tif_dir.c: Call TIFFError() instead of producing warnings - when setting custom tags by value. Reported by Eric Fieleke. - -2004-06-14 Andrey Kiselev - - * tools/bmp2tiff.c: Add missed RawsPerStrip setting. - -2004-06-08 Andrey Kiselev - - * tools/bmp2tiff.c: Added new utility to convert Windows BMP files - into TIFFs. - -2004-06-07 Andrey Kiselev - - * libtiff 3.7.0alpha released. - -2004-06-06 Andrey Kiselev - - * libtiff/{tiff.h, tif_dirwrite.c, tif_fax3.c, tif_packbits.c,}: Get rid - of ugly 64-bit hacks, replace them with the clever (autoconf based ) - ones :-). - - * libtiff/tiffio.h: Define thandle_t as int, not void* (may cause - problems in 64-bit environment). - -2004-06-05 Andrey Kiselev - - * tools/tiffset.c: tiffset now can set any libtiff supported tags. - Tags can be supplied by the mnemonic name or number. - - * libtiff/{tiffio.h, tif_dir.h, tif_dirinfo.c,}: Added two new - functions TIFFFindFieldInfoByName() and TIFFFieldWithName(). - -2004-05-27 Andrey Kiselev - - * libtiff/tif_ojpeg.c: Fixed problem with duplicated SOI and SOF - markers as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=581 - -2004-05-24 Andrey Kiselev - - * tools/tiffsplit.c: Don't forget to copy Photometric - Interpretation tag. - -2004-05-20 Andrey Kiselev - - * libtiff/{tif_open.c, tiffio.h}: New function added: - TIFFIsBigEndian(). Function returns nonzero if given was file written - in big-endian order. - - * tools/tiffsplit.c: Fixed problem with unproperly written multibyte - files. Now output files will be written using the same byte order - flag as in the input image. See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=574 - - for details. - -2004-05-19 Frank Warmerdam - - * libtiff/tif_print.c: added (untested) support for printing - SSHORT, SLONG and SRATIONAL fields. - - * tools/tiffcp.c: close output file on normal exit. - -2004-05-17 Andrey Kiselev - - * libtiff/tif_fax3.c: Avoid reading CCITT compression options - if compression type mismatches. See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=565 - -2004-04-30 Andrey Kiselev - - * libtiff/tif_strip.c: Never return 0 from the - TIFFNumberOfStrips(). - -2004-04-29 Andrey Kiselev - - * libtiff/tif_dirread.c: Workaround for broken TIFF writers which - store single SampleFormat value for multisampled images. See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=562 - -2004-04-25 Andrey Kiselev - - * configure.ac, libtiff/{tiff.h, config.h.in}: Added tests for int8, - int16 and int32 types to avoid complains on some compilers. Details at - - http://bugzilla.remotesensing.org/show_bug.cgi?id=39 - -2004-04-20 Andrey Kiselev - - * tools/tiff2pdf.c: Fixed problem with unaligned access as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=555 - -2004-04-14 Andrey Kiselev - - * libtiff/tif_write.c: Allow in-place updating of the compressed - images (don't work properly with all codecs). For details see GDAL bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=534 - -2004-04-06 Andrey Kiselev - - * libtiff/tif_jpeg.c: Workaround for wrong sampling factors used - in the Intergarph JPEG compressed TIFF images as per bug: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=532 - -2004-04-04 Frank Warmerdam - - * libtiff/tif_open.c: close clientdata if TIFFClientOpen() fails - via bad2. - -2004-03-26 Andrey Kiselev - - * tools/tiffcp.c: Properly set Photometric Interpretation in case of - JPEG compression of grayscale images. - - * tools/tiffcp.c: Don't emit warnings when Orientation tag does not - present in the input image. - -2004-03-19 Andrey Kiselev - - * {many}: The first attempt to switch to autotools. - -2004-03-03 Andrey Kiselev - - * libtiff/tif_open.c: Use dummy mmap/munmap functions in - TIFFClientOpen() when the appropriate client functions was not - supplied by user. - -2004-03-02 Frank Warmerdam - - * tools/ycbcr.c: fixed main() declaration as per: - http://bugzilla.remotesensing.org/show_bug.cgi?id=513 - -2004-02-26 Andrey Kiselev - - * tools/tiffsplit.c: Copy JPEGTables tag contents for JPEG compressed - images. Reported by Artem Mirolubov. - - * libtiff/tif_dirread.c: Fixed problem with handling TIFF_UNDEFINED - tag type in TIFFFetchNormalTag() as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=508 - -2004-02-17 Frank Warmerdam - - * libtiff/tif_codec.c: Fixed typo in TIFFInitPackBits name as per: - http://bugzilla.remotesensing.org/show_bug.cgi?id=494 - -2004-02-05 Andrey Kiselev - - * libtiff/tif_fax3.c: Fixed problem with CCITT encoding modes as per - bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=483 - - But we need more work on fax codec to support update mode. - -2004-01-30 Frank Warmerdam - - * libtiff/libtiff.def: Added TIFFCurrentDirOffset, TIFFWriteCheck, - TIFFRGBAImageOK, and TIFFNumberOfDirectories as suggested by - Scott Reynolds. - -2004-01-29 Andrey Kiselev - - * libtiff/tiff.h: Fixed tag definitions for TIFFTAG_YCLIPPATHUNITS - and TIFFTAG_INDEXED as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=475 - - * libtiff/{tif_win32.c, tif_unix.c}: Check whether the pointer is - NULL before proceeding further as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=474 - - Check results, returned by the TIFFFdOpen() before returning and close - file if TIFFFdOpen() failed as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=468 - - * libtiff/tif_open.c: More fixes for - - http://bugzilla.remotesensing.org/show_bug.cgi?id=468 - -2004-01-28 Andrey Kiselev - - * libtiff/{libtiff.def, tif_close.c, tiffio.h, tif_open.c}: Separate - TIFFCleanup() from the TIFFClose() in order to fix the bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=468 - - * tools/tiffcp.c: Fixed problem with wrong interpretation of the - InkNames tag as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=466 - - Memory leak fixed. - -2004-01-21 Frank Warmerdam - - * libtiff/tif_dirwrite.c: Fixed handling of writable ASCII tags that - are field_passcount=TRUE properly. Arguably anonymous custom tags - should be declared as passcount=FALSE, but I don't want to change - that without a careful review. - -2004-01-20 Andrey Kiselev - - * libtiff/tif_write.c: Fixed reporting size of the buffer in case of - stripped image in TIFFWriteBufferSetup(). As per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=460 - -2004-01-11 Andrey Kiselev - - * libtiff/tif_dir.c: Incomplete cleanup in TIFFFreeDirectory(), - patch from Gerben Koopmans. - - * libtiff/tif_dirread.c: Check field_passcount value before setting - the value of undefined type, patch from Gerben Koopmans. - -2004-01-02 Andrey Kiselev - - * tools/tiffcp.c: Fixed problem with wrong Photometric setting for - non-RGB images. - -2003-12-31 Andrey Kiselev - - * libtiff/tif_win32.c: Fixed problem with _TIFFrealloc() when the NULL - pointer passed. Patch supplied by Larry Grill. - - * libtiff/{tiff.h, tif_fax3.c}:Fixes for AMD 64 platform as - suggested by Jeremy C. Reed. - -2003-12-26 Andrey Kiselev - - * libtiff 3.6.1 released. - -2003-12-24 Andrey Kiselev - - * config.guess, config.sub: Updated from the recent upstream. - -2003-12-22 Andrey Kiselev - - * libtiff/{tif_color, tif_getimage.c, tiffio.h}, man/TIFFcolor.3t: - More cleanups in color conversion interface, added appropriate manual - page. - -2003-12-19 Andrey Kiselev - - * libtiff/{tif_extension.c, tif_dirinfo.c, tiff.h}: Warnings fixed as - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=357 - - * tools/tiff2ps.c: Added support for alpha channel. Fixes - - http://bugzilla.remotesensing.org/show_bug.cgi?id=428 - - * libtiff/{libtiff.def, tif_color.c, tif_getimage.c, tiffio.h}: - Interface for Lab->RGB color conversion is finally cleaned up. - Added support for ReferenceBlackWhite tag handling when converted from - YCbCr color space. The latter closes - - http://bugzilla.remotesensing.org/show_bug.cgi?id=120 - -2003-12-07 Andrey Kiselev - - * libtiff/{tif_getimage.c, tiffio.h}: Avoid warnings. - - * libtiff/makefile.vc, tools/makefile.vc: Support for IJG JPEG - library. - -2003-12-06 Andrey Kiselev - - * libtiff/{tif_getimage.c, tif_aux.c}: Read WhitePoint tag from the - file and properly use it for CIE Lab->RGB transform. - -2003-12-04 Andrey Kiselev - - * libtiff/{tif_getimage.c, tif_color.c, tiffio.h}: YCbCr->RGB - conversion routines now in the tif_color.c module. New function - TIFFYCbCrtoRGB() available in TIFF API. - - * libtiff/tif_dirwrite.c: Handle TIFF_IFD tag type correctly. - -2003-12-03 Andrey Kiselev - - * libtiff/{tif_getimage.c, tif_color.c, tiffio.h}: Improvements in - CIE Lab conversion code. Start moving YCbCr stuff to the tif_color.c - module. - - * libtiff/{tif_getimage.c, tiffio.h}, man{TIFFReadRGBAImage.3t, - TIFFReadRGBAStrip.3t, TIFFReadRGBATile.3t, TIFFRGBAImage.3t}: - Finally resolved problems with orientation handling. TIFFRGBAImage - interface now properly supports all possible orientations, i.e. images - will be flipped both in horizontal and vertical directions if - required. 'Known bugs' section now removed from the appropriate manual - pages. Closed bug entry: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=322 - -2003-12-02 Andrey Kiselev - - * libtiff/tif_dir.c: Fixed order of the parameters in TIFFError() - function calls as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=440 - -2003-11-28 Ross Finlayson - - * tools/tiff2pdf.c: Some bugs fixed. - -2003-11-27 Andrey Kiselev - - * libtiff/tif_luv.c: Fixed bug in 48-bit to 24-bit conversion routine, - reported by Antonio Scuri. - - * man/tiff2pdf.1: Few improvements in page layout. - - * Makefile.in, /man/Makefile.in, /html/man/tiff2pdf.1.html: - Added support fpr tiff2pdf manual page. - -2003-11-26 Ross Finlayson - - * /man/tiff2pdf.1: File added to repository. - -2003-11-26 Andrey Kiselev - - * Makefile.in, /tools/{Makefile.in, makefile.vc}: - Added support fpr tiff2pdf utility. - -2003-11-25 Ross Finlayson - - * /tools/tiff2pdf.c: File added to repository. - -2003-11-22 Andrey Kiselev - - * /tools/raw2tiff.c: sqrtf() replaced with sqrt(). - -2003-11-21 Andrey Kiselev - - * /tools/raw2tiff.c: #include removed. - - * tools/{Makefile.in, tiffgt.c}: Unmaintained and platform dependent - sgigt utility removed and replaced with the completely rewritten - portable tiffgt tool (depend on OpenGL and GLUT). Initial revision, - there is a lot of things to improve. - - * libtiff/tif_ojpeg.c: TIFFVGetField() function now can properly - extract the fields from the OJPEG files. Patch supplied by Ross - Finlayson. - - * libtiff/{tiffio.h, tif_codec.c}, man/{libtiff.3t, TIFFcodec.3t}: - Added new function TIFFIsCODECConfigured(), suggested by Ross - Finlayson. - -2003-11-18 Andrey Kiselev - - * libtiff/tif_dirinfo.c: Implemented binary search in - _TIFFMergeFieldInfo(). Patch supplied by Ross Finlayson. - - * libtiff/tif_dir.h: _TIFFFindOrRegisterdInfo declaration replaced - with _TIFFFindOrRegisterFieldInfo as reported by Ross Finlayson. - -2003-11-17 Frank Warmerdam - - * tif_dirread.c: do not mark all anonymously defined tags to be - IGNOREd. - -2003-11-17 Andrey Kiselev - - * contrib/pds/{tif_pdsdirread.c, tif_pdsdirwrite.c}: Use - TIFFDataWidth() function insted of tiffDataWidth array. - -2003-11-16 Andrey Kiselev - - * libtiff/{tiff.h, tif_dirinfo.c}: Added support for IFD (13) - datatype, intruduced in "Adobe PageMaker TIFF Tech. Notes". - -2003-11-15 Frank Warmerdam - - * Makefile.in: fixed missing backslash for tif_color.c in list. - -2003-11-13 Andrey Kiselev - - * libtiff/{tif_color.c, tif_getimage.c, tiffio.h, Makefile.in}: - New color space conversion code: CIE L*a*b* 1976 images now supported - by the TIFFRGBAImage interface. All introduced routines go to new - module tif_color.c. Eventually all color conversion functions should - be moved there. - -2003-11-12 Andrey Kiselev - - * tools/{ras2tiff.c, rasterfile.h}: Properly determine SUN Rasterfiles - with the reverse byte order (it is reported by the magic header - field). Problem reported by Andreas Wiesmann. - - * tools/raw2tiff.c, man/raw2tiff.1: Few improvements in correlation - calculation function. Guessing mechanics now documented in manual page. - -2003-11-11 Andrey Kiselev - - * tools/raw2tiff.c: Implemented image size guessing using - correlation coefficient calculation between two neighbour lines. - -2003-11-09 Frank Warmerdam - - * libtiff/tif_tile.c: remove spurious use of "s" (sample) in the - planarconfig_contig case in TIFFComputeTile(). - - http://bugzilla.remotesensing.org/show_bug.cgi?id=387 - -2003-11-09 Andrey Kiselev - - * libtiff/tiffiop.h: New macros: TIFFmax, TIFFmin and TIFFrint. - -2003-11-07 Andrey Kiselev - - * libtiff/{tiffio.h, tif_strip.c}, man/{TIFFstrip.3t, libtiff.3t}: - Added TIFFRawStripSize() function as suggested by Chris Hanson. - -2003-11-03 Andrey Kiselev - - * libtiff/{tif_lzw.c, tif_fax3.c}: Proper support for update mode as - per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=424 - -2003-10-29 Andrey Kiselev - - * libtiff/libtiff.def: Added TIFFReadRGBAImageOriented. - - * html/build.html: Added note about GNU make requirement. - -2003-10-25 Andrey Kiselev - - * Makefile.in: Fixes in using MAKEFLAGS as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=418 - - * port/install.sh.in: Option -p added to the mkdir command to create - all directory tree structure before installing. - -2003-10-18 Andrey Kiselev - - * /tools/tiff2ps.c: #include replaced with the - #include . - -2003-10-16 Andrey Kiselev - - * Makefile.in: Add an absolute path to the test_pics.sh call. - -2003-10-12 Andrey Kiselev - - * libtiff/tiffcomp.h: #define _BSDTYPES_DEFINED when defining BSD - typedefs. - -2003-10-09 Andrey Kiselev - - * configure, libtiff/{Makefile.in, mkversion.c}: - Relative buildings fixed. - - * tools/Makefile.in: Added "-I../libtiff" to the tiffset building - rule. - -2003-10-07 Andrey Kiselev - - * Makefile.in: Added missed v3.6.0.html. - - * libtiff/tiffio.h: Typo fixed: ORIENTATION_BOTTOMLEFT replaced with - ORIENTATION_BOTLEFT. - -2003-10-04 Andrey Kiselev - - * 3.6.0 final release. - -2003-10-03 Andrey Kiselev - - * libtiff/{tif_getimage.c, tiffio.h}, man/TIFFReadRGBAImage.3t: New - function TIFFReadRGBAImageOriented() implemented to retrieve raster - array with user-specified origin position as suggested by Jason Frank. - See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=322 - - for details. - - * tools/tiff2rgba.c: Switched to use TIFFReadRGBAImageOriented() - instead of TIFFReadRGBAImage(). - - * tools/tiff2ps.c: Fixed possible endless loop as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=404 - -2003-09-30 Andrey Kiselev - - * libtiff/tif_dirread.c: Check field counter against number of fields - in order to fix - - http://bugzilla.remotesensing.org/show_bug.cgi?id=366 - - * libtiff/tif_fax3.c: Fix wrong line numbering as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=342 - -2003-09-25 Andrey Kiselev - - * libtiff/{tiffiop.h, tif_dirread.c, tif_dir.c, tif_open.c, - tif_close.c}: Store a list of opened IFD to prevent looping as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=383 - -2003-09-23 Andrey Kiselev - - * libtiff/tif_dirread.c: More fixes for EstimateStripByteCounts(). See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=358 - -2003-08-21 Andrey Kiselev - - * tools/tiffmedian.c: int declaration replaced with the uint32 to - support large images as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=382 - -2003-08-12 Andrey Kiselev - - * libtiff/Makefile.in: Fixed problem with building in different - directory. - - * tools/tiff2ps.c: Added missing #include . - - * libtiff/tif_dirwrite.c: More fixes for custom tags code - from Ashley Dreier. - -2003-08-07 Andrey Kiselev - - * tools/tiff2ps.c: Added page size setting when creating PS Level 2. - Patch submitted by Balatoni Denes (with corrections from Tom - Kacvinsky). - - * tools/tiff2ps.c: Fixed PS comment emitted when FlateDecode is - being used. Reported by Tom Kacvinsky. - - * libtiff/tif_dirwrite.c: Fixed problem with custom tags writing, - reported by Ashley Dreier. - - * libtiff/tif_print.c: Fixed problem with float tags reading, support - for printing RATIONAL and BYTE tags added. - -2003-08-05 Andrey Kiselev - - * libtiff/tif_lzw.c: Move LZW codec state block allocation back to - TIFFInitLZW(), because its initialization in LZWSetupDecode() cause - problems with predictor initialization. Remove O_RDONLY check during - state block allocation to be able open LZW compressed files in update - mode. - - Problem exist for libtiff version of the tif_lzw.c module. One from - lzw-compression-kit hasn't such troubles. - -2003-08-04 Frank Warmerdam - - * libtiff/tif_write.c: modified tif_write.c so that the various - encoded write functions use tif_postdecode() to apply byte order - swapping (swab) to the application passed data buffer if the same - would be done when reading. This allows us to write pixel data with - more than 8 bits per sample to existing files of a non-native byte - order. One side effect of this change is the applications buffer - itself is altered in this case by the act of writing. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=171 - -2003-07-25 Frank Warmerdam - - * libtiff/tif_open.c: avoid signed/unsigned casting warning - initializing typemask as per patch from J.A. Strother. - - * tools/tiffcp.c: fixed signed/unsigned casting warning. - - * libtiff/tif_print.c: dos2unix conversion. - - * tools/tiffsplit.c: increased the maximum number of pages that - can be split. Patch provided by Andrew J. Montalenti. - -2003-07-11 Andrey Kiselev - - * tools/raw2tiff.c: Added option `-p' to explicitly select color - space of input image data. Closes - - http://bugzilla.remotesensing.org/show_bug.cgi?id=364 - -2003-07-08 Frank Warmerdam - - * tif_aux.c, tif_codec.c, tif_dir.c, tif_dirread.c, tif_extension.c, - tif_fax3.c, tif_getimage.c, tif_luv.c, tif_lzw.c, tif_next.c, - tif_packbits.c, tif_predict.c, tif_print.c, tif_swab.c, tif_thunder.c: - avoid casting warning at /W4. - -2003-07-03 Andrey Kiselev - - * tools/thumbnail.c: Memory leak fixed as reported by Robert S. Kissel. - -2003-06-30 Andrey Kiselev - - * libtiff/tif_pixarlog.c: Unused variables removed. - - * libtiff/{tif_dirread.c, tif_dir.c}: Fixed problem with - EstimateStripByteCounts() as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=358 - - * libtiff/{tif_dirwrite.c, tif_packbits.c}: Fixed compilation on - 64-bit architectures as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=357 - - * libtiff/tif_dirinfo.c: TIFFDataWidth() returns 0 in case of - unknown data type. - -2003-06-19 Frank Warmerdam - - * libtiff/tif_print.c: fixed some serious bugs when printing - custom tags ... almost certain to crash. - - * libtiff/tif_dirread.c: Don't ignore custom fields that are - autodefined. Not sure how this got to be like this. - -2003-06-18 Andrey Kiselev - - * 3.6.0 Beta2 released. - - * tools/tiffcmp.c, man/tiffcmp.1: Fixed problem with unused data - comparing as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=349 - - `-z' option now can be used to set the number of reported different - bytes. - -2003-06-09 Andrey Kiselev - - * tools/tiffcp.c, man/tiffcp.1: Added possibility to specify value -1 - to -r option to get the entire image as one strip. See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=343 - - for details. - -2003-06-04 Andrey Kiselev - - * tools/tiffcp.c: Set the correct RowsPerStrip and PageNumber - values as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=343 - -2003-05-27 Frank Warmerdam - - * libtiff/tif_jpeg.c: modified segment_height calculation to always - be a full height tile for tiled images. Also changed error to just - be a warning. - -2003-05-25 Andrey Kiselev - - * tools/fax2tiff.c: Page numbering fixed, as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=341 - -2003-05-20 Andrey Kiselev - - * contrib/ojpeg/{Makefile.in, jdhuff.h, jinclude.h, ojpeg.c, README}, - configure, Makefile.in: Switched back to the old behaviour. Likely - better solution should be found for OJPEG support. - -2003-05-11 Andrey Kiselev - - * libtiff/mkversion.c: Fixed problem with wrong string size when - reading RELEASE-DATE file. - -2003-05-07 Andrey Kiselev - - * tools/tiff2ps.c: Fixed bug in Ascii85EncodeBlock() function: array - index was out of range. - -2003-05-06 Andrey Kiselev - - * contrib/ojpeg/{Makefile.in, jdhuff.h, jinclude.h, ojpeg.c, README}, - configure, Makefile.in: Improved libtiff compilation with OJPEG - support. Now no need for patching IJG JPEG library, hack requred by - libtiff will be compiled and used in-place. Implemented with - suggestion and help from Bill Allombert, Debian's libjpeg maintainer. - - * libtiff/tif_aux.c: Properly handle TIFFTAG_PREDICTOR in - TIFFVGetFieldDefaulted() function. - -2003-05-05 Andrey Kiselev - - * tools/ppm2tiff.c: PPM header parser improved: now able to skip - comments. - - * tools/tiffdither.c: Fixed problem with bit fill order tag setting: - was not copied from source image. - - * libtiff/getimage.c: Workaround for some images without correct - info about alpha channel as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=331 - -2003-04-29 Andrey Kiselev - - * tools/tiff2ps.c, man/tiff2ps.1: Add ability to generate PS Level 3. - It basically allows one to use the /flateDecode filter for ZIP - compressed TIFF images. Patch supplied by Tom Kacvinsky. Fixes - - http://bugzilla.remotesensing.org/show_bug.cgi?id=328 - - * tools/tiff2ps.c: Force deadzone printing when EPS output specified - as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=325 - -2003-04-17 Andrey Kiselev - - * libtiff/tif_dirread.c: Removed additional check for StripByteCounts - due to problems with multidirectory images. Quality of error messages - improved. - -2003-04-16 Andrey Kiselev - - * tools/tiffcp.c: Fixed problem with colorspace conversion for JPEG - encoded images. See bug entries - - http://bugzilla.remotesensing.org/show_bug.cgi?id=275 - - and - - http://bugzilla.remotesensing.org/show_bug.cgi?id=23 - - * libtiff/tif_dirread.c: Additional check for StripByteCounts - correctness. Fixes - - http://bugzilla.remotesensing.org/show_bug.cgi?id=320 - -2003-03-12 Andrey Kiselev - - * tools/{fax2ps.c, fax2tiff.c, gif2tiff.c, pal2rgb.c, ppm2tiff.c, - ras2tiff.c, raw2tiff.c, rgb2ycbcr.c, thumbnail.c, tiff2bw.c, - tiff2ps.c, tiff2rgba.c, tiffcp.c, tiffdither.c, tiffinfo.c, - tiffmedian.c}: Added library version reporting facility to all tools. - -2003-03-06 Frank Warmerdam - - * port/install.sh.in: Fixed problems with install producing paths - like ///usr/local/lib on cygwin. - -2003-02-27 Andrey Kiselev - - * tools/fax2tiff.c, man/fax2tiff.1: New switch (-X) to set width of - raw input page. Patch supplied by Julien Gaulmin. See - - http://bugzilla.remotesensing.org/show_bug.cgi?id=293 - - for details. - -2003-02-26 Frank Warmerdam - - * libtiff/tif_dir.c: fixed up the tif_postdecode settings - responsible for byte swapping complex image data. - - * libtiff/tif_lzw.c: fixed so that decoder state isn't allocated till - LZWSetupDecode(). Needed to read LZW files in "r+" mode. - -2003-02-07 Andrey Kiselev - - * tools/ppm2tiff.c: Fixed problem with too many arguments. - -2003-02-04 Andrey Kiselev - - * tools/raw2tiff.c: Memory leak fixed. - -2003-02-03 Andrey Kiselev - - * tools/fax2tiff.c, man/fax2tiff.1: Applied patch from Julien Gaulmin - (thanks, Julien!). More switches for fax2tiff tool for better control - of input and output. Details at - - http://bugzilla.remotesensing.org/show_bug.cgi?id=272 - -2003-02-03 Frank Warmerdam - - * libtiff/tif_jpeg.c: Modified to defer initialization of jpeg - library so that we can check if there is already any tile/strip data - before deciding between creating a compressor or a decompressor. - -2003-01-31 Frank Warmerdam - - * libtiff/tif_write.c: TIFFWriteCheck() now fails if the image is - a pre-existing compressed image. That is, image writing to - pre-existing compressed images is not allowed. - - * libtiff/tif_open.c: Removed error if opening a compressed file - in update mode. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=198 - -2003-01-31 Andrey Kiselev - - * config.guess, config.sub: Updated to recent upstream versions. - -2003-01-15 Frank Warmerdam - - * cut 3.6.0 Beta release. - -2002-12-20 Andrey Kiselev - - * tools/fax2ps.c, man/fax2ps.1: Page size was determined - in wrong way as per bug - - http://bugzilla.remotesensing.org/show_bug.cgi?id=239 - -2002-12-17 Frank Warmerdam - - * libtiff/tif_dirread.c: Allow wrong sized arrays in - TIFFFetchStripThing(). - - http://bugzilla.remotesensing.org/show_bug.cgi?id=49 - -2002-12-02 Frank Warmerdam - - * libtiff/tif_dir.c: fix problem with test on td_customValueCount. - Was using realloc even first time. Fix by Igor Venevtsev. - -2002-11-30 Frank Warmerdam - - * libtiff/tif_dir.c: fixed bug with resetting an existing custom - field value. - - * libtiff/tif_dir.c: Fixed potential problem with ascii "custom" - tags in TIFFVGetField() ... added missing break. - -2002-10-14 Frank Warmerdam - - * tools/tiff2ps.c: fixes a problem where "tiff2ps -1e" did not make - the scanline buffer long enough when writing rgb triplets. - The scanline needs to be 3 X the number of dots or else it will - contain an incomplete triplet and programs that try to separate - the eps by redefining the colorimage operator will get messed up. - Patch supplied by William Bader. - - * Makefile.in: added tif_extension.c to file list as per - http://bugzilla.remotesensing.org/show_bug.cgi?id=218. - -2002-10-11 Andrey Kiselev - - * configure, config.site, libtiff/{tif_unix.c, Makefile.in}: Fix for - large files (>2GiB) supporting. New option in the config.site: - LARGEFILE="yes". Should be enough for I/O of the large files. - -2002-10-10 Frank Warmerdam - - * libtiff/html/v3.6.0.html: new release notes. - - * libtiff/index.html: removed faq, cvs snapshot cruft. Added email - link for Andrey. Pointer to v3.6.0.html. - - * libtiff/Makefile.in: added direct rule for tiffvers.h for release. - -2002-10-07 Andrey Kiselev - * tools/tiff2ps.c, man/tiff2ps.1: Applied patch form Sebastian Eken - (thanks, Sebastian!). New switches: - -b # for a bottom margin of # inches - -c center image - -l # for a left margin of # inches - -r rotate the image by 180 degrees - New features merged with code for shrinking/overlapping. - Previously added -c and -n switches (for overriding PS units) renamed - in -x and -y respectively. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=200 - - * html/man/*.html: Updated from actual manual pages. - -2002-10-06 Frank Warmerdam - - * libtiff/tif_jpeg.c: fixed problem with boolean defined with wrong - size on windows. Use #define boolean hack. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=188 - - * libtiff/tiff.h: Don't do special type handling in tiff.h unless - USING_VISUALAGE is defined. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=39 - -2002-10-03 Frank Warmerdam - - * libtiff/tiff.h: added COMPRESSION_JP2000. - -2002-10-02 Andrey Kiselev - - * libtiff/tif_dirread.c: Another fix for the fetching SBYTE arrays - by the TIFFFetchByteArray() function. Should finally resolve - - http://bugzilla.remotesensing.org/show_bug.cgi?id=52 - - * configure: Set -DPIXARLOG_SUPPORT option along with -DZIP_SUPPORT - - * html/Makefile.in: New targets added: html and groffhtml for - producing HTML representations of the manual pages automatically. - html target uses man2html tool, groffhtml uses groff tool. - -2002-09-29 Frank Warmerdam - - * configure, libtiff/Makefile.in: Added SCO OpenServer 5.0.6 support - from John H. DuBois III. - -2002-09-15 Andrey Kiselev - - * Makefile.in, /man/{raw2tiff.1, Makefile.in, libtiff.3}: Added - manual page for raw2tiff(1) tool. - -2002-09-12 Andrey Kiselev - - * /libtiff/{tiffio.h, tif_dir.h}: TIFFDataWidth() declaration moved to - the tiffio.h header file. - - * Makefile.in, /man/{TIFFDataWidth.3t, Makefile.in, libtiff.3}: Added - manual page for TIFFDataWidth() function - -2002-09-08 Frank Warmerdam - - * libtiff/tif_dirread.c: Expand v[2] to v[4] in TIFFFetchShortPair() - as per http://bugzilla.remotesensing.org/show_bug.cgi?id=196. - - * tools/tiff2ps.c: Don't emit BeginData/EndData DSC comments - since we are unable to properly include the amount to skip. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=80 - -2002-09-02 Andrey Kiselev - - * /libtiff/tif_dirread.c: Fixed problem with SBYTE type data fetching - in TIFFFetchByteArray(). Problem described at - http://bugzilla.remotesensing.org/show_bug.cgi?id=52 - -2002-08-22 Andrey Kiselev - - * /libtiff/tif_dirinfo.c: Further additions to free custom fields - in _TIFFSetupFieldInfo() function. - See http://bugzilla.remotesensing.org/show_bug.cgi?id=169 for details. - - * /libtiff/tif_lzw.c: Additional consistency checking added in - LZWDecode() and LZWDecodeCompat(). - Fixes http://bugzilla.remotesensing.org/show_bug.cgi?id=190 - and http://bugzilla.remotesensing.org/show_bug.cgi?id=100 - - * /libtiff/tif_lzw.c: - Added check for valid code lengths in LZWDecode() and - LZWDecodeCompat(). Fixes - http://bugzilla.remotesensing.org/show_bug.cgi?id=115 - -2002-08-16 Andrey Kiselev - - * /libtiff/{Makefile.vc, libtiff.def}: - Missed declarations added. - -2002-08-15 Frank Warmerdam - - * tif_getimage.c: Ensure that TIFFRGBAImageBegin() returns the - return code from the underlying pick function. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=177 - - * tif_dir.h: changed FIELD_CODEC to 66 from 64 to avoid overlap - with FIELD_CUSTOM as mentioned in bug 169. - - * tif_close.c: added logic to free dynamically created anonymous - field definitions to correct a small memory leak. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=169 - -2002-08-10 Andrey Kiselev - - * /tools/{raw2tiff.c, Makefile.in, Makefile.lcc, Makefile.vc}: - New tool: raw2tiff --- raw images to TIFF converter. No manual page yet. - -2002-07-31 Frank Warmerdam - - * libtiff/tif_jpeg.c: Fixed problem with setting of nrows in - JPEGDecode() as per bugzilla bug (issue 1): - - http://bugzilla.remotesensing.org/show_bug.cgi?id=129 - - * libtiff/{tif_jpeg.c,tif_strip.c,tif_print.c}: Hacked tif_jpeg.c to - fetch TIFFTAG_YCBCRSUBSAMPLING from the jpeg data stream if it isn't - present in the tiff tags. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=168 - - * libtiff/tif_read.c, libtiff/tif_write.c: TIFFReadScanline() and - TIFFWriteScanline() now set tif_row explicitly in case the codec has - fooled with the value. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=129 - -2002-06-22 Andrey Kiselev - - * /tools/tiff2ps.c: Added workaround for some software that may crash - when last strip of image contains fewer number of scanlines than - specified by the `/Height' variable. See - http://bugzilla.remotesensing.org/show_bug.cgi?id=164 - for explanation. - -2002-06-21 Andrey Kiselev - - * tools/tiff2ps, man/tiff2ps.1: New functionality for tiff2ps utility: - splitting long images in several pages. See - http://bugzilla.remotesensing.org/show_bug.cgi?id=142 for explanation. - Patch granted by John Williams . - -2002-06-11 Frank Warmerdam - - * libtiff/contrib/win95: renamed to contrib/win_dib. Added new - Tiffile.cpp example of converting TIFF files into a DIB on Win32. - This one is described in: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=143 - - * libtiff/tif_ojpeg.c: Major upgrade from Scott. See details at: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=156 - -2002-05-10 Andrey Kiselev - - * tools/tiff2ps: New commandline switches to override resolution - units obtained from the input file. Closes - http://bugzilla.remotesensing.org/show_bug.cgi?id=131 - -2002-04-26 Andrey Kiselev - - * libtiff/libtiff.def: Added missed declaration. - -2002-04-22 Andrey Kiselev - - * tools/fax2tiff.c: Updated to reflect latest changes in libtiff. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=125 - -2002-04-20 Andrey Kiselev - - * libtiff/tif_open.c: Pointers to custom procedures - in TIFFClientOpen() are checked to be not NULL-pointers. - -2002-04-18 Andrey Kiselev - - * libtiff/libtiff.def: Added missed declarations. - - * libtiff/tif_pixarlog.c: Updated for using tif_tagmethods structure. - -2002-04-16 Andrey Kiselev - - * libtiff/tif_lzw.c: Additional checks for data integrity introduced. - Should finally close - http://bugzilla.remotesensing.org/show_bug.cgi?id=100 - -2002-04-10 Andrey Kiselev - - * tools/tiff2ps: Division by zero fixed. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=88 - -2002-04-09 Andrey Kiselev - - * libtiff/: tif_dirwrite.c, tif_write.c, tiffio.h: - TIFFCheckpointDirectory() routine added. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=124 - - * man/: TIFFWriteDirectory.3t, Makefile.in: Added description - for the new function. - -2002-04-08 Andrey Kiselev - - * libtiff/: tif_codec.c, tif_compress.c, tiffiop.h: Introduced - additional members tif->tif_decodestatus and tif->tif_encodestatus - for correct handling of unconfigured codecs (we should not try to read - data or to define data size without correct codecs). - - * libtiff/tif_getimage.c: The way of codecs checking in TIFFRGBAImageOK - changed. Now it has used tif->tif_decodestatus and - tif->tif_encodestatus. - Should fix http://bugzilla.remotesensing.org/show_bug.cgi?id=119 (in - case of __cvs_8.tif test image). - - * libtiff/: tif_dirinfo.c, tif_dirread.c: Somebody makes a bug in - tif_dirread.c when TIFFCreateAnonFieldInfo was introduced. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=119 in case - of _cvs_00000-00.tif, _cvs_00000-01.tif and _cvs_00000-02.tif. - -2002-04-04 Andrey Kiselev - - * libtiff/: tif_lzw.c: Assertions in LZWDecode and LZWDecodeCompat - replaced by warnings. Now libtiff should read corrupted LZW-compressed - files by skipping bad strips. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=100 - -2002-04-03 Frank Warmerdam - - * libtiff/tif_dirwrite.c: Removed some dead code. - - * libtiff/*: Cleanup some warnings. - - * libtiff/tif_dir.c: Fixed bug with count returned by TIFFGetField() - for variable length FIELD_CUSTOM values. Was int * but should be - u_short *. - -2002-04-01 Andrey Kiselev - - * tools/: tifcp.c: Added support for 'Orientation' tag in tiffcp - utility (at cpStripToTile routine). - -2002-03-27 Frank Warmerdam - - * tif_dirread.c: avoid div-by-zero if rowbytes is zero in chop func. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=111 - - * tif_print.c: Fixed so that ASCII FIELD_CUSTOM values with - passcount set FALSE can be printed (such as TIFFTAG_SOFTWARE). - - * libtiff/tif_dir.c,tif_dirinfo.c,tif_dir.h,tif_ojpeg.c: modified so - that TIFFTAG_SOFTWARE uses FIELD_CUSTOM as an example. - -2002-03-26 Dwight Kelly - - * libtiff/: tiff.h, tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_dirread.c, - tif_dirwrite.c: Added get/put code for new tag XMLPACKET as defined - in Adobe XMP Technote. Added missing INKSET tag value from TIFF 6.0 spec - INKSET_MULTIINK (=2). Added missing tags from Adobe TIFF technotes: - CLIPPATH, XCLIPPATHUNITS, YCLIPPATHUNITS, OPIIMAGEID, OPIPROXY and - INDEXED. Added PHOTOMETRIC tag value from TIFF technote 4 ICCLAB (=9). - -2002-03-26 Andrey Kiselev - - * libtiff/: tif_getimage.c: TIFFReadRGBAStrip and TIFFReadRGBATile - now also uses TIFFRGBAImageOK before reading. This is additional fix - for http://bugzilla.remotesensing.org/show_bug.cgi?id=110 - -2002-03-25 Andrey Kiselev - - * libtiff/: tif_getimage.c: Additional check for supported - codecs added in TIFFRGBAImageOK and TIFFReadRGBAImage now uses - TIFFRGBAImageOK before reading. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=110 - -2002-03-15 Andrey Kiselev - - * libtiff/: tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_dirread.c, - tif_dirwrite.c: Added routine TIFFDataWidth for detrmining - TIFFDataType sizes instead of working with tiffDataWidth array - directly. Should prevent out-of-borders bugs in case of unknown or - broken data types. EstimateStripByteCounts routine modified, so it - won't work when tags with uknown sizes founded. - Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=109 - -2002-03-13 Andrey Kiselev - - * libtiff/tif_getimage.c: Added support for correct handling - `Orientation' tag in gtTileContig. Should be added in other gt* - functions as well, but I have not images for testing yet. Partially - resolves http://bugzilla.remotesensing.org/show_bug.cgi?id=23 - -2002-03-10 Andrey Kiselev - - * libtiff/: tif_dirinfo.c, tif_dirwrite.c: Added possibility to - read broken TIFFs with LONG type used for TIFFTAG_COMPRESSION, - TIFFTAG_BITSPERSAMPLE, TIFFTAG_PHOTOMETRIC. Closes - http://bugzilla.remotesensing.org/show_bug.cgi?id=99 - -2002-03-08 Andrey Kiselev - - * libtiff/Makefile.in, tools/Makefile.in: Shared library will not - be stripped when installing, utility binaries will do. Closes - http://bugzilla.remotesensing.org/show_bug.cgi?id=93 - -2002-02-28 Frank Warmerdam - - * man/TIFFGetField: fixed type of TIFFTAG_COPYRIGHT. - - * man/libtiff.3t: added copyright tag info. - -2002-02-11 Frank Warmerdam - - * libtiff/{tiff.h,tif_fax3.c}: Add support for __arch64__. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=94 - - * man/Makefile.in: Patch DESTDIR handling - - http://bugzilla.remotesensing.org/show_bug.cgi?id=95 - - * configure: OpenBSD changes for Sparc64 and DSO version. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=96 - -2002-02-05 Frank Warmerdam - - * config.site/configure: added support for OJPEG=yes option to enable - OJPEG support from config.site. - -2002-01-27 Frank Warmerdam - - * html/document.html: fixed links for TIFf 6 docs. - -2002-01-18 Frank Warmerdam - - * config.guess, config.sub: Updated from ftp.gnu.org/pub/config. - - * libtiff/tif_read.c: Fixed TIFFReadEncodedStrip() to fail if the - decodestrip function returns anything not greater than zero as per - http://bugzilla.remotesensing.org/show_bug.cgi?id=97 - - * configure: Modify CheckForBigEndian so it can work in a cross - compiled situation. - -2002-01-16 Frank Warmerdam - - * tools/tiffdump.c: include TIFFTAG_JPEGTABLES in tag list. - - * tools/tiffset.c: fix bug in error reporting. - - * tools/tiffcp.c: fix several warnings that show up with -Wall. - -2002-01-04 Frank Warmerdam - - * libtiff/tif_jpeg.c: fixed computation of segment_width for - tiles files to avoid error about it not matching the - cinfo.d.image_width values ("JPEGPreDecode: Improper JPEG strip/tile - size.") for ITIFF files. Apparently the problem was incorporated since - 3.5.5, presumably during the OJPEG/JPEG work recently. - -2001-12-15 Frank Warmerdam - - * configure, libtiff/Makefile.in: Changes for building on MacOS 10.1. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=94 - - * libtiff/tif_getimage.c: If DEFAULT_EXTRASAMPLE_AS_ALPHA is 1 - (defined in tiffconf.h - 1 by default) then the RGBA interface - will assume that a fourth extra sample is ASSOCALPHA if the - EXTRASAMPLE value isn't set for it. This changes the behaviour of - the library, but makes it work better with RGBA files produced by - lots of applications that don't mark the alpha values properly. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=93 - http://bugzilla.remotesensing.org/show_bug.cgi?id=65 - -2001-12-12 Frank Warmerdam - - * libtiff/tif_jpeg.c: allow jpeg data stream sampling values to - override those from tiff directory. This makes this work with - ImageGear generated files. - -2001-12-07 Frank Warmerdam - - * html/Makefile.in: added missing images per bug 92. - - * port/Makefile.in: fixed clean target per bug 92. - -2001-11-28 Frank Warmerdam - - * Reissue 3.5.7 release. - - * libtiff/mkversion.c: Fix output of TIFF_VERSION to be - YYYYMMDD so that it is increasing over time. - - * Makefile.in: Ensure that tiffvers.h is regenerated in the - make release target. - - * Makefile.in: added libtiff/tiffvers.h to the release file list. - -2001-11-23 Frank Warmerdam - - * added html/v3.5.7.html, updated html/index.html. - - * Makefile.in: added contrib/addtiffo/tif_ovrcache.{c,h}. - -2001-11-15 Frank Warmerdam - - * configure: fixed test for -lm. - -2001-11-02 Frank Warmerdam - - * Added PHOTOMETRIC_ITULAB as per bug 90. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=90 - -2001-10-10 Frank Warmerdam - - * libtiff/tiff.h: I have created COMPRESSION_CCITT_T4, - COMPRESSION_CCITT_T6, TIFFTAG_T4OPTIONS and TIFFTAG_T6OPTIONS aliases - in keeping with TIFF 6.0 standard in tiff.h - - http://bugzilla.remotesensing.org/show_bug.cgi?id=83 - -2001-09-26 Frank Warmerdam - - * libtiff/tif_dirwrite.c: added TIFFRewriteDirectory() function. - Updated TIFFWriteDirectory man page to include TIFFRewriteDirectory. - -2001-09-24 Frank Warmerdam - - * libtiff/tif_lzw.c: Avoid MS VC++ 5.0 optimization bug. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=78 - - * libtiff/tif_lzw.c: added dummy LZWSetupEncode() to report an - error about LZW not being available. - - * libtiff/tif_dir.c: propagate failure to initialize compression - back from TIFFSetField() as an error status, so applications can - detect failure. - - * libtiff/tif_dir.c: removed the auto replacement of - COMPRESSION_LZW with COMPRESSION_NONE in _TIFFVSetField(). - - * Removed Makefile, tools/Makefile, port/install.sh, man/Makefile - from CVS as they are all supposed to be auto-generated by configure. - -2001-09-22 Frank Warmerdam - - * libtiff/tif_ojpeg.c: new update from Scott. - -2001-09-09 Frank Warmerdam - - * libtif/tif_fax3.c: Removed #ifdef PURIFY logic, and modified to - always use the "safe" version, even if there is a very slight - cost in performance. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=54 - - * libtiff/Makefile.in: Fixed @DSOSUB_VERSION to be @DSOSUF_VERSION@ - in two places. - - * libtiff/tif_getimage.c: Fixed problem with reading strips or - tiles that don't start on a tile boundary. Fix contributed by - Josep Vallverdu (from HP), and further described in bug 47. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=47 - - * tools/tiff2ps.c: added OJPEG YCbCr to RGB support. - - * libtiff/tif_ojpeg.c: Applied substantial patch from Scott. - -2001-09-06 Frank Warmerdam - - * libtiff/tif_packbits.c: fixed memory overrun error. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=77 - -2001-08-31 Frank Warmerdam - - * libtiff/tif_getimage.c: relax handling of contig case where - there are extra samples that are supposed to be ignored. This - should now work for 8bit greyscale or palletted images. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=75 - -2001-08-28 Frank Warmerdam - - * libtiff/tif_getimage.c: Don't complain for CMYK (separated) - images with more than four samples per pixel. See: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=73 - -2001-08-10 Frank Warmerdam - - * libtiff/tif_getimage.c: Use memmove() instead of TIFFmemcpy() - in TIFFReadRGBATile() to avoid issues in cases of overlapping - buffers. See Bug 69 in Bugzilla. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=69 - - * tools/tiff2rgba.c: fixed getopt() call so that -b works again. - -2001-08-09 Frank Warmerdam - - * libtiff/tiff.h, libtiff/tif_fax3.c: added check for __LP64__ - when checking for 64 bit architectures as per bugzilla bug 67. - -2001-07-27 Frank Warmerdam - - * man/Makefile.in: add TIFFClientOpen link as per debian submitted - bug 66. - -2001-07-20 Frank Warmerdam - - * libtiff/tif_jpeg.c: Define HAVE_BOOLEAN on windows if RPCNDR.H - has been included. - -2001-07-19 Frank Warmerdam - - * libtiff/tif_open.c: Seek back to zero after failed read, - before writing header. - -2001-07-18 Frank Warmerdam - - * libtiff/tif_ojpeg.c: updates from Scott. Handles colors - much better. Now depends on having patched libjpeg as per - patch in contrib/ojpeg/*. - -2001-07-17 Frank Warmerdam - - * */Makefile.in: added DESTDIR support. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=60 - -2001-07-16 Frank Warmerdam - - * configure, libtiff/Makefile.in: applied OpenBSD patches - as per: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=61 - -2001-06-28 Frank Warmerdam - - * libtiff/tif_getimage.c: Fixed so that failure is properly - reported by gtTileContig, gtStripContig, gtTileSeparate and - gtStripSeparate. - - See http://bugzilla.remotesensing.org/show_bug.cgi?id=51 - - * tiffcmp.c: Fixed multi samples per pixel support for ContigCompare. - Updated bug section of tiffcmp.1 to note tiled file issues. - - See http://bugzilla.remotesensing.org/show_bug.cgi?id=53 - -2001-06-22 Frank Warmerdam - - * configure: Changes for DSO generation on AIX provided by - John Marquart . - - * configure, libtiff/Makeifle.in: Modified to build DSOs properly - on Darwin thanks to Robert Krajewski (rpk@alum.mit.edu) and - Keisuke Fujii (fujiik@jlcuxf.kek.jp). - -2001-06-13 Frank Warmerdam - - * tools/tiff2rgba.c: added -n flag to avoid emitting alpha component. - - * man/tiff2rgba.1: new - -2001-05-22 Frank Warmerdam - - * Added tiffset and tif_ojpeg to the dist lists in Makefile.in. - -2001-05-13 Frank Warmerdam - - * libtiff/tools/thumbnail.c: changed default output compression - to packbits from LZW since LZW isn't generally available. - -2001-05-12 Frank Warmerdam - - * libtiff/tif_ojpeg.c: New. - libtiff/tif_jpeg.c, tiffconf.h, tif_getimage.c: changes related - to OJPEG support. - - Scott Marovich supplied OJPEG support. - -2001-05-11 Frank Warmerdam - - * tiff.h: removed, it duplicates libtiff/tiff.h. - -2001-05-08 Frank Warmerdam - - * libtiff/tif_dirinfo.c: moved pixar and copyright flags to - ensure everything is in order. - - * libtiff/libtiff.def: added TIFFCreateDirectory and - TIFFDefaultStripSize as per: - - http://bugzilla.remotesensing.org/show_bug.cgi?id=46 - -2001-05-02 Frank Warmerdam - - * libtiff/tif_dirinfo.c: Modified the TIFF_BYTE definition for - TIFFTAG_PHOTOSHOP to use a writecount of TIFF_VARIABLE2 (-3) to - force use of uint32 counts instead of short counts. - - * libtiff/tif_dirwrite.c: Added support for TIFF_VARIABLE2 in the - case of writing TIFF_BYTE/TIFF_SBYTE fields. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=43 - -2001-05-01 Frank Warmerdam - - * libtiff/tif_dirinfo.c: removed duplicate TIFFTAG_PHOTOSHOP as per - bug report http://bugzilla.remotesensing.org/show_bug.cgi?id=44 - -2001-04-05 Frank Warmerdam - - * tiffio.h: removed C++ style comment. - - * configure: fixed up SCRIPT_SH/SHELL handling. - - * Makefile.in: Fixed SCRIPT_SH/SHELL handling. - - * config.guess: documented more variables as per bug 40. - -2001-04-03 Frank Warmerdam - - * configure, *Makefile.in: Various changes to improve configuration - for HP/UX specifically, and also in general. They include: - - Try to handle /usr/bin/sh instead of /bin/sh where necessary. - - Upgrade to HP/UX 10.x+ compiler, linker and dso options. - - Fixed mmap() test to avoid MMAP_FIXED ... it isn't available on HP - - Use -${MAKEFLAGS} in sub makes from makefiles. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=40 - -2001-04-02 Frank Warmerdam - - * libtiff/tiff.h: Applied hac to try and resolve the problem - with the inttypes.h include file on AIX. - - See http://bugzilla.remotesensing.org/show_bug.cgi?id=39 - - * VERSION: update to 3.5.7 beta in preparation for release. - - * configure/config.site: modified to check if -lm is needed for - MACHDEPLIBS if not supplied by config.site. Needed for Darwin. - - * config.guess: updated wholesale to an FSF version apparently - from 1998 (as opposed to 1994). This is mainly inspired by - providing for MacOS X support. - -2001-03-29 Frank Warmerdam - - * configure, Makefile.in, etc: added support for OPTIMIZER being - set from config.site. - -2001-03-28 Frank Warmerdam - - * fax2ps.c: Helge (libtiff at oldach.net) submitted fix: - - Here's a fix for fax2ps that corrects behaviour for non-Letter paper - sizes. It fixes two problems: - - Without scaling (-S) the fax is now centered on the page size specified - with -H and/or -W. Before, fax2ps was using an obscure and practially - useless algorithm to allocate the image relative to Letter sized paper - which sometime sled to useless whitespace on the paper, while at the - same time cutting of the faxes printable area at the opposite border. - - Second, scaling now preserves aspect ratio, which makes unusual faxes - (in particular short ones) print properly. - - See http://bugzilla.remotesensing.org/show_bug.cgi?id=35 - - * tiff2ps.c/tiff2ps.1: Substantial changes to tiff2ps by - Bruce A. Mallett. See check message for detailed information - on all the changes, including a faster encoder, fixes for level - 2 PostScript, and support for the imagemask operator. - -2001-03-27 Frank Warmerdam - - * libtiff/tiffio.h: Changed "#if LOGLUV_PUBLIC" to - "#ifdef LOGLUV_PUBLIC" so it will work with VisualAge on AIX. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=39 - -2001-03-16 Frank Warmerdam - - * tif_dirinfo.c: moved definition of copyright tag in field list. - Apparently they have to be in sorted order by tag id. - -2001-03-13 Frank Warmerdam - - * tif_getimage.c: Added support for 16bit minisblack/miniswhite - images in RGBA interface. - -2001-03-02 Frank Warmerdam - - * Added TIFFTAG_COPYRIGHT support. - -2001-02-19 Frank Warmerdam - - * Brent Roman contributed updated tiffcp utility (and tiffcp.1) - with support for extracting subimages with the ,n syntax, and also - adding the -b bias removal flag. - -2001-02-16 Frank Warmerdam - - * libtiff/libtiff.def: Brent Roman submitted new version adding - serveral missing entry points. - - * libtiff/tif_dirinfo.c: don't declare tiffFieldInfo static on VMS. - Some sort of weird VMS thing. - - http://bugzilla.remotesensing.org/show_bug.cgi?id=31 - - * tif_luv.c/tiff.h/tiffio.h: - New version of TIFF LogLuv (SGILOG) modules contributed by Greg Ward - (greg@shutterfly.com). He writes: - - 1) I improved the gamut-mapping function in tif_luv.c for imaginary - colors, because some images were being super-saturated on the input - side and this resulted in some strange color shifts in the output. - - 2) I added a psuedotag in tiff.h to control random dithering during - LogLuv encoding. This is turned off by default for 32-bit LogLuv and - on for 24-bit LogLuv output. Dithering improves the average color - accuracy over the image. - - 3) I added a #define for LOG_LUV_PUBLIC, which is enabled by default in - tiffio.h, to expose internal routines for converting between LogLuv and - XYZ coordinates. This is helpful for writing more efficient, - specialized conversion routines, especially for reading LogLuv files. - - Changes applied with minor edits. - -2001-01-23 Frank Warmerdam - - * tif_fax3.c: keep rw_mode flag internal to fax3 state to remember - whether we are encoding or decoding. This is to ensure graceful - recovery if TIFFClientOpen() discovers an attempt to open a compressed - file for "r+" access, and subsequently close it, as it resets the - tif_mode flag to O_RDONLY in this case to avoid writes, confusing the - compressor's concept of whether it is in encode or decode mode. - -2001-01-08 Mike Welles - - * Makefile.in: Now cleaning up after itself after creating the .tar.gz and .zip - -2001-01-07 Frank Warmerdam - - * html/libtiff.html: Fixed arguments in example for TIFFRGBAImageGet() - as per bug report by Patrick Connor. - -2000-12-28 Frank Warmerdam - - * Added RELEASE-DATE file to release file list. - - * Fixed libtiff/makefile.vc to make tiffvers.h not version.h. - -2000-12-22 Mike Welles - * added link to CVS mirror from index.html - - * updated html/internals.html to note that LZW compression is - not supported by default. - -2000-12-22 Frank Warmerdam - - * updated html/libtiff.html to not point at Niles' old JPL web site - for the man pages, point at www.libtiff.org. - -2000-12-21 Frank Warmerdam - - * libtiff/tif_apple.c: Applied "Carbon" support patches supplied by - Leonard Rosenthol . May interfere - with correct building on older systems. If so, please let me know. - -2000-12-19 Mike Welles - - * Took out LZW Encoding from tif_lzw.c - - * Created HOWTO-RELEASE - - * Created html/v3.5.6.html - - * updated index.html - -2000-12-01 Frank Warmerdam - - * Added patches for EOFB support in tif_fax3.c and tif_fax3.h. - Patches supplied by Frank Cringle - Example file at: ftp://ftp.remotesensing.org/pub/libtiff/eofb_396.tif - -2000-11-24 Frank Warmerdam - - * libtiff/Makefile.in: Added an installPrivateHdrs and install-private - target so that the private headers required by libgeotiff can be - installed with the others. They are not installed by default. - - * libtiff/Makefile.in: Added @MACHLIBDEPS@ to LINUXdso and GNULDdso - targets so libtiff.so will be built with an explicit dependency - on libm.so. - - * libtiff/Makefile.in: Use softlinks to link libtiff.so.3 to - libtiff.so.3.5.5. - - * libtiff/Makefile.in & configure: Remove all references to the ALPHA - file, or ALPHA version logic. Added stuff about DIST_POINT in - place of DIST_TYPE and the alpha release number stuff. - -2000-11-22 Frank Warmerdam - - * I have applied a patch from Steffen Moeller to - the configure script so that it now accepts the --prefix, and - --exec-prefix directives. - -2000-11-13 Frank Warmerdam - - * I have made a variety of modifications in an effort to ensure the - TIFFLIB_VERSION macro is automatically generated from the RELEASE-DATE - file which seems to be updated regularly. - - o mkversion.c now reads RELEASE-DATE and emits TIFFLIB_VERSION in - version include file. - o renamed version.h to tiffvers.h because we now have to install it - with the public libtiff include files. - o include tiffvers.h in tiffio.h. - o updated tif_version.c to use tiffvers.h. - o Updated Makefile.in accordingly. - - * As per http://bugzilla.remotesensing.org/show_bug.cgi?id=25 - I have updated the win32 detection rules in tiffcomp.h. - -2000-10-20 Frank Warmerdam - - * tif_getimage.c: Fixed RGBA translation for YCbCr images for which - the strip/tile width and height aren't multiples of the sampling size. - See http://bugzilla.remotesensing.org/show_bug.cgi?id=20 - Some patches from Rick LaMont of Dot C Software. - - * Modified tif_packbits.c encoder to avoid compressing more - data than provided if rowsize doesn't factor into provided data - (such as occurs for YCbCr). - -2000-10-19 Frank Warmerdam - - * tools/rgb2ycbcr.c: fixed output strip size to account for vertical - roundup if rows_per_strip not a multiple of vertical sample size. - -2000-10-16 Frank Warmerdam - - * tif_dir.c: Clear TIFF_ISTILED flag in TIFFDefaultDirectory - as per http://bugzilla.remotesensing.org/show_bug.cgi?id=18 - from vandrove@vc.cvut.cz. - - * Modified tif_packbits.c decoding to avoid overrunning the - output buffer, and to issue a warning if data needs to be - discarded. See http://bugzilla.remotesensing.org/show_bug.cgi?id=18 - -2000-10-12 Frank Warmerdam - - * Modified tiff2bw to ensure portions add to 100%, and that - white is properly recovered. - - See bug http://bugzilla.remotesensing.org/show_bug.cgi?id=15 - Patch c/o Stanislav Brabec - -2000-09-30 Frank Warmerdam - - * Modified TIFFClientOpen() to emit an error on an attempt to - open a comperessed file for update (O_RDWR/r+) access. This is - because the compressor/decompressor code gets very confused when - the mode is O_RDWR, assuming this means writing only. See - bug http://bugzilla.remotesensing.org/show_bug.cgi?id=13 - -2000-09-27 Frank Warmerdam - - * Added GNULDdso target an`d switched linux and freebsd to use it. - -2000-09-26 Frank Warmerdam - - * Applied patch for 0x0000 sequences in tif_fax3.h's definition - of EXPAND1D() as per bug 11 (from Roman). - -2000-09-25 Frank Warmerdam - * Fixed tiffcomp.h to avoid win32 stuff if unix #defined, to improve - cygwin compatibility. - - * Applied patch from Roman Shpount to tif_fax3.c. This seems to - be a proper fix to the buffer sizing problem. See - http://bugzilla.remotesensing.org/show_bug.cgi?id=11 - - * Fixed tif_getimage.c to fix overrun bug with YCbCr images without - downsampling. http://bugzilla.remotesensing.org/show_bug.cgi?id=10 - Thanks to Nick Lamb for reporting the - bug and proving the patch. - -2000-09-18 Frank Warmerdam - - * Fixed tif_jpeg.c so avoid destroying the decompressor before - we are done access data thanks to bug report from: - Michael Eckstein . - - * Reverted tif_flush change. - -2000-09-14 Frank Warmerdam - - * tif_flush.c: Changed so that TIFFFlushData() doesn't return an - error when TIFF_BEENWRITING is not set. This ensures that the - directory contents can still be flushed by TIFFFlush(). - -2000-08-14 Frank Warmerdam - - * tif_open.c: Don't set MMAP for O_RDWR files. - - * tif_open.c: Set STRIPCHOP_DEFAULT for O_RDWR as well as O_RDONLY - so that files opened for update can be strip chopped too. - - * tif_read.c: fixed up bug with files missing rowsperstrip and - the strips per separation fix done a few weeks ago. - -2000-07-17 Frank Warmerdam - - * Tentatively added support for SAMPLEFORMAT_COMPLEXIEEEFP, and - SAMPLEFORMAT_COMPLEXINT. - -2000-07-13 Mike Welles - - * index.html, bugs.html: added bugzilla info. - -2000-07-12 Frank Warmerdam - - * tif_read.c: fix subtle bug with determining the number of - rows for strips that are the last strip in a separation but - not the last strip of all in TIFFReadEncodedStrip(). - - * Applied 16/32 bit fix to tif_fax3.c. Fix supplied by - Peter Skarpetis - -2000-06-15 Frank Warmerdam - - * Modified tiffio.h logic with regard to including windows.h. It - won't include it when building with __CYGWIN__. - -2000-05-11 Frank Warmerdam - - * README: update to mention www.libtiff.org, don't list Sam's old - email address. - - * configure: Fixed DSO test for Linux as per patch from - Jan Van Buggenhout . - -2000-04-21 Frank Warmerdam - - * libtiff/tif_dirread.c: Don't use estimate strip byte count for - one tile/strip images with an offset, and byte count of zero. These - could be "unpopulated" images. - -2000-04-18 Frank Warmerdam - - * contrib/addtiffo: Added "averaging" resampling option. - - * tools/tiffsplit.c: Copy TIFFTAG_SAMPLEFORMAT. - -Tue Apr 18 16:18:08 2000 Frank Warmerdam - - * tools/Makefile.in: Modified to install properly on SGI. - -2000-04-12 Mike Welles - * configure: Fixed stupid mistake in libc6 test on Linux - -2000-04-04 Mike Welles - * tif_win32.c: Applied patch to fix overreads and ovverwrites - caught by BoundsChecker. From Arvan Pritchard - (untested). - - * tif_getimage.c: Applied patch to silence VC6 warnings. From - Arvan Pritchard - - * tif_lzw.c: Applied patch to silence VC6 warnings. From - Arvan Pritchard - -2000-03-28 Frank Warmerdam - - * Added contrib/stream (stream io) code submitted by Avi Bleiweiss. - -2000-03-28 Frank Warmerdam *** 3.5.5 release *** - - * fax2ps: Fixed mixup of width and height in bounding box statement - as per submission by Nalin Dahyabhai . - -2000-03-27 Mike Welles - - * fax2ps: Modified printruns to take uint32 instead of uint16. - Patch courtesy of Bernt Herd - -2000-03-20 Mike Welles - - * configure: added test for libc6 for linux targets. Bug reported by - Stanislav Brabec - - * Added 3.5 docs to html/Makefile.in. - Thanks to Stanislav Brabec - - * configure: fixed bugs in sed scripts - (applied sed script s:/@:s;@:;s:/s;;:;: to configure). - fix submitted to Stanislav Brabec - - * tools/iptcutil was not in files list, and wasn't being - added to tar archive. Updated Makefile.in. - -2000-03-17 Frank Warmerdam - - * tif_fax3.c: Fixed serious bug introduced during the uint16->uint32 - conversion for the run arrays. - -2000-03-03 Frank Warmerdam - - * Set td_sampleformat default to SAMPLEFORMAT_UINT instead of - SAMPLEFORMAT_VOID in TIFFDefaultDirectory() in tif_dir.c. - -2000-03-02 Frank Warmerdam - - * Added "GetDefaulted" support for TIFFTAG_SAMPLEFORMAT in tif_aux.c. - - * Patched tif_fax3.c so that dsp->runs is allocated a bit bigger - to avoid overruns encountered with frle_bug.tif. - -Tue Feb 15 22:01:05 2000 Frank Warmerdam - - * Fixed tools/tiffcmp so that stopondiff testing works. - Patch care of Joseph Orost . - -2000-01-28 - - * Modified tif_unix.c to support 2-4GB seeks if USE_64BIT_API is - set to 1, and added default (off) setting in tiffconf.h. This - should eventually be set by the configure script somehow. - - The original work on all these 2-4GB changes was done by - Peter Smith (psmith@creo.com). - - * Modified tif_win32.c to support 2-4GB seeks. - - * tentatively changed toff_t to be unsigned instead of signed to - facilitate support for 2-4GB files. - - * Updated a variety of files to use toff_t. Fixed some mixups - between toff_t and tsize_t. - -Fri Jan 28 10:13:49 2000 Frank Warmerdam - - * Largely reimplemented contrib/addtiffo to avoid temp files, - updating the TIFF file in place. Fixed a few other bugs to. - - * Set tif_rawdatasize to zero when freeing raw data buffer in - TIFFWriteDirectory(). - - * Enabled "REWRITE_HACK" in tif_write.c by default. - - * Fix bug in tif_write.c when switching between reading one directory - and writing to another. - - * Made TIFFWriteCheck() public, and added TIFFCreateDirectory() - -Wed Jan 5 12:37:48 2000 Frank Warmerdam - - * Added TIFFmemory(3t) functions to libtiff.def. - -Tue Jan 4 13:39:00 2000 Frank Warmerdam - - * Added libtiff/libtiff.def to TIFFILES distribution list. - -Mon Dec 27 12:13:39 EST 1999 Mike Welles - - * Created lzw compression kit, as a new module (libtiff-lzw-compression-kit). - - * Altered descriptions in tools to reflect "by default" lzw not supported - - * Updated index.html to note lzw compression kit. - -Tue Dec 21 14:01:51 1999 Frank Warmerdam - - * Added fax3sm_winnt.c to distribution list in Makefile.in. - -Tue Dec 21 11:04:45 EST 1999 Mike Welles *** 3.5.4 release *** - - * Aadded Pixar tag support. Contributed by Phil Beffery - - * Made one more change to tif_dir.c for removal of LZW compression. Also added notice - when LZW compression invoked. - - * Changed default compression in tools to TIFF_PACKBITS, and changed usage descriptions - in tools to reflect removal of LZW compression - -Mon Dec 20 18:39:02 EST 1999 Mike Welles - - * Fixed bug that caused LZW (non) compression to segfault. Added - warning about LZW compression removed being removed, and why. - - * Added nostrip to install in tools/Makefile.in so that debugging - symbols are kept. - -Tue Dec 7 12:04:47 EST 1999 Mike Welles - - * Added patch from Ivo Penzar , - supporting Adobe ZIP deflate. Untested. - -Sat Dec 4 15:47:11 1999 Frank Warmerdam - - * Made Packbits the default compression in tools/tiff2rgba.c instead - of LZW. - -Tue Nov 30 14:41:43 1999 Frank Warmerdam *** 3.5.3. release *** - - * Added tif_luv to contrib/djgpp/Makefile.lib. - -Tue Nov 30 14:15:32 EST 1999 Mike Welles - - * Added zip creation to relase makefile target - - * Added html for TIFFWriteTile.3t man page. - -Tue Nov 30 09:20:16 1999 Frank Warmerdam - - * Added some changes to tif_write.c to support rewriting existing - fixed sized tiles and strips. Code mods disabled by default, only - enabled if REWRITE_HACK is defined for now. - -Mon Nov 29 11:43:42 1999 Frank Warmerdam - - * Added TIFFWriteTile.3t man page. - -Sun Nov 28 20:36:18 1999 Frank Warmerdam - - * Added notes on use of makefile.vc in build.html, and fixed - email subscription address. - -199-11-28 Mike Welles - - * Fixed apocalypse-inducing y2k bug in contrib/ras/ras2tiff.c - - * Did some casts cleaning up to reduce compiler warnings in tif_fax3.c, - from Bruce Carmeron -- modifications of - changes made by Frank (sun cc still complained on cast). - - * Added tiffconf.h to install target per request from Bill - Radcliffe : "We need a way for ImageMagick to - know features have been compiled into the TIFF library in order to - handle things properly". - -Sat Nov 27 16:49:21 1999 Frank Warmerdam - - * fixed various VC++ warnings as suggested by Gilles Vollant - . - -Wed Nov 24 12:08:16 1999 Frank Warmerdam - - * Modified TIFFquery.3t man pages info on TIFFIsByteSwapped() to - not imply applications are responsible for image data swapping. - -1999-11-22 Mike Welles - * HTML-ized the man pages, added to html/man - - * Removed LZW Compression to comply with Unisys patent extortion. - -1999-09-29 Mike Welles - * Corrected one remaining 16 -> 32 bit value in tif_fax3.c, - From Ivo Penzar - -1999-09-26 Mike Welles *** 3.5.2 release *** - * Corrected alpha versioning. - - * Removed distinction between alpha and release targets in Makefile.in. - - * added release.stamp target, which tags cvs tree, and updates - "RELEASE-DATE" - - * added releasediff target, which diffs tree with source as of - date in "RELEASE-DATE" - - * Ticked up version to 3.5.2 (alpha 01 -- but I think we'll moving - away from alpha/non-alpha distinctions). - - * updated html to reflect release - -1999-09-23 - - * Set O_BINARY for tif_unix.c open() ... used on cygwin for instance. - - * Added CYGWIN case in configure. - -Fri Sep 17 00:13:51 CEST 1999 Mike Welles - - * Applied Francois Dagand's patch to handle fax decompression bug. - (sizes >= 65536 were failing) - -Tue Sep 14 21:31:43 1999 Frank Warmerdam - - * Applied "a" mode fix to tif_win32.c/TIFFOpen() as suggested - by Christopher Lawton - -Wed Sep 8 08:19:18 1999 Frank Warmerdam - - * Added IRIX/gcc, and OSF/1 4.x support on behalf of - Albert Chin-A-Young - - * Added TIFFReassignTagToIgnore() API on behalf of - Bruce Cameron . Man page still pending. - -Wed Aug 25 11:39:07 1999 Frank Warmerdam - - * Added test target in Makefile, test_pics.sh script and pics/*.rpt - files to provide for a rudimentary testsuite. - - * Added contrib/tags back from old distribution ... fixed up a bit. - -1999-08-16 - - * Added simple makefile.vc makefiles for building with MS VC++ - on Windows NT/98/95 in console mode. Stuff in contrib/win* make give - better solutions for some users. - -Mon Aug 16 21:52:11 1999 Frank Warmerdam - - * Added addtiffo (add overviews to a TIFF file) in contrib. Didn't - put it in tools since part of it is in C++. - -1999-08-16 Michael L. Welles - - * Updated html/index.html with anon CVS instructions. - -Mon Aug 16 13:18:41 1999 Frank Warmerdam - - * pre-remove so link before softlink in LINUXdso action in - libtiff/Makefile.in to avoid failure on LINUXdso builds other than - the first. - - * Fixed problem with cvtcmap() in tif_getimage.c modifying the - colormaps owned by the TIFF handle itself when trying to fixup wrong - (eight bit) colormaps. Corrected by maintaining a private copy of - the colormap. - - * Added TIFFReadRGBATile()/TIFFReadRGBAStrip() support in - tif_getimage.c. - - * CVS Repository placed at remotesensing.org. ChangeLog added. diff --git a/thirdparty/tiff-4.0.3/README.vms b/thirdparty/tiff-4.0.3/README.vms deleted file mode 100644 index 44d96639..00000000 --- a/thirdparty/tiff-4.0.3/README.vms +++ /dev/null @@ -1,12 +0,0 @@ -Dear OpenVMS user -to make this library, execute -$@CONFIGURE -$@BUILD - -Build process should be error and warning free. When process will be finished, -LIBTIFF$STRATUP.COM file containing all required definitions, will be created. -Please call it from system startup procedure or individual user procedure LOGIN.COM -To link software with libtiff, use TIFF:LIBTIFF.OPT - -best regards, -Alexey Chupahin, elvis_75@mail.ru diff --git a/thirdparty/tiff-4.0.3/RELEASE-DATE b/thirdparty/tiff-4.0.3/RELEASE-DATE deleted file mode 100644 index f0326d2c..00000000 --- a/thirdparty/tiff-4.0.3/RELEASE-DATE +++ /dev/null @@ -1 +0,0 @@ -20120922 diff --git a/thirdparty/tiff-4.0.3/VERSION b/thirdparty/tiff-4.0.3/VERSION deleted file mode 100644 index c4e41f94..00000000 --- a/thirdparty/tiff-4.0.3/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.0.3 diff --git a/thirdparty/tiff-4.0.3/config/compile b/thirdparty/tiff-4.0.3/config/compile deleted file mode 100755 index 1b1d2321..00000000 --- a/thirdparty/tiff-4.0.3/config/compile +++ /dev/null @@ -1,142 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand `-c -o'. - -scriptversion=2005-05-14.22 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. -# Written by Tom Tromey . -# -# 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 -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand `-c -o'. -Remove `-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file `INSTALL'. - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; -esac - -ofile= -cfile= -eat= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. - # So we strip `-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no `-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # `.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` - -# Create the lock directory. -# Note: use `[/.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/thirdparty/tiff-4.0.3/config/depcomp b/thirdparty/tiff-4.0.3/config/depcomp deleted file mode 100755 index ca5ea4e1..00000000 --- a/thirdparty/tiff-4.0.3/config/depcomp +++ /dev/null @@ -1,584 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2006-10-15.18 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 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 -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - 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. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$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. -## 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" - rm -f "$tmpdepfile" - ;; - -hp) - # 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 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> $depfile - echo >> $depfile - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> $depfile - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" - if test "$libtool" = yes; then - "$@" -Wc,-M - else - "$@" -M - fi - stat=$? - - if test -f "$tmpdepfile"; then : - else - stripped=`echo "$stripped" | sed 's,^.*/,,'` - tmpdepfile="$stripped.u" - fi - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - - if test -f "$tmpdepfile"; then - outname="$stripped.o" - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## 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" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no - for arg in "$@"; do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix="`echo $object | sed 's/^.*\././'`" - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## 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" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - "$@" || exit $? - IFS=" " - for arg - do - case "$arg" in - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/thirdparty/tiff-4.0.3/config/install-sh b/thirdparty/tiff-4.0.3/config/install-sh deleted file mode 100755 index 4fbbae7b..00000000 --- a/thirdparty/tiff-4.0.3/config/install-sh +++ /dev/null @@ -1,507 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2006-10-14.15 - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -posix_glob= -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chmodcmd=$chmodprog -chowncmd= -chgrpcmd= -stripcmd= -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src= -dst= -dir_arg= -dstarg= -no_target_directory= - -usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: --c (ignored) --d create directories instead of installing files. --g GROUP $chgrpprog installed files to GROUP. --m MODE $chmodprog installed files to MODE. --o USER $chownprog installed files to USER. --s $stripprog installed files. --t DIRECTORY install into DIRECTORY. --T report an error if DSTFILE is a directory. ---help display this help and exit. ---version display version info and exit. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - shift - shift - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -s) stripcmd=$stripprog - shift - continue;; - - -t) dstarg=$2 - shift - shift - continue;; - - -T) no_target_directory=true - shift - continue;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac -done - -if test $# -ne 0 && test -z "$dir_arg$dstarg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src ;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dstarg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dstarg - # 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. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dstarg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix=/ ;; - -*) prefix=./ ;; - *) prefix= ;; - esac - - case $posix_glob in - '') - if (set -f) 2>/dev/null; then - posix_glob=true - else - posix_glob=false - fi ;; - esac - - oIFS=$IFS - IFS=/ - $posix_glob && set -f - set fnord $dstdir - shift - $posix_glob && set +f - IFS=$oIFS - - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ - || { - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - if test -f "$dst"; then - $doit $rmcmd -f "$dst" 2>/dev/null \ - || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ - && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ - || { - echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - } || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/thirdparty/tiff-4.0.3/config/missing b/thirdparty/tiff-4.0.3/config/missing deleted file mode 100755 index 1c8ff704..00000000 --- a/thirdparty/tiff-4.0.3/config/missing +++ /dev/null @@ -1,367 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2006-05-10.23 - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# 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 -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). -case $1 in - lex|yacc) - # Not GNU programs, they don't have --version. - ;; - - tar) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $1 in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/thirdparty/tiff-4.0.3/config/mkinstalldirs b/thirdparty/tiff-4.0.3/config/mkinstalldirs deleted file mode 100755 index ef7e16fd..00000000 --- a/thirdparty/tiff-4.0.3/config/mkinstalldirs +++ /dev/null @@ -1,161 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy - -scriptversion=2006-05-11.19 - -# Original author: Noah Friedman -# Created: 1993-05-16 -# Public domain. -# -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -nl=' -' -IFS=" "" $nl" -errstatus=0 -dirmode= - -usage="\ -Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... - -Create each directory DIR (with mode MODE, if specified), including all -leading file name components. - -Report bugs to ." - -# process command line arguments -while test $# -gt 0 ; do - case $1 in - -h | --help | --h*) # -h for help - echo "$usage" - exit $? - ;; - -m) # -m PERM arg - shift - test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } - dirmode=$1 - shift - ;; - --version) - echo "$0 $scriptversion" - exit $? - ;; - --) # stop option processing - shift - break - ;; - -*) # unknown option - echo "$usage" 1>&2 - exit 1 - ;; - *) # first non-opt arg - break - ;; - esac -done - -for file -do - if test -d "$file"; then - shift - else - break - fi -done - -case $# in - 0) exit 0 ;; -esac - -# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and -# mkdir -p a/c at the same time, both will detect that a is missing, -# one will create a, then the other will try to create a and die with -# a "File exists" error. This is a problem when calling mkinstalldirs -# from a parallel make. We use --version in the probe to restrict -# ourselves to GNU mkdir, which is thread-safe. -case $dirmode in - '') - if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - echo "mkdir -p -- $*" - exec mkdir -p -- "$@" - else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - test -d ./-p && rmdir ./-p - test -d ./--version && rmdir ./--version - fi - ;; - *) - if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && - test ! -d ./--version; then - echo "mkdir -m $dirmode -p -- $*" - exec mkdir -m "$dirmode" -p -- "$@" - else - # Clean up after NextStep and OpenStep mkdir. - for d in ./-m ./-p ./--version "./$dirmode"; - do - test -d $d && rmdir $d - done - fi - ;; -esac - -for file -do - case $file in - /*) pathcomp=/ ;; - *) pathcomp= ;; - esac - oIFS=$IFS - IFS=/ - set fnord $file - shift - IFS=$oIFS - - for d - do - test "x$d" = x && continue - - pathcomp=$pathcomp$d - case $pathcomp in - -*) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - else - if test ! -z "$dirmode"; then - echo "chmod $dirmode $pathcomp" - lasterr= - chmod "$dirmode" "$pathcomp" || lasterr=$? - - if test ! -z "$lasterr"; then - errstatus=$lasterr - fi - fi - fi - fi - - pathcomp=$pathcomp/ - done -done - -exit $errstatus - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/thirdparty/tiff-4.0.3/contrib/win_dib/Makefile.am b/thirdparty/tiff-4.0.3/contrib/win_dib/Makefile.am deleted file mode 100644 index 2bdccd0f..00000000 --- a/thirdparty/tiff-4.0.3/contrib/win_dib/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# Tag Image File Format (TIFF) Software -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Process this file with automake to produce Makefile.in. - -EXTRA_DIST = Makefile.w95 README.Tiffile README.tiff2dib Tiffile.cpp tiff2dib.c - diff --git a/thirdparty/tiff-4.0.3/html/man/bmp2tiff.1.html b/thirdparty/tiff-4.0.3/html/man/bmp2tiff.1.html deleted file mode 100644 index 1104a49f..00000000 --- a/thirdparty/tiff-4.0.3/html/man/bmp2tiff.1.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - -BMP2TIFF - - - -

BMP2TIFF

-NAME
-SYNOPSIS
-DESCRIPTION
-OPTIONS
-SEE ALSO
- -
- -

NAME

- - - - - -
-

bmp2tiff − create a TIFF file from a -Microsoft Windows Device Independent Bitmap image file

-
- -

SYNOPSIS

- - - - - -
-

bmp2tiff [ options ] input.bmp -output.tiff

-
- -

DESCRIPTION

- - - - - -
-

bmp2tiff converts a Microsoft Windows Device -Independent Bitmap image file to TIFF. By -default, the TIFF image is created with data -samples packed (PlanarConfiguration=1), compressed -with the PackBits algorithm -(Compression=32773), and with each strip no -more than 8 kilobytes. These characteristics can overridden, -or explicitly specified with the options described -below.

-
- -

OPTIONS

- - - - - - - - -
- -

−c

-
- -

Specify a compression scheme to use when writing image -data: −c none for no compression, -c -packbits for the PackBits compression algorithm (the -default), -c jpeg for the baseline JPEG compression -algorithm, -c zip for the Deflate compression -algorithm, and −c lzw for Lempel-Ziv & -Welch.

-
-
- - - - - -
-

−r <number>

- - - - - -
-

Write data with a specified number of rows per strip; by -default the number of rows/strip is selected so that each -strip is approximately 8 kilobytes.

-
- -

SEE ALSO

- - - - - -
-

gif2tiff(1), pal2rgb(1), -ppm2tiff(1), raw2tiff(1), ras2tiff(1), -sgi2tiff(1), libtiff(3TIFF)

-
-
- - diff --git a/thirdparty/tiff-4.0.3/html/man/gif2tiff.1.html b/thirdparty/tiff-4.0.3/html/man/gif2tiff.1.html deleted file mode 100644 index c5073537..00000000 --- a/thirdparty/tiff-4.0.3/html/man/gif2tiff.1.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - -GIF2TIFF - - - -

GIF2TIFF

-NAME
-SYNOPSIS
-DESCRIPTION
-OPTIONS
-NOTES
-BUGS
-SEE ALSO
- -
- -

NAME

- - - - - -
-

gif2tiff − create a TIFF file from a -GIF87 format image file

-
- -

SYNOPSIS

- - - - - -
-

gif2tiff [ options ] input.gif -output.tif

-
- -

DESCRIPTION

- - - - - -
-

Gif2tiff converts a file in the GIF87 format to -TIFF. The TIFF image is -created as a palette image, with samples compressed with the -Lempel-Ziv & Welch algorithm (Compression=5). -These characteristics can overridden, or explicitly -specified with the options described below.

-
- -

OPTIONS

- - - - - - - - - - - - - - -
- -

−c

-
- -

Specify a compression scheme to use when writing image -data: −c none for no compression, −c -packbits for the PackBits compression algorithm, -−c zip for the Deflate compression algorithm, -and −c lzw for Lempel-Ziv & Welch (the -default).

-
-
- -

−r

-
- -

Write data with a specified number of rows per strip; by -default the number of rows/strip is selected so that each -strip is approximately 8 kilobytes.

-
-
- -

NOTES

- - - - - -
-

The program is based on Paul Haeberli’s -fromgif program which, in turn, is based on Marcel -J.E. Mol’s GIF reader.

-
- -

BUGS

- - - - - -
-

Should have more options to control output format.

-
- -

SEE ALSO

- - - - - -
-

pal2rgb(1), tiffinfo(1), tiffcp(1), -tiffmedian(1), libtiff(3)

- -

Libtiff library home page: -http://www.remotesensing.org/libtiff/

-
-
- - diff --git a/thirdparty/tiff-4.0.3/html/man/ras2tiff.1.html b/thirdparty/tiff-4.0.3/html/man/ras2tiff.1.html deleted file mode 100644 index 2c652aba..00000000 --- a/thirdparty/tiff-4.0.3/html/man/ras2tiff.1.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -RAS2TIFF - - - -

RAS2TIFF

-NAME
-SYNOPSIS
-DESCRIPTION
-OPTIONS
-BUGS
-SEE ALSO
- -
- -

NAME

- - - - - -
-

ras2tiff − create a TIFF file from a -Sun rasterfile

-
- -

SYNOPSIS

- - - - - -
-

ras2tiff [ options ] input.ras -output.tif

-
- -

DESCRIPTION

- - - - - -
-

ras2tiff converts a file in the Sun rasterfile -format to TIFF. By default, the -TIFF image is created with data samples -packed (PlanarConfiguration=1), compressed with the -Lempel-Ziv & Welch algorithm (Compression=5), and -with each strip no more than 8 kilobytes. These -characteristics can overridden, or explicitly specified with -the options described below.

- -

Any colormap information in the rasterfile is carried -over to the TIFF file by including a -Colormap tag in the output file. If the rasterfile -has a colormap, the PhotometricInterpretation tag is -set to 3 (palette); otherwise it is set to 2 (RGB) if the -depth is 24 or 1 (min-is-black) if the depth is not 24.

-
- -

OPTIONS

- - - - - - - - - - - - - - -
- -

−c

-
- -

Specify a compression scheme to use when writing image -data: −c none for no compression, −c -packbits for the PackBits compression algorithm, -−c jpeg for the baseline JPEG compression -algorithm, −c zip for the Deflate compression -algorithm, and −c lzw for Lempel-Ziv & -Welch (the default).

-
-
- -

−r

-
- -

Write data with a specified number of rows per strip; by -default the number of rows/strip is selected so that each -strip is approximately 8 kilobytes.

-
-
- -

BUGS

- - - - - -
-

Does not handle all possible rasterfiles. In particular, -ras2tiff does not handle run-length encoded -images.

-
- -

SEE ALSO

- - - - - -
-

pal2rgb(1), tiffinfo(1), tiffcp(1), -tiffmedian(1), libtiff(3)

- -

Libtiff library home page: -http://www.remotesensing.org/libtiff/

-
-
- - diff --git a/thirdparty/tiff-4.0.3/html/man/rgb2ycbcr.1.html b/thirdparty/tiff-4.0.3/html/man/rgb2ycbcr.1.html deleted file mode 100644 index dcd88d14..00000000 --- a/thirdparty/tiff-4.0.3/html/man/rgb2ycbcr.1.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - -RGB2YCBCR - - - -

RGB2YCBCR

-NAME
-SYNOPSIS
-DESCRIPTION
-OPTIONS
-SEE ALSO
- -
- -

NAME

- - - - - -
-

rgb2ycbcr − convert non-YCbCr TIFF -images to a YCbCr TIFF image

-
- -

SYNOPSIS

- - - - - -
-

rgb2ycbcr [ options ] src1.tif src2.tif -... dst.tif

-
- -

DESCRIPTION

- - - - - -
-

rgb2ycbcr converts RGB color, -greyscale, or bi-level TIFF images to YCbCr -images by transforming and sampling pixel data. If multiple -files are specified on the command line each source file is -converted to a separate directory in the destination -file.

- -

By default, chrominance samples are created by sampling 2 -by 2 blocks of luminance values; this can be changed with -the −h and −v options. Output data -are compressed with the PackBits compression -scheme, by default; an alternate scheme can be selected with -the −c option. By default, output data are -compressed in strips with the number of rows in each strip -selected so that the size of a strip is never more than 8 -kilobytes; the −r option can be used to -explicitly set the number of rows per strip.

-
- -

OPTIONS

- - - - - - - - - - - - - - - - - - - - - - - - - - -
- -

−c

-
- -

Specify a compression scheme to use when writing image -data: −c none for no compression, −c -packbits for the PackBits compression algorithm (the -default), −c jpeg for the JPEG compression -algorithm, −c zip for the deflate compression -algorithm, and −c lzw for Lempel-Ziv & -Welch.

-
-
- -

−h

-
- -

Set the horizontal sampling dimension to one of: 1, 2 -(default), or 4.

-
-
- -

−r

-
- -

Write data with a specified number of rows per strip; by -default the number of rows/strip is selected so that each -strip is approximately 8 kilobytes.

-
-
- -

−v

-
- -

Set the vertical sampling dimension to one of: 1, 2 -(default), or 4.

-
-
- -

SEE ALSO

- - - - - -
-

tiffinfo(1), tiffcp(1), -libtiff(3)

- -

Libtiff library home page: -http://www.remotesensing.org/libtiff

-
-
- - diff --git a/thirdparty/tiff-4.0.3/html/man/sgi2tiff.1.html b/thirdparty/tiff-4.0.3/html/man/sgi2tiff.1.html deleted file mode 100644 index 7665a6e4..00000000 --- a/thirdparty/tiff-4.0.3/html/man/sgi2tiff.1.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - -SGI2TIFF - - - -

SGI2TIFF

-NAME
-SYNOPSIS
-DESCRIPTION
-OPTIONS
-BUGS
-SEE ALSO
- -
- -

NAME

- - - - - -
-

sgi2tiff − create a TIFF file from -an SGI image file

-
- -

SYNOPSIS

- - - - - -
-

sgi2tiff [ options ] input.rgb -output.tif

-
- -

DESCRIPTION

- - - - - -
-

sgi2tiff converts a file in the SGI -image format to TIFF. By default, the -TIFF image is created with data samples -packed (PlanarConfiguration=1), compressed with the -Lempel-Ziv & Welch algorithm (Compression=5), and -with each strip no more than 8 kilobytes. These -characteristics can overridden, or explicitly specified with -the options described below.

-
- -

OPTIONS

- - - - - - - - - - - - - - - - - - - - -
- -

−c

-
- -

Specify a compression scheme to use when writing image -data: −c none for no compression, −c -packbits for the PackBits compression algorithm), -−c jpeg for the baseline JPEG compression -algorithm, −c zip for the Deflate compression -algorithm, and −c lzw for Lempel-Ziv & -Welch (the default).

-
-
- -

−p

-
- -

Explicitly select the planar configuration used in -organizing data samples in the output image: −p -contig for samples packed contiguously, and −p -separate for samples stored separately. By default -samples are packed.

-
-
- -

−r

-
- -

Write data with a specified number of rows per strip; by -default the number of rows/strip is selected so that each -strip is approximately 8 kilobytes.

-
-
- -

BUGS

- - - - - -
-

Does not record colormap information.

-
- -

SEE ALSO

- - - - - -
-

tiffinfo(1), tiffcp(1), -tiffmedian(1), libtiff(3)

- -

Libtiff library home page: -http://www.remotesensing.org/libtiff/

-
-
- - diff --git a/thirdparty/tiff-4.0.3/html/man/thumbnail.1.html b/thirdparty/tiff-4.0.3/html/man/thumbnail.1.html deleted file mode 100644 index 2d1f3c9a..00000000 --- a/thirdparty/tiff-4.0.3/html/man/thumbnail.1.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - -THUMBNAIL - - - -

THUMBNAIL

-NAME
-SYNOPSIS
-DESCRIPTION
-OPTIONS
-BUGS
-SEE ALSO
- -
- -

NAME

- - - - - -
-

thumbnail − create a TIFF file with -thumbnail images

-
- -

SYNOPSIS

- - - - - -
-

thumbnail [ options ] input.tif -output.tif

-
- -

DESCRIPTION

- - - - - -
-

thumbnail is a program written to show how one -might use the SubIFD tag (#330) to store thumbnail images. -thumbnail copies a TIFF Class F -facsimile file to the output file and for each image an -8-bit greyscale thumbnail sketch. The output file -contains the thumbnail image with the associated -full-resolution page linked below with the SubIFD tag.

- -

By default, thumbnail images are 216 pixels wide by 274 -pixels high. Pixels are calculated by sampling and filtering -the input image with each pixel value passed through a -contrast curve.

-
- -

OPTIONS

- - - - - - - - - - - - - - - - - - - - -
- -

−w

-
- -

Specify the width of thumbnail images in pixels.

-
-
- -

−h

-
- -

Specify the height of thumbnail images in pixels.

-
-
- -

−c

-
- -

Specify a contrast curve to apply in generating the -thumbnail images. By default pixels values are passed -through a linear contrast curve that simply maps the pixel -value ranges. Alternative curves are: exp50 for a 50% -exponential curve, exp60 for a 60% exponential curve, -exp70 for a 70% exponential curve, exp80 for a -80% exponential curve, exp90 for a 90% exponential -curve, exp for a pure exponential curve, -linear for a linear curve.

-
-
- -

BUGS

- - - - - -
-

There are no options to control the format of the saved -thumbnail images.

-
- -

SEE ALSO

- - - - - -
-

tiffdump(1), tiffgt(1), tiffinfo(1), -libtiff(3)

- -

Libtiff library home page: -http://www.remotesensing.org/libtiff/

-
-
- - diff --git a/thirdparty/tiff-4.0.3/html/man/tiffsv.1.html b/thirdparty/tiff-4.0.3/html/man/tiffsv.1.html deleted file mode 100644 index f9921a48..00000000 --- a/thirdparty/tiff-4.0.3/html/man/tiffsv.1.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - -TIFFSV - - - -

TIFFSV

-NAME
-SYNOPSIS
-DESCRIPTION
-OPTIONS
-NOTE
-BUGS
-SEE ALSO
- -
- -

NAME

- - - - - -
-

tiffsv − save an image from the framebuffer in a -TIFF file (Silicon Graphics version)

-
- -

SYNOPSIS

- - - - - -
-

tiffsv [ options ] output.tif [ -x1 x2 y1 y2 ]

-
- -

DESCRIPTION

- - - - - -
-

tiffsv saves all or part of the framebuffer in a -file using the Tag Image File Format, Revision 6.0. By -default, the image is saved with data samples packed -(PlanarConfiguration=1), compressed with the -Lempel-Ziv & Welch algorithm (Compression=5), and -with each strip no more than 8 kilobytes. These -characteristics can be overridden, or explicitly specified -with the options described below.

-
- -

OPTIONS

- - - - - - - - - - - - - - -
- -

−b

-
- -

Save the image as a greyscale image as if it were -processed by tiff2bw(1). This option is included for -compatibility with the standard scrsave(6D) -program.

-
-
- -

−c

-
- -

Specify the compression to use for data written to the -output file: none for no compression, packbits -for PackBits compression, jpeg for baseline JPEG -compression, zip for Deflate compression, and -lzw for Lempel-Ziv & Welch compression -(default).

-
-
- - - - - -
-

LZW compression can be specified together -with a predictor value. A predictor value of 2 causes -each scanline of the output image to undergo horizontal -differencing before it is encoded; a value of 1 forces each -scanline to be encoded without differencing. LZW-specific -options are specified by appending a -‘‘:’’-separated list to the -‘‘lzw’’ option; e.g. −c -lzw:2 for LZW compression with horizontal -differencing.

-
- - - - - - - - - - - - - - -
- -

−p

-
- -

Specify the planar configuration to use in writing image -data. By default, tiffsv will create a new file with -the data samples packed contiguously. Specifying −p -contig will force data to be written with multi-sample -data packed together, while −p separate will -force samples to be written in separate planes.

-
-
- -

−r

-
- -

Specify the number of rows (scanlines) in each strip of -data written to the output file. By default, tiffsv -attempts to set the rows/strip that no more than 8 kilobytes -of data appear in a strip.

-
-
- -

NOTE

- - - - - -
-

Except for the use of TIFF, this program -is equivalent to the standard scrsave program. This -means, for example, that you can use it in conjunction with -the standard icut program simply by creating a link -called scrsave, or by creating a shell script called -scrsave that invokes tiffgt with the -appropriate options.

-
- -

BUGS

- - - - - -
-

If data are saved compressed and in separate planes, then -the rows in each strip is silently set to one to avoid -limitations in the libtiff(3TIFF) library.

-
- -

SEE ALSO

- - - - - -
-

scrsave(6D) pal2rgb(1), tiffdump(1), -tiffgt(1), tiffinfo(1), tiffcp(1), -tiffmedian(1), libtiff(3TIFF)

- -

Libtiff library home page: -http://www.remotesensing.org/libtiff/

-
-
- - diff --git a/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2013.lib b/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2013.lib deleted file mode 100644 index c1dc461b..00000000 --- a/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2013.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:89c01765c3108dfd6e3ebf793250a3da123193c7a1c256ed785a42a72157fcd4 -size 3293724 diff --git a/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2013_64.lib b/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2013_64.lib deleted file mode 100644 index 325a4480..00000000 --- a/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2013_64.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:65fc3676ea3f1716639cd80a50921134fc148227bb27448fa195fef30219053e -size 3307736 diff --git a/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2013_64d.lib b/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2013_64d.lib deleted file mode 100644 index 4cce5590..00000000 --- a/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2013_64d.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:04fbb1f045853101f78076eac6773718237dfb89dabf712217528f5bf018a88f -size 1730990 diff --git a/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2013d.lib b/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2013d.lib deleted file mode 100644 index 50e7964b..00000000 --- a/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2013d.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:79ec3503f8654a7bd7feabe7f62617be2b5eca7a03820630ecab6c99b890ffc7 -size 1963882 diff --git a/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2015.lib b/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2015.lib deleted file mode 100644 index cc151bc8..00000000 --- a/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2015.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3a7941d8d8a8278ea62ead65f63af9bce7801614ee2e5f629ca107a14fc60594 -size 6199378 diff --git a/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2015_64.lib b/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2015_64.lib deleted file mode 100644 index 44cb16ce..00000000 --- a/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2015_64.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:931554a80f424a46e248c3f7f95ac3ee039b3f54e0f379ef1aab04462e715f86 -size 6227900 diff --git a/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2015_64d.lib b/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2015_64d.lib deleted file mode 100644 index 3c547a82..00000000 --- a/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2015_64d.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:10f1b5baecb1e850ca8994e4f6f4347f9426ddb77b841178ee734fb609c0370f -size 2094704 diff --git a/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2015d.lib b/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2015d.lib deleted file mode 100644 index dd058853..00000000 --- a/thirdparty/tiff-4.0.3/lib/LibTIFF-4.0.3_2015d.lib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c4dfbbc0a9446626227bd6ea2a930b5b3dc83d2295c08459bc3b6f6920e288d7 -size 1859564 diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_flush.c b/thirdparty/tiff-4.0.3/libtiff/tif_flush.c deleted file mode 100644 index fd14e4cd..00000000 --- a/thirdparty/tiff-4.0.3/libtiff/tif_flush.c +++ /dev/null @@ -1,118 +0,0 @@ -/* $Id: tif_flush.c,v 1.9 2010-03-31 06:40:10 fwarmerdam Exp $ */ - -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * TIFF Library. - */ -#include "tiffiop.h" - -int -TIFFFlush(TIFF* tif) -{ - if( tif->tif_mode == O_RDONLY ) - return 1; - - if (!TIFFFlushData(tif)) - return (0); - - /* In update (r+) mode we try to detect the case where - only the strip/tile map has been altered, and we try to - rewrite only that portion of the directory without - making any other changes */ - - if( (tif->tif_flags & TIFF_DIRTYSTRIP) - && !(tif->tif_flags & TIFF_DIRTYDIRECT) - && tif->tif_mode == O_RDWR ) - { - uint64 *offsets=NULL, *sizes=NULL; - - if( TIFFIsTiled(tif) ) - { - if( TIFFGetField( tif, TIFFTAG_TILEOFFSETS, &offsets ) - && TIFFGetField( tif, TIFFTAG_TILEBYTECOUNTS, &sizes ) - && _TIFFRewriteField( tif, TIFFTAG_TILEOFFSETS, TIFF_LONG8, - tif->tif_dir.td_nstrips, offsets ) - && _TIFFRewriteField( tif, TIFFTAG_TILEBYTECOUNTS, TIFF_LONG8, - tif->tif_dir.td_nstrips, sizes ) ) - { - tif->tif_flags &= ~TIFF_DIRTYSTRIP; - tif->tif_flags &= ~TIFF_BEENWRITING; - return 1; - } - } - else - { - if( TIFFGetField( tif, TIFFTAG_STRIPOFFSETS, &offsets ) - && TIFFGetField( tif, TIFFTAG_STRIPBYTECOUNTS, &sizes ) - && _TIFFRewriteField( tif, TIFFTAG_STRIPOFFSETS, TIFF_LONG8, - tif->tif_dir.td_nstrips, offsets ) - && _TIFFRewriteField( tif, TIFFTAG_STRIPBYTECOUNTS, TIFF_LONG8, - tif->tif_dir.td_nstrips, sizes ) ) - { - tif->tif_flags &= ~TIFF_DIRTYSTRIP; - tif->tif_flags &= ~TIFF_BEENWRITING; - return 1; - } - } - } - - if ((tif->tif_flags & (TIFF_DIRTYDIRECT|TIFF_DIRTYSTRIP)) - && !TIFFRewriteDirectory(tif)) - return (0); - - return (1); -} - -/* - * Flush buffered data to the file. - * - * Frank Warmerdam'2000: I modified this to return 1 if TIFF_BEENWRITING - * is not set, so that TIFFFlush() will proceed to write out the directory. - * The documentation says returning 1 is an error indicator, but not having - * been writing isn't exactly a an error. Hopefully this doesn't cause - * problems for other people. - */ -int -TIFFFlushData(TIFF* tif) -{ - if ((tif->tif_flags & TIFF_BEENWRITING) == 0) - return (1); - if (tif->tif_flags & TIFF_POSTENCODE) { - tif->tif_flags &= ~TIFF_POSTENCODE; - if (!(*tif->tif_postencode)(tif)) - return (0); - } - return (TIFFFlushData1(tif)); -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_zip.c b/thirdparty/tiff-4.0.3/libtiff/tif_zip.c deleted file mode 100644 index f5aa2a96..00000000 --- a/thirdparty/tiff-4.0.3/libtiff/tif_zip.c +++ /dev/null @@ -1,469 +0,0 @@ -/* $Id: tif_zip.c,v 1.31 2011-01-06 16:00:23 fwarmerdam Exp $ */ - -/* - * Copyright (c) 1995-1997 Sam Leffler - * Copyright (c) 1995-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tiffiop.h" -#ifdef ZIP_SUPPORT -/* - * TIFF Library. - * - * ZIP (aka Deflate) Compression Support - * - * This file is simply an interface to the zlib library written by - * Jean-loup Gailly and Mark Adler. You must use version 1.0 or later - * of the library: this code assumes the 1.0 API and also depends on - * the ability to write the zlib header multiple times (one per strip) - * which was not possible with versions prior to 0.95. Note also that - * older versions of this codec avoided this bug by supressing the header - * entirely. This means that files written with the old library cannot - * be read; they should be converted to a different compression scheme - * and then reconverted. - * - * The data format used by the zlib library is described in the files - * zlib-3.1.doc, deflate-1.1.doc and gzip-4.1.doc, available in the - * directory ftp://ftp.uu.net/pub/archiving/zip/doc. The library was - * last found at ftp://ftp.uu.net/pub/archiving/zip/zlib/zlib-0.99.tar.gz. - */ -#include "tif_predict.h" -#include "zlib.h" - -#include - -/* - * Sigh, ZLIB_VERSION is defined as a string so there's no - * way to do a proper check here. Instead we guess based - * on the presence of #defines that were added between the - * 0.95 and 1.0 distributions. - */ -#if !defined(Z_NO_COMPRESSION) || !defined(Z_DEFLATED) -#error "Antiquated ZLIB software; you must use version 1.0 or later" -#endif - -/* - * State block for each open TIFF - * file using ZIP compression/decompression. - */ -typedef struct { - TIFFPredictorState predict; - z_stream stream; - int zipquality; /* compression level */ - int state; /* state flags */ -#define ZSTATE_INIT_DECODE 0x01 -#define ZSTATE_INIT_ENCODE 0x02 - - TIFFVGetMethod vgetparent; /* super-class method */ - TIFFVSetMethod vsetparent; /* super-class method */ -} ZIPState; - -#define ZState(tif) ((ZIPState*) (tif)->tif_data) -#define DecoderState(tif) ZState(tif) -#define EncoderState(tif) ZState(tif) - -static int ZIPEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s); -static int ZIPDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s); - -static int -ZIPFixupTags(TIFF* tif) -{ - (void) tif; - return (1); -} - -static int -ZIPSetupDecode(TIFF* tif) -{ - static const char module[] = "ZIPSetupDecode"; - ZIPState* sp = DecoderState(tif); - - assert(sp != NULL); - - /* if we were last encoding, terminate this mode */ - if (sp->state & ZSTATE_INIT_ENCODE) { - deflateEnd(&sp->stream); - sp->state = 0; - } - - if (inflateInit(&sp->stream) != Z_OK) { - TIFFErrorExt(tif->tif_clientdata, module, "%s", sp->stream.msg); - return (0); - } else { - sp->state |= ZSTATE_INIT_DECODE; - return (1); - } -} - -/* - * Setup state for decoding a strip. - */ -static int -ZIPPreDecode(TIFF* tif, uint16 s) -{ - static const char module[] = "ZIPPreDecode"; - ZIPState* sp = DecoderState(tif); - - (void) s; - assert(sp != NULL); - - if( (sp->state & ZSTATE_INIT_DECODE) == 0 ) - tif->tif_setupdecode( tif ); - - sp->stream.next_in = tif->tif_rawdata; - assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - apropriately even before we simplify it */ - sp->stream.avail_in = (uInt) tif->tif_rawcc; - if ((tmsize_t)sp->stream.avail_in != tif->tif_rawcc) - { - TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size"); - return (0); - } - return (inflateReset(&sp->stream) == Z_OK); -} - -static int -ZIPDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) -{ - static const char module[] = "ZIPDecode"; - ZIPState* sp = DecoderState(tif); - - (void) s; - assert(sp != NULL); - assert(sp->state == ZSTATE_INIT_DECODE); - - sp->stream.next_in = tif->tif_rawcp; - sp->stream.avail_in = (uInt) tif->tif_rawcc; - - sp->stream.next_out = op; - assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - apropriately even before we simplify it */ - sp->stream.avail_out = (uInt) occ; - if ((tmsize_t)sp->stream.avail_out != occ) - { - TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size"); - return (0); - } - do { - int state = inflate(&sp->stream, Z_PARTIAL_FLUSH); - if (state == Z_STREAM_END) - break; - if (state == Z_DATA_ERROR) { - TIFFErrorExt(tif->tif_clientdata, module, - "Decoding error at scanline %lu, %s", - (unsigned long) tif->tif_row, sp->stream.msg); - if (inflateSync(&sp->stream) != Z_OK) - return (0); - continue; - } - if (state != Z_OK) { - TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s", - sp->stream.msg); - return (0); - } - } while (sp->stream.avail_out > 0); - if (sp->stream.avail_out != 0) { - TIFFErrorExt(tif->tif_clientdata, module, - "Not enough data at scanline %lu (short " TIFF_UINT64_FORMAT " bytes)", - (unsigned long) tif->tif_row, (TIFF_UINT64_T) sp->stream.avail_out); - return (0); - } - - tif->tif_rawcp = sp->stream.next_in; - tif->tif_rawcc = sp->stream.avail_in; - - return (1); -} - -static int -ZIPSetupEncode(TIFF* tif) -{ - static const char module[] = "ZIPSetupEncode"; - ZIPState* sp = EncoderState(tif); - - assert(sp != NULL); - if (sp->state & ZSTATE_INIT_DECODE) { - inflateEnd(&sp->stream); - sp->state = 0; - } - - if (deflateInit(&sp->stream, sp->zipquality) != Z_OK) { - TIFFErrorExt(tif->tif_clientdata, module, "%s", sp->stream.msg); - return (0); - } else { - sp->state |= ZSTATE_INIT_ENCODE; - return (1); - } -} - -/* - * Reset encoding state at the start of a strip. - */ -static int -ZIPPreEncode(TIFF* tif, uint16 s) -{ - static const char module[] = "ZIPPreEncode"; - ZIPState *sp = EncoderState(tif); - - (void) s; - assert(sp != NULL); - if( sp->state != ZSTATE_INIT_ENCODE ) - tif->tif_setupencode( tif ); - - sp->stream.next_out = tif->tif_rawdata; - assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - apropriately even before we simplify it */ - sp->stream.avail_out = tif->tif_rawdatasize; - if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) - { - TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size"); - return (0); - } - return (deflateReset(&sp->stream) == Z_OK); -} - -/* - * Encode a chunk of pixels. - */ -static int -ZIPEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) -{ - static const char module[] = "ZIPEncode"; - ZIPState *sp = EncoderState(tif); - - assert(sp != NULL); - assert(sp->state == ZSTATE_INIT_ENCODE); - - (void) s; - sp->stream.next_in = bp; - assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised, - we need to simplify this code to reflect a ZLib that is likely updated - to deal with 8byte memory sizes, though this code will respond - apropriately even before we simplify it */ - sp->stream.avail_in = (uInt) cc; - if ((tmsize_t)sp->stream.avail_in != cc) - { - TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size"); - return (0); - } - do { - if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) { - TIFFErrorExt(tif->tif_clientdata, module, "Encoder error: %s", - sp->stream.msg); - return (0); - } - if (sp->stream.avail_out == 0) { - tif->tif_rawcc = tif->tif_rawdatasize; - TIFFFlushData1(tif); - sp->stream.next_out = tif->tif_rawdata; - sp->stream.avail_out = (uInt) tif->tif_rawdatasize; /* this is a safe typecast, as check is made already in ZIPPreEncode */ - } - } while (sp->stream.avail_in > 0); - return (1); -} - -/* - * Finish off an encoded strip by flushing the last - * string and tacking on an End Of Information code. - */ -static int -ZIPPostEncode(TIFF* tif) -{ - static const char module[] = "ZIPPostEncode"; - ZIPState *sp = EncoderState(tif); - int state; - - sp->stream.avail_in = 0; - do { - state = deflate(&sp->stream, Z_FINISH); - switch (state) { - case Z_STREAM_END: - case Z_OK: - if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) - { - tif->tif_rawcc = tif->tif_rawdatasize - sp->stream.avail_out; - TIFFFlushData1(tif); - sp->stream.next_out = tif->tif_rawdata; - sp->stream.avail_out = (uInt) tif->tif_rawdatasize; /* this is a safe typecast, as check is made already in ZIPPreEncode */ - } - break; - default: - TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s", - sp->stream.msg); - return (0); - } - } while (state != Z_STREAM_END); - return (1); -} - -static void -ZIPCleanup(TIFF* tif) -{ - ZIPState* sp = ZState(tif); - - assert(sp != 0); - - (void)TIFFPredictorCleanup(tif); - - tif->tif_tagmethods.vgetfield = sp->vgetparent; - tif->tif_tagmethods.vsetfield = sp->vsetparent; - - if (sp->state & ZSTATE_INIT_ENCODE) { - deflateEnd(&sp->stream); - sp->state = 0; - } else if( sp->state & ZSTATE_INIT_DECODE) { - inflateEnd(&sp->stream); - sp->state = 0; - } - _TIFFfree(sp); - tif->tif_data = NULL; - - _TIFFSetDefaultCompressionState(tif); -} - -static int -ZIPVSetField(TIFF* tif, uint32 tag, va_list ap) -{ - static const char module[] = "ZIPVSetField"; - ZIPState* sp = ZState(tif); - - switch (tag) { - case TIFFTAG_ZIPQUALITY: - sp->zipquality = (int) va_arg(ap, int); - if ( sp->state&ZSTATE_INIT_ENCODE ) { - if (deflateParams(&sp->stream, - sp->zipquality, Z_DEFAULT_STRATEGY) != Z_OK) { - TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s", - sp->stream.msg); - return (0); - } - } - return (1); - default: - return (*sp->vsetparent)(tif, tag, ap); - } - /*NOTREACHED*/ -} - -static int -ZIPVGetField(TIFF* tif, uint32 tag, va_list ap) -{ - ZIPState* sp = ZState(tif); - - switch (tag) { - case TIFFTAG_ZIPQUALITY: - *va_arg(ap, int*) = sp->zipquality; - break; - default: - return (*sp->vgetparent)(tif, tag, ap); - } - return (1); -} - -static const TIFFField zipFields[] = { - { TIFFTAG_ZIPQUALITY, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, TRUE, FALSE, "", NULL }, -}; - -int -TIFFInitZIP(TIFF* tif, int scheme) -{ - static const char module[] = "TIFFInitZIP"; - ZIPState* sp; - - assert( (scheme == COMPRESSION_DEFLATE) - || (scheme == COMPRESSION_ADOBE_DEFLATE)); - - /* - * Merge codec-specific tag information. - */ - if (!_TIFFMergeFields(tif, zipFields, TIFFArrayCount(zipFields))) { - TIFFErrorExt(tif->tif_clientdata, module, - "Merging Deflate codec-specific tags failed"); - return 0; - } - - /* - * Allocate state block so tag methods have storage to record values. - */ - tif->tif_data = (uint8*) _TIFFmalloc(sizeof (ZIPState)); - if (tif->tif_data == NULL) - goto bad; - sp = ZState(tif); - sp->stream.zalloc = NULL; - sp->stream.zfree = NULL; - sp->stream.opaque = NULL; - sp->stream.data_type = Z_BINARY; - - /* - * Override parent get/set field methods. - */ - sp->vgetparent = tif->tif_tagmethods.vgetfield; - tif->tif_tagmethods.vgetfield = ZIPVGetField; /* hook for codec tags */ - sp->vsetparent = tif->tif_tagmethods.vsetfield; - tif->tif_tagmethods.vsetfield = ZIPVSetField; /* hook for codec tags */ - - /* Default values for codec-specific fields */ - sp->zipquality = Z_DEFAULT_COMPRESSION; /* default comp. level */ - sp->state = 0; - - /* - * Install codec methods. - */ - tif->tif_fixuptags = ZIPFixupTags; - tif->tif_setupdecode = ZIPSetupDecode; - tif->tif_predecode = ZIPPreDecode; - tif->tif_decoderow = ZIPDecode; - tif->tif_decodestrip = ZIPDecode; - tif->tif_decodetile = ZIPDecode; - tif->tif_setupencode = ZIPSetupEncode; - tif->tif_preencode = ZIPPreEncode; - tif->tif_postencode = ZIPPostEncode; - tif->tif_encoderow = ZIPEncode; - tif->tif_encodestrip = ZIPEncode; - tif->tif_encodetile = ZIPEncode; - tif->tif_cleanup = ZIPCleanup; - /* - * Setup predictor setup. - */ - (void) TIFFPredictorInit(tif); - return (1); -bad: - TIFFErrorExt(tif->tif_clientdata, module, - "No space for ZIP state block"); - return (0); -} -#endif /* ZIP_SUPORT */ - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/thirdparty/tiff-4.0.3/man/bmp2tiff.1 b/thirdparty/tiff-4.0.3/man/bmp2tiff.1 deleted file mode 100644 index f5d68ce0..00000000 --- a/thirdparty/tiff-4.0.3/man/bmp2tiff.1 +++ /dev/null @@ -1,85 +0,0 @@ -.\" $Id: bmp2tiff.1,v 1.7 2006-04-20 12:17:19 dron Exp $ -.\" -.\" Copyright (c) 2004, Andrey Kiselev -.\" -.\" Permission to use, copy, modify, distribute, and sell this software and -.\" its documentation for any purpose is hereby granted without fee, provided -.\" that (i) the above copyright notices and this permission notice appear in -.\" all copies of the software and related documentation, and (ii) the names of -.\" Sam Leffler and Silicon Graphics may not be used in any advertising or -.\" publicity relating to the software without the specific, prior written -.\" permission of Sam Leffler and Silicon Graphics. -.\" -.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -.\" -.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -.\" OF THIS SOFTWARE. -.\" -.if n .po 0 -.TH BMP2TIFF 1 "15 October, 2004" "libtiff" -.SH NAME -bmp2tiff \- create a -.SM TIFF -file from a Microsoft Windows Device Independent Bitmap image file -.SH SYNOPSIS -.B bmp2tiff -[ -.I options -] -.I input.bmp -[ -.I input2.bmp ...\& -] -.I output.tiff -.SH DESCRIPTION -.I bmp2tiff -converts a Microsoft Windows Device Independent Bitmap image file to -.SM TIFF. -If several input BMP files are being specified the multipage -.SM TIFF -output file will be created. By default, the -.SM TIFF -image is created with data samples packed (\c -.IR PlanarConfiguration =1), -compressed with the PackBits algorithm (\c -.IR Compression =32773), -and with each strip no more than 8 kilobytes. -These characteristics can overridden, or explicitly specified -with the options described below. -.SH OPTIONS -.TP -.B \-c -Specify a compression scheme to use when writing image data: -.B "\-c none" -for no compression, -.B "\-c packbits" -for the PackBits compression algorithm (the default), -.B "\-c jpeg" -for the baseline JPEG compression algorithm, -.B "\-c zip" -for the Deflate compression algorithm, -and -.B "\-c lzw" -for Lempel-Ziv & Welch. -.TP -.BI \-r " number" -Write data with a specified number of rows per strip; -by default the number of rows/strip is selected so that each strip -is approximately 8 kilobytes. -.SH "SEE ALSO" -.BR gif2tiff (1), -.BR pal2rgb (1), -.BR ppm2tiff (1), -.BR raw2tiff (1), -.BR ras2tiff (1), -.BR sgi2tiff (1), -.BR libtiff (3TIFF) -.PP -Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/gif2tiff.1 b/thirdparty/tiff-4.0.3/man/gif2tiff.1 deleted file mode 100644 index 5f01d8dc..00000000 --- a/thirdparty/tiff-4.0.3/man/gif2tiff.1 +++ /dev/null @@ -1,81 +0,0 @@ -.\" $Id: gif2tiff.1,v 1.4 2006-04-20 12:17:19 dron Exp $ -.\" -.\" Copyright (c) 1991-1997 Sam Leffler -.\" Copyright (c) 1991-1997 Silicon Graphics, Inc. -.\" -.\" Permission to use, copy, modify, distribute, and sell this software and -.\" its documentation for any purpose is hereby granted without fee, provided -.\" that (i) the above copyright notices and this permission notice appear in -.\" all copies of the software and related documentation, and (ii) the names of -.\" Sam Leffler and Silicon Graphics may not be used in any advertising or -.\" publicity relating to the software without the specific, prior written -.\" permission of Sam Leffler and Silicon Graphics. -.\" -.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -.\" -.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -.\" OF THIS SOFTWARE. -.\" -.if n .po 0 -.TH GIF2TIFF 1 "November 2, 2005" "libtiff" -.SH NAME -gif2tiff \- create a -.SM TIFF -file from a GIF87 format image file -.SH SYNOPSIS -.B gif2tiff -[ -.I options -] -.I input.gif -.I output.tif -.SH DESCRIPTION -.I Gif2tiff -converts a file in the GIF87 format to -.SM TIFF. -The -.SM TIFF -image is created as a palette image, with samples -compressed with the Lempel-Ziv & Welch algorithm (\c -.IR Compression =5). -These characteristics can overridden, or explicitly specified -with the options described below. -.SH OPTIONS -.TP -.B \-c -Specify a compression scheme to use when writing image data: -.B "\-c none" -for no compression, -.B "\-c packbits" -for the PackBits compression algorithm, -.B "\-c zip" -for the Deflate compression algorithm, -and -.B "\-c lzw" -for Lempel-Ziv & Welch (the default). -.TP -.B \-r -Write data with a specified number of rows per strip; -by default the number of rows/strip is selected so that each strip -is approximately 8 kilobytes. -.SH NOTES -The program is based on Paul Haeberli's -.I fromgif -program which, in turn, is based on Marcel J.E. Mol's GIF reader. -.SH BUGS -Should have more options to control output format. -.SH "SEE ALSO" -.BR pal2rgb (1), -.BR tiffinfo (1), -.BR tiffcp (1), -.BR tiffmedian (1), -.BR libtiff (3) -.PP -Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/ras2tiff.1 b/thirdparty/tiff-4.0.3/man/ras2tiff.1 deleted file mode 100644 index 0c78ddb6..00000000 --- a/thirdparty/tiff-4.0.3/man/ras2tiff.1 +++ /dev/null @@ -1,96 +0,0 @@ -.\" $Id: ras2tiff.1,v 1.4 2006-04-20 12:17:19 dron Exp $ -.\" -.\" Copyright (c) 1990-1997 Sam Leffler -.\" Copyright (c) 1991-1997 Silicon Graphics, Inc. -.\" -.\" Permission to use, copy, modify, distribute, and sell this software and -.\" its documentation for any purpose is hereby granted without fee, provided -.\" that (i) the above copyright notices and this permission notice appear in -.\" all copies of the software and related documentation, and (ii) the names of -.\" Sam Leffler and Silicon Graphics may not be used in any advertising or -.\" publicity relating to the software without the specific, prior written -.\" permission of Sam Leffler and Silicon Graphics. -.\" -.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -.\" -.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -.\" OF THIS SOFTWARE. -.\" -.if n .po 0 -.TH RAS2TIFF 1 "November 2, 2005" "libtiff" -.SH NAME -ras2tiff \- create a -.SM TIFF -file from a Sun rasterfile -.SH SYNOPSIS -.B ras2tiff -[ -.I options -] -.I input.ras -.I output.tif -.SH DESCRIPTION -.I ras2tiff -converts a file in the Sun rasterfile format to -.SM TIFF. -By default, the -.SM TIFF -image is created with data samples packed (\c -.IR PlanarConfiguration =1), -compressed with the Lempel-Ziv & Welch algorithm (\c -.IR Compression =5), -and with each strip no more than 8 kilobytes. -These characteristics can overridden, or explicitly specified -with the options described below. -.PP -Any colormap information in the rasterfile is carried over to the -.SM TIFF -file by including a -.I Colormap -tag in the output file. -If the rasterfile has a colormap, the -.I PhotometricInterpretation -tag is set to 3 (palette); -otherwise it is set to 2 (RGB) if the depth -is 24 or 1 (min-is-black) if the depth is not 24. -.SH OPTIONS -.TP -.B \-c -Specify a compression scheme to use when writing image data: -.B "\-c none" -for no compression, -.B "\-c packbits" -for the PackBits compression algorithm, -.B "\-c jpeg" -for the baseline JPEG compression algorithm, -.B "\-c zip -for the Deflate compression algorithm, -and -.B "\-c lzw" -for Lempel-Ziv & Welch (the default). -.TP -.B \-r -Write data with a specified number of rows per strip; -by default the number of rows/strip is selected so that each strip -is approximately 8 kilobytes. -.SH BUGS -Does not handle all possible rasterfiles. -In particular, -.I ras2tiff -does not handle run-length encoded images. -.SH "SEE ALSO" -.BR pal2rgb (1), -.BR tiffinfo (1), -.BR tiffcp (1), -.BR tiffmedian (1), -.BR libtiff (3) -.PP -Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ - diff --git a/thirdparty/tiff-4.0.3/man/rgb2ycbcr.1 b/thirdparty/tiff-4.0.3/man/rgb2ycbcr.1 deleted file mode 100644 index 01a332ca..00000000 --- a/thirdparty/tiff-4.0.3/man/rgb2ycbcr.1 +++ /dev/null @@ -1,99 +0,0 @@ -.\" $Header: /cvs/maptools/cvsroot/libtiff/man/rgb2ycbcr.1,v 1.4 2006-04-20 12:17:19 dron Exp $ -.\" -.\" Copyright (c) 1991-1997 Sam Leffler -.\" Copyright (c) 1991-1997 Silicon Graphics, Inc. -.\" -.\" Permission to use, copy, modify, distribute, and sell this software and -.\" its documentation for any purpose is hereby granted without fee, provided -.\" that (i) the above copyright notices and this permission notice appear in -.\" all copies of the software and related documentation, and (ii) the names of -.\" Sam Leffler and Silicon Graphics may not be used in any advertising or -.\" publicity relating to the software without the specific, prior written -.\" permission of Sam Leffler and Silicon Graphics. -.\" -.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -.\" -.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -.\" OF THIS SOFTWARE. -.\" -.if n .po 0 -.TH RGB2YCBCR 1 "November 2, 2005" "libtiff" -.SH NAME -rgb2ycbcr \- convert non-YCbCr -.SM TIFF -images to a YCbCr -.SM TIFF -image -.SH SYNOPSIS -.B rgb2ycbcr -[ -.I options -] -.I "src1.tif src2.tif ... dst.tif" -.SH DESCRIPTION -.I rgb2ycbcr -converts -.SM RGB -color, greyscale, or bi-level -.SM TIFF -images to YCbCr images by transforming and sampling pixel data. If multiple -files are specified on the command line each source file is converted to a -separate directory in the destination file. -.PP -By default, chrominance samples are created by sampling -2 by 2 blocks of luminance values; this can be changed with the -.B \-h -and -.B \-v -options. -Output data are compressed with the -.SM PackBits -compression scheme, by default; an alternate scheme can be selected with the -.B \-c -option. -By default, output data are compressed in strips with -the number of rows in each strip selected so that the -size of a strip is never more than 8 kilobytes; -the -.B \-r -option can be used to explicitly set the number of -rows per strip. -.SH OPTIONS -.TP -.B \-c -Specify a compression scheme to use when writing image data: -.B "\-c none" -for no compression, -.B "\-c packbits" -for the PackBits compression algorithm (the default), -.B "\-c jpeg" -for the JPEG compression algorithm, -.B "\-c zip" -for the deflate compression algorithm, -and -.B "\-c lzw" -for Lempel-Ziv & Welch. -.TP -.B \-h -Set the horizontal sampling dimension to one of: 1, 2 (default), or 4. -.TP -.B \-r -Write data with a specified number of rows per strip; -by default the number of rows/strip is selected so that each strip -is approximately 8 kilobytes. -.TP -.B \-v -Set the vertical sampling dimension to one of: 1, 2 (default), or 4. -.SH "SEE ALSO" -.BR tiffinfo (1), -.BR tiffcp (1), -.BR libtiff (3) -.PP -Libtiff library home page: -.BR http://www.remotesensing.org/libtiff diff --git a/thirdparty/tiff-4.0.3/man/sgi2tiff.1 b/thirdparty/tiff-4.0.3/man/sgi2tiff.1 deleted file mode 100644 index 650adb3c..00000000 --- a/thirdparty/tiff-4.0.3/man/sgi2tiff.1 +++ /dev/null @@ -1,93 +0,0 @@ -.\" $Id: sgi2tiff.1,v 1.4 2006-04-20 12:17:19 dron Exp $ -.\" -.\" Copyright (c) 1991-1997 Sam Leffler -.\" Copyright (c) 1991-1997 Silicon Graphics, Inc. -.\" -.\" Permission to use, copy, modify, distribute, and sell this software and -.\" its documentation for any purpose is hereby granted without fee, provided -.\" that (i) the above copyright notices and this permission notice appear in -.\" all copies of the software and related documentation, and (ii) the names of -.\" Sam Leffler and Silicon Graphics may not be used in any advertising or -.\" publicity relating to the software without the specific, prior written -.\" permission of Sam Leffler and Silicon Graphics. -.\" -.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -.\" -.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -.\" OF THIS SOFTWARE. -.\" -.if n .po 0 -.TH SGI2TIFF 1 "November 2, 2005" "libtiff" -.SH NAME -sgi2tiff \- create a -.SM TIFF -file from an -.SM SGI -image file -.SH SYNOPSIS -.B sgi2tiff -[ -.I options -] -.I input.rgb -.I output.tif -.SH DESCRIPTION -.I sgi2tiff -converts a file in the -.SM SGI -image format to -.SM TIFF. -By default, the -.SM TIFF -image is created with data samples packed (\c -.IR PlanarConfiguration =1), -compressed with the Lempel-Ziv & Welch algorithm (\c -.IR Compression =5), -and with each strip no more than 8 kilobytes. -These characteristics can overridden, or explicitly specified -with the options described below. -.SH OPTIONS -.TP -.B \-c -Specify a compression scheme to use when writing image data: -.B "\-c none" -for no compression, -.B "\-c packbits" -for the PackBits compression algorithm), -.B "\-c jpeg" -for the baseline JPEG compression algorithm, -.B "\-c zip -for the Deflate compression algorithm, -and -.B "\-c lzw" -for Lempel-Ziv & Welch (the default). -.TP -.B \-p -Explicitly select the planar configuration used in organizing -data samples in the output image: -.B "\-p contig" -for samples packed contiguously, and -.B "\-p separate" -for samples stored separately. -By default samples are packed. -.TP -.B \-r -Write data with a specified number of rows per strip; -by default the number of rows/strip is selected so that each strip -is approximately 8 kilobytes. -.SH BUGS -Does not record colormap information. -.SH "SEE ALSO" -.BR tiffinfo (1), -.BR tiffcp (1), -.BR tiffmedian (1), -.BR libtiff (3) -.PP -Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/thumbnail.1 b/thirdparty/tiff-4.0.3/man/thumbnail.1 deleted file mode 100644 index f4172bb6..00000000 --- a/thirdparty/tiff-4.0.3/man/thumbnail.1 +++ /dev/null @@ -1,90 +0,0 @@ -.\" $Id: thumbnail.1,v 1.2 2005-11-02 11:07:19 dron Exp $ -.\" -.\" Copyright (c) 1994-1997 Sam Leffler -.\" Copyright (c) 1994-1997 Silicon Graphics, Inc. -.\" -.\" Permission to use, copy, modify, distribute, and sell this software and -.\" its documentation for any purpose is hereby granted without fee, provided -.\" that (i) the above copyright notices and this permission notice appear in -.\" all copies of the software and related documentation, and (ii) the names of -.\" Sam Leffler and Silicon Graphics may not be used in any advertising or -.\" publicity relating to the software without the specific, prior written -.\" permission of Sam Leffler and Silicon Graphics. -.\" -.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -.\" -.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -.\" OF THIS SOFTWARE. -.\" -.if n .po 0 -.TH THUMBNAIL 1 "November 2, 2005" "libtiff" -.SH NAME -thumbnail \- create a -.SM TIFF -file with thumbnail images -.SH SYNOPSIS -.B thumbnail -[ -.I options -] -.I input.tif -.I output.tif -.SH DESCRIPTION -.I thumbnail -is a program written to show how one might use the -SubIFD tag (#330) to store thumbnail images. -.I thumbnail -copies a -.SM TIFF -Class F facsimile file to the output file -and for each image an 8-bit greyscale -.IR "thumbnail sketch" . -The output file contains the thumbnail image with the associated -full-resolution page linked below with the SubIFD tag. -.PP -By default, thumbnail images are 216 pixels wide by 274 pixels high. -Pixels are calculated by sampling and filtering the input image -with each pixel value passed through a contrast curve. -.SH OPTIONS -.TP -.B \-w -Specify the width of thumbnail images in pixels. -.TP -.B \-h -Specify the height of thumbnail images in pixels. -.TP -.B \-c -Specify a contrast curve to apply in generating the thumbnail images. -By default pixels values are passed through a linear contrast curve -that simply maps the pixel value ranges. -Alternative curves are: -.B exp50 -for a 50% exponential curve, -.B exp60 -for a 60% exponential curve, -.B exp70 -for a 70% exponential curve, -.B exp80 -for a 80% exponential curve, -.B exp90 -for a 90% exponential curve, -.B exp -for a pure exponential curve, -.B linear -for a linear curve. -.SH BUGS -There are no options to control the format of the saved thumbnail images. -.SH "SEE ALSO" -.BR tiffdump (1), -.BR tiffgt (1), -.BR tiffinfo (1), -.BR libtiff (3) -.PP -Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/tiffsv.1 b/thirdparty/tiff-4.0.3/man/tiffsv.1 deleted file mode 100644 index 206df567..00000000 --- a/thirdparty/tiff-4.0.3/man/tiffsv.1 +++ /dev/null @@ -1,142 +0,0 @@ -.\" $Id: tiffsv.1,v 1.3 2005-11-02 11:07:19 dron Exp $ -.\" -.\" Copyright (c) 1988-1997 Sam Leffler -.\" Copyright (c) 1991-1997 Silicon Graphics, Inc. -.\" -.\" Permission to use, copy, modify, distribute, and sell this software and -.\" its documentation for any purpose is hereby granted without fee, provided -.\" that (i) the above copyright notices and this permission notice appear in -.\" all copies of the software and related documentation, and (ii) the names of -.\" Sam Leffler and Silicon Graphics may not be used in any advertising or -.\" publicity relating to the software without the specific, prior written -.\" permission of Sam Leffler and Silicon Graphics. -.\" -.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -.\" -.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -.\" OF THIS SOFTWARE. -.\" -.if n .po 0 -.TH TIFFSV 1 "September 20, 2005" "libtiff" -.SH NAME -tiffsv \- save an image from the framebuffer in a -.SM TIFF -file (Silicon Graphics version) -.SH SYNOPSIS -.B tiffsv -[ -.I options -] -.I output.tif -[ -.I "x1 x2 y1 y2" -] -.SH DESCRIPTION -.I tiffsv -saves all or part of the framebuffer in a file using the -Tag Image File Format, Revision 6.0. -By default, the image is saved with data samples packed (\c -.IR PlanarConfiguration =1), -compressed with the Lempel-Ziv & Welch algorithm (\c -.IR Compression =5), -and with each strip no more than 8 kilobytes. -These characteristics can be overridden, or explicitly specified -with the options described below. -.SH OPTIONS -.TP -.B \-b -Save the image as a greyscale image -as if it were processed by -.IR tiff2bw (1). -This option is included for compatibility with the standard -.IR scrsave (6D) -program. -.TP -.B \-c -Specify the compression to use for data written to the output file: -.B none -for no compression, -.B packbits -for PackBits compression, -.B jpeg -for baseline JPEG compression, -.B zip -for Deflate compression, -and -.B lzw -for Lempel-Ziv & Welch compression (default). -.IP -.SM LZW -compression can be specified together with a -.I predictor -value. -A predictor value of 2 causes -each scanline of the output image to undergo horizontal -differencing before it is encoded; a value -of 1 forces each scanline to be encoded without differencing. -LZW-specific options are specified by appending a ``:''-separated -list to the ``lzw'' option; e.g. -.B "\-c lzw:2" -for -.SM LZW -compression with horizontal differencing. -.TP -.B \-p -Specify the planar configuration to use in writing image data. -By default, -.I tiffsv -will create a new file with the data samples packed contiguously. -Specifying -.B "\-p contig" -will force data to be written with multi-sample data packed -together, while -.B "\-p separate" -will force samples to be written in separate planes. -.TP -.B \-r -Specify the number of rows (scanlines) in each strip of data -written to the output file. -By default, -.I tiffsv -attempts to set the rows/strip -that no more than 8 kilobytes of data appear in a strip. -.SH NOTE -Except for the use of -.SM TIFF, -this program is equivalent to the standard -.I scrsave -program. -This means, for example, that you can use it in conjunction with -the standard -.IR icut -program simply by creating a link called -.IR scrsave , -or by creating a shell script called -.I scrsave -that invokes -.I tiffgt -with the appropriate options. -.SH BUGS -If data are saved compressed and in separate planes, then the -rows in each strip is silently set to one to avoid limitations -in the -.BR libtiff (3TIFF) -library. -.SH "SEE ALSO" -.BR scrsave (6D) -.BR pal2rgb (1), -.BR tiffdump (1), -.BR tiffgt (1), -.BR tiffinfo (1), -.BR tiffcp (1), -.BR tiffmedian (1), -.BR libtiff (3TIFF) -.PP -Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/port/strtoull.c b/thirdparty/tiff-4.0.3/port/strtoull.c deleted file mode 100644 index fb7739cc..00000000 --- a/thirdparty/tiff-4.0.3/port/strtoull.c +++ /dev/null @@ -1,116 +0,0 @@ -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include -#include -#include - -/* - * Convert a string to an unsigned long long integer. - * - * Assumes that the upper and lower case - * alphabets and digits are each contiguous. - */ -unsigned long long -strtoull(const char *nptr, char **endptr, int base) -{ - const char *s; - unsigned long long acc; - char c; - unsigned long long cutoff; - int neg, any, cutlim; - - /* - * See strtoq for comments as to the logic used. - */ - s = nptr; - do { - c = *s++; - } while (isspace((unsigned char)c)); - if (c == '-') { - neg = 1; - c = *s++; - } else { - neg = 0; - if (c == '+') - c = *s++; - } - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X') && - ((s[1] >= '0' && s[1] <= '9') || - (s[1] >= 'A' && s[1] <= 'F') || - (s[1] >= 'a' && s[1] <= 'f'))) { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == '0' ? 8 : 10; - acc = any = 0; - if (base < 2 || base > 36) - goto noconv; - - cutoff = ULLONG_MAX / base; - cutlim = ULLONG_MAX % base; - for ( ; ; c = *s++) { - if (c >= '0' && c <= '9') - c -= '0'; - else if (c >= 'A' && c <= 'Z') - c -= 'A' - 10; - else if (c >= 'a' && c <= 'z') - c -= 'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) { - acc = ULLONG_MAX; - errno = ERANGE; - } else if (!any) { -noconv: - errno = EINVAL; - } else if (neg) - acc = -acc; - if (endptr != NULL) - *endptr = (char *)(any ? s - 1 : nptr); - return (acc); -} diff --git a/thirdparty/tiff-4.0.3/test/bmp2tiff_palette.sh b/thirdparty/tiff-4.0.3/test/bmp2tiff_palette.sh deleted file mode 100755 index 1992623e..00000000 --- a/thirdparty/tiff-4.0.3/test/bmp2tiff_palette.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$IMG_PALETTE_1C_8B_BMP" -outfile="o-bmp2tiff_palette.tiff" -f_test_convert "$BMP2TIFF" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/thirdparty/tiff-4.0.3/test/bmp2tiff_rgb.sh b/thirdparty/tiff-4.0.3/test/bmp2tiff_rgb.sh deleted file mode 100755 index 2e940ce4..00000000 --- a/thirdparty/tiff-4.0.3/test/bmp2tiff_rgb.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$IMG_RGB_3C_8B_BMP" -outfile="o-bmp2tiff_rgb.tiff" -f_test_convert "$BMP2TIFF" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/thirdparty/tiff-4.0.3/test/gif2tiff.sh b/thirdparty/tiff-4.0.3/test/gif2tiff.sh deleted file mode 100755 index 6bf9a124..00000000 --- a/thirdparty/tiff-4.0.3/test/gif2tiff.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$IMG_PALETTE_1C_8B_GIF" -outfile="o-gif2tiff.tiff" -f_test_convert "$GIF2TIFF" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/thirdparty/tiff-4.0.3/test/images/palette-1c-8b.bmp b/thirdparty/tiff-4.0.3/test/images/palette-1c-8b.bmp deleted file mode 100644 index 215f4c50dabf91c65e4c6f07c449c7d67fbef359..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24954 zcmYkE2UwKX7OpW=b27kyA_{0kdIy0hMLI}VutdcM7TOGnbVVb*iijvhaE1Y90Hs$! zQJPqy#_lm*R6sxz^@tjK?)}z}Ip=O*g5?RX->Q4>^^c?X?yX|XnkOzM_8q<}6Dt&( zAtr(*iHWhq#5BZa=!<`=H)F=)88d98XD*#N+gw4{TFYw5qUFmZB$i7{uK8}( z+F8m!$|`!z(Ox&(#9PDCUs`hK?0Gw9O2*Amif7A3%+uaE*EmvhNto7>m_>Trg{sjW zOT$&&*6ObGw~SwB9PY2?@so~QnBLkDUAGwhH8JMvV$J+H`a44`gTt1@hU)K#{vkNV zDlXa}`e)Uh8=Yf+blel`63f{b6tX0JgH_&!r5V9iM}n==qiv4H7^H?-*Z%C9x4|Vd z#I-PZ&9P9I^feYCzuYCk zDb}$mCJ~49mbaU`cN(p1GU3!OSX1j7eZbwX&4=5%b^C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Ml~;71=2T7=b?%i9X-dY-6$@9T^H=$UhJtooL8tcFfZ_R&vE+@Zc+~i8 zME`71oAXMW)2hm-P^9EalaeIy93eO0G&zx9+J5?K{BrQ^`J0K;@#(4QxzX9#$=SJy zh1rRfxyiNJ>9yIp)wwy|{OrNvtYBqcv9=`LT#E}X^JZtJR+VkHEHA%) zv&8itiz1Ikv!*%hrEr&>DCe_q2c9ouFgbHRE@}S>>(GbE^Jh)?J9USIwnQc6ClqC5 zwio6NR_DEGN`2d&GS!_vJ@9O1sb+4ydbX!#wyS=&r+Vg9`S7dMl%6P;zBr$uq~Ot{ z(9u};8gB5@?B_W}^*PTQ^UGTDi(89J+G{HMyQ)TKYbMt#rnjF@Y?h917K|+yj11fS EACx+>(EtDd diff --git a/thirdparty/tiff-4.0.3/test/ppm2tiff_ppm.sh b/thirdparty/tiff-4.0.3/test/ppm2tiff_ppm.sh deleted file mode 100755 index 8a81527b..00000000 --- a/thirdparty/tiff-4.0.3/test/ppm2tiff_ppm.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Generated file, master is Makefile.am -. ${srcdir:-.}/common.sh -infile="$IMG_RGB_3C_8B_PPM" -outfile="o-ppm2tiff_ppm.tiff" -f_test_convert "$PPM2TIFF" $infile $outfile -f_tiffinfo_validate $outfile diff --git a/thirdparty/tiff-4.0.3/test/tiff2ps-EPS1.sh b/thirdparty/tiff-4.0.3/test/tiff2ps-EPS1.sh deleted file mode 100755 index ebe6f04b..00000000 --- a/thirdparty/tiff-4.0.3/test/tiff2ps-EPS1.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffps with PostScript Level 1 encapsulated output -# -. ${srcdir:-.}/common.sh -f_test_stdout "${TIFF2PS} -e -1" "${IMG_MINISWHITE_1C_1B}" "o-tiff2ps-EPS1.ps" \ No newline at end of file diff --git a/thirdparty/tiff-4.0.3/test/tiff2ps-PS1.sh b/thirdparty/tiff-4.0.3/test/tiff2ps-PS1.sh deleted file mode 100755 index 65921597..00000000 --- a/thirdparty/tiff-4.0.3/test/tiff2ps-PS1.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffps with PostScript Level 1 output -# -. ${srcdir:-.}/common.sh -f_test_stdout "${TIFF2PS} -a -p -1" "${IMG_MINISWHITE_1C_1B}" "o-tiff2ps-PS1.ps" \ No newline at end of file diff --git a/thirdparty/tiff-4.0.3/test/tiff2ps-PS2.sh b/thirdparty/tiff-4.0.3/test/tiff2ps-PS2.sh deleted file mode 100755 index 2a216069..00000000 --- a/thirdparty/tiff-4.0.3/test/tiff2ps-PS2.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffps with PostScript Level 2 output -# -. ${srcdir:-.}/common.sh -f_test_stdout "${TIFF2PS} -a -p -2" "${IMG_MINISWHITE_1C_1B}" "o-tiff2ps-PS2.ps" \ No newline at end of file diff --git a/thirdparty/tiff-4.0.3/test/tiff2ps-PS3.sh b/thirdparty/tiff-4.0.3/test/tiff2ps-PS3.sh deleted file mode 100755 index f9f34b66..00000000 --- a/thirdparty/tiff-4.0.3/test/tiff2ps-PS3.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffps with PostScript Level 3 output -# -. ${srcdir:-.}/common.sh -f_test_stdout "${TIFF2PS} -a -p -3" "${IMG_MINISWHITE_1C_1B}" "o-tiff2ps-PS3.ps" \ No newline at end of file diff --git a/thirdparty/tiff-4.0.3/tools/bmp2tiff.c b/thirdparty/tiff-4.0.3/tools/bmp2tiff.c deleted file mode 100644 index c66a8d21..00000000 --- a/thirdparty/tiff-4.0.3/tools/bmp2tiff.c +++ /dev/null @@ -1,854 +0,0 @@ -/* $Id: bmp2tiff.c,v 1.23 2010-03-10 18:56:49 bfriesen Exp $ - * - * Project: libtiff tools - * Purpose: Convert Windows BMP files in TIFF. - * Author: Andrey Kiselev, dron@ak4719.spb.edu - * - ****************************************************************************** - * Copyright (c) 2004, Andrey Kiselev - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tif_config.h" - -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -# include -#endif - -#if HAVE_FCNTL_H -# include -#endif - -#if HAVE_SYS_TYPES_H -# include -#endif - -#if HAVE_IO_H -# include -#endif - -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - -#include "tiffio.h" - -#ifndef O_BINARY -# define O_BINARY 0 -#endif - -enum BMPType -{ - BMPT_WIN4, /* BMP used in Windows 3.0/NT 3.51/95 */ - BMPT_WIN5, /* BMP used in Windows NT 4.0/98/Me/2000/XP */ - BMPT_OS21, /* BMP used in OS/2 PM 1.x */ - BMPT_OS22 /* BMP used in OS/2 PM 2.x */ -}; - -/* - * Bitmap file consists of a BMPFileHeader structure followed by a - * BMPInfoHeader structure. An array of BMPColorEntry structures (also called - * a colour table) follows the bitmap information header structure. The colour - * table is followed by a second array of indexes into the colour table (the - * actual bitmap data). Data may be comressed, for 4-bpp and 8-bpp used RLE - * compression. - * - * +---------------------+ - * | BMPFileHeader | - * +---------------------+ - * | BMPInfoHeader | - * +---------------------+ - * | BMPColorEntry array | - * +---------------------+ - * | Colour-index array | - * +---------------------+ - * - * All numbers stored in Intel order with least significant byte first. - */ - -enum BMPComprMethod -{ - BMPC_RGB = 0L, /* Uncompressed */ - BMPC_RLE8 = 1L, /* RLE for 8 bpp images */ - BMPC_RLE4 = 2L, /* RLE for 4 bpp images */ - BMPC_BITFIELDS = 3L, /* Bitmap is not compressed and the colour table - * consists of three DWORD color masks that specify - * the red, green, and blue components of each - * pixel. This is valid when used with - * 16- and 32-bpp bitmaps. */ - BMPC_JPEG = 4L, /* Indicates that the image is a JPEG image. */ - BMPC_PNG = 5L /* Indicates that the image is a PNG image. */ -}; - -enum BMPLCSType /* Type of logical color space. */ -{ - BMPLT_CALIBRATED_RGB = 0, /* This value indicates that endpoints and - * gamma values are given in the appropriate - * fields. */ - BMPLT_DEVICE_RGB = 1, - BMPLT_DEVICE_CMYK = 2 -}; - -typedef struct -{ - int32 iCIEX; - int32 iCIEY; - int32 iCIEZ; -} BMPCIEXYZ; - -typedef struct /* This structure contains the x, y, and z */ -{ /* coordinates of the three colors that */ - /* correspond */ - BMPCIEXYZ iCIERed; /* to the red, green, and blue endpoints for */ - BMPCIEXYZ iCIEGreen; /* a specified logical color space. */ - BMPCIEXYZ iCIEBlue; -} BMPCIEXYZTriple; - -typedef struct -{ - char bType[2]; /* Signature "BM" */ - uint32 iSize; /* Size in bytes of the bitmap file. Should - * always be ignored while reading because - * of error in Windows 3.0 SDK's description - * of this field */ - uint16 iReserved1; /* Reserved, set as 0 */ - uint16 iReserved2; /* Reserved, set as 0 */ - uint32 iOffBits; /* Offset of the image from file start in bytes */ -} BMPFileHeader; - -/* File header size in bytes: */ -const int BFH_SIZE = 14; - -typedef struct -{ - uint32 iSize; /* Size of BMPInfoHeader structure in bytes. - * Should be used to determine start of the - * colour table */ - int32 iWidth; /* Image width */ - int32 iHeight; /* Image height. If positive, image has bottom - * left origin, if negative --- top left. */ - int16 iPlanes; /* Number of image planes (must be set to 1) */ - int16 iBitCount; /* Number of bits per pixel (1, 4, 8, 16, 24 - * or 32). If 0 then the number of bits per - * pixel is specified or is implied by the - * JPEG or PNG format. */ - uint32 iCompression; /* Compression method */ - uint32 iSizeImage; /* Size of uncomressed image in bytes. May - * be 0 for BMPC_RGB bitmaps. If iCompression - * is BI_JPEG or BI_PNG, iSizeImage indicates - * the size of the JPEG or PNG image buffer. */ - int32 iXPelsPerMeter; /* X resolution, pixels per meter (0 if not used) */ - int32 iYPelsPerMeter; /* Y resolution, pixels per meter (0 if not used) */ - uint32 iClrUsed; /* Size of colour table. If 0, iBitCount should - * be used to calculate this value - * (1< 0) ? info_hdr.iHeight : -info_hdr.iHeight; - - switch (info_hdr.iBitCount) - { - case 1: - case 4: - case 8: - nbands = 1; - depth = info_hdr.iBitCount; - photometric = PHOTOMETRIC_PALETTE; - /* Allocate memory for colour table and read it. */ - if (info_hdr.iClrUsed) - clr_tbl_size = - ((uint32)(1< 0) - offset = file_hdr.iOffBits+(length-row-1)*size; - else - offset = file_hdr.iOffBits + row * size; - if (lseek(fd, offset, SEEK_SET) == (off_t)-1) { - TIFFError(infilename, - "scanline %lu: Seek error", - (unsigned long) row); - break; - } - - if (read(fd, scanbuf, size) < 0) { - TIFFError(infilename, - "scanline %lu: Read error", - (unsigned long) row); - break; - } - - rearrangePixels(scanbuf, width, info_hdr.iBitCount); - - if (TIFFWriteScanline(out, scanbuf, row, 0)<0) { - TIFFError(infilename, - "scanline %lu: Write error", - (unsigned long) row); - break; - } - } - - _TIFFfree(scanbuf); - -/* -------------------------------------------------------------------- */ -/* Read compressed image data. */ -/* -------------------------------------------------------------------- */ - - } else if ( info_hdr.iCompression == BMPC_RLE8 - || info_hdr.iCompression == BMPC_RLE4 ) { - uint32 i, j, k, runlength; - uint32 compr_size, uncompr_size; - unsigned char *comprbuf; - unsigned char *uncomprbuf; - - compr_size = file_hdr.iSize - file_hdr.iOffBits; - uncompr_size = width * length; - comprbuf = (unsigned char *) _TIFFmalloc( compr_size ); - if (!comprbuf) { - TIFFError(infilename, - "Can't allocate space for compressed scanline buffer"); - goto bad3; - } - uncomprbuf = (unsigned char *)_TIFFmalloc(uncompr_size); - if (!uncomprbuf) { - TIFFError(infilename, - "Can't allocate space for uncompressed scanline buffer"); - goto bad3; - } - - lseek(fd, file_hdr.iOffBits, SEEK_SET); - read(fd, comprbuf, compr_size); - i = 0; - j = 0; - if (info_hdr.iBitCount == 8) { /* RLE8 */ - while(j < uncompr_size && i < compr_size) { - if ( comprbuf[i] ) { - runlength = comprbuf[i++]; - while( runlength > 0 - && j < uncompr_size - && i < compr_size ) { - uncomprbuf[j++] = comprbuf[i]; - runlength--; - } - i++; - } else { - i++; - if (comprbuf[i] == 0) /* Next scanline */ - i++; - else if (comprbuf[i] == 1) /* End of image */ - break; - else if (comprbuf[i] == 2) { /* Move to... */ - i++; - if (i < compr_size - 1) { - j+=comprbuf[i]+comprbuf[i+1]*width; - i += 2; - } - else - break; - } else { /* Absolute mode */ - runlength = comprbuf[i++]; - for (k = 0; k < runlength && j < uncompr_size && i < compr_size; k++) - uncomprbuf[j++] = comprbuf[i++]; - if ( k & 0x01 ) - i++; - } - } - } - } - else { /* RLE4 */ - while( j < uncompr_size && i < compr_size ) { - if ( comprbuf[i] ) { - runlength = comprbuf[i++]; - while( runlength > 0 && j < uncompr_size && i < compr_size ) { - if ( runlength & 0x01 ) - uncomprbuf[j++] = (comprbuf[i] & 0xF0) >> 4; - else - uncomprbuf[j++] = comprbuf[i] & 0x0F; - runlength--; - } - i++; - } else { - i++; - if (comprbuf[i] == 0) /* Next scanline */ - i++; - else if (comprbuf[i] == 1) /* End of image */ - break; - else if (comprbuf[i] == 2) { /* Move to... */ - i++; - if (i < compr_size - 1) { - j+=comprbuf[i]+comprbuf[i+1]*width; - i += 2; - } - else - break; - } else { /* Absolute mode */ - runlength = comprbuf[i++]; - for (k = 0; k < runlength && j < uncompr_size && i < compr_size; k++) { - if (k & 0x01) - uncomprbuf[j++] = comprbuf[i++] & 0x0F; - else - uncomprbuf[j++] = (comprbuf[i] & 0xF0) >> 4; - } - if (k & 0x01) - i++; - } - } - } - } - - _TIFFfree(comprbuf); - - for (row = 0; row < length; row++) { - if (TIFFWriteScanline(out, - uncomprbuf + (length - row - 1) * width, - row, 0) < 0) { - TIFFError(infilename, - "scanline %lu: Write error.\n", - (unsigned long) row); - } - } - - _TIFFfree(uncomprbuf); - } - TIFFWriteDirectory(out); - if (blue_tbl) { - _TIFFfree(blue_tbl); - blue_tbl=NULL; - } - if (green_tbl) { - _TIFFfree(green_tbl); - green_tbl=NULL; - } - if (red_tbl) { - _TIFFfree(red_tbl); - red_tbl=NULL; - } - } - -bad3: - if (blue_tbl) - _TIFFfree(blue_tbl); -bad2: - if (green_tbl) - _TIFFfree(green_tbl); -bad1: - if (red_tbl) - _TIFFfree(red_tbl); -bad: - close(fd); - - if (out) - TIFFClose(out); - return 0; -} - -/* - * Image data in BMP file stored in BGR (or ABGR) format. We should rearrange - * pixels to RGB (RGBA) format. - */ -static void -rearrangePixels(char *buf, uint32 width, uint32 bit_count) -{ - char tmp; - uint32 i; - - switch(bit_count) { - case 16: /* FIXME: need a sample file */ - break; - case 24: - for (i = 0; i < width; i++, buf += 3) { - tmp = *buf; - *buf = *(buf + 2); - *(buf + 2) = tmp; - } - break; - case 32: - { - char *buf1 = buf; - - for (i = 0; i < width; i++, buf += 4) { - tmp = *buf; - *buf1++ = *(buf + 2); - *buf1++ = *(buf + 1); - *buf1++ = tmp; - } - } - break; - default: - break; - } -} - -static int -processCompressOptions(char* opt) -{ - if (strcmp(opt, "none") == 0) - compression = COMPRESSION_NONE; - else if (strcmp(opt, "packbits") == 0) - compression = COMPRESSION_PACKBITS; - else if (strncmp(opt, "jpeg", 4) == 0) { - char* cp = strchr(opt, ':'); - - compression = COMPRESSION_JPEG; - while( cp ) - { - if (isdigit((int)cp[1])) - quality = atoi(cp+1); - else if (cp[1] == 'r' ) - jpegcolormode = JPEGCOLORMODE_RAW; - else - usage(); - - cp = strchr(cp+1,':'); - } - } else if (strncmp(opt, "lzw", 3) == 0) { - char* cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp+1); - compression = COMPRESSION_LZW; - } else if (strncmp(opt, "zip", 3) == 0) { - char* cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp+1); - compression = COMPRESSION_DEFLATE; - } else - return (0); - return (1); -} - -static char* stuff[] = { -"bmp2tiff --- convert Windows BMP files to TIFF", -"usage: bmp2tiff [options] input.bmp [input2.bmp ...] output.tif", -"where options are:", -" -r # make each strip have no more than # rows", -"", -" -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding", -" -c zip[:opts] compress output with deflate encoding", -" -c jpeg[:opts]compress output with JPEG encoding", -" -c packbits compress output with packbits encoding", -" -c none use no compression algorithm on output", -"", -"JPEG options:", -" # set compression quality level (0-100, default 75)", -" r output color image as RGB rather than YCbCr", -"For example, -c jpeg:r:50 to get JPEG-encoded RGB data with 50% comp. quality", -"", -"LZW and deflate options:", -" # set predictor value", -"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing", -" -o out.tif write output to out.tif", -" -h this help message", -NULL -}; - -static void -usage(void) -{ - char buf[BUFSIZ]; - int i; - - setbuf(stderr, buf); - fprintf(stderr, "%s\n\n", TIFFGetVersion()); - for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); - exit(-1); -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/thirdparty/tiff-4.0.3/tools/gif2tiff.c b/thirdparty/tiff-4.0.3/tools/gif2tiff.c deleted file mode 100644 index 17f7a19e..00000000 --- a/thirdparty/tiff-4.0.3/tools/gif2tiff.c +++ /dev/null @@ -1,530 +0,0 @@ -/* $Id: gif2tiff.c,v 1.12 2010-12-15 00:22:44 faxguy Exp $ */ - -/* - * Copyright (c) 1990-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -/* - * convert a GIF file into a TIFF file. - * based on Paul Haeberli's fromgif program which in turn is - * based on a GIF file reader by Marcel J.E. Mol March 23 1989 - * - * if input is 320 by 200 pixel aspect is probably 1.2 - * if input is 640 350 pixel aspect is probably 1.37 - * - */ -#include "tif_config.h" - -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -# include -#endif - -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - -#include "tiffio.h" - -#define GIFGAMMA (1.5) /* smaller makes output img brighter */ -#define IMAX 0xffff /* max intensity value */ -#define EXTRAFUDGE 128 /* some people write BAD .gif files */ - -#define streq(a,b) (strcmp(a,b) == 0) -#define strneq(a,b,n) (strncmp(a,b,n) == 0) - -unsigned short gamtab[256]; - -void -makegamtab(float gam) -{ - int i; - - for(i=0; i<256; i++) - gamtab[i] = (unsigned short) (IMAX*pow(i/255.0,gam)+0.5); -} - -char* stuff[] = { -"usage: gif2tiff [options] input.gif output.tif", -"where options are:", -" -r # make each strip have no more than # rows", -"", -" -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding", -" -c zip[:opts] compress output with deflate encoding", -" -c packbits compress output with packbits encoding", -" -c none use no compression algorithm on output", -"", -"LZW and deflate options:", -" # set predictor value", -"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing", -NULL -}; - -static void -usage(void) -{ - char buf[BUFSIZ]; - int i; - - setbuf(stderr, buf); - fprintf(stderr, "%s\n\n", TIFFGetVersion()); - for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); - exit(-1); -} - -#define COLSIZE 256 - -unsigned char *stackp; -unsigned int prefix[4096]; -unsigned char suffix[4096]; -unsigned char stack[4096]; -int datasize,codesize,codemask; /* Decoder working variables */ -int clear,eoi; /* Special code values */ -int avail, oldcode; - -FILE *infile; -int global; /* Is there a global color map? */ -int globalbits; /* Number of bits of global colors */ -unsigned char globalmap[COLSIZE][3];/* RGB values for global color map */ -unsigned char *raster; /* Decoded image data */ -unsigned long width, height; -unsigned short red[COLSIZE]; -unsigned short green[COLSIZE]; -unsigned short blue[COLSIZE]; -char *filename, *imagename; - -static uint16 compression = COMPRESSION_PACKBITS; -static uint16 predictor = 0; -static uint32 rowsperstrip = (uint32) -1; -static int processCompressOptions(char*); - -int convert(void); -int checksignature(void); -void readscreen(void); -int readgifimage(char*); -void readextension(void); -int readraster(void); -int process(int, unsigned char**); -void initcolors(unsigned char [COLSIZE][3], int); -void rasterize(int, char*); - -int -main(int argc, char* argv[]) -{ - extern int optind; - extern char *optarg; - int c, status; - - while ((c = getopt(argc, argv, "c:r:")) != -1) - switch (c) { - case 'c': /* compression scheme */ - if (!processCompressOptions(optarg)) - usage(); - break; - case 'r': /* rows/strip */ - rowsperstrip = atoi(optarg); - break; - case '?': - usage(); - /*NOTREACHED*/ - } - if (argc - optind != 2) - usage(); - - makegamtab(GIFGAMMA); - filename = argv[optind]; - imagename = argv[optind+1]; - if ((infile = fopen(imagename, "rb")) != NULL) { - int c; - fclose(infile); - printf("overwrite %s? ", imagename); fflush(stdout); - c = getc(stdin); - if (c != 'y' && c != 'Y') - return (1); - } - if ((infile = fopen(filename, "rb")) == NULL) { - perror(filename); - return (1); - } - status = convert(); - fclose(infile); - return (status); -} - -static int -processCompressOptions(char* opt) -{ - if (streq(opt, "none")) - compression = COMPRESSION_NONE; - else if (streq(opt, "packbits")) - compression = COMPRESSION_PACKBITS; - else if (strneq(opt, "lzw", 3)) { - char* cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp+1); - compression = COMPRESSION_LZW; - } else if (strneq(opt, "zip", 3)) { - char* cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp+1); - compression = COMPRESSION_DEFLATE; - } else - return (0); - return (1); -} - -int -convert(void) -{ - int ch; - char* mode = "w"; - - if (!checksignature()) - return (-1); - readscreen(); - while ((ch = getc(infile)) != ';' && ch != EOF) { - switch (ch) { - case '\0': break; /* this kludge for non-standard files */ - case ',': if (!readgifimage(mode)) - return (-1); - mode = "a"; /* subsequent images append */ - break; - case '!': readextension(); - break; - default: fprintf(stderr, "illegal GIF block type\n"); - return (-1); - } - } - return (0); -} - -int -checksignature(void) -{ - char buf[6]; - - fread(buf,1,6,infile); - if (strncmp(buf,"GIF",3)) { - fprintf(stderr, "file is not a GIF file\n"); - return 0; - } - if (strncmp(&buf[3],"87a",3)) { - fprintf(stderr, "unknown GIF version number\n"); - return 0; - } - return 1; -} - -/* - * readscreen - - * Get information which is global to all the images stored - * in the file - */ -void -readscreen(void) -{ - unsigned char buf[7]; - - fread(buf,1,7,infile); - global = buf[4] & 0x80; - if (global) { - globalbits = (buf[4] & 0x07) + 1; - fread(globalmap,3,((size_t)1)< 0; count = getc(infile)) { - fread(buf,1,count,infile); - for (ch=buf; count-- > 0; ch++) { - datum += (unsigned long) *ch << bits; - bits += 8; - while (bits >= codesize) { - code = datum & codemask; - datum >>= codesize; - bits -= codesize; - if (code == eoi) { /* This kludge put in */ - goto exitloop; /* because some GIF files*/ - } /* aren't standard */ - if (!process(code, &fill)) { - status = 0; - goto exitloop; - } - } - } - if (fill >= raster + width*height) { - fprintf(stderr, "raster full before eoi code\n"); - break; - } - } -exitloop: - if (fill != raster + width*height) { - fprintf(stderr, "warning: wrong rastersize: %ld bytes\n", - (long) (fill-raster)); - fprintf(stderr, " instead of %ld bytes\n", - (long) width*height); - } - return status; -} - -/* - * process - - * Process a compression code. "clear" resets the code table. - * Otherwise make a new code table entry, and output the bytes - * associated with the code. - */ -int -process(register int code, unsigned char** fill) -{ - int incode; - static unsigned char firstchar; - - if (code == clear) { - codesize = datasize + 1; - codemask = (1 << codesize) - 1; - avail = clear + 2; - oldcode = -1; - return 1; - } - - if (oldcode == -1) { - *(*fill)++ = suffix[code]; - firstchar = oldcode = code; - return 1; - } - if (code > avail) { - fprintf(stderr, "code %d too large for %d\n", code, avail); - return 0; - } - - incode = code; - if (code == avail) { /* the first code is always < avail */ - *stackp++ = firstchar; - code = oldcode; - } - while (code > clear) { - *stackp++ = suffix[code]; - code = prefix[code]; - } - - *stackp++ = firstchar = suffix[code]; - prefix[avail] = oldcode; - suffix[avail] = firstchar; - avail++; - - if (((avail & codemask) == 0) && (avail < 4096)) { - codesize++; - codemask += avail; - } - oldcode = incode; - do { - *(*fill)++ = *--stackp; - } while (stackp > stack); - return 1; -} - -/* - * initcolors - - * Convert a color map (local or global) to arrays with R, G and B - * values. - * - */ -void -initcolors(unsigned char colormap[COLSIZE][3], int ncolors) -{ - register int i; - - for (i = 0; i < ncolors; i++) { - red[i] = gamtab[colormap[i][0]]; - green[i] = gamtab[colormap[i][1]]; - blue[i] = gamtab[colormap[i][2]]; - } -} - -void -rasterize(int interleaved, char* mode) -{ - register unsigned long row; - unsigned char *newras; - unsigned char *ras; - TIFF *tif; - tstrip_t strip; - tsize_t stripsize; - - if ((newras = (unsigned char*) _TIFFmalloc(width*height+EXTRAFUDGE)) == NULL) { - fprintf(stderr, "not enough memory for image\n"); - return; - } -#define DRAWSEGMENT(offset, step) { \ - for (row = offset; row < height; row += step) { \ - _TIFFmemcpy(newras + row*width, ras, width);\ - ras += width; \ - } \ - } - ras = raster; - if (interleaved) { - DRAWSEGMENT(0, 8); - DRAWSEGMENT(4, 8); - DRAWSEGMENT(2, 4); - DRAWSEGMENT(1, 2); - } else - DRAWSEGMENT(0, 1); -#undef DRAWSEGMENT - - tif = TIFFOpen(imagename, mode); - if (!tif) { - TIFFError(imagename,"Can not open output image"); - exit(-1); - } - TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32) width); - TIFFSetField(tif, TIFFTAG_IMAGELENGTH, (uint32) height); - TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE); - TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); - TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, - rowsperstrip = TIFFDefaultStripSize(tif, rowsperstrip)); - TIFFSetField(tif, TIFFTAG_COMPRESSION, compression); - switch (compression) { - case COMPRESSION_LZW: - case COMPRESSION_DEFLATE: - if (predictor != 0) - TIFFSetField(tif, TIFFTAG_PREDICTOR, predictor); - break; - } - TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue); - TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); - strip = 0; - stripsize = TIFFStripSize(tif); - for (row=0; row height-row) { - rowsperstrip = height-row; - stripsize = TIFFVStripSize(tif, rowsperstrip); - } - if (TIFFWriteEncodedStrip(tif, strip, newras+row*width, stripsize) < 0) - break; - strip++; - } - TIFFClose(tif); - - _TIFFfree(newras); -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/thirdparty/tiff-4.0.3/tools/ras2tiff.c b/thirdparty/tiff-4.0.3/tools/ras2tiff.c deleted file mode 100644 index ec8a0712..00000000 --- a/thirdparty/tiff-4.0.3/tools/ras2tiff.c +++ /dev/null @@ -1,316 +0,0 @@ -/* $Id: ras2tiff.c,v 1.18 2010-03-10 18:56:49 bfriesen Exp $ */ - -/* - * Copyright (c) 1988-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "tif_config.h" - -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -# include -#endif - -#ifdef NEED_LIBPORT -# include "libport.h" -#endif - -#include "rasterfile.h" -#include "tiffio.h" - -#ifndef howmany -#define howmany(x, y) (((x)+((y)-1))/(y)) -#endif -#define streq(a,b) (strcmp(a,b) == 0) -#define strneq(a,b,n) (strncmp(a,b,n) == 0) - -static uint16 compression = (uint16) -1; -static int jpegcolormode = JPEGCOLORMODE_RGB; -static int quality = 75; /* JPEG quality */ -static uint16 predictor = 0; - -static void usage(void); -static int processCompressOptions(char*); - -int -main(int argc, char* argv[]) -{ - unsigned char* buf; - long row; - tsize_t linebytes, scanline; - TIFF *out; - FILE *in; - struct rasterfile h; - uint16 photometric; - uint16 config = PLANARCONFIG_CONTIG; - uint32 rowsperstrip = (uint32) -1; - int c; - extern int optind; - extern char* optarg; - - while ((c = getopt(argc, argv, "c:r:h")) != -1) - switch (c) { - case 'c': /* compression scheme */ - if (!processCompressOptions(optarg)) - usage(); - break; - case 'r': /* rows/strip */ - rowsperstrip = atoi(optarg); - break; - case 'h': - usage(); - /*NOTREACHED*/ - } - if (argc - optind != 2) - usage(); - in = fopen(argv[optind], "rb"); - if (in == NULL) { - fprintf(stderr, "%s: Can not open.\n", argv[optind]); - return (-1); - } - if (fread(&h, sizeof (h), 1, in) != 1) { - fprintf(stderr, "%s: Can not read header.\n", argv[optind]); - fclose(in); - return (-2); - } - if (strcmp(h.ras_magic, RAS_MAGIC) == 0) { -#ifndef WORDS_BIGENDIAN - TIFFSwabLong((uint32 *)&h.ras_width); - TIFFSwabLong((uint32 *)&h.ras_height); - TIFFSwabLong((uint32 *)&h.ras_depth); - TIFFSwabLong((uint32 *)&h.ras_length); - TIFFSwabLong((uint32 *)&h.ras_type); - TIFFSwabLong((uint32 *)&h.ras_maptype); - TIFFSwabLong((uint32 *)&h.ras_maplength); -#endif - } else if (strcmp(h.ras_magic, RAS_MAGIC_INV) == 0) { -#ifdef WORDS_BIGENDIAN - TIFFSwabLong((uint32 *)&h.ras_width); - TIFFSwabLong((uint32 *)&h.ras_height); - TIFFSwabLong((uint32 *)&h.ras_depth); - TIFFSwabLong((uint32 *)&h.ras_length); - TIFFSwabLong((uint32 *)&h.ras_type); - TIFFSwabLong((uint32 *)&h.ras_maptype); - TIFFSwabLong((uint32 *)&h.ras_maplength); -#endif - } else { - fprintf(stderr, "%s: Not a rasterfile.\n", argv[optind]); - fclose(in); - return (-3); - } - out = TIFFOpen(argv[optind+1], "w"); - if (out == NULL) - { - fclose(in); - return (-4); - } - TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32) h.ras_width); - TIFFSetField(out, TIFFTAG_IMAGELENGTH, (uint32) h.ras_height); - TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); - TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, h.ras_depth > 8 ? 3 : 1); - TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, h.ras_depth > 1 ? 8 : 1); - TIFFSetField(out, TIFFTAG_PLANARCONFIG, config); - if (h.ras_maptype != RMT_NONE) { - uint16* red; - register uint16* map; - register int i, j; - int mapsize; - - buf = (unsigned char *)_TIFFmalloc(h.ras_maplength); - if (buf == NULL) { - fprintf(stderr, "No space to read in colormap.\n"); - return (-5); - } - if (fread(buf, h.ras_maplength, 1, in) != 1) { - fprintf(stderr, "%s: Read error on colormap.\n", - argv[optind]); - return (-6); - } - mapsize = 1< mapsize*3) { - fprintf(stderr, - "%s: Huh, %ld colormap entries, should be %d?\n", - argv[optind], h.ras_maplength, mapsize*3); - return (-7); - } - red = (uint16*)_TIFFmalloc(mapsize * 3 * sizeof (uint16)); - if (red == NULL) { - fprintf(stderr, "No space for colormap.\n"); - return (-8); - } - map = red; - for (j = 0; j < 3; j++) { -#define SCALE(x) (((x)*((1L<<16)-1))/255) - for (i = h.ras_maplength/3; i-- > 0;) - *map++ = SCALE(*buf++); - if ((i = h.ras_maplength/3) < mapsize) { - i = mapsize - i; - _TIFFmemset(map, 0, i*sizeof (uint16)); - map += i; - } - } - TIFFSetField(out, TIFFTAG_COLORMAP, - red, red + mapsize, red + 2*mapsize); - photometric = PHOTOMETRIC_PALETTE; - if (compression == (uint16) -1) - compression = COMPRESSION_PACKBITS; - TIFFSetField(out, TIFFTAG_COMPRESSION, compression); - } else { - /* XXX this is bogus... */ - photometric = h.ras_depth == 24 ? - PHOTOMETRIC_RGB : PHOTOMETRIC_MINISBLACK; - if (compression == (uint16) -1) - compression = COMPRESSION_LZW; - TIFFSetField(out, TIFFTAG_COMPRESSION, compression); - } - switch (compression) { - case COMPRESSION_JPEG: - if (photometric == PHOTOMETRIC_RGB && jpegcolormode == JPEGCOLORMODE_RGB) - photometric = PHOTOMETRIC_YCBCR; - TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality); - TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode); - break; - case COMPRESSION_LZW: - case COMPRESSION_DEFLATE: - if (predictor != 0) - TIFFSetField(out, TIFFTAG_PREDICTOR, predictor); - break; - } - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric); - linebytes = ((h.ras_depth*h.ras_width+15) >> 3) &~ 1; - scanline = TIFFScanlineSize(out); - if (scanline > linebytes) { - buf = (unsigned char *)_TIFFmalloc(scanline); - _TIFFmemset(buf+linebytes, 0, scanline-linebytes); - } else - buf = (unsigned char *)_TIFFmalloc(linebytes); - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, - TIFFDefaultStripSize(out, rowsperstrip)); - for (row = 0; row < h.ras_height; row++) { - if (fread(buf, linebytes, 1, in) != 1) { - fprintf(stderr, "%s: scanline %ld: Read error.\n", - argv[optind], row); - break; - } - if (h.ras_type == RT_STANDARD && h.ras_depth == 24) { - tsize_t cc = h.ras_width; - unsigned char* cp = buf; -#define SWAP(a,b) { unsigned char t = (a); (a) = (b); (b) = t; } - do { - SWAP(cp[0], cp[2]); - cp += 3; - } while (--cc); - } - if (TIFFWriteScanline(out, buf, row, 0) < 0) - break; - } - (void) TIFFClose(out); - fclose(in); - return (0); -} - -static int -processCompressOptions(char* opt) -{ - if (streq(opt, "none")) - compression = COMPRESSION_NONE; - else if (streq(opt, "packbits")) - compression = COMPRESSION_PACKBITS; - else if (strneq(opt, "jpeg", 4)) { - char* cp = strchr(opt, ':'); - - compression = COMPRESSION_JPEG; - while( cp ) - { - if (isdigit((int)cp[1])) - quality = atoi(cp+1); - else if (cp[1] == 'r' ) - jpegcolormode = JPEGCOLORMODE_RAW; - else - usage(); - - cp = strchr(cp+1,':'); - } - } else if (strneq(opt, "lzw", 3)) { - char* cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp+1); - compression = COMPRESSION_LZW; - } else if (strneq(opt, "zip", 3)) { - char* cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp+1); - compression = COMPRESSION_DEFLATE; - } else - return (0); - return (1); -} - -char* stuff[] = { -"usage: ras2tiff [options] input.ras output.tif", -"where options are:", -" -r # make each strip have no more than # rows", -"", -" -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding", -" -c zip[:opts] compress output with deflate encoding", -" -c jpeg[:opts] compress output with JPEG encoding", -" -c packbits compress output with packbits encoding", -" -c none use no compression algorithm on output", -"", -"JPEG options:", -" # set compression quality level (0-100, default 75)", -" r output color image as RGB rather than YCbCr", -"For example, -c jpeg:r:50 to get JPEG-encoded RGB data with 50% comp. quality", -"", -"LZW and deflate options:", -" # set predictor value", -"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing", -" -h this help message", -NULL -}; - -static void -usage(void) -{ - char buf[BUFSIZ]; - int i; - - setbuf(stderr, buf); - fprintf(stderr, "%s\n\n", TIFFGetVersion()); - for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); - exit(-1); -} - -/* vim: set ts=8 sts=8 sw=8 noet: */ -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/thirdparty/tiff-4.0.3/tools/rasterfile.h b/thirdparty/tiff-4.0.3/tools/rasterfile.h deleted file mode 100644 index 833e095c..00000000 --- a/thirdparty/tiff-4.0.3/tools/rasterfile.h +++ /dev/null @@ -1,42 +0,0 @@ -/* $Header: /cvs/libtiff/tools/rasterfile.h,v 1.3 2003/11/12 19:14:33 dron Exp $ */ - -/* - * Description of header for files containing raster images - */ -struct rasterfile { - char ras_magic[4]; /* magic number */ - long ras_width; /* width (pixels) of image */ - long ras_height; /* height (pixels) of image */ - long ras_depth; /* depth (1, 8, or 24 bits) of pixel */ - long ras_length; /* length (bytes) of image */ - long ras_type; /* type of file; see RT_* below */ - long ras_maptype; /* type of colormap; see RMT_* below */ - long ras_maplength; /* length (bytes) of following map */ - /* color map follows for ras_maplength bytes, followed by image */ -}; -#define RAS_MAGIC "\x59\xa6\x6a\x95" -#define RAS_MAGIC_INV "\x95\x6a\xa6\x59" - - /* Sun supported ras_type's */ -#define RT_OLD 0 /* Raw pixrect image in 68000 byte order */ -#define RT_STANDARD 1 /* Raw pixrect image in 68000 byte order */ -#define RT_BYTE_ENCODED 2 /* Run-length compression of bytes */ -#define RT_EXPERIMENTAL 0xffff /* Reserved for testing */ - - /* Sun registered ras_maptype's */ -#define RMT_RAW 2 - /* Sun supported ras_maptype's */ -#define RMT_NONE 0 /* ras_maplength is expected to be 0 */ -#define RMT_EQUAL_RGB 1 /* red[ras_maplength/3],green[],blue[] */ - -/* - * NOTES: - * Each line of the image is rounded out to a multiple of 16 bits. - * This corresponds to the rounding convention used by the memory pixrect - * package (/usr/include/pixrect/memvar.h) of the SunWindows system. - * The ras_encoding field (always set to 0 by Sun's supported software) - * was renamed to ras_length in release 2.0. As a result, rasterfiles - * of type 0 generated by the old software claim to have 0 length; for - * compatibility, code reading rasterfiles must be prepared to compute the - * true length from the width, height, and depth fields. - */ diff --git a/thirdparty/tiff-4.0.3/tools/sgi2tiff.c b/thirdparty/tiff-4.0.3/tools/sgi2tiff.c deleted file mode 100644 index 227e6210..00000000 --- a/thirdparty/tiff-4.0.3/tools/sgi2tiff.c +++ /dev/null @@ -1,335 +0,0 @@ -/* $Id: sgi2tiff.c,v 1.6 2010-03-10 18:56:49 bfriesen Exp $ */ - -/* - * Copyright (c) 1991-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include -#include -#include - -#include "tiffio.h" - -#define streq(a,b) (strcmp(a,b) == 0) -#define strneq(a,b,n) (strncmp(a,b,n) == 0) - -static short config = PLANARCONFIG_CONTIG; -static uint16 compression = COMPRESSION_PACKBITS; -static uint16 predictor = 0; -static uint16 fillorder = 0; -static uint32 rowsperstrip = (uint32) -1; -static int jpegcolormode = JPEGCOLORMODE_RGB; -static int quality = 75; /* JPEG quality */ -static uint16 photometric; - -static void usage(void); -static int cpContig(IMAGE*, TIFF*); -static int cpSeparate(IMAGE*, TIFF*); -static int processCompressOptions(char*); - -/* XXX image library has no prototypes */ -extern IMAGE* iopen(const char*, const char*); -extern void iclose(IMAGE*); -extern void getrow(IMAGE*, short*, int, int); - -int -main(int argc, char* argv[]) -{ - IMAGE *in; - TIFF *out; - int c; - extern int optind; - extern char* optarg; - - while ((c = getopt(argc, argv, "c:p:r:")) != -1) - switch (c) { - case 'c': /* compression scheme */ - if (!processCompressOptions(optarg)) - usage(); - break; - case 'f': /* fill order */ - if (streq(optarg, "lsb2msb")) - fillorder = FILLORDER_LSB2MSB; - else if (streq(optarg, "msb2lsb")) - fillorder = FILLORDER_MSB2LSB; - else - usage(); - break; - case 'p': /* planar configuration */ - if (streq(optarg, "separate")) - config = PLANARCONFIG_SEPARATE; - else if (streq(optarg, "contig")) - config = PLANARCONFIG_CONTIG; - else - usage(); - break; - case 'r': /* rows/strip */ - rowsperstrip = atoi(optarg); - break; - case '?': - usage(); - /*NOTREACHED*/ - } - if (argc - optind != 2) - usage(); - in = iopen(argv[optind], "r"); - if (in == NULL) - return (-1); - out = TIFFOpen(argv[optind+1], "w"); - if (out == NULL) - return (-2); - TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32) in->xsize); - TIFFSetField(out, TIFFTAG_IMAGELENGTH, (uint32) in->ysize); - TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 8); - TIFFSetField(out, TIFFTAG_COMPRESSION, compression); - if (in->zsize == 1) - photometric = PHOTOMETRIC_MINISBLACK; - else - photometric = PHOTOMETRIC_RGB; - switch (compression) { - case COMPRESSION_JPEG: - if (photometric == PHOTOMETRIC_RGB && jpegcolormode == JPEGCOLORMODE_RGB) - photometric = PHOTOMETRIC_YCBCR; - TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality); - TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode); - break; - case COMPRESSION_LZW: - case COMPRESSION_DEFLATE: - if (predictor != 0) - TIFFSetField(out, TIFFTAG_PREDICTOR, predictor); - break; - } - TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric); - if (fillorder != 0) - TIFFSetField(out, TIFFTAG_FILLORDER, fillorder); - TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); - TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, in->zsize); - if (in->zsize > 3) { - uint16 v[1]; - v[0] = EXTRASAMPLE_UNASSALPHA; - TIFFSetField(out, TIFFTAG_EXTRASAMPLES, 1, v); - } - TIFFSetField(out, TIFFTAG_MINSAMPLEVALUE, (uint16) in->min); - TIFFSetField(out, TIFFTAG_MAXSAMPLEVALUE, (uint16) in->max); - TIFFSetField(out, TIFFTAG_PLANARCONFIG, config); - if (config != PLANARCONFIG_SEPARATE) - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, - TIFFDefaultStripSize(out, rowsperstrip)); - else /* force 1 row/strip for library limitation */ - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, 1L); - if (in->name[0] != '\0') - TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, in->name); - if (config == PLANARCONFIG_CONTIG) - cpContig(in, out); - else - cpSeparate(in, out); - (void) iclose(in); - (void) TIFFClose(out); - return (0); -} - -static int -processCompressOptions(char* opt) -{ - if (streq(opt, "none")) - compression = COMPRESSION_NONE; - else if (streq(opt, "packbits")) - compression = COMPRESSION_PACKBITS; - else if (strneq(opt, "jpeg", 4)) { - char* cp = strchr(opt, ':'); - - defcompression = COMPRESSION_JPEG; - while( cp ) - { - if (isdigit((int)cp[1])) - quality = atoi(cp+1); - else if (cp[1] == 'r' ) - jpegcolormode = JPEGCOLORMODE_RAW; - else - usage(); - - cp = strchr(cp+1,':'); - } - } else if (strneq(opt, "lzw", 3)) { - char* cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp+1); - compression = COMPRESSION_LZW; - } else if (strneq(opt, "zip", 3)) { - char* cp = strchr(opt, ':'); - if (cp) - predictor = atoi(cp+1); - compression = COMPRESSION_DEFLATE; - } else - return (0); - return (1); -} - -static int -cpContig(IMAGE* in, TIFF* out) -{ - tdata_t buf = _TIFFmalloc(TIFFScanlineSize(out)); - short *r = NULL; - int x, y; - - if (in->zsize == 3) { - short *g, *b; - - r = (short *)_TIFFmalloc(3 * in->xsize * sizeof (short)); - g = r + in->xsize; - b = g + in->xsize; - for (y = in->ysize-1; y >= 0; y--) { - uint8* pp = (uint8*) buf; - - getrow(in, r, y, 0); - getrow(in, g, y, 1); - getrow(in, b, y, 2); - for (x = 0; x < in->xsize; x++) { - pp[0] = r[x]; - pp[1] = g[x]; - pp[2] = b[x]; - pp += 3; - } - if (TIFFWriteScanline(out, buf, in->ysize-y-1, 0) < 0) - goto bad; - } - } else if (in->zsize == 4) { - short *g, *b, *a; - - r = (short *)_TIFFmalloc(4 * in->xsize * sizeof (short)); - g = r + in->xsize; - b = g + in->xsize; - a = b + in->xsize; - for (y = in->ysize-1; y >= 0; y--) { - uint8* pp = (uint8*) buf; - - getrow(in, r, y, 0); - getrow(in, g, y, 1); - getrow(in, b, y, 2); - getrow(in, a, y, 3); - for (x = 0; x < in->xsize; x++) { - pp[0] = r[x]; - pp[1] = g[x]; - pp[2] = b[x]; - pp[3] = a[x]; - pp += 4; - } - if (TIFFWriteScanline(out, buf, in->ysize-y-1, 0) < 0) - goto bad; - } - } else { - uint8* pp = (uint8*) buf; - - r = (short *)_TIFFmalloc(in->xsize * sizeof (short)); - for (y = in->ysize-1; y >= 0; y--) { - getrow(in, r, y, 0); - for (x = in->xsize-1; x >= 0; x--) - pp[x] = r[x]; - if (TIFFWriteScanline(out, buf, in->ysize-y-1, 0) < 0) - goto bad; - } - } - if (r) - _TIFFfree(r); - _TIFFfree(buf); - return (1); -bad: - if (r) - _TIFFfree(r); - _TIFFfree(buf); - return (0); -} - -static int -cpSeparate(IMAGE* in, TIFF* out) -{ - tdata_t buf = _TIFFmalloc(TIFFScanlineSize(out)); - short *r = (short *)_TIFFmalloc(in->xsize * sizeof (short)); - uint8* pp = (uint8*) buf; - int x, y, z; - - for (z = 0; z < in->zsize; z++) { - for (y = in->ysize-1; y >= 0; y--) { - getrow(in, r, y, z); - for (x = 0; x < in->xsize; x++) - pp[x] = r[x]; - if (TIFFWriteScanline(out, buf, in->ysize-y-1, z) < 0) - goto bad; - } - } - _TIFFfree(r); - _TIFFfree(buf); - return (1); -bad: - _TIFFfree(r); - _TIFFfree(buf); - return (0); -} - -char* stuff[] = { -"usage: sgi2tiff [options] input.rgb output.tif", -"where options are:", -" -r # make each strip have no more than # rows", -"", -" -p contig pack samples contiguously (e.g. RGBRGB...)", -" -p separate store samples separately (e.g. RRR...GGG...BBB...)", -"", -" -f lsb2msb force lsb-to-msb FillOrder for output", -" -f msb2lsb force msb-to-lsb FillOrder for output", -"", -" -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding", -" -c zip[:opts] compress output with deflate encoding", -" -c jpeg[:opts]compress output with JPEG encoding", -" -c packbits compress output with packbits encoding", -" -c none use no compression algorithm on output", -"", -"JPEG options:", -" # set compression quality level (0-100, default 75)", -" r output color image as RGB rather than YCbCr", -"", -"LZW and deflate options:", -" # set predictor value", -"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing", -NULL -}; - -static void -usage(void) -{ - char buf[BUFSIZ]; - int i; - - setbuf(stderr, buf); - for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); - exit(-1); -} -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/thirdparty/tiff-4.0.3/tools/sgisv.c b/thirdparty/tiff-4.0.3/tools/sgisv.c deleted file mode 100644 index e0d91e06..00000000 --- a/thirdparty/tiff-4.0.3/tools/sgisv.c +++ /dev/null @@ -1,316 +0,0 @@ -/* $Id: sgisv.c,v 1.6 2010-03-10 18:56:49 bfriesen Exp $ */ - -/* - * Copyright (c) 1990-1997 Sam Leffler - * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and - * its documentation for any purpose is hereby granted without fee, provided - * that (i) the above copyright notices and this permission notice appear in - * all copies of the software and related documentation, and (ii) the names of - * Sam Leffler and Silicon Graphics may not be used in any advertising or - * publicity relating to the software without the specific, prior written - * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR - * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include -#include -#include - -#include -#include - -#include "tiffio.h" - -typedef unsigned char unsigned char; -typedef unsigned long uint32; - -#define streq(a,b) (strcmp(a,b) == 0) -#define strneq(a,b,n) (strncmp(a,b,n) == 0) - -uint32 rowsperstrip = (uint32) -1; -uint16 compression = COMPRESSION_PACKBITS; -uint16 config = PLANARCONFIG_CONTIG; -uint16 predictor = 0; -int xmaxscreen; -int ymaxscreen; -uint16 photometric = PHOTOMETRIC_RGB; -int jpegcolormode = JPEGCOLORMODE_RGB; -int quality = 75; /* JPEG quality */ - -static void usage(void); -static void tiffsv(char*, int, int, int, int); - -int -main(int argc, char* argv[]) -{ - int c; - extern int optind; - extern char* optarg; - - while ((c = getopt(argc, argv, "c:p:r:")) != -1) - switch (c) { - case 'b': /* save as b&w */ - photometric = PHOTOMETRIC_MINISBLACK; - break; - case 'c': /* compression scheme */ - if (streq(optarg, "none")) - compression = COMPRESSION_NONE; - else if (streq(optarg, "packbits")) - compression = COMPRESSION_PACKBITS; - else if (strneq(optarg, "jpeg", 4)) { - char* cp = strchr(optarg, ':'); - if (cp && isdigit(cp[1])) - quality = atoi(cp+1); - if (cp && strchr(cp, 'r')) - jpegcolormode = JPEGCOLORMODE_RAW; - compression = COMPRESSION_JPEG; - } else if (strneq(optarg, "lzw", 3)) { - char* cp = strchr(optarg, ':'); - if (cp) - predictor = atoi(cp+1); - compression = COMPRESSION_LZW; - } else - usage(); - break; - case 'p': /* planar configuration */ - if (streq(optarg, "separate")) - config = PLANARCONFIG_SEPARATE; - else if (streq(optarg, "contig")) - config = PLANARCONFIG_CONTIG; - else - usage(); - break; - case 'r': /* rows/strip */ - rowsperstrip = atoi(optarg); - break; - case '?': - usage(); - /*NOTREACHED*/ - } - if (argc - optind != 1 && argc - optind != 5) - usage(); - xmaxscreen = getgdesc(GD_XPMAX)-1; - ymaxscreen = getgdesc(GD_YPMAX)-1; - foreground(); - noport(); - winopen("tiffsv"); - if (argc - optind == 5) - tiffsv(argv[optind], - atoi(argv[optind+1]), atoi(argv[optind+2]), - atoi(argv[optind+3]), atoi(argv[optind+4])); - else - tiffsv(argv[optind], 0, xmaxscreen, 0, ymaxscreen); - return (0); -} - -char* stuff[] = { -"usage: tiffsv [options] outimage.tif [x1 x2 y1 y2] [-b]", -"where options are:", -" -p contig pack samples contiguously (e.g. RGBRGB...)", -" -p separate store samples separately (e.g. RRR...GGG...BBB...)", -"", -" -r # make each strip have no more than # rows", -"", -" -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding", -" -c jpeg[:opts]compress output with JPEG encoding", -" -c packbits compress output with packbits encoding", -" -c none use no compression algorithm on output", -"", -"JPEG options:", -" # set compression quality level (0-100, default 75)", -" r output color image as RGB rather than YCbCr", -"", -"LZW options:", -" # set predictor value for Lempel-Ziv & Welch encoding", -"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing", -NULL -}; - -static void -usage(void) -{ - char buf[BUFSIZ]; - int i; - - setbuf(stderr, buf); - for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); - exit(-1); -} - -static void -svRGBSeparate(TIFF* tif, uint32* ss, int xsize, int ysize) -{ - tsize_t stripsize = TIFFStripSize(tif); - unsigned char *rbuf = (unsigned char *)_TIFFmalloc(3*stripsize); - unsigned char *gbuf = rbuf + stripsize; - unsigned char *bbuf = gbuf + stripsize; - register int y; - - for (y = 0; y <= ysize; y += rowsperstrip) { - unsigned char *rp, *gp, *bp; - register int x; - register uint32 n; - - n = rowsperstrip; - if (n > ysize-y+1) - n = ysize-y+1; - rp = rbuf; gp = gbuf; bp = bbuf; - do { - for (x = 0; x <= xsize; x++) { - uint32 v = ss[x]; - rp[x] = v; - gp[x] = v >> 8; - bp[x] = v >> 16; - } - rp += xsize+1, gp += xsize+1, bp += xsize+1; - ss += xsize+1; - } while (--n); - if (TIFFWriteEncodedStrip(tif, TIFFComputeStrip(tif,y,0), - rbuf, stripsize) < 0) - break; - if (TIFFWriteEncodedStrip(tif, TIFFComputeStrip(tif,y,1), - gbuf, stripsize) < 0) - break; - if (TIFFWriteEncodedStrip(tif, TIFFComputeStrip(tif,y,2), - bbuf, stripsize) < 0) - break; - } - _TIFFfree(rbuf); -} - -static void -svRGBContig(TIFF* tif, uint32* ss, int xsize, int ysize) -{ - register int x, y; - tsize_t stripsize = TIFFStripSize(tif); - unsigned char *strip = (unsigned char *)_TIFFmalloc(stripsize); - - for (y = 0; y <= ysize; y += rowsperstrip) { - register unsigned char *pp = strip; - register uint32 n; - - n = rowsperstrip; - if (n > ysize-y+1) - n = ysize-y+1; - do { - for (x = 0; x <= xsize; x++) { - uint32 v = ss[x]; - pp[0] = v; - pp[1] = v >> 8; - pp[2] = v >> 16; - pp += 3; - } - ss += xsize+1; - } while (--n); - if (TIFFWriteEncodedStrip(tif, TIFFComputeStrip(tif,y,0), - strip, stripsize) < 0) - break; - } - _TIFFfree(strip); -} - -#undef RED -#undef GREEN -#undef BLUE -#define CVT(x) (((x)*255)/100) -#define RED CVT(28) /* 28% */ -#define GREEN CVT(59) /* 59% */ -#define BLUE CVT(11) /* 11% */ - -static void -svGrey(TIFF* tif, uint32* ss, int xsize, int ysize) -{ - register int x, y; - unsigned char *buf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(tif)); - - for (y = 0; y <= ysize; y++) { - for (x = 0; x <= xsize; x++) { - unsigned char *cp = (unsigned char *)&ss[x]; - buf[x] = (RED*cp[3] + GREEN*cp[2] + BLUE*cp[1]) >> 8; - } - if (TIFFWriteScanline(tif, buf, (uint32) y, 0) < 0) - break; - ss += xsize+1; - } - _TIFFfree(buf); -} - -#define MIN(a,b) ((a)<(b)?(a):(b)) -#define ABS(x) ((x)<0?-(x):(x)) - -static void -tiffsv(char* name, int x1, int x2, int y1, int y2) -{ - TIFF *tif; - int xsize, ysize; - int xorg, yorg; - uint32 *scrbuf; - - xorg = MIN(x1,x2); - yorg = MIN(y1,y2); - if (xorg<0) - xorg = 0; - if (yorg<0) - yorg = 0; - xsize = ABS(x2-x1); - ysize = ABS(y2-y1); - if (xorg+xsize > xmaxscreen) - xsize = xmaxscreen-xorg; - if (yorg+ysize > ymaxscreen) - ysize = ymaxscreen-yorg; - tif = TIFFOpen(name, "w"); - TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32) (xsize+1)); - TIFFSetField(tif, TIFFTAG_IMAGELENGTH, (uint32) (ysize+1)); - TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); - TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, - photometric == PHOTOMETRIC_RGB ? 3 : 1); - TIFFSetField(tif, TIFFTAG_PLANARCONFIG, config); - TIFFSetField(tif, TIFFTAG_COMPRESSION, compression); - switch (compression) { - case COMPRESSION_JPEG: - if (photometric == PHOTOMETRIC_RGB && jpegcolormode == JPEGCOLORMODE_RGB) - photometric = PHOTOMETRIC_YCBCR; - TIFFSetField(tif, TIFFTAG_JPEGQUALITY, quality); - TIFFSetField(tif, TIFFTAG_JPEGCOLORMODE, jpegcolormode); - break; - case COMPRESSION_LZW: - if (predictor != 0) - TIFFSetField(tif, TIFFTAG_PREDICTOR, predictor); - break; - } - TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric); - TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_BOTLEFT); - rowsperstrip = TIFFDefaultStripSize(tif, rowsperstrip); - TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip); - scrbuf = (uint32 *)_TIFFmalloc((xsize+1)*(ysize+1)*sizeof (uint32)); - readdisplay(xorg, yorg, xorg+xsize, yorg+ysize, scrbuf, RD_FREEZE); - if (photometric == PHOTOMETRIC_RGB) { - if (config == PLANARCONFIG_SEPARATE) - svRGBSeparate(tif, scrbuf, xsize, ysize); - else - svRGBContig(tif, scrbuf, xsize, ysize); - } else - svGrey(tif, scrbuf, xsize, ysize); - (void) TIFFClose(tif); - _TIFFfree((char *)scrbuf); -} -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/thirdparty/tiff-4.0.3/tools/ycbcr.c b/thirdparty/tiff-4.0.3/tools/ycbcr.c deleted file mode 100644 index 8f72447d..00000000 --- a/thirdparty/tiff-4.0.3/tools/ycbcr.c +++ /dev/null @@ -1,168 +0,0 @@ -float ycbcrCoeffs[3] = { .299, .587, .114 }; -/* default coding range is CCIR Rec 601-1 with no headroom/footroom */ -unsigned long refBlackWhite[6] = { 0, 255, 128, 255, 128, 255 }; - -#define LumaRed ycbcrCoeffs[0] -#define LumaGreen ycbcrCoeffs[1] -#define LumaBlue ycbcrCoeffs[2] - -long eRtotal = 0; -long eGtotal = 0; -long eBtotal = 0; -long preveRtotal = 0; -long preveGtotal = 0; -long preveBtotal = 0; -unsigned long AbseRtotal = 0; -unsigned long AbseGtotal = 0; -unsigned long AbseBtotal = 0; -unsigned long eCodes = 0; -unsigned long preveCodes = 0; -unsigned long eBits = 0; -unsigned long preveBits = 0; - -static void setupLumaTables(); -static int abs(int v) { return (v < 0 ? -v : v); } -static double pct(int v,double range) { return (v*100. / range); } -static void check(int R, int G, int B); - -float D1, D2; -float D3, D4; -float D5, D6; - -int -main(int argc, char** argv) -{ - int R, G, B; - - if (argc > 1) { - refBlackWhite[0] = 16; - refBlackWhite[1] = 235; - refBlackWhite[2] = 128; - refBlackWhite[3] = 240; - refBlackWhite[4] = 128; - refBlackWhite[5] = 240; - } - D3 = 2 - 2*LumaRed; - D4 = 2 - 2*LumaBlue; - D1 = 1. / D3; - D2 = 1. / D4; - D5 = D3*LumaRed / LumaGreen; - D6 = D4*LumaBlue / LumaGreen; - setupLumaTables(); - for (R = 0; R < 256; R++) { - for (G = 0; G < 256; G++) - for (B = 0; B < 256; B++) - check(R, G, B); - printf("[%3u] c %u/%u b %u/%u (R %u/%d/%u G %u/%d/%u B %u/%d/%u)\n" - , R - , eCodes - preveCodes, eCodes - , eBits - preveBits, eBits - , abs(AbseRtotal - preveRtotal), eRtotal , AbseRtotal - , abs(AbseGtotal - preveGtotal), eGtotal , AbseGtotal - , abs(AbseBtotal - preveBtotal), eBtotal , AbseBtotal - ); - preveRtotal = AbseRtotal; - preveGtotal = AbseGtotal; - preveBtotal = AbseBtotal; - preveCodes = eCodes; - preveBits = eBits; - } - printf("%u total codes\n", 256*256*256); - printf("total error: %u codes %u bits (R %d/%u G %d/%u B %d/%u)\n" - , eCodes - , eBits - , eRtotal , AbseRtotal - , eGtotal , AbseGtotal - , eBtotal , AbseBtotal - ); - return (0); -} - -float *lumaRed; -float *lumaGreen; -float *lumaBlue; - -static float* -setupLuma(float c) -{ - float *v = (float *)_TIFFmalloc(256 * sizeof (float)); - int i; - for (i = 0; i < 256; i++) - v[i] = c * i; - return (v); -} - -static void -setupLumaTables(void) -{ - lumaRed = setupLuma(LumaRed); - lumaGreen = setupLuma(LumaGreen); - lumaBlue = setupLuma(LumaBlue); -} - -static unsigned -V2Code(float f, unsigned long RB, unsigned long RW, int CR) -{ - unsigned int c = (unsigned int)((((f)*(RW-RB)/CR)+RB)+.5); - return (c > 255 ? 255 : c); -} - -#define Code2V(c, RB, RW, CR) ((((c)-(int)RB)*(float)CR)/(float)(RW-RB)) - -#define CLAMP(f,min,max) \ - (int)((f)+.5 < (min) ? (min) : (f)+.5 > (max) ? (max) : (f)+.5) - -static -void -check(int R, int G, int B) -{ - float Y, Cb, Cr; - int iY, iCb, iCr; - float rY, rCb, rCr; - float rR, rG, rB; - int eR, eG, eB; - - Y = lumaRed[R] + lumaGreen[G] + lumaBlue[B]; - Cb = (B - Y)*D2; - Cr = (R - Y)*D1; - iY = V2Code(Y, refBlackWhite[0], refBlackWhite[1], 255); - iCb = V2Code(Cb, refBlackWhite[2], refBlackWhite[3], 127); - iCr = V2Code(Cr, refBlackWhite[4], refBlackWhite[5], 127); - rCb = Code2V(iCb, refBlackWhite[2], refBlackWhite[3], 127); - rCr = Code2V(iCr, refBlackWhite[4], refBlackWhite[5], 127); - rY = Code2V(iY, refBlackWhite[0], refBlackWhite[1], 255); - rR = rY + rCr*D3; - rB = rY + rCb*D4; - rG = rY - rCb*D6 - rCr*D5; - eR = R - CLAMP(rR,0,255); - eG = G - CLAMP(rG,0,255); - eB = B - CLAMP(rB,0,255); - if (abs(eR) > 1 || abs(eG) > 1 || abs(eB) > 1) { - printf("R %u G %u B %u", R, G, B); - printf(" Y %g Cb %g Cr %g", Y, Cb, Cr); - printf(" iY %u iCb %u iCr %u", iY, iCb, iCr); - printf("\n -> Y %g Cb %g Cr %g", rY, rCb, rCr); - printf(" R %g (%u) G %g (%u) B %g (%u) E=[%d %d %d])\n" - , rR, CLAMP(rR,0,255) - , rG, CLAMP(rG,0,255) - , rB, CLAMP(rB,0,255) - , eR, eG, eB - ); - } - eRtotal += eR; - eGtotal += eG; - eBtotal += eB; - AbseRtotal += abs(eR); - AbseGtotal += abs(eG); - AbseBtotal += abs(eB); - if (eR | eG | eB) - eCodes++; - eBits += abs(eR) + abs(eG) + abs(eB); -} -/* - * Local Variables: - * mode: c - * c-basic-offset: 8 - * fill-column: 78 - * End: - */ diff --git a/thirdparty/tiff-4.2.0/CMakeLists.txt b/thirdparty/tiff-4.2.0/CMakeLists.txt new file mode 100644 index 00000000..efe857df --- /dev/null +++ b/thirdparty/tiff-4.2.0/CMakeLists.txt @@ -0,0 +1,787 @@ +# CMake build for libtiff +# Run "cmake" to generate the build files for your platform +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +cmake_minimum_required(VERSION 2.8.11) # b/c of use of BUILD_INTERFACE generator expression + +# Default policy is from 2.8.9 +cmake_policy(VERSION 2.8.9) +# Set MacOSX @rpath usage globally. +if (POLICY CMP0020) + cmake_policy(SET CMP0020 NEW) +endif(POLICY CMP0020) +if (POLICY CMP0042) + cmake_policy(SET CMP0042 NEW) +endif(POLICY CMP0042) +# Use new variable expansion policy. +if (POLICY CMP0053) + cmake_policy(SET CMP0053 NEW) +endif(POLICY CMP0053) +if (POLICY CMP0054) + cmake_policy(SET CMP0054 NEW) +endif(POLICY CMP0054) + +# Read version information from configure.ac. +FILE(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/configure.ac" configure REGEX "^LIBTIFF_.*=") +foreach(line ${configure}) + foreach(var LIBTIFF_MAJOR_VERSION LIBTIFF_MINOR_VERSION LIBTIFF_MICRO_VERSION LIBTIFF_ALPHA_VERSION + LIBTIFF_CURRENT LIBTIFF_REVISION LIBTIFF_AGE) + if(NOT ${var} AND line MATCHES "^${var}=(.*)") + set(${var} "${CMAKE_MATCH_1}") + break() + endif() + endforeach() +endforeach() + +math(EXPR SO_MAJOR "${LIBTIFF_CURRENT} - ${LIBTIFF_AGE}") +set(SO_MINOR "${LIBTIFF_AGE}") +set(SO_REVISION "${LIBTIFF_REVISION}") + +message(STATUS "Building tiff version ${LIBTIFF_MAJOR_VERSION}.${LIBTIFF_MINOR_VERSION}.${LIBTIFF_MICRO_VERSION}${LIBTIFF_ALPHA_VERSION}") +message(STATUS "libtiff library version ${SO_MAJOR}.${SO_MINOR}.${SO_REVISION}") + +set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries") + +# Project version +project(tiff C) +set(VERSION "${LIBTIFF_MAJOR_VERSION}.${LIBTIFF_MINOR_VERSION}.${LIBTIFF_MICRO_VERSION}") +set(tiff_VERSION "${VERSION}") +set(tiff_VERSION_MAJOR "${LIBTIFF_MAJOR_VERSION}") +set(tiff_VERSION_MINOR "${LIBTIFF_MINOR_VERSION}") +set(tiff_VERSION_PATCH "${LIBTIFF_MICRO_VERSION}") + +# the other tiff_VERSION_* variables are set automatically +set(tiff_VERSION_ALPHA "${LIBTIFF_ALPHA_VERSION}") +# Library version (unlike libtool's baroque scheme, WYSIWYG here) +set(SO_COMPATVERSION "${SO_MAJOR}") +set(SO_VERSION "${SO_MAJOR}.${SO_MINOR}.${SO_REVISION}") + +# For autotools header compatibility +set(PACKAGE_NAME "LibTIFF Software") +set(PACKAGE_TARNAME "${PROJECT_NAME}") +set(PACKAGE_VERSION "${PROJECT_VERSION}${tiff_VERSION_ALPHA}") +set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") +set(PACKAGE_BUGREPORT "tiff@lists.maptools.org") + +include(GNUInstallDirs) +include(CheckCCompilerFlag) +include(CheckCSourceCompiles) +include(CheckIncludeFile) +include(CheckLibraryExists) +include(CheckTypeSize) +include(CheckSymbolExists) +enable_testing() + +macro(current_date var) + if(UNIX) + execute_process(COMMAND "date" +"%Y%m%d" OUTPUT_VARIABLE ${var}) + endif() +endmacro() + +current_date(RELEASE_DATE) + +macro(extra_dist) + foreach(file ${ARGV}) + file(RELATIVE_PATH relfile "${PROJECT_SOURCE_DIR}" + "${CMAKE_CURRENT_SOURCE_DIR}/${file}") + list(APPEND EXTRA_DIST "${relfile}") + endforeach() + set(EXTRA_DIST "${EXTRA_DIST}" PARENT_SCOPE) +endmacro() + +set(EXTRA_DIST + HOWTO-RELEASE + Makefile.vc + SConstruct + autogen.sh + configure.com + nmake.opt + libtiff-4.pc.in) + +# These are annoyingly verbose, produce false positives or don't work +# nicely with all supported compiler versions, so are disabled unless +# explicitly enabled. +option(extra-warnings "Enable extra compiler warnings" OFF) + +# This will cause the compiler to fail when an error occurs. +option(fatal-warnings "Compiler warnings are errors" OFF) + +# Check if the compiler supports each of the following additional +# flags, and enable them if supported. This greatly improves the +# quality of the build by checking for a number of common problems, +# some of which are quite serious. +if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR + CMAKE_C_COMPILER_ID MATCHES "Clang") + set(test_flags + -Wall + -Winline + -W + -Wformat-security + -Wpointer-arith + -Wdisabled-optimization + -Wno-unknown-pragmas + -Wdeclaration-after-statement + -fstrict-aliasing) + if(extra-warnings) + list(APPEND test_flags + -Wfloat-equal + -Wmissing-prototypes + -Wunreachable-code) + endif() + if(fatal-warnings) + list(APPEND test_flags + -Werror) + endif() +elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC") + set(test_flags) + if(extra-warnings) + list(APPEND test_flags + /W4) + else() + list(APPEND test_flags + /W3) + endif() + if (fatal-warnings) + list(APPEND test_flags + /WX) + endif() +endif() + +foreach(flag ${test_flags}) + string(REGEX REPLACE "[^A-Za-z0-9]" "_" flag_var "${flag}") + set(test_c_flag "C_FLAG${flag_var}") + CHECK_C_COMPILER_FLAG(${flag} "${test_c_flag}") + if (${test_c_flag}) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}") + endif (${test_c_flag}) +endforeach(flag ${test_flags}) + +if(MSVC) + set(CMAKE_DEBUG_POSTFIX "d") +endif() + +option(ld-version-script "Enable linker version script" ON) +# Check if LD supports linker scripts. +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map" "VERS_1 { + global: sym; +}; + +VERS_2 { + global: sym; +} VERS_1; +") +set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS}) +set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/conftest.map") +check_c_source_compiles("int main(void){return 0;}" HAVE_LD_VERSION_SCRIPT) +set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE}) +file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map") +if (ld-version-script AND HAVE_LD_VERSION_SCRIPT) + set(HAVE_LD_VERSION_SCRIPT TRUE) +else() + set(HAVE_LD_VERSION_SCRIPT FALSE) +endif() + +# Find libm, if available +if(NOT MINGW) + find_library(M_LIBRARY m) +endif() + +check_include_file(assert.h HAVE_ASSERT_H) +check_include_file(dlfcn.h HAVE_DLFCN_H) +check_include_file(fcntl.h HAVE_FCNTL_H) +check_include_file(inttypes.h HAVE_INTTYPES_H) +check_include_file(io.h HAVE_IO_H) +check_include_file(search.h HAVE_SEARCH_H) +check_include_file(stdint.h HAVE_STDINT_H) +check_include_file(string.h HAVE_STRING_H) +check_include_file(strings.h HAVE_STRINGS_H) +check_include_file(sys/time.h HAVE_SYS_TIME_H) +check_include_file(sys/types.h HAVE_SYS_TYPES_H) +check_include_file(unistd.h HAVE_UNISTD_H) + +# Inspired from /usr/share/autoconf/autoconf/c.m4 +foreach(inline_keyword "inline" "__inline__" "__inline") + if(NOT DEFINED C_INLINE) + set(CMAKE_REQUIRED_DEFINITIONS_SAVE ${CMAKE_REQUIRED_DEFINITIONS}) + set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + "-Dinline=${inline_keyword}") + check_c_source_compiles(" + typedef int foo_t; + static inline foo_t static_foo() {return 0;} + foo_t foo(){return 0;} + int main(int argc, char *argv[]) {return 0;}" + C_HAS_${inline_keyword}) + set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS_SAVE}) + if(C_HAS_${inline_keyword}) + set(C_INLINE TRUE) + set(INLINE_KEYWORD "${inline_keyword}") + endif() + endif() +endforeach() +if(NOT DEFINED C_INLINE) + set(INLINE_KEYWORD) +endif() + +# off_t and size_t checks omitted; not clear they are used at all +# Are off_t and size_t checks strictly necessary? + +# Check if sys/time.h and time.h allow use together +check_c_source_compiles(" +#include +#include +int main(void){return 0;}" + TIME_WITH_SYS_TIME) + +# Check if struct tm is in sys/time.h +check_c_source_compiles(" +#include +#include + +int main(void){ + struct tm tm; + int *p = &tm.tm_sec; + return !p; +}" + TM_IN_SYS_TIME) + +# Check type sizes +# NOTE: Could be replaced with C99 +check_type_size("signed int" SIZEOF_SIGNED_INT) +check_type_size("unsigned int" SIZEOF_UNSIGNED_INT) +check_type_size("signed long" SIZEOF_SIGNED_LONG) +check_type_size("unsigned long" SIZEOF_UNSIGNED_LONG) +check_type_size("signed long long" SIZEOF_SIGNED_LONG_LONG) +check_type_size("unsigned long long" SIZEOF_UNSIGNED_LONG_LONG) +check_type_size("unsigned char *" SIZEOF_UNSIGNED_CHAR_P) + +set(CMAKE_EXTRA_INCLUDE_FILES_SAVE ${CMAKE_EXTRA_INCLUDE_FILES}) +set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} "stddef.h") +check_type_size("size_t" SIZEOF_SIZE_T) +check_type_size("ptrdiff_t" SIZEOF_PTRDIFF_T) +set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES_SAVE}) + +macro(report_values) + foreach(val ${ARGV}) + message(STATUS "${val} set to ${${val}}") + endforeach() +endmacro() + +set(TIFF_INT8_T "signed char") +set(TIFF_UINT8_T "unsigned char") + +set(TIFF_INT16_T "signed short") +set(TIFF_UINT16_T "unsigned short") + +if(SIZEOF_SIGNED_INT EQUAL 4) + set(TIFF_INT32_T "signed int") + set(TIFF_INT32_FORMAT "%d") +elseif(SIZEOF_SIGNED_LONG EQUAL 4) + set(TIFF_INT32_T "signed long") + set(TIFF_INT32_FORMAT "%ld") +endif() + +if(SIZEOF_UNSIGNED_INT EQUAL 4) + set(TIFF_UINT32_T "unsigned int") + set(TIFF_UINT32_FORMAT "%u") +elseif(SIZEOF_UNSIGNED_LONG EQUAL 4) + set(TIFF_UINT32_T "unsigned long") + set(TIFF_UINT32_FORMAT "%lu") +endif() + +if(SIZEOF_SIGNED_LONG EQUAL 8) + set(TIFF_INT64_T "signed long") + set(TIFF_INT64_FORMAT "%ld") +elseif(SIZEOF_SIGNED_LONG_LONG EQUAL 8) + set(TIFF_INT64_T "signed long long") + if (MINGW) + set(TIFF_INT64_FORMAT "%I64d") + else() + set(TIFF_INT64_FORMAT "%lld") + endif() +endif() + +if(SIZEOF_UNSIGNED_LONG EQUAL 8) + set(TIFF_UINT64_T "unsigned long") + set(TIFF_UINT64_FORMAT "%lu") +elseif(SIZEOF_UNSIGNED_LONG_LONG EQUAL 8) + set(TIFF_UINT64_T "unsigned long long") + if (MINGW) + set(TIFF_UINT64_FORMAT "%I64u") + else() + set(TIFF_UINT64_FORMAT "%llu") + endif() +endif() + +if(SIZEOF_UNSIGNED_INT EQUAL SIZEOF_SIZE_T) + set(TIFF_SIZE_T "unsigned int") + set(TIFF_SIZE_FORMAT "%u") + set(TIFF_SSIZE_T "signed int") + set(TIFF_SSIZE_FORMAT "%d") +elseif(SIZEOF_UNSIGNED_LONG EQUAL SIZEOF_SIZE_T) + set(TIFF_SIZE_T "unsigned long") + set(TIFF_SIZE_FORMAT "%lu") + set(TIFF_SSIZE_T "signed long") + set(TIFF_SSIZE_FORMAT "%ld") +elseif(SIZEOF_UNSIGNED_LONG_LONG EQUAL SIZEOF_SIZE_T) + set(TIFF_SIZE_T "unsigned long long") + set(TIFF_SSIZE_T "signed long long") + if (MINGW) + set(TIFF_SIZE_FORMAT "%I64u") + set(TIFF_SSIZE_FORMAT "%I64d") + else() + set(TIFF_SIZE_FORMAT "%llu") + set(TIFF_SSIZE_FORMAT "%lld") + endif() +endif() + +if(NOT SIZEOF_PTRDIFF_T) + set(TIFF_PTRDIFF_T "${TIFF_SSIZE_T}") + set(TIFF_PTRDIFF_FORMAT "${SSIZE_FORMAT}") +else() + set(TIFF_PTRDIFF_T "ptrdiff_t") + set(TIFF_PTRDIFF_FORMAT "%ld") +endif() + +#report_values(TIFF_INT8_T TIFF_INT8_FORMAT +# TIFF_UINT8_T TIFF_UINT8_FORMAT +# TIFF_INT16_T TIFF_INT16_FORMAT +# TIFF_UINT16_T TIFF_UINT16_FORMAT +# TIFF_INT32_T TIFF_INT32_FORMAT +# TIFF_UINT32_T TIFF_UINT32_FORMAT +# TIFF_INT64_T TIFF_INT64_FORMAT +# TIFF_UINT64_T TIFF_UINT64_FORMAT +# TIFF_SSIZE_T TIFF_SSIZE_FORMAT +# TIFF_PTRDIFF_T TIFF_PTRDIFF_FORMAT) + +check_symbol_exists(mmap "sys/mman.h" HAVE_MMAP) +check_symbol_exists(setmode "unistd.h" HAVE_SETMODE) +check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF) +check_symbol_exists(strcasecmp "strings.h" HAVE_STRCASECMP) +check_symbol_exists(strtol "stdlib.h" HAVE_STRTOL) +check_symbol_exists(strtoll "stdlib.h" HAVE_STRTOLL) +check_symbol_exists(strtoul "stdlib.h" HAVE_STRTOUL) +check_symbol_exists(strtoull "stdlib.h" HAVE_STRTOULL) +check_symbol_exists(getopt "unistd.h;stdio.h" HAVE_GETOPT) +check_symbol_exists(lfind "search.h" HAVE_LFIND) + +if(NOT HAVE_SNPRINTF) + add_definitions(-DNEED_LIBPORT) +endif() + +# CPU bit order +set(HOST_FILLORDER FILLORDER_MSB2LSB) +if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i.*86.*" OR + CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64.*" OR + # AMD64 on Windows + CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "AMD64" OR + CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64.*") + set(HOST_FILLORDER FILLORDER_LSB2MSB) +endif() + +# CPU endianness +include(TestBigEndian) +test_big_endian(HOST_BIG_ENDIAN) +if(HOST_BIG_ENDIAN) + add_definitions(-DWORDS_BIGENDIAN) +endif() + +# IEEE floating point +set(HAVE_IEEEFP 1) + +report_values(CMAKE_HOST_SYSTEM_PROCESSOR HOST_FILLORDER + HOST_BIG_ENDIAN HAVE_IEEEFP) + +# Large file support +if (UNIX OR MINGW) + # This might not catch every possibility catered for by + # AC_SYS_LARGEFILE. + add_definitions(-D_FILE_OFFSET_BITS=64) + set(FILE_OFFSET_BITS 64) +endif() + +# Documentation install directory (default to cmake project docdir) +set(LIBTIFF_DOCDIR "${CMAKE_INSTALL_FULL_DOCDIR}") + +# Options to enable and disable internal codecs + +option(ccitt "support for CCITT Group 3 & 4 algorithms" ON) +set(CCITT_SUPPORT ${ccitt}) + +option(packbits "support for Macintosh PackBits algorithm" ON) +set(PACKBITS_SUPPORT ${packbits}) + +option(lzw "support for LZW algorithm" ON) +set(LZW_SUPPORT ${lzw}) + +option(thunder "support for ThunderScan 4-bit RLE algorithm" ON) +set(THUNDER_SUPPORT ${thunder}) + +option(next "support for NeXT 2-bit RLE algorithm" ON) +set(NEXT_SUPPORT ${next}) + +option(logluv "support for LogLuv high dynamic range algorithm" ON) +set(LOGLUV_SUPPORT ${logluv}) + +# Option for Microsoft Document Imaging +option(mdi "support for Microsoft Document Imaging" ON) +set(MDI_SUPPORT ${mdi}) + +# ZLIB +option(zlib "use zlib (required for Deflate compression)" ON) +if (zlib) + find_package(ZLIB) +endif() +set(ZLIB_SUPPORT 0) +if(ZLIB_FOUND) + set(ZLIB_SUPPORT 1) +endif() +set(ZIP_SUPPORT ${ZLIB_SUPPORT}) + + +# libdeflate +option(libdeflate "use libdeflate (optional for faster Deflate support, still requires zlib)" ON) +if (libdeflate) + set(DEFLATE_FOUND 0) + find_path(DEFLATE_INCLUDE_DIR libdeflate.h) + set(DEFLATE_NAMES ${DEFLATE_NAMES} deflate) + find_library(DEFLATE_LIBRARY NAMES ${DEFLATE_NAMES}) + if (DEFLATE_INCLUDE_DIR AND DEFLATE_LIBRARY) + set(DEFLATE_FOUND 1) + set(DEFLATE_LIBRARIES ${DEFLATE_LIBRARY}) + endif() +endif() +set(LIBDEFLATE_SUPPORT FALSE) +if(DEFLATE_FOUND) + set(LIBDEFLATE_SUPPORT TRUE) +endif() + +if(LIBDEFLATE_SUPPORT AND NOT ZIP_SUPPORT) + message(WARNING "libdeflate available but zlib is not. libdeflate cannot be used") + set(LIBDEFLATE_SUPPORT FALSE) +endif() + +set(LIBDEFLATE_SUPPORT ${LIBDEFLATE_SUPPORT}) + + +# Option for Pixar log-format algorithm + +# Pixar log format +option(pixarlog "support for Pixar log-format algorithm (requires Zlib)" ON) +set(PIXARLOG_SUPPORT FALSE) +if (ZLIB_SUPPORT) + if(pixarlog) + set(PIXARLOG_SUPPORT TRUE) + endif() +endif() + +# JPEG +option(jpeg "use libjpeg (required for JPEG compression)" ON) +if (jpeg) + find_package(JPEG) +endif() +set(JPEG_SUPPORT FALSE) +if(JPEG_FOUND) + set(JPEG_SUPPORT TRUE) +endif() + +option(old-jpeg "support for Old JPEG compression (read-only)" ON) +set(OJPEG_SUPPORT FALSE) +if (JPEG_SUPPORT) + if (old-jpeg) + set(OJPEG_SUPPORT TRUE) + endif() +endif() + +# JBIG-KIT +option(jbig "use ISO JBIG compression (requires JBIT-KIT library)" ON) +if (jbig) + set(JBIG_FOUND 0) + find_path(JBIG_INCLUDE_DIR jbig.h) + set(JBIG_NAMES ${JBIG_NAMES} jbig libjbig) + find_library(JBIG_LIBRARY NAMES ${JBIG_NAMES}) + if (JBIG_INCLUDE_DIR AND JBIG_LIBRARY) + set(JBIG_FOUND 1) + set(JBIG_LIBRARIES ${JBIG_LIBRARY}) + endif() +endif() +set(JBIG_SUPPORT 0) +if(JBIG_FOUND) + set(JBIG_FOUND TRUE) + set(JBIG_SUPPORT 1) +else() + set(JBIG_FOUND FALSE) +endif() + +set(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES}) +set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${JBIG_INCLUDE_DIR}) +check_symbol_exists(jbg_newlen "jbig.h" HAVE_JBG_NEWLEN) +set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE}) + +# liblzma2 +option(lzma "use liblzma (required for LZMA2 compression)" ON) +if (lzma) + find_package(LibLZMA) +endif() +set(LZMA_SUPPORT 0) +if(LIBLZMA_FOUND) + set(LZMA_SUPPORT 1) +endif() + +# libzstd +option(zstd "use libzstd (required for ZSTD compression)" ON) +if (zstd) + find_path(ZSTD_INCLUDE_DIR zstd.h) + find_library(ZSTD_LIBRARY NAMES zstd) + if (ZSTD_INCLUDE_DIR AND ZSTD_LIBRARY) + check_library_exists ("${ZSTD_LIBRARY}" ZSTD_decompressStream "" ZSTD_RECENT_ENOUGH) + if (ZSTD_RECENT_ENOUGH) + set(ZSTD_FOUND TRUE) + set(ZSTD_LIBRARIES ${ZSTD_LIBRARY}) + message(STATUS "Found ZSTD library: ${ZSTD_LIBRARY}") + else () + message(WARNING "Found ZSTD library, but not recent enough. Use zstd >= 1.0") + endif () + endif () +endif() +set(ZSTD_SUPPORT 0) +if(ZSTD_FOUND) + set(ZSTD_SUPPORT 1) +endif() + +# libwebp +option(webp "use libwebp (required for WEBP compression)" ON) +if (webp) + find_path(WEBP_INCLUDE_DIR /webp/decode.h) + find_library(WEBP_LIBRARY NAMES webp) +endif() +set(WEBP_SUPPORT 0) +set(WEBP_FOUND FALSE) +if (WEBP_INCLUDE_DIR AND WEBP_LIBRARY) + set(WEBP_SUPPORT 1) + set(WEBP_FOUND TRUE) + set(WEBP_LIBRARIES ${WEBP_LIBRARY}) + message(STATUS "Found WEBP library: ${WEBP_LIBRARY}") +endif() + +# 8/12-bit jpeg mode +option(jpeg12 "enable libjpeg 8/12-bit dual mode (requires separate +12-bit libjpeg build)" ON) +set(JPEG12_INCLUDE_DIR JPEG12_INCLUDE_DIR-NOTFOUND CACHE PATH "Include directory for 12-bit libjpeg") +set(JPEG12_LIBRARY JPEG12_LIBRARY-NOTFOUND CACHE FILEPATH "12-bit libjpeg library") +set(JPEG12_FOUND FALSE) +if (JPEG12_INCLUDE_DIR AND JPEG12_LIBRARY) + set(JPEG12_LIBRARIES ${JPEG12_LIBRARY}) + set(JPEG12_FOUND TRUE) +endif() +if (JPEG12_FOUND) + set(JPEG_DUAL_MODE_8_12 1) + set(LIBJPEG_12_PATH "${JPEG12_INCLUDE_DIR}/jpeglib.h") +endif() + +# C++ support +option(cxx "Enable C++ stream API building (requires C++ compiler)" ON) +set(CXX_SUPPORT FALSE) +if (cxx) + enable_language(CXX) + set(CXX_SUPPORT TRUE) +endif() + +# OpenGL and GLUT +find_package(OpenGL) +find_package(GLUT) +set(HAVE_OPENGL FALSE) +if(OPENGL_FOUND AND OPENGL_GLU_FOUND AND GLUT_FOUND) + set(HAVE_OPENGL TRUE) +endif() +# Purely to satisfy the generated headers: +check_include_file(GL/gl.h HAVE_GL_GL_H) +check_include_file(GL/glu.h HAVE_GL_GLU_H) +check_include_file(GL/glut.h HAVE_GL_GLUT_H) +check_include_file(GLUT/glut.h HAVE_GLUT_GLUT_H) +check_include_file(OpenGL/gl.h HAVE_OPENGL_GL_H) +check_include_file(OpenGL/glu.h HAVE_OPENGL_GLU_H) + +# Win32 IO +set(win32_io FALSE) +if(WIN32) + set(win32_io TRUE) +endif() + +set(USE_WIN32_FILEIO ${win32_io}) + +# Orthogonal features + +# Strip chopping +option(strip-chopping "strip chopping (whether or not to convert single-strip uncompressed images to mutiple strips of specified size to reduce memory usage)" ON) +set(TIFF_DEFAULT_STRIP_SIZE 8192 CACHE STRING "default size of the strip in bytes (when strip chopping is enabled)") + +set(STRIPCHOP_DEFAULT) +if(strip-chopping) + set(STRIPCHOP_DEFAULT TRUE) + if(TIFF_DEFAULT_STRIP_SIZE) + set(STRIP_SIZE_DEFAULT "${TIFF_DEFAULT_STRIP_SIZE}") + endif() +endif() + +# Defer loading of strip/tile offsets +option(defer-strile-load "enable deferred strip/tile offset/size loading (also available at runtime with the 'D' flag of TIFFOpen())" OFF) +set(DEFER_STRILE_LOAD ${defer-strile-load}) + +# CHUNKY_STRIP_READ_SUPPORT +option(chunky-strip-read "enable reading large strips in chunks for TIFFReadScanline() (experimental)" OFF) +set(CHUNKY_STRIP_READ_SUPPORT ${chunky-strip-read}) + +# SUBIFD support +set(SUBIFD_SUPPORT 1) + +# Default handling of ASSOCALPHA support. +option(extrasample-as-alpha "the RGBA interface will treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many packages produce RGBA files but don't mark the alpha properly" ON) +if(extrasample-as-alpha) + set(DEFAULT_EXTRASAMPLE_AS_ALPHA 1) +endif() + +# Default handling of YCbCr subsampling support. +# See Bug 168 in Bugzilla, and JPEGFixupTestSubsampling() for details. +option(check-ycbcr-subsampling "enable picking up YCbCr subsampling info from the JPEG data stream to support files lacking the tag" ON) +if (check-ycbcr-subsampling) + set(CHECK_JPEG_YCBCR_SUBSAMPLING 1) +endif() + +# Generate pkg-config file +set(prefix "${CMAKE_INSTALL_PREFIX}") +set(exec_prefix "${CMAKE_INSTALL_PREFIX}") +set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") +set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}") +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libtiff-4.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/libtiff-4.pc) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libtiff-4.pc + DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig") + +# Includes used by libtiff (and tests) +if(ZLIB_INCLUDE_DIRS) + list(APPEND TIFF_INCLUDES ${ZLIB_INCLUDE_DIRS}) +endif() +if(DEFLATE_INCLUDE_DIR) + list(APPEND TIFF_INCLUDES ${DEFLATE_INCLUDE_DIR}) +endif() +if(JPEG_INCLUDE_DIR) + list(APPEND TIFF_INCLUDES ${JPEG_INCLUDE_DIR}) +endif() +if(JPEG12_INCLUDE_DIR) + list(APPEND TIFF_INCLUDES ${JPEG12_INCLUDE_DIR}) +endif() +if(JBIG_INCLUDE_DIR) + list(APPEND TIFF_INCLUDES ${JBIG_INCLUDE_DIR}) +endif() +if(LIBLZMA_INCLUDE_DIRS) + list(APPEND TIFF_INCLUDES ${LIBLZMA_INCLUDE_DIRS}) +endif() +if(ZSTD_INCLUDE_DIR) + list(APPEND TIFF_INCLUDES ${ZSTD_INCLUDE_DIR}) +endif() +if(WEBP_INCLUDE_DIR) + list(APPEND TIFF_INCLUDES ${WEBP_INCLUDE_DIR}) +endif() + +# Libraries required by libtiff +set(TIFF_LIBRARY_DEPS) +if(NOT MINGW AND M_LIBRARY) + list(APPEND TIFF_LIBRARY_DEPS "m") +endif() +if(ZLIB_LIBRARIES) + list(APPEND TIFF_LIBRARY_DEPS ${ZLIB_LIBRARIES}) +endif() +if(DEFLATE_LIBRARIES) + list(APPEND TIFF_LIBRARY_DEPS ${DEFLATE_LIBRARIES}) +endif() +if(JPEG_LIBRARIES) + list(APPEND TIFF_LIBRARY_DEPS ${JPEG_LIBRARIES}) +endif() +if(JPEG12_LIBRARIES) + list(APPEND TIFF_LIBRARY_DEPS ${JPEG12_LIBRARIES}) +endif() +if(JBIG_LIBRARIES) + list(APPEND TIFF_LIBRARY_DEPS ${JBIG_LIBRARIES}) +endif() +if(LIBLZMA_LIBRARIES) + list(APPEND TIFF_LIBRARY_DEPS ${LIBLZMA_LIBRARIES}) +endif() +if(ZSTD_LIBRARIES) + list(APPEND TIFF_LIBRARY_DEPS ${ZSTD_LIBRARIES}) +endif() +if(WEBP_LIBRARIES) + list(APPEND TIFF_LIBRARY_DEPS ${WEBP_LIBRARIES}) +endif() + +#report_values(TIFF_INCLUDES TIFF_LIBRARY_DEPS) + +# Process subdirectories +add_subdirectory(port) +add_subdirectory(libtiff) +add_subdirectory(tools) +add_subdirectory(test) +add_subdirectory(contrib) +add_subdirectory(build) +add_subdirectory(man) +add_subdirectory(html) + +#message(STATUS "EXTRA_DIST: ${EXTRA_DIST}") + +message(STATUS "") +message(STATUS "Libtiff is now configured for ${host}") +message(STATUS "") +message(STATUS " Installation directory: ${prefix}") +message(STATUS " Documentation directory: ${LIBTIFF_DOCDIR}") +message(STATUS " C compiler: ${CMAKE_C_COMPILER}") +message(STATUS " C++ compiler: ${CMAKE_CXX_COMPILER}") +message(STATUS " Build shared libraries: ${BUILD_SHARED_LIBS}") +message(STATUS " Enable linker symbol versioning: ${HAVE_LD_VERSION_SCRIPT}") +message(STATUS " Support Microsoft Document Imaging: ${mdi}") +message(STATUS " Use win32 IO: ${USE_WIN32_FILEIO}") +message(STATUS "") +message(STATUS " Support for internal codecs:") +message(STATUS " CCITT Group 3 & 4 algorithms: ${ccitt}") +message(STATUS " Macintosh PackBits algorithm: ${packbits}") +message(STATUS " LZW algorithm: ${lzw}") +message(STATUS " ThunderScan 4-bit RLE algorithm: ${thunder}") +message(STATUS " NeXT 2-bit RLE algorithm: ${next}") +message(STATUS " LogLuv high dynamic range encoding: ${logluv}") +message(STATUS "") +message(STATUS " Support for external codecs:") +message(STATUS " ZLIB support: ${zlib} (requested) ${ZLIB_FOUND} (availability)") +message(STATUS " libdeflate support: ${libdeflate} (requested) ${LIBDEFLATE_SUPPORT} (availability)") +message(STATUS " Pixar log-format algorithm: ${pixarlog} (requested) ${PIXARLOG_SUPPORT} (availability)") +message(STATUS " JPEG support: ${jpeg} (requested) ${JPEG_FOUND} (availability)") +message(STATUS " Old JPEG support: ${old-jpeg} (requested) ${JPEG_FOUND} (availability)") +message(STATUS " JPEG 8/12 bit dual mode: ${jpeg12} (requested) ${JPEG12_FOUND} (availability)") +message(STATUS " ISO JBIG support: ${jbig} (requested) ${JBIG_FOUND} (availability)") +message(STATUS " LZMA2 support: ${lzma} (requested) ${LIBLZMA_FOUND} (availability)") +message(STATUS " ZSTD support: ${zstd} (requested) ${ZSTD_FOUND} (availability)") +message(STATUS " WEBP support: ${webp} (requested) ${WEBP_FOUND} (availability)") +message(STATUS "") +message(STATUS " C++ support: ${cxx} (requested) ${CXX_SUPPORT} (availability)") +message(STATUS "") +# message(STATUS " X Athena Widgets support: ${HAVE_XAW}") +message(STATUS " OpenGL support: ${HAVE_OPENGL}") +message(STATUS "") diff --git a/thirdparty/tiff-4.0.3/COPYRIGHT b/thirdparty/tiff-4.2.0/COPYRIGHT similarity index 100% rename from thirdparty/tiff-4.0.3/COPYRIGHT rename to thirdparty/tiff-4.2.0/COPYRIGHT diff --git a/thirdparty/tiff-4.2.0/ChangeLog b/thirdparty/tiff-4.2.0/ChangeLog new file mode 100644 index 00000000..452dcb3a --- /dev/null +++ b/thirdparty/tiff-4.2.0/ChangeLog @@ -0,0 +1,11094 @@ +2020-12-19 Bob Friesenhahn + + * libtiff 4.2.0 released. + + * configure.ac: Pass tar-ustar option to AM_INIT_AUTOMAKE rather + than tar-pax since ustar POSIX 1003.1-1988 format is more portable + than PAX POSIX 1003.1-2001 format. + +2020-12-12 Even Rouault + + Merge branch 'w_adjust-deflate_names' into 'master' + Set 'deflate' to DEFLATE_NAMES, instead of 'libdeflate' + + See merge request libtiff/libtiff!174 + +2020-12-12 Lemures Lemniscati + + Set 'deflate' to DEFLATE_NAMES, instead of 'libdeflate' + 'lib' will be automatically added as a prefix while doing find_library() + +2020-12-12 Even Rouault + + DoubleToRational(): avoid casting NaN to uint32 (fixes #227) + +2020-12-12 Even Rouault + + Merge branch 'fix_221' into 'master' + tiffio.h: do not define __attribute__ but defines TIFF_ATTRIBUTE instead (fixes #221) + + Closes #221 + + See merge request libtiff/libtiff!173 + +2020-12-12 Even Rouault + + tiffio.h: do not define __attribute__ but defines TIFF_ATTRIBUTE instead (fixes #221) + +2020-12-08 Even Rouault + + TIFFReadDirEntryArrayWithLimit(): properly read from offline tag value when we clamp the number of strips to 1. + Fixes regression of commit 7057734d986001b7fd6d2afde9667da7754ff2cc on reading + a file with StripByteCounts with 1 element (broken) and StripOffsets with + 896 elements, and where StripOffsets[0] is correct + + $ tiffdump foo.tif + Magic: 0x4949 Version: 0x2a + Directory 0: offset 25725448 (0x1888a08) next 0 (0) + SubFileType (254) LONG (4) 1<0> + ImageWidth (256) LONG (4) 1<640> + ImageLength (257) LONG (4) 1<20098> + BitsPerSample (258) SHORT (3) 1<16> + Photometric (262) SHORT (3) 1<1> + SamplesPerPixel (277) SHORT (3) 1<1> + ResolutionUnit (296) SHORT (3) 1<2> + StripByteCounts (279) LONG (4) 1<1806> + StripOffsets (273) LONG (4) 896<8 648 1288 1928 2568 3208 3848 4488 5128 5768 6408 7048 7688 8328 8968 9608 10248 10888 11528 12168 12808 13448 14088 14728 ...> + +2020-12-02 Even Rouault + + tif_jpeg.c: avoid potential harmless unsigned integer overflow on data->fileoffset in JPEGFixupTagsSubsamplingSkip() by validating earlier. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28200 + +2020-11-27 Even Rouault + + Merge branch 'Jamaika1-master-patch-47839' into 'master' + Change ULARGE_INTEGER to LARGE_INTEGER + + See merge request libtiff/libtiff!170 + +2020-11-27 Even Rouault + + Merge branch 'Jamaika1-master-patch-46397' into 'master' + Added stdint.h + + See merge request libtiff/libtiff!171 + +2020-11-27 Jamaika + + Added stdint.h. + + ``` tif_win32.c: In function '_tiffSizeProc': tif_win32.c:159:23: warning: passing argument 2 of 'GetFileSizeEx' from incompatible pointer type [-Wincompatible-pointer-types] 159 | if (GetFileSizeEx(fd,&m)) | ^~ | | | ULARGE_INTEGER * In file included from c:\msys1021\x86_64-w64-mingw32\include\winbase.h:18, from c:\msys1021\x86_64-w64-mingw32\include\windows.h:70, from tif_win32.c:32: c:\msys1021\x86_64-w64-mingw32\include\fileapi.h:78:73: note: expected 'PLARGE_INTEGER' {aka 'LARGE_INTEGER *'} but argument is of type 'ULARGE_INTEGER *' 78 | WINBASEAPI WINBOOL WINAPI GetFileSizeEx (HANDLE hFile, PLARGE_INTEGER lpFileSize); | ~~~~~~~~~~~~~~~^~~~~~~~~~ ``` + +2020-11-21 Even Rouault + + Merge branch 'issue-113' into 'master' + tiffcrop: fix buffer overrun in extractContigSamples24bits() + + Closes #113 + + See merge request libtiff/libtiff!169 + +2020-11-21 Even Rouault + + Merge branch 'issue-156' into 'master' + tiff2pdf: Check output size before writing + + Closes #156 + + See merge request libtiff/libtiff!168 + +2020-11-21 Even Rouault + + Merge branch 'issue-201' into 'master' + tiff2pdf: enforce memory limit for tiled pictures too + + Closes #201 + + See merge request libtiff/libtiff!167 + +2020-11-20 Even Rouault + + Merge branch 'issue-207' into 'master' + enforce (configurable) memory limit in tiff2rgba + + Closes #209 et #207 + + See merge request libtiff/libtiff!165 + +2020-11-20 Even Rouault + + tif_lzw.c: avoid false positive -Wnull-dereference of mingw32 gcc 7.3. + +2020-11-17 Thomas Bernard + + tiffcrop: fix buffer overrun in extractContigSamples24bits() + fixes #113 + + tiff2pdf: Check output size before writing. + fixes #156 + + tiff2pdf: enforce memory limit for tiled pictures too. + fixes #201 + +2020-11-15 Thomas Bernard + + tiff2rgba.1: -M option. + + enforce (configurable) memory limit in tiff2rgba. + fixes #207 + fixes #209 + +2020-11-14 Even Rouault + + Merge branch 'issue-220' into 'master' + tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr + + Closes #220 + + See merge request libtiff/libtiff!159 + +2020-11-14 Thomas Bernard + + tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr. + fixes #220 + +2020-11-14 Even Rouault + + Merge branch 'issue-204' into 'master' + avoid buffer overflow while writing jpeg end of file marker + + Closes #204 + + See merge request libtiff/libtiff!161 + +2020-11-14 Even Rouault + + Merge branch 'issue-193' into 'master' + fix buffer overflow in tiff2ps.c + + Closes #193 + + See merge request libtiff/libtiff!162 + +2020-11-14 Even Rouault + + Merge branch 'skal65535-master-patch-91082' into 'master' + More overflow fixes for large widths + + See merge request libtiff/libtiff!164 + +2020-11-14 skal + + More overflow fixes for large width. + Also: use INT_MAX instead of hard-coded constants. + +2020-11-12 Even Rouault + + Merge branch 'skal65535-master-patch-56655' into 'master' + Fix potential overflow in gtStripContig() + + See merge request libtiff/libtiff!163 + +2020-11-12 Even Rouault + + Merge branch 'issue-211' into 'master' + check for tile width overflow + + Closes #211 + + See merge request libtiff/libtiff!160 + +2020-11-12 skal + + Fix potential overflow in gtStripContig() + (w + w) might not fit in int32 if too large. + +2020-11-09 Thomas Bernard + + tiff2ps.c: fix buffer overread. + fixes #193 + + fix undefined behaviour (int shifted too much to the left) + + avoid buffer overflow while writing jpeg end of file marker. + fixes #204 + + gtTileContig(): check Tile width for overflow. + fixes #211 + + fix warning messages (v32 is unsigned) + +2020-10-26 Even Rouault + + TIFFStartStrip(): avoid potential crash in WebP codec when using scanline access on corrupted files. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26650 + +2020-10-20 Even Rouault + + tif_webp.c: validate tile/strip dimension to avoid unsigned integer overflow in RGBA.size computation + +2020-10-19 Even Rouault + + tif_zip.c: fix typo in comment. + +2020-10-16 Even Rouault + + tiff.h: remove irrelevant warning about webp related pseudo-tags not being registered: they are purely internal libtiff concepts + +2020-10-16 Even Rouault + + Merge branch 'libdeflate' into 'master' + Add support for building against libdeflate for faster Zip/Deflate compression/decompression + + See merge request libtiff/libtiff!158 + +2020-10-16 Even Rouault + + test: add testdeflatelaststripextradata.sh. + +2020-10-16 Even Rouault + + Add support for optional building against libdeflate for faster Zip/Deflate compression/decompression. + So we can have 2 kind of builds with the Zip/Deflate codec: + - zlib only + - zlib + libdeflate + + Speed improvements in the 35%-50% range can be expected when libdeflate is used. + Compression level up to 12 is now supported (capped to 9 when zlib is used). + Still requires zlib for situations where libdeflate cannot be used (that + is for scanline access, since libdeflate has no streaming mode) + + Pseudo-tag TIFFTAG_DEFLATE_SUBCODEC=DEFLATE_SUBCODEC_ZLIB/DEFLATE_SUBCODEC_LIBDEFLATE + is added to control which subcodec (zlib or libdeflate) should be used (it defaults + of course to libdeflate, when it is available). + This is mostly aimed at being used on the writing side, to be able to reproduce + output of previous libtiff versions at a binary level, in situations where this would + be really needed. Or as a safety belt in case there would be unforeseen issues + with using libdeflate. + It can be used to know when libdeflate is available at runtime (DEFLATE_SUBCODEC_LIBDEFLATE + will be the default value in that situation). + + Of course, deflate codestreams produced by libdeflate can be read by zlib, and vice-versa. + +2020-10-14 Even Rouault + + tif_webp.c: fix compiler warnings with MSVC. + +2020-10-12 Even Rouault + + Merge branch 'various_fixes' into 'master' + Fix compiler warnings about unused variables when assert() expands to nothing + + See merge request libtiff/libtiff!157 + +2020-10-12 Even Rouault + + .gitignore: add entries for new files in test/ + + Fix compiler warnings about unused variables when assert() expands to nothing + +2020-10-09 Roger Leigh + + Merge branch '215-cygwin-appveyor-fail' into 'master' + Update Appveyor CI build to build with VS2019 image + + Closes #215 + + See merge request libtiff/libtiff!154 + +2020-10-09 Roger Leigh + + wip. + + wip. + + wip. + + wip. + + wip. + + wip. + +2020-10-09 Roger Leigh + + Merge branch 'TIFF-217_m_lib_path' into 'master' + cmake: Do not use absolute libm path + + Closes #217 + + See merge request libtiff/libtiff!156 + +2020-10-09 Roger Leigh + + cmake: Do not use absolute libm path. + +2020-10-08 Even Rouault + + tif_fax3.h: restore systematic calls to CLEANUP_RUNS() + now that SETVALUE() no longer cause overflows. + Those were removed per b351db8be1b4d3f712bdb9424a79d3174cc03202 and + 3440ac216463fcad170bbb391491e69730a59ffa. + + As SETVALUE() now returns an error, this allow the decoder to exit. + + Otherwise, the assert(x == lastx) in _TIFFFax3fillruns() can trigger. + + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26201 + +2020-10-06 Even Rouault + + Merge branch 'check_TIFFFlushData1' into 'master' + FAX/JPEG/LZMA/PixarLog/ZIP/ZSTD codecs: make sure to check TIFFFlushData1() return value + + See merge request libtiff/libtiff!155 + +2020-10-04 Even Rouault + + Merge branch 'shared-memory' into 'master' + Set the --shared-memory linker flag for Emscripten builds + + See merge request libtiff/libtiff!153 + +2020-10-03 Even Rouault + + tiff2rgba.c: fix -Wold-style-declaration warning. + + FAX/JPEG/LZMA/PixarLog/ZIP/ZSTD codecs: make sure to check TIFFFlushData1() return value + +2020-09-26 Even Rouault + + tif_fax3.h: extra buffer overflow checks. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25934 + +2020-09-25 Roger Leigh + + wip. + + wip. + + wip. + + wip. + + wip. + + wip. + + Update AppVeyor image. + + test-appveyor. + +2020-09-24 Attila Oláh + + Also pass --shared-memory to raw_decode. + This is needed when building for Emscripten with *both* WEBP and JPEG + support. + + Set the --shared-memory linker flag for Emscripten builds. + This is only needed when building with WEBP support, which uses atomics, + therefore the linker needs the --shared-memory flag. The flag cannot be + added globally because not all executables link against libwebp. + +2020-09-22 Even Rouault + + tif_fax3.h: return error when a buffer overflow occurs. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25552 and https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25849 + +2020-09-11 Even Rouault + + Merge branch 'fix-float-compare' into 'master' + Fix comparison for max negative float value. + + See merge request libtiff/libtiff!152 + +2020-09-11 Dirk Lemstra + + Fix comparison for max negative float value. + +2020-09-07 Even Rouault + + Fax3PreDecode(): reset curruns and refruns state variables. + to avoid out-of-bounds write triggered by GDAL when repeatedly + reading a corrupt strip. + + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25493 + +2020-06-06 Thomas Bernard + + Merge branch 'issue-17' into 'master' + normalize tools behaviour regarding -h + + Closes #17 + + See merge request libtiff/libtiff!115 + +2020-05-31 Even Rouault + + TWebPSetupEncode(): fix logic problem (and instead of or) in test that checks input is 8bit unsigned data + +2020-05-12 Even Rouault + + TIFFGetConfiguredCODECs(): fix to avoid wrong structure to be returned for registered (ie non built-in) codecs + +2020-05-09 Even Rouault + + Merge branch 'zstd-webp-update' into 'master' + gitlab-ci: use latest zstd and webp versions + + See merge request libtiff/libtiff!148 + +2020-05-09 Even Rouault + + Merge branch 'deprecated' into 'master' + ojpeg: s/Depreciated/Deprecated/ + + See merge request libtiff/libtiff!149 + +2020-05-09 Aaron Boxer + + ojpeg: s/Depreciated/Deprecated/ + +2020-04-27 Even Rouault + + Fix typos. + + tif_jpeg.c: avoid potential division in previous fix (master only) + +2020-04-26 Thomas Bernard + + gitlab-ci: use latest zstd and webp versions. + +2020-04-26 Even Rouault + + tiff.h: fixes to use ASCII only characters (master only) + +2020-04-26 Thomas Bernard + + tiffsplit: use EXIT_SUCCESS / EXIT_FAILURE. + + tiffset: print usage on stdout when -h is used. + also use EXIT_FAILURE / EXIT_SUCCESS + see #17 + + tiffmedian: shopw usage on stdout when -h is used. + aslo use EXIT_SUCCESS/EXIT_FAILURE + see #17 + + tiffinfo: print usage on stdout when -h is used. + also use EXIT_FAILURE / EXIT_SUCCESS + see #17 + + raw2tiff: print usage to stdout when -h is used. + see #17 + + tiff2pdf: print usage on stdout when -h is used. + see #17 + + tiffgt: output usage on stdout with -h. + also use EXIT_SUCCESS / EXIT_FAILURE + + tiffdump: use EXIT_FAILURE / EXIT_SUCCESS. + see #17 + + tiffdither: print usage on stdout when -h is used. + see #17 + +2020-04-26 Thomas Bernard + + tiffcrop: -h / -v prints usage/version to stdout. + also uses the standard C EXIT_SUCCESS / EXIT_FAILURE + macros + + see #17 + +2020-04-26 Thomas Bernard + + tiffcp: output usage to stdout when using -h. + also use EXIT_FAILURE / EXIT_SUCCESS + see #17 + + tiffcmp: match exit status for posix cmp and diff tools. + + tiff2rgba: output usage to stdout when using -h. + also uses std C EXIT_FAILURE / EXIT_SUCCESS + see #17 + + tiff2ps: sue EXIT_FAILURE / EXIT_SUCCESS. + see #17 + + tiff2bw: output usage on stdout when using -h. + also uses EXIT_SUCCESS / EXIT_FAILURE + see #17 + + thumbnail: use EXIT_FAILURE / EXIT_SUCCESS. + the -h option was already used so it cannot be used for help/usage + see #17 + + rgb2ycbcr: use EXIT_FAILURE / EXIT_SUCCESS. + the -h option was already used so it cannot be used for help/usage + see #17 + + ppm2tiff: output usage to stdout when using -h option. + also uses std C EXIT_SUCCESS / EXIT_FAILURE + see #17 + + pal2rgb: output usage to stdout when -h is used. + see #17 + + fax2tiff.c: print usage on stdout when using -h option. + see #17 + + fax2ps: output usage to stdout when using -h option. + also use EXIT_SUCCESS, EXIT_FAILURE from C standard + +2020-04-25 Even Rouault + + Merge branch 'jpeg_multiscan_dos_logic' into 'master' + tif_jpeg.c: revise logic to detect potential excessive memory usage when... + + See merge request libtiff/libtiff!147 + +2020-04-24 Even Rouault + + Merge branch 'issue-176' into 'master' + tiff2pdf: get rid of uninitialized memory content + + Closes #176 + + See merge request libtiff/libtiff!143 + +2020-04-24 Even Rouault + + tif_jpeg.c: revise logic to detect potential excessive memory usage when decoding multiscan JPEG compressed images + +2020-04-19 Thomas Bernard + + tiff2pdf: test the return code of TIFFReadRawStrip() and TIFFReadRawTile() + + tiff2pdf.c: fix some whitespace problems in source. + + tiff2pdf: get rid of uninitialized memory content. + fixes #176 + +2020-04-19 Even Rouault + + Merge branch 'issue-18' into 'master' + tiffset: pass size for TIFFTAG_INKNAMES + + Closes #18 + + See merge request libtiff/libtiff!146 + +2020-04-18 Olivier Paquet + + Merge branch 'issue-80' into 'master' + tiffinfo: fix dump of Tiled images + + Closes #80 + + See merge request libtiff/libtiff!144 + +2020-04-15 Even Rouault + + Fix wrong file size checks for memory-mapped BigTIFF files that could lead to image rejection + +2020-04-05 Thomas Bernard + + tiffset: pass size for TIFFTAG_INKNAMES. + Uses TIFFFieldPassCount() to know which arguments need to be + passed to TiffSetField() + + fixes #18 + see http://bugzilla.maptools.org/show_bug.cgi?id=2202 + +2020-04-04 Thomas Bernard + + tiffinfo: showdata for tiled images. + + tiffinfo: fix dump of Tiled images. + fixes #80 + +2020-04-03 Even Rouault + + Merge branch 'issue-117' into 'master' + tiffcrop: enforce memory allocation limit + + Closes #117 + + See merge request libtiff/libtiff!140 + +2020-04-03 Thomas Bernard + + tiffcrop: enforce memory allocation limit. + uses -k option to change limit (default to 256MiB) + fixes #117 / http://bugzilla.maptools.org/show_bug.cgi?id=2757 + +2020-04-02 Even Rouault + + Merge branch 'issue-45' into 'master' + tiffcp: disable strip chopping when trying to convert to JBIG compression + + Closes #45 + + See merge request libtiff/libtiff!138 + +2020-04-02 Even Rouault + + Merge branch 'issue-124' into 'master' + TIFFGetFields(3tiff): TIFFTAG_*BYTECOUNTS TIFFTAG_*OFFSETS are uint64 + + Closes #124 + + See merge request libtiff/libtiff!137 + +2020-04-02 Even Rouault + + Merge branch 'aix_itrunc' into 'master' + Rename itrunc to fix name clash with a different itrunc in math.h on AIX. Fixes issue #189 + + Closes #189 + + See merge request libtiff/libtiff!139 + +2020-04-01 Rob Boehne + + Rename itrunc to fix name clash with a different itrunc in math.h on AIX. Fixes issue #189 + +2020-04-01 Thomas Bernard + + tiffcp: disable strip chopping when trying to convert to JBIG compression + fixes #45 + +2020-03-29 Thomas Bernard + + TIFFGetFields(3tiff): TIFFTAG_*BYTECOUNTS TIFFTAG_*OFFSETS are uint64. + fixes #124 / http://bugzilla.maptools.org/show_bug.cgi?id=2774 + +2020-03-29 Even Rouault + + Merge branch 'issue-48' into 'master' + tiff2pdf: fix "raw" copy of Deflate streams + + Closes #48 + + See merge request libtiff/libtiff!136 + +2020-03-27 Thomas Bernard + + tiff2pdf: fix "raw" copy of Deflate streams. + The Predictor parametter was not copied from the source tiff to the PDF. + fixes #48 / http://bugzilla.maptools.org/show_bug.cgi?id=2442 + +2020-03-26 Thomas Bernard + + tif_fax3: quit Fax3Decode2D() when a buffer overflow occurs. + fixes #186 + +2020-03-24 Even Rouault + + Merge branch 'issue-143-144' into 'master' + tiffdump: avoid unaligned memory access + + Closes #144 et #143 + + See merge request libtiff/libtiff!133 + +2020-03-24 Even Rouault + + Merge branch 'issue-133' into 'master' + tiff2pdf: avoid divide by 0 + + Closes #133 + + See merge request libtiff/libtiff!126 + +2020-03-24 Thomas Bernard + + tiff2pdf: normalizePoint() macro to normalize the white point. + +2020-03-23 Thomas Bernard + + tiffdump: avoid unaligned memory access. + fixes #143 + fixes #144 + +2020-03-23 Even Rouault + + Merge branch 'out-of-memory' into 'master' + tiffcp/tiff2pdf/tiff2ps: enforce maximum malloc size + + Closes #153, #84, #116 et #115 + + See merge request libtiff/libtiff!130 + +2020-03-23 Even Rouault + + Merge branch 'issue-157' into 'master' + tiffset: check memory allocation + + Closes #157 + + See merge request libtiff/libtiff!132 + +2020-03-23 Even Rouault + + Merge branch 'issue-185' into 'master' + tif_fax3: more buffer overflow checks in Fax3Decode2D() + + Closes #185 + + See merge request libtiff/libtiff!131 + +2020-03-23 Thomas Bernard + + tiffset: check memory allocation. + fixes #157 / http://bugzilla.maptools.org/show_bug.cgi?id=2850 + + tif_fax3: more buffer overflow checks in Fax3Decode2D() + fixes #185 + +2020-03-21 Thomas Bernard + + tiff2ps: enforce memory allocation limit. + fixes #153 / http://bugzilla.maptools.org/show_bug.cgi?id=2845 + + tiff2pdf: enforce maximum data size. + fixes #116 / http://bugzilla.maptools.org/show_bug.cgi?id=2756 + fixes #84 / http://bugzilla.maptools.org/show_bug.cgi?id=2683 + + update man page for tiffcp regarding the -m option. + + tiffcp.c: _TIFFmalloc() => limitMalloc() + +2020-03-21 Thomas Bernard + + tiffcp: enforce maximum malloc size. + default is 256MB. use -m option to change + + fixes #115 / http://bugzilla.maptools.org/show_bug.cgi?id=2755 + +2020-03-21 Even Rouault + + Merge branch 'issue-184' into 'master' + CmakeLists.txt: define WORDS_BIGENDIAN when the CPU is big endian + + Closes #184 + + See merge request libtiff/libtiff!127 + +2020-03-21 Even Rouault + + Merge branch 'issue-44' into 'master' + tiff2pdf: "" causes the relevant argument not to be written + + Closes #44 + + See merge request libtiff/libtiff!128 + +2020-03-21 Even Rouault + + Merge branch 'issue-56' into 'master' + fix man for TIFFReadEncodedStrip(), TIFFStripSize, TIFFVStripSize, TIFFRawStripSize + + Closes #56 + + See merge request libtiff/libtiff!129 + +2020-03-20 Thomas Bernard + + fix man for TIFFReadEncodedStrip(), TIFFStripSize, TIFFVStripSize, TIFFRawStripSize + fixes #56 + http://bugzilla.maptools.org/show_bug.cgi?id=2507 + + tiff2pdf: "" causes the relevant argument not to be written. + fixes #44 + + CmakeLists.txt: define WORDS_BIGENDIAN when the CPU is big endian. + fixes #184 + +2020-03-17 Thomas Bernard + + tiff2pdf: avoid divide by 0. + fixes #133 http://bugzilla.maptools.org/show_bug.cgi?id=2796 + +2020-03-17 Even Rouault + + Merge branch 'issue-22' into 'master' + do not _tiffMapProc 0 size files + + Closes #22 + + See merge request libtiff/libtiff!125 + +2020-03-13 Thomas Bernard + + tif_win32.c: do not _tiffMapProc() 0 sized files. + see #22 + + tif_unix.c: do not _tiffMapProc 0 size files. + fixes #22 + http://bugzilla.maptools.org/show_bug.cgi?id=2249 + +2020-03-12 Even Rouault + + tif_fax3.c: fix warning C4018: '<': signed/unsigned mismatch introduced in past commits + +2020-03-11 Even Rouault + + tiff.h: mention TIFFTAG_RPCCOEFFICIENT, TIFFTAG_TIFF_RSID, TIFFTAG_GEO_METADATA + +2020-03-11 Even Rouault + + Merge branch 'issue-60' into 'master' + added support for more private tags + + Closes #60 + + See merge request libtiff/libtiff!124 + +2020-03-11 Even Rouault + + Merge branch 'issue-160' into 'master' + Fax3SetupState(): check consistency of rowbytes and rowpixels + + Closes #160 + + See merge request libtiff/libtiff!123 + +2020-03-11 Thomas Bernard + + added support for more private tags. + see https://gitlab.com/libtiff/libtiff/-/issues/60 + bugzilla.maptools.org/show_bug.cgi?id=2525 + + closes #60 + + original author : art1@andreas-romeyke.de + +2020-03-11 Thomas Bernard + + Fax3SetupState(): check consistency of rowbytes and rowpixels. + also add some parameter documentation to Fax3Decode1D() + + fixes #160 + http://bugzilla.maptools.org/show_bug.cgi?id=2854 + +2020-03-10 Even Rouault + + Merge branch 'issue-11-const-pointers' into 'master' + Make pointers returned via TIFFGetField const + + Closes #11 + + See merge request libtiff/libtiff!118 + +2020-03-10 Even Rouault + + tif_ojpeg.c: relax again too strict sanity checks to allow reading of valid images such as https://gitlab.com/libtiff/libtiff/-/issues/181#note_302535232. Fixes #181 + +2020-03-09 Even Rouault + + Merge branch 'issue-52' into 'master' + contrib/win_dib/tiff2dib: fix Uninitialized variable: lpBits + + Closes #52 + + See merge request libtiff/libtiff!121 + +2020-03-09 Thomas Bernard + + contrib/win_dib/tiff2dib: fix Uninitialized variable: lpBits. + fixes #52 + http://bugzilla.maptools.org/show_bug.cgi?id=2469 + +2020-03-08 Even Rouault + + Merge branch 'issue-58' into 'master' + Make TIFFTAG_CFAPATTERN variable count + + Closes #58 + + See merge request libtiff/libtiff!120 + +2020-03-08 Even Rouault + + Merge branch 'issue-158-no-predictor-in-webp' into 'master' + TIFFTAG_PREDICTOR is not supported for WebP + + Closes #158 + + See merge request libtiff/libtiff!119 + +2020-03-08 Sam Hasinoff + + Make TIFFTAG_CFAPATTERN variable count. + The TIFFTAG_CFAPATTERN tag (33422) from TIFF/EP, recently introduced in libtiff + 3363eda09d082e3e1dfffa6281f53085cac51ad3 / http://bugzilla.maptools.org/show_bug.cgi?id=2457 + is described as having a fixed count of 4. + But the TIFF/EP spec says this should support a variable count (= CFARepeatRows * CFARepeatCols): + + TIFF/EP, ISO 12234-2:2001 + http://www.barrypearson.co.uk/top2009/downloads/TAG2000-22_DIS12234-2.pdf + page 18 and 26 + +2020-03-08 Thomas Bernard + + TIFFTAG_PREDICTOR is not supported for WebP. + fixes #158 + https://gitlab.com/libtiff/libtiff/-/issues/158 + + this bug was introduced by 9eacd59fecc4ef593ac17689bc530ab451c8ec14 + merge request !32 + +2020-03-07 Adam Goode + + Make the default whitepoint and ycbcrcoeffs arrays const. + Now that we are returning const pointers in TIFFGetFieldDefaulted, + we can now make these static default arrays const. + + see #11 + +2020-03-07 Adam Goode + + Make pointers returned via TIFFGetField const. + According to http://bugzilla.maptools.org/show_bug.cgi?id=2125#c6 + callers are not allowed to modify pointer or array values returned from + TIFFGetField or the like. So, make this explicit in the documentation + by specifying these things as const. Note that this is not an ABI + change, since C does not encode const in libraries. Also, this is + not really an API change, since the varargs call strips away all + the types anyway. So it really is more of a documentation change. + + fixes #11 + +2020-03-07 Even Rouault + + CMake: Skip custom_dir_EXIF_231 test on shared builds to avoid issues on Windows + +2020-03-07 Even Rouault + + Merge branch 'EXIF231_GPS_upgrade' into 'master' + EXIF 2.32 and GPS TIFF-tags and functionality upgraded. + + See merge request libtiff/libtiff!91 + +2020-03-07 Su_Laus + + EXIF 2.32 and GPS tags and functionality upgraded. + - Existing EXIF field definition of tags is upgraded to EXIF version 2.3.2 + - EXIF-GPS structure, tags and access functions are added as special CustomDirectory (like it was done for EXIF). + - Test program custom_dir_EXIF_231.c added to test writing/reading of EXID IFD and GPS IFD tags + and to highlight some quirks of IFD-handling and peculiarities of reading/writing the different data types. + - Reading error for FileSource and SceneType tags corrected. + + - EXIF_GPS_upgrade rebased onto c8c5309b765ef4ff097d2aaffbdb8f403db8967d (Merge branch 'Rational2DoublePrecision_correction' into 'master') + and adapted: + - tif_dirinfo.c: All rational tags set to TIFF_SETGET_FLOAT but only the GPSTAG_ tags set to TIFF_SETGET_DOUBLE. + - custom_dir_EXIF_231.c: Editorials amended and gcc warnigs fixed. + - CMakeLists.txt: add_test(NAME "custom_dir_EXIF_231" COMMAND "custom_dir_EXIF_231") added. + +2020-03-07 Even Rouault + + Merge branch 'issue-55' into 'master' + ppm2tiff: support any bps value from 1 to 16 + + Closes #55 + + See merge request libtiff/libtiff!106 + +2020-03-07 Thomas Bernard + + ppm2tiff: Add test for 16bpc PPM. + + ppm2tiff: remove unused argument warning. + +2020-03-07 Ludolf Holzheid + + ppm2tiff: support any bps value from 1 to 16. + fix #55 + http://bugzilla.maptools.org/show_bug.cgi?id=2505 + + Patch originally submited by Ludolf Holzheid + +2020-03-06 Even Rouault + + Merge branch 'fax-test' into 'master' + add test for fax4 decoding + + See merge request libtiff/libtiff!114 + +2020-03-05 Thomas Bernard + + add test for fax4 decoding. + This will check for regression on #46 + https://gitlab.com/libtiff/libtiff/issues/46 + http://bugzilla.maptools.org/show_bug.cgi?id=2434 + +2020-03-05 Even Rouault + + Merge branch 'freebsd-tests' into 'master' + make tests pass under FreeBSD. + + See merge request libtiff/libtiff!113 + +2020-03-05 Thomas Bernard + + make tests pass under FreeBSD. + the -I option for the GNU diff and the FreeBSD diff + behaves differently regarding escaping the ( ) and | + + By using two -I option, we avoid using such charracters. + +2020-03-05 Even Rouault + + Merge branch 'issue-31' into 'master' + HTML + + Closes #31 + + See merge request libtiff/libtiff!111 + +2020-03-05 Even Rouault + + Merge branch 'issue-179' into 'master' + tif_fax3.h: check for buffer overflow in EXPAND2D before "calling" CLEANUP_RUNS() + + Closes #179 + + See merge request libtiff/libtiff!112 + +2020-03-05 Thomas Bernard + + v4.1.0.html: fix for validation. + long comments were replaced + because they confused some parsers + + add DOCTYPE on v*.html. + + fix HTML files so they are valid according to https://validator.w3.org. + +2020-03-05 Thomas Bernard + + tif_fax3.h: check for buffer overflow in EXPAND2D before "calling" CLEANUP_RUNS() + fixes #179 + + this fixes the regression introduced in 02bb0175 / 72c4acef + ( merge request !110 ) + + It may be a better fix to do the overflow check in SETVALUE() but the + macro do { } while(0) construct makes it difficult to quit the loop + properly. + +2020-03-01 Thomas Bernard + + index.html: fix unclosed tag. + +2020-03-01 Thomas Bernard + + html: do not force colors (which are default anyway) + If needed, style should be set using CSS. + + fixes #31 + https://gitlab.com/libtiff/libtiff/issues/31 + http://bugzilla.maptools.org/show_bug.cgi?id=2326 + +2020-03-01 Even Rouault + + TIFFReadCustomDirectory(): fix potential heap buffer overflow when reading a custom directory, after a regular directory where a codec was active. Fixes https://gitlab.com/libtiff/libtiff/issues/178 + +2020-03-01 Even Rouault + + Merge branch 'issue-46' into 'master' + fix decoding of fax4 images + + Closes #46 + + See merge request libtiff/libtiff!110 + +2020-02-29 Thomas Bernard + + tif_fax3: better fix for CVE-2011-0192. + There are some legitimate case which were forbidden by the previous fix + + tif_fax3.h: allow 0 length run in DECODE2D. + fixes #46 + https://gitlab.com/libtiff/libtiff/issues/46 + http://bugzilla.maptools.org/show_bug.cgi?id=2434 + +2020-02-29 Even Rouault + + Merge branch 'mingwlibm' into 'master' + Don't use libm with libtiff due to conflict with libmsvcrt + + See merge request libtiff/libtiff!73 + +2020-02-29 Even Rouault + + Merge branch 'Rational2DoublePrecision_correction' into 'master' + tif_dirwrite.c: bugfix DoubleToSrational() for plain signed integers + + See merge request libtiff/libtiff!109 + +2020-02-29 Su_Laus + + tif_dirwrite.c: bugfix DoubleToSrational(), which returns plain signed interger values always as unsigned rationals. Add a test into rational_precision2double.c for "-1.0" and some editorials in tif_dirwrite.c. (code is related to 6df997c786928757caea0dd68d26ea5f098f49df changes). + +2020-02-29 Even Rouault + + Merge branch 'issue-174' into 'master' + tif_fax3.c: check buffer overflow in Fax4Decode() + + Closes #174 + + See merge request libtiff/libtiff!108 + +2020-02-29 Thomas Bernard + + Fax4Decode(): log error message in case of buffer overrun. + + tif_fax3.c: check buffer overflow in Fax4Decode() + fixes #174 + +2020-02-28 Even Rouault + + typo fixes in code comments. + + ToRationalEuclideanGCD: remove useless test that confuses Coverity Scan about a potential later modulo by zero + +2020-02-27 Even Rouault + + tif_dirwrite.c: fix other warnings related to 6df997c786928757caea0dd68d26ea5f098f49df changes + + rational_precision2double.c: fix many warnings, and do not build it on CMake on shared lib builds + + tif_dirwrite.c: fix various warnings found when building GDAL with internal libtiff after 6df997c786928757caea0dd68d26ea5f098f49df changes + + tif_dirwrite.c: qualify ToRationalEuclideanGCD() with static. + +2020-02-27 Even Rouault + + Merge branch 'Rational2DoublePrecision' into 'master' + Rational with Double Precision Upgrade + + See merge request libtiff/libtiff!100 + +2020-02-27 Su_Laus + + Rational with Double Precision Upgrade. + Unfortunately, custom rational tags (TIFF_RATIONAL with field_bit=FIELD_CUSTOM) are defined as TIFF_SETGET_DOUBLE + but for the reading interface and LibTiff internally they are stored ALLWAYS as floating point SINGLE precision. + Double precision custom rational tags are not supported by LibTiff. + + For the GPS tags in WGS84 a higher accuracy / precision is needed. + Therefore, this upgrade is made, keeping the old interface for the already defined tags and allowing a double precision definition, + as well as calculating rationals with higher accuracy / precision. + This higher accuracy can be used for newly defined tags like that in EXIF/GPS. + + Refer also to the very old Bugzilla issue 2542 (#69) + + A test file rational_precision2double.c is added, which shows prevention of the old interface to the already defined custom rational tags + with the standard library as well as with the upgraded library. + + Also TIFFTAG_XRESOLUTION, TIFFTAG_YRESOLUTION, TIFFTAG_XPOSITION, TIFFTAG_YPOSITION amended from TIFF_SETGET_DOUBLE to TIFF_SETGET_FLOAT and testcase inserted in rational_precision2double.c + +2020-02-26 Chris Degawa + + mingw-w64 cmake: Don't find libm. + mingw-w64 will provide libm symbols by default without -lm and mingw-64's + libm is just a stub. + + This is just to make sure that on systems with msys2 and also cygwin, cmake + doesn't find a libm that actually contains math functions. + +2020-02-26 Even Rouault + + Merge branch 'division-by-zero' into 'master' + tools/tiffcp.c: fix potential division by zero + + See merge request libtiff/libtiff!83 + +2020-02-26 Even Rouault + + Merge branch 'fix-unused-warning' into 'master' + warnings: mark conditionally used parameters + + See merge request libtiff/libtiff!49 + +2020-02-26 Even Rouault + + Merge branch 'master' into 'master' + fix issue #78 warnings regarding RichTIFFIPTC data type + + Closes #78 + + See merge request libtiff/libtiff!99 + +2020-02-26 Even Rouault + + Merge branch 'win64-handle-casts-warn-fix' into 'master' + Avoid warnings about casts between HANDLE and int in Win64 builds + + Closes #2 + + See merge request libtiff/libtiff!93 + +2020-02-26 Even Rouault + + Merge branch 'bug2839' into 'master' + raw2tiff: avoid divide by 0 + + Closes #151 + + See merge request libtiff/libtiff!103 + +2020-02-26 Even Rouault + + Merge branch 'bug2669' into 'master' + tiff2pdf: palette bound check in t2p_sample_realize_palette() + + Closes #82 + + See merge request libtiff/libtiff!104 + +2020-02-26 Even Rouault + + Merge branch 'int-shift' into 'master' + tiffcrop: fix asan runtime error caused by integer promotion + + See merge request libtiff/libtiff!105 + +2020-02-26 Even Rouault + + Merge branch 'bug-2538' into 'master' + libtiff.html: fix function casing + + Closes #68 + + See merge request libtiff/libtiff!107 + +2020-02-16 Thomas Bernard + + raw2tiff: avoid divide by 0. + fixes #151 / http://bugzilla.maptools.org/show_bug.cgi?id=2839 + + first memcmp() lines before computing corellation + and always avoid divide by 0 anyway + +2020-02-09 Even Rouault + + Merge branch 'bug2855' into 'master' + tiff2ps: fix heap buffer read overflow in PSDataColorContig() + + Closes #161 + + See merge request libtiff/libtiff!102 + +2020-02-08 Thomas Bernard + + libtiff.html: fix function casing. + + libtiff.html: fix function casing. + fixes #68 / http://bugzilla.maptools.org/show_bug.cgi?id=2538 + +2020-02-08 Thomas Bernard + + tiffcrop: fix asan runtime error caused by integer promotion. + tiffcrop.c:4027:20: runtime error: left shift of 190 by 24 places cannot be represented in type 'int' + + C treats (byte << 24) as an int expression. + casting explicitely to unsigned type uint32 avoids the problem. + + the same issue has been fixed elsewhere with a24213691616e7cd35aa3e2805493de80c7e4fcf + + I detected the bug with the test file of #86 + +2020-02-08 Thomas Bernard + + tiff2pdf: palette bound check in t2p_sample_realize_palette() + fixes #82 + +2020-02-08 Thomas Bernard + + tiff2ps: fix heap buffer read overflow in PSDataColorContig() + fixes #161 / http://bugzilla.maptools.org/show_bug.cgi?id=2855 + + in 05029fb7f1ecf771abaf90b5705b6cab9eb522a7 I missed that 1 extra byte is read + in this loop. + +2020-02-05 Even Rouault + + tif_dirread.c: suppress CLang static Analyzer 9.0 false positive. + +2020-02-01 Even Rouault + + TIFFSetupStrips: enforce 2GB limitation of Strip/Tile Offsets/ByteCounts arrays + TIFFWriteDirectoryTagData() has an assertion that checks that the + arrays are not larger than 2GB. So error out earlier if in that situation. + +2020-01-29 Bob Friesenhahn + + Simplify nmake configuration for building port directory. Now there is only one boolean setting to enable building strtoll() and strtoull() port functions. The boolean setting enables the necessary port files to be built, but the remainder of the logic is via pre-processor code in the common tif_config.h, which was prepared before entering the port directory to do a build. + +2020-01-28 Bob Friesenhahn + + Make sure that tif_config.h is produced prior to entering the port directory and add an include path so that the port files can include tif_config.h. Do not actually include tif_config.h at this time since CMake and Autotools builds are not prepared for that. This issue could be handled by updating the CMake and Autotools builds or by adding a define which directs libport.h to include tif_config.h. + +2020-01-26 Bob Friesenhahn + + Fix nmake build mistakes in my last commit: + tif_config.vc.h: + + Always define HAVE_STRTOL/HAVE_STRTOUL. + Define HAVE_STRTOLL/HAVE_STRTOULL if _MSC_VER >= 1900. + + nmake.opt: + + Provide defaults suitable for MSVC prior to 14.0. + + libport.h: + + The sense of the pre-processor logic was inverted from what it + should be. The intention is to only provide the prototype if the + function is missing. + +2020-01-25 Bob Friesenhahn + + Add nmake build support for manually configuring the 'port' files to be built based on MSVC features. Include tif_config.h in tools/tiffset.c. + +2020-01-23 Even Rouault + + Adjust previous fix to avoid undue warning in some situations triggered by GDAL + +2020-01-12 Even Rouault + + _TIFFPartialReadStripArray: bring back support for non-conformant SLONG8 data type + Such as in https://github.com/OSGeo/gdal/issues/2165 + +2020-01-07 Even Rouault + + test: add test for single-strip OJPEG file without RowsPerStrip tag (like in CR2 files) + + OJPEGReadHeaderInfo: if rowsperstrip not defined, then assume one-single-strip. Complementary fix to 0356ea76bac908c61160d735f078437ace953bd3 + +2019-12-16 Angel Sánchez + + fix issue #78 warnings regarding RichTIFFIPTC data type. + +2019-12-14 Even Rouault + + contrib/oss-fuzz/build.sh: fix broken if construct. + +2019-11-28 Even Rouault + + contrib/oss-fuzz/build.sh: other attempt at fixing build failure. + +2019-11-20 Even Rouault + + contrib/oss-fuzz/build.sh: install liblzma-dev for x86_64 builds. + +2019-11-17 Even Rouault + + contrib/oss-fuzz/build.sh: install liblzma-dev:i386 on i386 builds. + +2019-11-15 Even Rouault + + Merge branch 'cmake-parse' into 'master' + CMake: simplify parsing variables from configure + + See merge request libtiff/libtiff!98 + +2019-11-15 Rolf Eike Beer + + CMake: simplify parsing variables from configure. + +2019-11-14 Even Rouault + + contrib/oss-fuzz/build.sh: fix ossfuzz build by statically linking to lzma + +2019-11-12 Even Rouault + + Merge branch 'fix_ojpeg_172' into 'master' + OJPEG: fix broken sanity check added in 4.1.0 (#fixes 172) + + See merge request libtiff/libtiff!97 + +2019-11-11 Even Rouault + + OJPEG: fix broken sanity check added in 4.1.0, and add two OJPEG test files + + test/: add missing generated .sh files. + +2019-11-04 Even Rouault + + Merge branch 'fix-missing-checks-TIFFGetField-tiffcrop' into 'master' + adds missing checks on TIFFGetField in tiffcrop tool + + Closes #170 + + See merge request libtiff/libtiff!96 + +2019-11-04 Bug Checkers + + adds missing checks on TIFFGetField in tiffcrop tool (fixes #170) + +2019-11-04 Even Rouault + + Merge branch 'adds-missing-TIFFClose-rgb2ycbcr' into 'master' + adds a missing TIFFClose in rgb2ycbcr tool + + See merge request libtiff/libtiff!95 + +2019-11-04 Mansour Ahmadi + + adds a missing TIFFClose in rgb2ycbcr tool. + +2019-11-03 Bob Friesenhahn + + libtiff 4.1.0 released. + + Added a step for updating the legacy ChangeLog file. + + Ignore emacs temporary files (ending with tilde character). + + Added release summary page for the 4.1.0 release. + + Fix Cmake HAVE_GETOPT for systems which declare getopt in stdio.h. Fix utility baked-in getopt prototype which appears when HAVE_GETOPT is not defined. + + Fax2tiff.sh needs to remove its output file in advance. Syntax changes so that bash is not required. + +2019-10-26 Even Rouault + + tif_jpeg.c: extra cast to silence Coverity warning. GDAL CID 1406475. + +2019-10-23 Even Rouault + + tif_jpeg.c: fix warning added by previous commit (on 32bit builds) + +2019-10-23 Even Rouault + + Merge branch 'coverity-fixes' into 'master' + Coverity fixes + + See merge request libtiff/libtiff!94 + +2019-10-22 Timothy Lyanguzov + + Use 64-bit calculations correctly. + + Fix size calculation to use 64-bit tmsize_t correctly. + + Make bytesperclumpline calculations using tmsize_t type. + +2019-10-03 Even Rouault + + tif_read: align code of TIFFReadRawStrip() and TIFFReadRawTile() that differed for non good reason. Non-functional change normally. (fixes GitLab #162) + +2019-10-01 Even Rouault + + HTML: update for GitLab issues. + +2019-09-29 Even Rouault + + html/v3.5.6-beta.html: redact URL of defunct web site. + + Website: update links to mailing list. + +2019-09-17 Even Rouault + + TIFFReadAndRealloc(): avoid too large memory allocation attempts. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17244 + +2019-09-03 Even Rouault + + ByteCountLooksBad and EstimateStripByteCounts: avoid unsigned integer overflows. Fixes https://oss-fuzz.com/testcase-detail/5686156066291712 and https://oss-fuzz.com/testcase-detail/6332499206078464 + +2019-09-02 Even Rouault + + tif_ojpeg.c: avoid relying on isTiled macro being wrapped in () + + tif_ojpeg.c: avoid use of uninitialized memory on edge/broken file. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16844 + + tiff_read_rgba_fuzzer.cc: add a -DSTANDALONE mode for easier reproduction of oss-fuzz reports + +2019-09-01 Even Rouault + + tif_dirread.c: allocChoppedUpStripArrays(). avoid unsigned integer overflow. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16846 + +2019-08-27 Even Rouault + + tif_ojpeg.c: avoid unsigned integer overflow. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16793 + +2019-08-26 Even Rouault + + TIFFReadDirEntryData(): rewrite to avoid unsigned integer overflow (not a bug). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16792 + + TIFFFetchDirectory(): fix invalid cast from uint64 to tmsize_t. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16784 + +2019-08-25 Even Rouault + + JPEG: avoid use of unintialized memory on corrupted files. + Follow-up of cf3ce6fab894414a336546f62adc57f02590a22c + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16602 + Credit to OSS Fuzz + +2019-08-23 Even Rouault + + _TIFFPartialReadStripArray(): avoid unsigned integer overflow. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16685 + + OJPEGWriteHeaderInfo(): avoid unsigned integer overflow on strile dimensions close to UINT32_MAX. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16683 + + TIFFFillStrip(): avoid harmless unsigned integer overflow. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16653 + + EstimateStripByteCounts(): avoid unsigned integer overflow. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16643& + + tif_ojpeg: avoid unsigned integer overflow (probably not a bug). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16635 + + tif_thunder: avoid unsigned integer overflow (not a bug). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16632 + +2019-08-22 Even Rouault + + _TIFFMultiply32() / _TIFFMultiply64(): avoid relying on unsigned integer overflow (not a bug) + + EstimateStripByteCounts(): avoid unsigned integer overflow. + +2019-08-21 Even Rouault + + EstimateStripByteCounts(): avoid unsigned integer overflow. + +2019-08-20 Even Rouault + + EstimateStripByteCounts(): avoid harmless unsigned integer overflow. + + _TIFFPartialReadStripArray(): avoid triggering unsigned integer overflow with -fsanitize=unsigned-integer-overflow (not a bug, this is well defined by itself) + +2019-08-18 Even Rouault + + tiff2ps: fix use of wrong data type that caused issues (/Height being written as 0) on 64-bit big endian platforms + +2019-08-16 Even Rouault + + setByteArray(): fix previous commit. + + setByteArray(): avoid potential signed integer overflow. Pointed by Hendra Gunadi. No actual problem known (which does not mean there wouldn't be any. Particularly on 32bit builds) + +2019-08-15 Even Rouault + + RGBA interface: fix integer overflow potentially causing write heap buffer overflow, especially on 32 bit builds. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16443. Credit to OSS Fuzz + +2019-08-14 Even Rouault + + Merge branch 'fix_integer_overflow' into 'master' + Fix integer overflow in _TIFFCheckMalloc() and other implementation-defined behaviour (CVE-2019-14973) + + See merge request libtiff/libtiff!90 + +2019-08-13 Even Rouault + + Fix integer overflow in _TIFFCheckMalloc() and other implementation-defined behaviour (CVE-2019-14973) + _TIFFCheckMalloc()/_TIFFCheckRealloc() used a unsafe way to detect overflow + in the multiplication of nmemb and elem_size (which are of type tmsize_t, thus + signed), which was especially easily triggered on 32-bit builds (with recent + enough compilers that assume that signed multiplication cannot overflow, since + this is undefined behaviour by the C standard). The original issue which lead to + this fix was trigged from tif_fax3.c + + There were also unsafe (implementation defied), and broken in practice on 64bit + builds, ways of checking that a uint64 fits of a (signed) tmsize_t by doing + (uint64)(tmsize_t)uint64_var != uint64_var comparisons. Those have no known + at that time exploits, but are better to fix in a more bullet-proof way. + Or similarly use of (int64)uint64_var <= 0. + +2019-08-12 Even Rouault + + TIFFClientOpen(): fix memory leak if one of the required callbacks is not provided. Fixed Coverity GDAL CID 1404110 + + OJPEGReadBufferFill(): avoid very long processing time on corrupted files. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16400. master only + +2019-08-10 Even Rouault + + oss-fuzz/tiff_read_rgba_fuzzer.cc: fix wrong env variable value in previous commit + + oss-fuzz/tiff_read_rgba_fuzzer.cc: avoid issue with libjpeg-turbo and MSAN + + OJPEG: fix integer division by zero on corrupted subsampling factors. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15824. Credit to OSS Fuzz + + Merge branch 'ossfuzz_i386' + + contrib/oss-fuzz/build.sh: fix for i386 build of jbigkit, and use $LIB_FUZZING_ENGINE + +2019-08-10 Even Rouault + + Merge branch 'patch-1' into 'master' + fix two tiny typos + + See merge request libtiff/libtiff!89 + +2019-08-10 Reto Kromer + + fix two tiny typos. + +2019-08-09 Even Rouault + + Merge branch 'patch-1' into 'master' + fix a typo in man page + + See merge request libtiff/libtiff!88 + +2019-08-09 Reto Kromer + + fix typo. + +2019-08-04 Even Rouault + + Merge branch 'TIFFTAGID_Zero_reading_IGNORE' into 'master' + Suppressed Reading of Tiff tags with ID = 0 (like GPSVERSIONID) corrected. + + See merge request libtiff/libtiff!77 + +2019-08-04 Su Laus + + Reading of Tiff tags with ID = 0 (like GPSVERSIONID) corrected. + IGNORE placeholder in tif_dirread.c is now replaced by a field dir_ignore in the TIFFDirEntry structure + + Currently, in tif_dirread.c a special IGNORE value for the tif tags is defined + in order to flag status preventing already processed tags from further processing. + This irrational behaviour prevents reading of custom tags with id code 0 - like tag GPSVERSIONID from EXIF 2.31 definition. + + An additional field 'tdir_ignore' is now added to the TIFFDirEntry structure and code is changed + to allow tags with id code 0 to be read correctly. + + This change was already proposed as pending improvement in tif_dirread.c around line 32. + + Reference is also made to: + - Discussion in https://gitlab.com/libtiff/libtiff/merge_requests/39 + - http://bugzilla.maptools.org/show_bug.cgi?id=2540 + + Comments and indention adapted. + + Preparation to rebase onto master + +2019-07-16 Even Rouault + + Merge branch 'cmake_amd64' into 'master' + CMakeLists.txt: properly set value of HOST_FILLORDER to LSB2MSB for Windows CMake builds + + See merge request libtiff/libtiff!87 + +2019-07-15 Even Rouault + + CMakeLists.txt: properly set value of HOST_FILLORDER to LSB2MSB for Windows CMake builds + As can be seen in https://ci.appveyor.com/project/rleigh-codelibre/libtiff-didfs/builds/25846668/job/ory5w098j8wcij9x + log, the HOST_FILLORDER is not properly set: + + [00:02:58] -- CMAKE_HOST_SYSTEM_PROCESSOR set to AMD64 + [00:02:58] -- HOST_FILLORDER set to FILLORDER_MSB2LSB + + Ther reason is that we match the "amd64.*" lowercase string whereas + CMAKE_HOST_SYSTEM_PROCESSOR is set to AMD64 uppercase. + +2019-07-09 Even Rouault + + TIFFWriteCheck(): call TIFFForceStrileArrayWriting() when needed (should have gone with eaeca6274ae71cdfaeb9f673b6fb0f3cfc0e6ce5) (master only) + +2019-07-09 Even Rouault + + Merge branch 'fix_chromium_925269' into 'master' + OJPEG: avoid use of unintialized memory on corrupted files + + See merge request libtiff/libtiff!86 + +2019-07-05 Even Rouault + + OJPEG: avoid use of unintialized memory on corrupted files. + Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=925269 + Patch from Lei Zhang with little adaptations. + +2019-06-29 Even Rouault + + Merge branch 'fix-division-by-zero' into 'master' + Return infinite distance when denominator is zero. + + See merge request libtiff/libtiff!85 + +2019-06-29 Dirk Lemstra + + Return infinite distance when denominator is zero. + +2019-06-29 Even Rouault + + Merge branch 'typetests' into 'master' + Add test to check that libtiff types have the correct size + + See merge request libtiff/libtiff!57 + +2019-05-31 Thomas Bernard + + make TIFF_SSIZE_T the same bitwidth as TIFF_SIZE_T. + it was previously the same bitwidth as unsigned char * + Pointers can be larger than size_t. + +2019-05-31 Thomas Bernard + + Add test to check that libtiff types have the correct size. + in configure/CMakeList.txt : + + - TIFF_INT8_T/TIFF_UINT8_T is signed/unsigned char + sizeof(char)==1 in C standard + - TIFF_INT16_T/TIFF_UINT16_T is signed/unsigned short + sizeof(short)>=2 in C standard + - TIFF_INT32_T/TIFF_UINT32_T is defined so its sizeof() is 4 + + - TIFF_INT64_T/TIFF_UINT64_T is defined so its sizeof() is 8 + + - TIFF_SIZE_T is defined so it has same sizeof() than size_t + + - TIFF_SSIZE_T is defined so it has same sizeof() than unsigned char * + +2019-05-29 Even Rouault + + Merge branch 'defer_strile_writing' into 'master' + Add TIFFDeferStrileArrayWriting() and TIFFForceStrileArrayWriting() + + See merge request libtiff/libtiff!82 + +2019-05-29 Even Rouault + + Merge branch 'TIFFReadFromUserBuffer' into 'master' + Add TIFFReadFromUserBuffer() + + See merge request libtiff/libtiff!81 + +2019-05-26 Even Rouault + + Fix vulnerability in 'D' (DeferStrileLoad) mode (master only) (fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14908) + +2019-05-25 Even Rouault + + Replace 'stripped' by 'striped' in error messages. + +2019-05-25 Even Rouault + + Add TIFFDeferStrileArrayWriting() and TIFFForceStrileArrayWriting() + Those advanced writing functions must be used in a particular sequence + to make their intended effect. Their aim is to control when/where + the [Strip/Tile][Offsets/ByteCounts] arrays are written into the file. + + The purpose of this is to generate 'cloud-optimized geotiff' files where + the first KB of the file only contain the IFD entries without the potentially + large strile arrays. Those are written afterwards. + + The typical sequence of calls is: + TIFFOpen() + [ TIFFCreateDirectory(tif) ] + Set fields with calls to TIFFSetField(tif, ...) + TIFFDeferStrileArrayWriting(tif) + TIFFWriteCheck(tif, ...) + TIFFWriteDirectory(tif) + ... potentially create other directories and come back to the above directory + TIFFForceStrileArrayWriting(tif): emit the arrays at the end of file + + See test/defer_strile_writing.c for a practical example. + +2019-05-24 Even Rouault + + Fix vulnerability introduced by defer strile loading (master only) + Found on GDAL with https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14894 + Disabling the TIFF_DEFERSTRILELOAD bit in ChopupStripArray() was a + bad idea since when using TIFFReadDirectory() to reload the directory again + would lead to a different value of td_rowsperstrip, which could confuse + readers if they relied on the value found initially. + + Fix typo in error message (master only) + +2019-05-22 Even Rouault + + Add TIFFReadFromUserBuffer() + This function replaces the use of TIFFReadEncodedStrip()/TIFFReadEncodedTile() + when the user can provide the buffer for the input data, for example when + he wants to avoid libtiff to read the strile offset/count values from the + [Strip|Tile][Offsets/ByteCounts] array. + + libtiff.def: add missing new symbols. + + test/defer_strile_loading.c: fix warning with Visual C++ + + _TIFFRewriteField(): fix for bigtiff case (master only) + 116cf67f4c59196605abdb244657c3070c4310af made StripByteCount/TileByteCount to + always be rewritten as TIFF_LONG8. + +2019-05-21 Even Rouault + + Merge branch 'ondemand_strile_offbytecount_loading' into 'master' + Make defer strile offset/bytecount loading available at runtime + + See merge request libtiff/libtiff!79 + +2019-05-21 Even Rouault + + Merge branch 'bigtiff_write_bytecount_on_long_when_possible' into 'master' + Create TileByteCounts/StripByteCounts tag with SHORT (ClassicTIFF/BigTIFF) or LONG (BigTIFF) type when possible + + See merge request libtiff/libtiff!78 + +2019-05-21 Even Rouault + + Merge branch 'html_link' into 'master' + libtiff.html, bigtiffpr.html: absolute => relative link + + See merge request libtiff/libtiff!80 + +2019-05-14 Thomas Bernard + + libtiff.html, bigtiffpr.html: absolute => relative link. + +2019-05-10 Even Rouault + + Make defer strile offset/bytecount loading available at runtime. + ... and add per-strile offset/bytecount loading capabilities. + + Part of this commit makes the behaviour that was previously met when + libtiff was compiled with -DDEFER_STRILE_LOAD available for default builds + when specifying the new 'D' (Deferred) TIFFOpen() flag. In that mode, the [Tile/Strip][ByteCounts/Offsets] + arrays are only loaded when first accessed. This can speed-up the opening + of files stored on the network when just metadata retrieval is needed. + This mode has been used for years by the GDAL library when compiled with + its embeded libtiff copy. + + To avoid potential out-of-tree code (typically codecs) that would use + the td_stripbytecount and td_stripoffset array inconditionnaly assuming they + have been loaded, those have been suffixed with _p (for protected). The + use of the new functions mentionned below is then recommended. + + Another addition of this commit is the capability of loading only the + values of the offset/bytecount of the strile of interest instead of the + whole array. This is enabled with the new 'O' (Ondemand) flag of TIFFOpen() + (which implies 'D'). That behaviour has also been used by GDAL, which hacked + into the td_stripoffset/td_stripbytecount arrays directly. The new code + added in the _TIFFFetchStrileValue() and _TIFFPartialReadStripArray() internal + functions is mostly a port of what was in GDAL GTiff driver previously. + + Related to that, the public TIFFGetStrileOffset[WithErr]() and TIFFGetStrileByteCount[WithErr]() + functions have been added to API. They are of particular interest when + using sparse files (with offset == bytecount == 0) and you want to detect + if a strile is present or not without decompressing the data, or updating + an existing sparse file. + They will also be used to enable a future enhancement where client code can entirely + skip bytecount loading in some situtations + + A new test/defer_strile_loading.c test has been added to test the above + capabilities. + +2019-05-10 Even Rouault + + Creation: use SHORT type when possible for StripByteCounts/TileByteCounts + This follows the same logic as previous commit. + +2019-05-09 Even Rouault + + BigTIFF creation: write TileByteCounts/StripByteCounts tag with LONG when possible + In most situations of BigTIFF file, the tile/strip sizes are of reasonable size, + that is they fit on a 4-byte LONG. So in that case, use LONG instead of LONG8 + to save some space. For uncompressed file, it is easy to detect such situations + by checking at the TIFFTileSize64()/TIFFStripSize64() return. For compressed file, + we must take into account the fact that compression may sometimes result in + larger compressed data. So we allow this optimization only for a few select + compression times, and take a huge security margin (10x factor). We also only + apply this optimization on multi-strip files, so as to allow easy on-the-fly + growing of single-strip files whose strip size could grow above the 4GB threshold. + + This change is compatible with the BigTIFF specification. According to + https://www.awaresystems.be/imaging/tiff/bigtiff.html: + "The StripOffsets, StripByteCounts, TileOffsets, and TileByteCounts tags are + allowed to have the datatype TIFF_LONG8 in BigTIFF. Old datatypes TIFF_LONG, + and TIFF_SHORT where allowed in the TIFF 6.0 specification, are still valid in BigTIFF, too. " + On a practical point of view, this is also compatible on reading/writing of + older libtiff 4.X versions. + + The only glitch I found, which is rather minor, is when using such a BigTIFF + file with TileByteCounts/StripByteCounts written with TIFF_LONG, and updating + it with an older libtiff 4.X version with a change in the + [Tile/Strip][ByteCounts/Offsets] array. In that case the _TIFFRewriteField() + function will rewrite the directory and array with TIFF_LONG8, instead of updating + the existing array (this is an issue fixed by this commit). The file will + still be valid however, hence the minor severity of this. + +2019-05-08 Even Rouault + + Merge branch 'bug2799' into 'master' + fix fax2tiff + + See merge request libtiff/libtiff!55 + +2019-05-08 Even Rouault + + Merge branch 'bug_2829' into 'master' + WIN32: use tif_win32.c when building with CMake + + See merge request libtiff/libtiff!75 + +2019-05-06 Even Rouault + + Merge branch 'FILESOURCE_SCENETYPE_reading' into 'master' + Reading error for FileSource and SceneType tags corrected. + + See merge request libtiff/libtiff!76 + +2019-05-06 Su Laus + + Reading error for FileSource and SceneType tags corrected. + EXIF tags FILESOURCE and SCENETYPE are defined as TIFF_UNDEFINED and field_readcount==1! + There is a bug in TIFFReadDirEntryByte() preventing to read correctly type TIFF_UNDEFINED fields with field_readcount==1 + Upgrade of TIFFReadDirEntryByte() with added TIFF_UNDEFINED switch-entry allows libtiff to read those tags correctly. + +2019-04-25 Thomas Bernard + + WIN32: use tif_win32.c when building with CMake. + see http://bugzilla.maptools.org/show_bug.cgi?id=2829 + + the top CMakeLists.txt defines + win32_io and USE_WIN32_FILEIO + + WIN32_IO is defined nowhere in CMake (only in automake things) + +2019-04-25 Even Rouault + + Merge branch 'gitlab_pages' into 'master' + Advertise https://libtiff.gitlab.io/libtiff/ as mirror + + See merge request libtiff/libtiff!70 + +2019-04-25 Even Rouault + + Merge branch 'bug_2844' into 'master' + tiff2ps.c: PSDataColorContig(): avoid heap buffer overrun + + See merge request libtiff/libtiff!69 + +2019-04-25 Even Rouault + + Merge branch 'issue_2785' into 'master' + tiff2pdf.c: don't call t2p_tile_collapse_left() for Ycbcr + + See merge request libtiff/libtiff!64 + +2019-04-11 Even Rouault + + Merge branch 'fix_gdal_1439' into 'master' + TIFFWriteEncodedStrip/TIFFWriteEncodedTile: fix rewriting of LZW-compressed data + + See merge request libtiff/libtiff!74 + +2019-04-11 Even Rouault + + TIFFWriteEncodedStrip/TIFFWriteEncodedTile: fix rewriting of LZW-compressed data + Fixes https://github.com/OSGeo/gdal/issues/1439 + + When rewriting a LZW tile/strip whose existing size is very close to a multiple of + 1024 bytes (and larger than 8192 bytes) with compressed data that is larger, + the new data was not placed at the end of the file, causing corruption. + +2019-04-08 Even Rouault + + Merge branch 'bug2848' into 'master' + tif_luv.c: LogLuvSetupEncode() error must return 0 + + See merge request libtiff/libtiff!72 + +2019-04-03 Thomas Bernard + + build/gitlab-ci: fix typo. + + show test-suite.log in gitlab-ci. + useful when build fails + + Add output check for tiff2ps. + note : the reference files have been generated in master branch + +2019-03-23 Even Rouault + + tif_read.c: potentially fix false positive from Coverity Scan. CID 1400288 + + tif_read.c: potentially fix false positive from Coverity Scan. CID 1400271 + + tif_zip.c: remove dead code. CID 1400360. + + tif_webp.c: remove false positive warning about dereference before null check. CID 1400255 + + tif_pixarlog.c: remove dead code. CID 1400342. + + tif_pixarlog.c: avoid false positive Coverity Scan warnings about overflow. CID 1400300 and 1400367 + + tif_lzw.c: silence CoverityScan false positive. CID 1400355. + + tif_luv.c: silence CoverityScan false positive. CID 1400231, 1400251, 1400254, 1400272, 1400318, 1400356 + + TryChopUpUncompressedBigTiff(): avoid potential division by zero. master only. GDAL Coverity CID 1400263 + +2019-03-22 Thomas Bernard + + tif_luv.c: LogLuvSetupEncode() error must return 0. + see http://bugzilla.maptools.org/show_bug.cgi?id=2848 + + if wrongly returning 1, the processing of incorrect file continues, + which causes problems. + +2019-03-22 Thomas Bernard + + add a test for fax2tiff tool. + +2019-02-28 Thomas Bernard + + tiff2pdf.c: don't call t2p_tile_collapse_left() when buffer size is wrong + see http://bugzilla.maptools.org/show_bug.cgi?id=2785 + + Advertise https://libtiff.gitlab.io/libtiff/ as mirror. + I'm put it above the maptools.org mirror because + Even Rouault believe at some point it will be completely removed + +2019-02-28 Even Rouault + + Merge branch 'bug_2826' into 'master' + tiff2pdf.c: check colormap pointers when loading CMYK with colormap + + See merge request libtiff/libtiff!65 + +2019-02-28 Thomas Bernard + + tiff2pdf.c: check colormap pointers. + Avoid access to non initialized pointers + http://bugzilla.maptools.org/show_bug.cgi?id=2826 + +2019-02-27 Even Rouault + + Merge branch 'fix_warnings' into 'master' + tiff2ps.c: fix warning caused by integer promotion + + See merge request libtiff/libtiff!68 + +2019-02-23 Thomas Bernard + + PSDataColorContig(): avoid heap buffer overrun. + fixes http://bugzilla.maptools.org/show_bug.cgi?id=2844 + each iteration of the loop read nc bytes + +2019-02-22 Thomas Bernard + + tiff2ps.c: fix warning caused by integer promotion. + uint8 value is promoted to int in (value << 24) so -fsanitize + yield runtime errors : + tiff2ps.c:2969:33: runtime error: left shift of 246 by 24 places cannot be represented in type 'int' + +2019-02-22 Even Rouault + + Merge branch 'large_strile_improvements' into 'master' + Large strile support improvements + + See merge request libtiff/libtiff!63 + +2019-02-21 Even Rouault + + Merge branch 'gitlab-pages' into 'master' + ci: Add pages job + + See merge request libtiff/libtiff!45 + +2019-02-19 Even Rouault + + Merge branch 'issue_2833' into 'master' + tiffcp.c: check that (Tile Width)*(Samples/Pixel) do no overflow + + See merge request libtiff/libtiff!60 + +2019-02-19 Even Rouault + + Merge branch 'issue_2831' into 'master' + tiffcrop.c: fix invertImage() for bps 2 and 4 + + See merge request libtiff/libtiff!61 + +2019-02-19 Even Rouault + + Merge branch 'issue_2842' into 'master' + move _TIFFClampDoubleToFloat() to tif_aux.c + + See merge request libtiff/libtiff!62 + +2019-02-19 Even Rouault + + tif_zip.c: allow reading and writing strips/tiles with more than 4 GB of compressed or uncompressed data + + tif_dirread.c: when strip chopping is enabled, extend this mechanism to multi-strip uncompressed files with strips larger than 2GB to expose them as strips of ~500 MB + +2019-02-19 Even Rouault + + Merge branch 'size_t_typo' into 'master' + CMakeLists.txt: fix TIFF_SIZE_T + + See merge request libtiff/libtiff!59 + +2019-02-12 Thomas Bernard + + move _TIFFClampDoubleToFloat() to tif_aux.c. + the same function was declared in tif_dir.c and tif_dirwrite.c + + see http://bugzilla.maptools.org/show_bug.cgi?id=2842 + +2019-02-11 Thomas Bernard + + tiffcrop.c: fix invertImage() for bps 2 and 4. + too much bytes were processed, causing a heap buffer overrun + http://bugzilla.maptools.org/show_bug.cgi?id=2831 + the loop counter must be + for (col = 0; col < width; col += 8 / bps) + + Also the values were not properly calculated. It should be + 255-x, 15-x, 3-x for bps 8, 4, 2. + + But anyway it is easyer to invert all bits as 255-x = ~x, etc. + (substracting from a binary number composed of all 1 is like inverting + the bits) + +2019-02-11 Thomas Bernard + + tiffcp.c: use INT_MAX. + + check that (Tile Width)*(Samples/Pixel) do no overflow. + fixes bug 2833 + +2019-02-03 Thomas Bernard + + CMakeLists.txt: fix TIFF_SIZE_T. + +2019-02-02 Even Rouault + + Merge branch 'master' into 'master' + Fix for simple memory leak that was assigned CVE-2019-6128. + + See merge request libtiff/libtiff!50 + +2019-02-02 Even Rouault + + Merge branch 'bug2835' into 'master' + tiff2ps: fix heap-buffer-overflow + + See merge request libtiff/libtiff!53 + +2019-02-02 Even Rouault + + Fix warning (use of uninitialized value) added per d0a842c5dbad2609aed43c701a12ed12461d3405 (fixes https://gitlab.com/libtiff/libtiff/merge_requests/54#note_137742985) + +2019-02-02 Yuri Aksenov + + fix fax2tiff. + see http://bugzilla.maptools.org/show_bug.cgi?id=2799 + fixes d9bc8472e72549f29c0062c1cbd3d56f279f3be2 + +2019-02-02 Even Rouault + + Merge branch 'tiffcrop' into 'master' + tiffcrop: shut up clang warnings + + See merge request libtiff/libtiff!52 + +2019-02-01 Even Rouault + + Merge branch 'bug2833' into 'master' + TIFFWriteDirectoryTagTransferfunction() : fix NULL dereferencing + + See merge request libtiff/libtiff!54 + +2019-02-01 Even Rouault + + Merge branch 'gitignore' into 'master' + add test/ files to .gitignore + + See merge request libtiff/libtiff!56 + +2019-02-01 Even Rouault + + Merge branch 'master' into 'master' + tif_dir: unset transferfunction field if necessary (CVE-2018-19210) + + See merge request libtiff/libtiff!47 + +2019-01-29 Thomas Bernard + + add test/ files to .gitignore. + +2019-01-29 Thomas Bernard + + TIFFWriteDirectoryTagTransferfunction() : fix NULL dereferencing. + http://bugzilla.maptools.org/show_bug.cgi?id=2833 + + we must check the pointer is not NULL before memcmp() the memory + +2019-01-29 Thomas Bernard + + tiff2ps: fix heap-buffer-overflow. + http://bugzilla.maptools.org/show_bug.cgi?id=2834 + + usually the test (i < byte_count) is OK because the byte_count is divisible by samplesperpixel. + But if that is not the case, (i + ncomps) < byte_count should be used, or + maybe (i + samplesperpixel) <= byte_count + +2019-01-28 Thomas Bernard + + tiffcrop: shut up clang warnings. + make the out filename building a bit more simple + and remove the use of strcat() + +2019-01-23 Scott Gayou + + Fix for simple memory leak that was assigned CVE-2019-6128. + pal2rgb failed to free memory on a few errors. This was reported + here: http://bugzilla.maptools.org/show_bug.cgi?id=2836. + +2019-01-05 Bob Friesenhahn + + Fix tiff2ps error regarding "Inconsistent value of es" by allowing es to be zero. Problem was reported to the tiff mailing list by Julian H. Stacey on January 5, 2019. + +2018-12-13 Hugo Lefeuvre + + tif_dir: unset transferfunction field if necessary. + The number of entries in the transfer table is determined as following: + + (td->td_samplesperpixel - td->td_extrasamples) > 1 ? 3 : 1 + + This means that whenever td->td_samplesperpixel or td->td_extrasamples are + modified we also need to make sure that the number of required entries in + the transfer table didn't change. + + If it changed and the number of entries is higher than before we should + invalidate the transfer table field and free previously allocated values. + In the other case there's nothing to do, additional tf entries won't harm + and properly written code will just ignore them since spp - es < 1. + + For instance this situation might happen when reading an OJPEG compressed + image with missing SamplesPerPixel tag. In this case the SamplesPerPixel + field might be updated after setting the transfer table. + + see http://bugzilla.maptools.org/show_bug.cgi?id=2500 + + This commit addresses CVE-2018-19210. + +2018-12-08 Bob Friesenhahn + + Do not attempt to re-sync zip stream after reported data error from inflate(). + +2018-12-07 Even Rouault + + Merge branch 'resource-leaks' into 'master' + Fix two resource leaks + + See merge request libtiff/libtiff!43 + +2018-12-07 Even Rouault + + Merge branch 'build-jbig' into 'master' + add jbig support to the fuzzer + + See merge request libtiff/libtiff!42 + +2018-12-01 Bob Friesenhahn + + tiffcrop.c: Avoid new clang warning about tools/tiffcrop.c "size argument in 'strncat' call appears to be size of the source". + +2018-11-28 Even Rouault + + Merge branch 'webp_memleak' into 'master' + fixed mem leak in webp compression + + See merge request libtiff/libtiff!48 + +2018-11-28 Norman Barker + + fixed mem leak in webp compression. + +2018-11-20 Even Rouault + + Merge branch 'lossless_webp' into 'master' + fixed lossless webp compression config + + See merge request libtiff/libtiff!46 + +2018-11-20 Norman Barker + + fixed lossless webp compression config. + +2018-11-18 Bob Friesenhahn + + snprintf porting fix for Visual Studio 2003. + +2018-11-18 Roger Leigh + + ci: Add pages job. + +2018-11-10 Bob Friesenhahn + + Change references from defunct ftp site to https site. + +2018-11-10 Bob Friesenhahn + + * configure.ac: libtiff 4.0.10 released. + + Change COMPRESSION_ZSTD to 50000 and COMPRESSION_WEBP to 50001. + +2018-11-04 Bob Friesenhahn + + Added preliminary release notes for release 4.0.10. + +2018-11-03 Bob Friesenhahn + + tiff2pdf: Eliminate compiler warning about snprintf output truncation when formatting pdf_datetime. + +2018-11-03 Olivier Paquet + + Merge branch 'no_tif_platform_console' into 'master' + Remove builtin support for GUI warning and error message boxes + + See merge request libtiff/libtiff!24 + +2018-11-03 Bob Friesenhahn + + tiffcrop.c: Eliminate compiler warning about snprintf output truncation when formatting filenum. + + TWebPVGetField(): Add apparently missing break statement impacting TIFFTAG_WEBP_LOSSLESS. + + Eliminate compiler warnings about duplicate definitions of streq/strneq macros. + + Ignore generated files. + + Remove and ignore files which are a product of autogen.sh. + +2018-11-02 Bob Friesenhahn + + Fix TIFFErrorExt() formatting of size_t type for 32-bit compiles. + +2018-10-30 Even Rouault + + tiff2bw: avoid null pointer dereference in case of out of memory situation. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2819 / CVE-2018-18661 + + tiffio.h: fix comment. + +2018-10-26 Even Rouault + + Merge branch 'header2' into 'master' + Fix 725279bd: Standalone tif_predict.h: tiff.h should be tiffiop.h + + See merge request libtiff/libtiff!41 + +2018-10-26 Kurt Schwehr + + Fix 725279bd: Standalone tif_predict.h: tiff.h should be tiffiop.h. + +2018-10-25 Even Rouault + + Merge branch 'headers' into 'master' + Add includes to headers to allow them to stand alone. + + See merge request libtiff/libtiff!40 + +2018-10-24 Kurt Schwehr + + Add includes to headers to allow them to stand alone. + This allows compilers that can do header stand alone header parsing + to process libtiff. + +2018-10-18 Even Rouault + + LZMAPreEncode: emit verbose error if lzma_stream_encoder() fails (typically because not enough memory available) + +2018-10-17 Even Rouault + + tif_webp.c: fix previous commit that broke scanline decoding. + + tif_webp.c: fix potential read outside libwebp buffer on corrupted images + +2018-10-14 Even Rouault + + Merge branch 'jbig_decode_overflow' into 'master' + JBIG: fix potential out-of-bounds write in JBIGDecode() + + See merge request libtiff/libtiff!38 + +2018-10-14 Even Rouault + + JBIG: fix potential out-of-bounds write in JBIGDecode() + JBIGDecode doesn't check if the user provided buffer is large enough + to store the JBIG decoded image, which can potentially cause out-of-bounds + write in the buffer. + This issue was reported and analyzed by Thomas Dullien. + + Also fixes a (harmless) potential use of uninitialized memory when + tif->tif_rawsize > tif->tif_rawcc + + And in case libtiff is compiled with CHUNKY_STRIP_READ_SUPPORT, make sure + that whole strip data is provided to JBIGDecode() + +2018-10-05 Even Rouault + + tif_webp.c: fix scanline reading/writing. + + WEBP codec: initialize nSamples in TWebPSetupDecode() and TWebPSetupEncode() + +2018-10-05 Even Rouault + + Merge branch 'tif_webp' into 'master' + webp support + + See merge request libtiff/libtiff!32 + +2018-10-05 Norman Barker + + webp in tiff. + +2018-09-17 Even Rouault + + Merge branch 'master' into 'master' + fix three potential vulnerabilities. + + See merge request libtiff/libtiff!33 + +2018-09-08 Young_X + + fix out-of-bound read on some tiled images. + + avoid potential int32 overflows in multiply_ms() + + only read/write TIFFTAG_GROUP3OPTIONS or TIFFTAG_GROUP4OPTIONS if compression is COMPRESSION_CCITTFAX3 or COMPRESSION_CCITTFAX4 + +2018-08-15 Even Rouault + + TIFFSetupStrips(): avoid potential uint32 overflow on 32-bit systems with large number of strips. Probably relates to http://bugzilla.maptools.org/show_bug.cgi?id=2788 / CVE-2018-10779 + +2018-08-07 Even Rouault + + ZSTD: fix flush issue that can cause endless loop in ZSTDEncode() + Fixes https://github.com/OSGeo/gdal/issues/833 + +2018-08-07 Even Rouault + + Merge branch 'fix_bug_2800' into 'master' + Fix libtiff 4.0.8 regression when reading LZW-compressed strips with scanline API + + See merge request libtiff/libtiff!31 + +2018-08-07 Even Rouault + + Fix libtiff 4.0.8 regression when reading LZW-compressed strips with scanline API + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2800 + +2018-07-05 Even Rouault + + Add tag and pseudo-tag definitions for ESRI LERC codec (out of tree codec whose source is at https://github.com/OSGeo/gdal/blob/master/gdal/frmts/gtiff/tif_lerc.c) + +2018-07-02 Even Rouault + + Fix TIFFTAG_ZSTD_LEVEL pseudo tag value to be > 65536, and the next one in the series + +2018-05-25 Stefan Weil + + Remove builtin support for GUI warning and error message boxes. + Now warnings always go to the console by default unless applications + define their own warning and error handlers. + + GUI applications (and Windows CE) are required to define such handlers. + +2018-05-12 Even Rouault + + LZWDecodeCompat(): fix potential index-out-of-bounds write. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2780 / CVE-2018-8905 + The fix consists in using the similar code LZWDecode() to validate we + don't write outside of the output buffer. + + TIFFFetchNormalTag(): avoid (probably false positive) clang-tidy clang-analyzer-core.NullDereference warnings + + TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963 + +2018-05-04 Even Rouault + + tif_color.c: fix code comment. + +2018-04-17 Even Rouault + + Merge branch 'fuzzer-fix' into 'master' + remove a pointless multiplication and a variable that's not necessary + + See merge request libtiff/libtiff!29 + +2018-04-17 Paul Kehrer + + remove a pointless multiplication and a variable that's not necessary. + +2018-04-17 Even Rouault + + Merge branch 'ossfuzz' into 'master' + move oss-fuzz build script and fuzzer into libtiff tree + + See merge request libtiff/libtiff!28 + +2018-04-17 Paul Kehrer + + move oss-fuzz build script and fuzzer into libtiff tree. + +2018-04-14 Even Rouault + + _TIFFGetMaxColorChannels: update for LOGLUV, ITULAB and ICCLAB that have 3 color channels + +2018-04-12 Even Rouault + + Fix MSVC warning. + +2018-04-12 Even Rouault + + Merge branch 'master' into 'master' + Fix NULL pointer dereference in TIFFPrintDirectory (bugzilla 2778/CVE-2018-7456) + + See merge request libtiff/libtiff!27 + +2018-04-11 Hugo Lefeuvre + + Fix NULL pointer dereference in TIFFPrintDirectory. + The TIFFPrintDirectory function relies on the following assumptions, + supposed to be guaranteed by the specification: + + (a) A Transfer Function field is only present if the TIFF file has + photometric type < 3. + + (b) If SamplesPerPixel > Color Channels, then the ExtraSamples field + has count SamplesPerPixel - (Color Channels) and contains + information about supplementary channels. + + While respect of (a) and (b) are essential for the well functioning of + TIFFPrintDirectory, no checks are realized neither by the callee nor + by TIFFPrintDirectory itself. Hence, following scenarios might happen + and trigger the NULL pointer dereference: + + (1) TIFF File of photometric type 4 or more has illegal Transfer + Function field. + + (2) TIFF File has photometric type 3 or less and defines a + SamplesPerPixel field such that SamplesPerPixel > Color Channels + without defining all extra samples in the ExtraSamples fields. + + In this patch, we address both issues with respect of the following + principles: + + (A) In the case of (1), the defined transfer table should be printed + safely even if it isn't 'legal'. This allows us to avoid expensive + checks in TIFFPrintDirectory. Also, it is quite possible that + an alternative photometric type would be developed (not part of the + standard) and would allow definition of Transfer Table. We want + libtiff to be able to handle this scenario out of the box. + + (B) In the case of (2), the transfer table should be printed at its + right size, that is if TIFF file has photometric type Palette + then the transfer table should have one row and not three, even + if two extra samples are declared. + + In order to fulfill (A) we simply add a new 'i < 3' end condition to + the broken TIFFPrintDirectory loop. This makes sure that in any case + where (b) would be respected but not (a), everything stays fine. + + (B) is fulfilled by the loop condition + 'i < td->td_samplesperpixel - td->td_extrasamples'. This is enough as + long as (b) is respected. + + Naturally, we also make sure (b) is respected. This is done in the + TIFFReadDirectory function by making sure any non-color channel is + counted in ExtraSamples. + + This commit addresses CVE-2018-7456. + +2018-03-27 Even Rouault + + Merge branch 'tiffset-long8' into 'master' + tiffset: Add support for LONG8, SLONG8 and IFD8 field types + + See merge request libtiff/libtiff!25 + +2018-03-26 Roger Leigh + + port: Clean up NetBSD sources and headers to build standalone. + +2018-03-23 Roger Leigh + + port: Add strtol, strtoll and strtoull. + Also update strtoul. All use the same implementation from NetBSD libc. + + tiffset: Add support for LONG8, SLONG8 and IFD8 field types. + +2018-03-17 Even Rouault + + ChopUpSingleUncompressedStrip: avoid memory exhaustion (CVE-2017-11613) + Rework fix done in 3719385a3fac5cfb20b487619a5f08abbf967cf8 to work in more + cases like https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6979. + Credit to OSS Fuzz + + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2724 + +2018-03-13 Even Rouault + + libtiff/tif_luv.c: rewrite loops in a more readable way (to avoid false positive reports like http://bugzilla.maptools.org/show_bug.cgi?id=2779) + +2018-03-13 Even Rouault + + Merge branch 'avoid_memory_exhaustion_in_ChopUpSingleUncompressedStrip' into 'master' + ChopUpSingleUncompressedStrip: avoid memory exhaustion (CVE-2017-11613) + + See merge request libtiff/libtiff!26 + +2018-03-11 Even Rouault + + ChopUpSingleUncompressedStrip: avoid memory exhaustion (CVE-2017-11613) + In ChopUpSingleUncompressedStrip(), if the computed number of strips is big + enough and we are in read only mode, validate that the file size is consistent + with that number of strips to avoid useless attempts at allocating a lot of + memory for the td_stripbytecount and td_stripoffset arrays. + + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2724 + +2018-03-10 Even Rouault + + Typo fix in comment. + +2018-03-03 Even Rouault + + Avoid warning with gcc 8 (partially revert 647b0e8c11ee11896f319b92cf110775f538d75c) + +2018-02-25 Even Rouault + + Merge branch 'typos' into 'master' + Fix some typos + + See merge request libtiff/libtiff!23 + +2018-02-24 Stefan Weil + + Fix some typos. + Most of them were found by codespell. + +2018-02-14 Even Rouault + + Typo fix in comment. + + Merge branch 'zstd' + + Add warning about COMPRESSION_ZSTD not being officialy registered. + +2018-02-14 Even Rouault + + Merge branch 'bug2772' into 'master' + Fix for bug 2772 + + See merge request libtiff/libtiff!20 + +2018-02-12 Nathan Baker + + Fix for bug 2772. + It is possible to craft a TIFF document where the IFD list is circular, + leading to an infinite loop while traversing the chain. The libtiff + directory reader has a failsafe that will break out of this loop after + reading 65535 directory entries, but it will continue processing, + consuming time and resources to process what is essentially a bogus TIFF + document. + + This change fixes the above behavior by breaking out of processing when + a TIFF document has >= 65535 directories and terminating with an error. + +2018-02-09 Even Rouault + + Merge branch 'libtiff-as-subdirectory-fixes' into 'master' + Prefer target_include_directories + + See merge request libtiff/libtiff!12 + +2018-02-06 Even Rouault + + Merge branch 'cmake-cleanups' into 'master' + Cmake cleanups + + See merge request libtiff/libtiff!11 + +2018-02-06 Even Rouault + + Merge branch 'check-right-cxx-variable' into 'master' + Check right cxx variable + + See merge request libtiff/libtiff!19 + +2018-02-06 Even Rouault + + Merge branch 'dont-leak-stream-open' into 'master' + Fix a memory leak in TIFFStreamOpen + + See merge request libtiff/libtiff!17 + +2018-02-06 Ben Boeckel + + cmake: check CXX_SUPPORT. + This variable is set in response to the `cxx` cache variable; use it + instead. + +2018-02-04 Olivier Paquet + + Merge branch 'warnings' into 'master' + Fix all compiler warnings for default build + + See merge request libtiff/libtiff!16 + +2018-02-04 Nathan Baker + + Fix all compiler warnings for default build. + +2018-01-30 Paul Kehrer + + tabs are hard. + +2018-01-29 Paul Kehrer + + use hard tabs like the rest of the project. + + Fix a memory leak in TIFFStreamOpen. + TIFFStreamOpen allocates a new tiff{o,i}s_data, but if TIFFClientOpen + fails then that struct is leaked. Delete it if the returned TIFF * is + null. + +2018-01-29 Kevin Funk + + Bump minimum required CMake version to v2.8.11. + Because we use the BUILD_INTERFACE generator expression + +2018-01-27 Even Rouault + + Merge branch 'patch-1' into 'master' + Update CMakeLists.txt for build fix on Windows + + See merge request libtiff/libtiff!14 + +2018-01-27 Even Rouault + + Merge branch 'patch-2' into 'master' + Update tiffgt.c for build fix on Windows + + See merge request libtiff/libtiff!13 + +2018-01-25 Olivier Paquet + + Merge branch 'bug2750' into 'master' + Add workaround to pal2rgb buffer overflow. + + See merge request libtiff/libtiff!15 + +2018-01-25 Nathan Baker + + Add workaround to pal2rgb buffer overflow. + +2018-01-23 Andrea + + Update tiffgt.c for build fix on Windows. + + Update CMakeLists.txt for build fix on Windows. + +2018-01-15 Even Rouault + + Merge branch 'has-attribute-check' into 'master' + tiffiop: use __has_attribute to detect the no_sanitize attribute + + See merge request libtiff/libtiff!10 + +2018-01-15 Ben Boeckel + + cmake: avoid setting hard-coded variables in the cache. + + cmake: avoid an unnecessary intermediate variable. + + cmake: avoid an unnecessary intermediate variable. + + cmake: avoid tautological logic. + + cmake: use check_symbol_exists. + This accounts for symbols being provided by macros. + + cmake: remove unused configure checks. + +2018-01-12 Kevin Funk + + Prefer target_include_directories. + When libtiff is included in a super project via a simple + `add_subdirectory(libtiff)`, this way the `tiff` library target has all + the necessary information to build against it. + + Note: The BUILD_INTERFACE generator expression feature requires at least + CMake v2.8.11 if I'm correct. + +2018-01-09 Ben Boeckel + + tiffiop: use __has_attribute to detect the no_sanitize attribute. + +2017-12-31 Even Rouault + + man/TIFFquery.3tiff: remove reference to non-existing TIFFReadStrip() function in TIFFIsByteSwapped() documentation. Patch by Eric Piel. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2763 + + libtiff/tif_dir.c: _TIFFVGetField(): fix heap out-of-bounds access when requesting TIFFTAG_NUMBEROFINKS on a EXIF directory. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2765. Reported by Google Autofuzz project + + libtiff/tif_print.c: TIFFPrintDirectory(): fix null pointer dereference on corrupted file. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2770 + +2017-12-21 Even Rouault + + Add libzstd to gitlab-ci. + +2017-12-21 Even Rouault + + Add ZSTD compression codec. + From https://github.com/facebook/zstd + "Zstandard, or zstd as short version, is a fast lossless compression + algorithm, targeting real-time compression scenarios at zlib-level + and better compression ratios. It's backed by a very fast entropy stage, + provided by Huff0 and FSE library." + + We require libzstd >= 1.0.0 so as to be able to use streaming compression + and decompression methods. + + The default compression level we have selected is 9 (range goes from 1 to 22), + which experimentally offers equivalent or better compression ratio than + the default deflate/ZIP level of 6, and much faster compression. + + For example on a 6600x4400 16bit image, tiffcp -c zip runs in 10.7 seconds, + while tiffcp -c zstd runs in 5.3 seconds. Decompression time for zip is + 840 ms, and for zstd 650 ms. File size is 42735936 for zip, and + 42586822 for zstd. Similar findings on other images. + + On a 25894x16701 16bit image, + + Compression time Decompression time File size + + ZSTD 35 s 3.2 s 399 700 498 + ZIP/Deflate 1m 20 s 4.9 s 419 622 336 + +2017-12-10 Even Rouault + + Merge branch 'fix_cve-2017-9935' into 'master' + Fix CVE-2017-9935 + + See merge request libtiff/libtiff!7 + +2017-12-10 Brian May + + tiff2pdf: Fix apparent incorrect type for transfer table. + The standard says the transfer table contains unsigned 16 bit values, + I have no idea why we refer to them as floats. + +2017-12-10 Brian May + + tiff2pdf: Fix CVE-2017-9935. + Fix for http://bugzilla.maptools.org/show_bug.cgi?id=2704 + + This vulnerability - at least for the supplied test case - is because we + assume that a tiff will only have one transfer function that is the same + for all pages. This is not required by the TIFF standards. + + We than read the transfer function for every page. Depending on the + transfer function, we allocate either 2 or 4 bytes to the XREF buffer. + We allocate this memory after we read in the transfer function for the + page. + + For the first exploit - POC1, this file has 3 pages. For the first page + we allocate 2 extra extra XREF entries. Then for the next page 2 more + entries. Then for the last page the transfer function changes and we + allocate 4 more entries. + + When we read the file into memory, we assume we have 4 bytes extra for + each and every page (as per the last transfer function we read). Which + is not correct, we only have 2 bytes extra for the first 2 pages. As a + result, we end up writing past the end of the buffer. + + There are also some related issues that this also fixes. For example, + TIFFGetField can return uninitalized pointer values, and the logic to + detect a N=3 vs N=1 transfer function seemed rather strange. + + It is also strange that we declare the transfer functions to be of type + float, when the standard says they are unsigned 16 bit values. This is + fixed in another patch. + + This patch will check to ensure that the N value for every transfer + function is the same for every page. If this changes, we abort with an + error. In theory, we should perhaps check that the transfer function + itself is identical for every page, however we don't do that due to the + confusion of the type of the data in the transfer function. + +2017-12-10 Even Rouault + + Merge branch 'undef-warn-fixes' into 'master' + Fix a couple of harmless but annoying -Wundef warnings + + See merge request libtiff/libtiff!8 + +2017-12-07 Vadim Zeitlin + + Remove tests for undefined SIZEOF_VOIDP. + As configure never uses AC_CHECK_SIZEOF(void*), this symbol is never + defined and so it doesn't make sense to test it in the code, this just + results in -Wundef warnings if they're enabled. + + Avoid harmless -Wundef warnings for __clang_major__ + Check that we're using Clang before checking its version. + +2017-12-02 Even Rouault + + Merge branch 'remove_autogenerated_files' into 'master' + Remove autogenerated files + + See merge request libtiff/libtiff!5 + +2017-12-02 Bob Friesenhahn + + Merge branch 'tif_config_h_includes' into 'master' + 'tif_config.h' or 'tiffiop.h' must be included before any system header. + + See merge request libtiff/libtiff!6 + +2017-12-02 Bob Friesenhahn + + 'tif_config.h' or 'tiffio.h' must be included before any system header. + +2017-12-01 Even Rouault + + .gitignore: add patterns for build from root. + + Remove remaining .cvsignore files. + + Remove autoconf/automake generated files, and add them to .gitignore. + +2017-12-01 Olivier Paquet + + Merge branch 'makedistcheck' into 'master' + build/gitlab-ci and build/travis-ci: add a 'make dist' step in autoconf_build()… + + See merge request libtiff/libtiff!4 + +2017-12-01 Even Rouault + + build/gitlab-ci and build/travis-ci: add a 'make dist' step in autoconf_build() target, to check we are release-ready + +2017-12-01 Even Rouault + + Merge branch 'git_updates' into 'master' + CVS to Git updates + + See merge request libtiff/libtiff!2 + +2017-12-01 Even Rouault + + HOWTO-RELEASE: update to use signed tags. + + README.md: use markdown syntax for hyperlinks. + +2017-11-30 Even Rouault + + Add .gitignore. + + Regenerate autoconf files. + + Makefile.am: update to reflect removal of README.vms and README -> README.md + + Remove all $Id and $Headers comments with CVS versions. + + HOWTO-RELEASE: update for git. + + Remove outdated .cvsignore. + + Remove outdated commit script. + + Remove README.vms. + + Rename README as README.md, and update content. + + html/index.html: reflect change from CVS to gitlab. + +2017-11-30 Olivier Paquet + + Merge branch 'test-ci' into 'master' + Update CI configuration + + See merge request libtiff/libtiff!1 + +2017-11-23 Roger Leigh + + appveyor: Correct path for git clone and skip artefact archival. + +2017-11-22 Roger Leigh + + travis-ci: Remove unused matrix exclusion. + + Add gitlab-ci build support. + +2017-11-18 Bob Friesenhahn + + * configure.ac: libtiff 4.0.9 released. + + * html/v4.0.9.html: Add HTML file to document changes in libtiff + v4.0.9. + +2017-11-17 Even Rouault + + * libtiff/tif_aux.c, tif_getimage.c, tif_read.c: typo fixes in + comments. + +2017-11-02 Bob Friesenhahn + + * test/Makefile.am: Add some tests for tiff2bw. + +2017-11-01 Bob Friesenhahn + + * tools/tiff2bw.c (main): Free memory allocated in the tiff2bw + program. This is in response to the report associated with + CVE-2017-16232 but does not solve the extremely high memory usage + with the associated POC file. + +2017-10-29 Bob Friesenhahn + + * tools/tiff2pdf.c (t2p_sample_realize_palette): Fix possible + arithmetic overflow in bounds checking code and eliminate + comparison between signed and unsigned type. + + * tools/fax2tiff.c (_FAX_Client_Data): Pass FAX_Client_Data as the + client data. This client data is not used at all at the moment, + but it makes the most sense. Issue that the value of + client_data.fd was passed where a pointer is expected was reported + via email by Gerald Schade on Sun, 29 Oct 2017. + +2017-10-23 Even Rouault + + * libtiff/tif_getimage.c: avoid floating point division by zero in + initCIELabConversion() + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3733 + Credit to OSS Fuzz + +2017-10-17 Even Rouault + + * libtiff/tif_jpeg.c: add compatibility with libjpeg-turbo 1.5.2 that + honours max_memory_to_use > 0. + Cf https://github.com/libjpeg-turbo/libjpeg-turbo/issues/162 + +2017-10-10 Even Rouault + + * nmake.opt: support a DEBUG=1 option, so as to adjust OPTFLAGS and use + /MDd runtime in debug mode. + +2017-10-01 Even Rouault + + * tools/tiffset.c: fix setting a single value for the ExtraSamples tag + (and other tags with variable number of values). + So 'tiffset -s ExtraSamples 1 X'. This only worked + when setting 2 or more values, but not just one. + +2017-09-29 Even Rouault + + * libtiff/libtiff.def: add TIFFReadRGBAStripExt and TIFFReadRGBATileExt + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2735 + +2017-09-09 Even Rouault + + * libtiff/tif_dirread.c: add NULL check to avoid likely false positive + null-pointer dereference warning by CLang Static Analyzer. + +2017-09-07 Even Rouault + + * libtiff/tiffiop.h, tif_aux.c: redirect SeekOK() macro to a _TIFFSeekoK() + function that checks if the offset is not bigger than INT64_MAX, so as + to avoid a -1 error return code of TIFFSeekFile() to match a required + seek to UINT64_MAX/-1. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2726 + Adapted from proposal by Nicolas Ruff. + +2017-08-29 Even Rouault + + * libtiff/tif_jpeg.c: accept reading the last strip of a JPEG compressed + file if the codestream height is larger than the truncated height of the + strip. Emit a warning in this situation since this is non compliant. + +2017-08-28 Even Rouault + + * test/Makefile.am: add missing reference to images/quad-lzw-compat.tiff + to fix "make distcheck". Patch by Roger Leigh + +2017-08-23 Even Rouault + + * libtiff/tif_dirwrite.c: replace assertion to tag value not fitting + on uint32 when selecting the value of SubIFD tag by runtime check + (in TIFFWriteDirectoryTagSubifd()). + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2728 + Reported by team OWL337 + +2017-08-23 Even Rouault + + * libtiff/tif_dirwrite.c: replace assertion related to not finding the + SubIFD tag by runtime check (in TIFFWriteDirectorySec()) + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2727 + Reported by team OWL337 + +2017-07-24 Even Rouault + + * libtiff/tif_luv.c: further reduce memory requirements for temporary + buffer when RowsPerStrip >= image_length in LogLuvInitState() and + LogL16InitState(). + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2700 + Credit to OSS Fuzz + +2017-07-24 Even Rouault + + * libtiff/tif_getimage.c: fix fromskew computation when to-be-skipped + pixel number is not a multiple of the horizontal subsampling, and + also in some other cases. Impact putcontig8bitYCbCr44tile, + putcontig8bitYCbCr42tile, putcontig8bitYCbCr41tile, + putcontig8bitYCbCr21tile and putcontig8bitYCbCr12tile + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2637 (discovered + by Agostino Sarubbo) + and https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2691 (credit + to OSS Fuzz) + +2017-07-24 Even Rouault + + * libtiff/tif_getimage.c: gtTileContig() and gtTileSeparate(): + properly break from loops on error when stoponerr is set, instead + of going on iterating on row based loop. + +2017-07-18 Even Rouault + + * libtiff/tif_luv.c: LogLuvInitState(): avoid excessive memory + allocation when RowsPerStrip tag is missing. + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2683 + Credit to OSS-Fuzz + +2017-07-15 Even Rouault + + * libtiff/tif_read.c: add protection against excessive memory + allocation attempts in TIFFReadDirEntryArray() on short files. + Effective for mmap'ed case. And non-mmap'ed case, but restricted + to 64bit builds. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2675 + +2017-07-15 Even Rouault + + * libtiff/tif_read.c: in TIFFFetchStripThing(), only grow the + arrays that hold StripOffsets/StripByteCounts, when they are smaller + than the expected number of striles, up to 1 million striles, and + error out beyond. Can be tweaked by setting the environment variable + LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT. + This partially goes against a change added on 2002-12-17 to accept + those arrays of wrong sizes, but is needed to avoid denial of services. + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2350 + Credit to OSS Fuzz + +2017-07-15 Even Rouault + + * libtiff/tif_read.c: TIFFFillStrip() / TIFFFillTile(). + Complementary fix for http://bugzilla.maptools.org/show_bug.cgi?id=2708 + in the isMapped() case, so as to avoid excessive memory allocation + when we need a temporary buffer but the file is truncated. + +2017-07-15 Even Rouault + + * tools/tiff2pdf.c: prevent heap buffer overflow write in "Raw" + mode on PlanarConfig=Contig input images. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2715 + Reported by team OWL337 + +2017-07-11 Even Rouault + + * libtiff/tif_dir.c: avoid potential null pointer dereference in + _TIFFVGetField() on corrupted TIFFTAG_NUMBEROFINKS tag instance. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2713 + +2017-07-11 Even Rouault + + * libtiff/tif_lzw.c: fix potential out-of-buffer read on 1-byte LZW + strips. Crashing issue only on memory mapped files, where the strip + offset is the last byte of the file, and the file size is a multiple + of one page size on the CPU architecture (typically 4096). Credit + to myself :-) + +2017-07-11 Even Rouault + + * test/tiffcp-lzw-compat.sh, test/images/quad-lzw-compat.tiff: new files + to test old-style LZW decompression + * test/common.sh, Makefile.am, CMakeList.txt: updated with above + +2017-07-11 Even Rouault + + * refresh autoconf/make stuff with what is on Ubuntu 16.04 (minor changes) + +2017-07-11 Even Rouault + + * libtiff/tif_lzw.c: fix 4.0.8 regression in the decoding of old-style LZW + compressed files. + +2017-07-10 Even Rouault + + * libtiff/tif_pixarlog.c: avoid excessive memory allocation on decoding + when RowsPerStrip tag is not defined (and thus td_rowsperstrip == UINT_MAX) + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2554 + Credit to OSS Fuzz + +2017-07-04 Even Rouault + + * libtiff/tif_read.c, tiffiop.h: add a _TIFFReadEncodedTileAndAllocBuffer() + and _TIFFReadTileAndAllocBuffer() variants of TIFFReadEncodedTile() and + TIFFReadTile() that allocates the decoded buffer only after a first + successful TIFFFillTile(). This avoids excessive memory allocation + on corrupted files. + * libtiff/tif_getimage.c: use _TIFFReadTileAndAllocBuffer(). + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2470 + Credit to OSS Fuzz. + +2017-07-04 Even Rouault + + * libtiff/tif_error.c, tif_warning.c: correctly use va_list when both + an old-style and new-style warning/error handlers are installed. + Patch by Paavo Helde (sent on the mailing list) + +2017-07-02 Even Rouault + + * libtiff/tif_read.c: TIFFStartTile(): set tif_rawcc to + tif_rawdataloaded when it is set. Similarly to TIFFStartStrip(). + This issue was revealed by the change of 2017-06-30 in TIFFFileTile(), + limiting the number of bytes read. But it could probably have been hit + too in CHUNKY_STRIP_READ_SUPPORT mode previously ? + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2454 + Credit to OSS Fuzz + +2017-06-30 Even Rouault + + * man: update documentation regarding SubIFD tag and + TIFFSetSubDirectory() data type. + Patch by Eric Piel + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2671 + +2017-06-30 Even Rouault + + * libtiff/tif_dirwrite.c: in TIFFWriteDirectoryTagCheckedXXXX() + functions associated with LONG8/SLONG8 data type, replace assertion that + the file is BigTIFF, by a non-fatal error. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2712 + Reported by team OWL337 + +2017-06-30 Even Rouault + + * libtiff/tif_read.c, tiffiop.h: add a _TIFFReadEncodedStripAndAllocBuffer() + function, variant of TIFFReadEncodedStrip() that allocates the + decoded buffer only after a first successful TIFFFillStrip(). This avoids + excessive memory allocation on corrupted files. + * libtiff/tif_getimage.c: use _TIFFReadEncodedStripAndAllocBuffer(). + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2708 and + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2433 . + Credit to OSS Fuzz + +2017-06-30 Even Rouault + + * libtiff/tif_read.c: TIFFFillTile(): add limitation to the number + of bytes read in case td_stripbytecount[strip] is bigger than + reasonable, so as to avoid excessive memory allocation (similarly to + what was done for TIFFFileStrip() on 2017-05-10) + +2017-06-29 Even Rouault + + * libtiff/tiffiop.h, libtiff/tif_jpeg.c, libtiff/tif_jpeg_12.c, + libtiff/tif_read.c: make TIFFReadScanline() works in + CHUNKY_STRIP_READ_SUPPORT mode with JPEG stream with multiple scans. + Also make configurable through a LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER + environment variable the maximum number of scans allowed. Defaults to + 100. + +2017-06-27 Even Rouault + + * libtiff/tif_dirread.c: in TIFFReadDirEntryFloat(), check that a + double value can fit in a float before casting. Patch by Nicolas RUFF + +2017-06-26 Even Rouault + + * libtiff/tif_jbig.c: fix memory leak in error code path of JBIGDecode() + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2706 + Reported by team OWL337 + +2017-06-24 Even Rouault + + * libtiff/tif_jpeg.c: error out at decoding time if anticipated libjpeg + memory allocation is above 100 MB. libjpeg in case of multiple scans, + which is allowed even in baseline JPEG, if components are spread over several + scans and not interleavedin a single one, needs to allocate memory (or + backing store) for the whole strip/tile. + See http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf + This limitation may be overriden by setting the + LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC environment variable, or recompiling + libtiff with a custom value of TIFF_LIBJPEG_LARGEST_MEM_ALLOC macro. + +2017-06-24 Even Rouault + + * libtiff/tif_jpeg.c: add anti-denial of service measure to avoid excessive + CPU consumption on progressive JPEGs with a huge number of scans. + See http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf + Note: only affects libtiff since 2014-12-29 where support of non-baseline JPEG + was added. + +2017-06-18 Even Rouault + + * libtiff/tiffiop.h: add TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW macro to + disable CLang warnings raised by -fsanitize=undefined,unsigned-integer-overflow + * libtiff/tif_predict.c: decorate legitimate functions where unsigned int + overflow occur with TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW + * libtiff/tif_dirread.c: avoid unsigned int overflow in EstimateStripByteCounts() + and BYTECOUNTLOOKSBAD when file is too short. + * libtiff/tif_jpeg.c: avoid (harmless) unsigned int overflow on tiled images. + * libtiff/tif_fax3.c: avoid unsigned int overflow in Fax3Encode2DRow(). Could + potentially be a bug with huge rows. + * libtiff/tif_getimage.c: avoid many (harmless) unsigned int overflows. + +2017-06-12 Even Rouault + + * libtiff/tif_dirread.c: TIFFFetchStripThing(): limit the number of items + read in StripOffsets/StripByteCounts tags to the number of strips to avoid + excessive memory allocation. + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2215 + Credit to OSS Fuzz + +2017-06-12 Even Rouault + + * libtiff/tif_dirread.c: fix regression of libtiff 4.0.8 in + ChopUpSingleUncompressedStrip() regarding update of newly single-strip + uncompressed files whose bytecount is 0. Before the change of 2016-12-03, + the condition bytecount==0 used to trigger an early exit/disabling of + strip chop. Re-introduce that in update mode. Otherwise this cause + later incorrect setting for the value of StripByCounts/StripOffsets. + ( https://trac.osgeo.org/gdal/ticket/6924 ) + +2017-06-10 Even Rouault + + * .appveyor.yml, .travis.yml, build/travis-ci: apply patches + 0001-ci-Travis-script-improvements.patch and + 0002-ci-Invoke-helper-script-via-shell.patch by Roger Leigh + (sent to mailing list) + +2017-06-08 Even Rouault + + * .travis.yml, build/travis-ci: new files from + 0001-ci-Add-Travis-support-for-Linux-builds-with-Autoconf.patch by + Roger Leigh (sent to mailing list on 2017-06-08) + This patch adds support for the Travis-CI service. + + * .appveyor.yml: new file from + 0002-ci-Add-AppVeyor-support.patch by Roger Leigh (sent to mailing + list on 2017-06-08) + This patch adds a .appveyor.yml file to the top-level. This allows + one to opt in to having a branch built on Windows with Cygwin, + MinGW and MSVC automatically when a branch is pushed to GitHub, + GitLab, BitBucket or any other supported git hosting service. + + * CMakeLists.txt, test/CMakeLists.txt, test/TiffTestCommon.cmake: apply + patch 0001-cmake-Improve-Cygwin-and-MingGW-test-support.patch from Roger + Leigh (sent to mailing list on 2017-06-08) + This patch makes the CMake build system support running the tests + with MinGW or Cygwin. + +2017-06-08 Even Rouault + + * libtiff/tif_swab.c: if DISABLE_CHECK_TIFFSWABMACROS is defined, do not do + the #ifdef TIFFSwabXXX checks. Make it easier for GDAL to rename the symbols + of its internal libtiff copy. + +2017-06-01 Even Rouault + + * libtiff/tif_dirinfo.c, tif_dirread.c: add _TIFFCheckFieldIsValidForCodec(), + and use it in TIFFReadDirectory() so as to ignore fields whose tag is a + codec-specified tag but this codec is not enabled. This avoids TIFFGetField() + to behave differently depending on whether the codec is enabled or not, and + thus can avoid stack based buffer overflows in a number of TIFF utilities + such as tiffsplit, tiffcmp, thumbnail, etc. + Patch derived from 0063-Handle-properly-CODEC-specific-tags.patch + (http://bugzilla.maptools.org/show_bug.cgi?id=2580) by Raphaël Hertzog. + Fixes: + http://bugzilla.maptools.org/show_bug.cgi?id=2580 + http://bugzilla.maptools.org/show_bug.cgi?id=2693 + http://bugzilla.maptools.org/show_bug.cgi?id=2625 (CVE-2016-10095) + http://bugzilla.maptools.org/show_bug.cgi?id=2564 (CVE-2015-7554) + http://bugzilla.maptools.org/show_bug.cgi?id=2561 (CVE-2016-5318) + http://bugzilla.maptools.org/show_bug.cgi?id=2499 (CVE-2014-8128) + http://bugzilla.maptools.org/show_bug.cgi?id=2441 + http://bugzilla.maptools.org/show_bug.cgi?id=2433 + +2017-05-29 Even Rouault + + * libtiff/tif_getimage.c: initYCbCrConversion(): stricter validation for + refBlackWhite coefficients values. To avoid invalid float->int32 conversion + (when refBlackWhite[0] == 2147483648.f) + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1907 + Credit to OSS Fuzz + +2017-05-29 Even Rouault + + * libtiff/tif_color.c: TIFFYCbCrToRGBInit(): stricter clamping to avoid + int32 overflow in TIFFYCbCrtoRGB(). + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1844 + Credit to OSS Fuzz + +2017-05-21 Bob Friesenhahn + + * configure.ac: libtiff 4.0.8 released. + + * html/v4.0.8.html: Add description of changes targeting the 4.0.8 + release. + +2017-05-20 Even Rouault + + * libtiff/tif_getimage.c: initYCbCrConversion(): stricter validation for + refBlackWhite coefficients values. To avoid invalid float->int32 conversion. + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1718 + Credit to OSS Fuzz + +2017-05-18 Even Rouault + + * libtiff/tif_getimage.c: initYCbCrConversion(): check luma[1] is not zero + to avoid division by zero. + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1665 + Credit to OSS Fuzz + +2017-05-17 Even Rouault + + * libtiff/tif_read.c: _TIFFVSetField(): fix outside range cast of double to + float. + Credit to Google Autofuzz project + +2017-05-17 Even Rouault + + * libtiff/tif_getimage.c: initYCbCrConversion(): add basic validation of + luma and refBlackWhite coefficients (just check they are not NaN for now), + to avoid potential float to int overflows. + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1663 + Credit to OSS Fuzz + +2017-05-17 Even Rouault + + * libtiff/tif_pixarlog.c: PixarLogDecode(): resync tif_rawcp with + next_in and tif_rawcc with avail_in at beginning and end of function, + similarly to what is done in LZWDecode(). Likely needed so that it + works properly with latest chnges in tif_read.c in CHUNKY_STRIP_READ_SUPPORT + mode. But untested... + +2017-05-17 Even Rouault + + * libtiff/tif_lzw.c: update dec_bitsleft at beginning of LZWDecode(), + and update tif_rawcc at end of LZWDecode(). This is needed to properly + work with the latest chnges in tif_read.c in CHUNKY_STRIP_READ_SUPPORT + mode. + +2017-05-14 Even Rouault + + * libtiff/tif_luv.c: LogL16InitState(): avoid excessive memory + allocation when RowsPerStrip tag is missing. + Credit to OSS-Fuzz (locally run, on GDAL) + +2017-05-14 Even Rouault + + * libtiff/tif_packbits.c: fix out-of-buffer read in PackBitsDecode() + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1563 + Credit to OSS-Fuzz + +2017-05-13 Even Rouault + + * libtiff/tif_pixarlog.c, tif_luv.c: avoid potential int32 + overflows in multiply_ms() and add_ms(). + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1558 + Credit to OSS-Fuzz + +2017-05-13 Even Rouault + + * libtiff/tif_color.c: avoid potential int32 overflow in + TIFFYCbCrToRGBInit() + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1533 + Credit to OSS-Fuzz + +2017-05-13 Even Rouault + + * libtiff/tif_read.c: update tif_rawcc in CHUNKY_STRIP_READ_SUPPORT + mode with tif_rawdataloaded when calling TIFFStartStrip() or + TIFFFillStripPartial(). This avoids reading beyond tif_rawdata + when bytecount > tif_rawdatasize. + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1545. + Credit to OSS-Fuzz + +2017-05-12 Even Rouault + + * libtiff/tif_read.c: TIFFFillStripPartial(): + avoid excessive memory allocation in case of shorten files. + Only effective on 64 bit builds. + Credit to OSS-Fuzz (locally run, on GDAL) + +2017-05-12 Even Rouault + + * libtiff/tif_read.c: TIFFFillStripPartial() / TIFFSeek(), + avoid potential integer overflows with read_ahead in + CHUNKY_STRIP_READ_SUPPORT mode. Should + especially occur on 32 bit platforms. + +2017-05-10 Even Rouault + + * libtiff/tif_read.c: TIFFFillStrip() and TIFFFillTile(): + avoid excessive memory allocation in case of shorten files. + Only effective on 64 bit builds and non-mapped cases. + Credit to OSS-Fuzz (locally run, on GDAL) + +2017-05-10 Even Rouault + + * libtiff/tif_zip.c, tif_pixarlog.c, tif_predict.c: fix memory + leak when the underlying codec (ZIP, PixarLog) succeeds its + setupdecode() method, but PredictorSetup fails. + Credit to OSS-Fuzz (locally run, on GDAL) + +2017-05-10 Even Rouault + + * libtiff/tif_read.c: TIFFFillStrip(): add limitation to the number + of bytes read in case td_stripbytecount[strip] is bigger than + reasonable, so as to avoid excessive memory allocation. + +2017-04-28 Even Rouault + + * tools/tiff2bw.c: close TIFF handle in error code path. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2677 + +2017-04-27 Even Rouault + + * litiff/tif_fax3.c: avoid crash in Fax3Close() on empty file. + Patch by Alan Coopersmith + complement by myself. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2673 + * tools/fax2tiff.c: emit appropriate message if the input file is + empty. Patch by Alan Coopersmith. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2672 + +2017-04-27 Even Rouault + + * libtiff/tif_ojpeg.c: fix potential memory leak in + OJPEGReadHeaderInfoSecTablesQTable, OJPEGReadHeaderInfoSecTablesDcTable + and OJPEGReadHeaderInfoSecTablesAcTable + Patch by Nicolás Peña. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2670 + +2017-04-27 Even Rouault + + * libtiff/tif_dirread.c: fix memory leak in non DEFER_STRILE_LOAD + mode (ie default) when there is both a StripOffsets and + TileOffsets tag, or a StripByteCounts and TileByteCounts + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2689 + * tools/tiff2ps.c: call TIFFClose() in error code paths. + +2017-02-25 Even Rouault + + * libtiff/tif_fax3.c, tif_predict.c, tif_getimage.c: fix GCC 7 + -Wimplicit-fallthrough warnings. + +2017-02-18 Even Rouault + + * libtiff/tif_pixarlog.c: fix memory leak in error code path of + PixarLogSetupDecode(). Patch by Nicolás Peña. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2665 + +2017-02-18 Even Rouault + + * libtiff/tif_lzw.c: in LZWPostEncode(), increase, if necessary, the + code bit-width after flushing the remaining code and before emitting + the EOI code. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=1982 + +2017-01-31 Even Rouault + + * libtiff/tif_jpeg.c: only run JPEGFixupTagsSubsampling() if the + YCbCrSubsampling tag is not explicitly present. This helps a bit to reduce + the I/O amount when te tag is present (especially on cloud hosted files). + +2017-01-14 Even Rouault + + * tools/raw2tiff.c: avoid integer division by zero. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2631 + +2017-01-12 Even Rouault + + * libtiff/tif_ojpeg.c: fix leak in OJPEGReadHeaderInfoSecTablesQTable, + OJPEGReadHeaderInfoSecTablesDcTable and OJPEGReadHeaderInfoSecTablesAcTable + when read fails. + Patch by Nicolás Peña. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2659 + +2017-01-11 Even Rouault + + * libtiff/tif_luv.c, tif_lzw.c, tif_packbits.c: return 0 in Encode + functions instead of -1 when TIFFFlushData1() fails. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2130 + +2017-01-11 Even Rouault + + * tools/tiffcp.c: error out cleanly in cpContig2SeparateByRow and + cpSeparate2ContigByRow if BitsPerSample != 8 to avoid heap based overflow. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2656 and + http://bugzilla.maptools.org/show_bug.cgi?id=2657 + +2017-01-11 Even Rouault + + * libtiff/tiffio.h, tif_unix.c, tif_win32.c, tif_vms.c: add _TIFFcalloc() + + * libtiff/tif_read.c: TIFFReadBufferSetup(): use _TIFFcalloc() to zero + initialize tif_rawdata. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2651 + +2017-01-11 Even Rouault + + * libtiff/tif_getimage.c: add explicit uint32 cast in putagreytile to + avoid UndefinedBehaviorSanitizer warning. + Patch by Nicolás Peña. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2658 + +2017-01-11 Even Rouault + + * libtiff/tif_read.c: avoid potential undefined behaviour on signed integer + addition in TIFFReadRawStrip1() in isMapped() case. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2650 + +2017-01-11 Even Rouault + + * libtiff/tif_jpeg.c: validate BitsPerSample in JPEGSetupEncode() to avoid + undefined behaviour caused by invalid shift exponent. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2648 + +2017-01-11 Even Rouault + + * libtiff/tif_dir.c, tif_dirread.c, tif_dirwrite.c: implement various clampings + of double to other data types to avoid undefined behaviour if the output range + isn't big enough to hold the input value. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2643 + http://bugzilla.maptools.org/show_bug.cgi?id=2642 + http://bugzilla.maptools.org/show_bug.cgi?id=2646 + http://bugzilla.maptools.org/show_bug.cgi?id=2647 + +2017-01-11 Even Rouault + + * libtiff/tif_dirread.c: avoid division by floating point 0 in + TIFFReadDirEntryCheckedRational() and TIFFReadDirEntryCheckedSrational(), + and return 0 in that case (instead of infinity as before presumably) + Apparently some sanitizers do not like those divisions by zero. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2644 + +2017-01-11 Even Rouault + + * libtiff/tif_dirwrite.c: in TIFFWriteDirectoryTagCheckedRational, replace + assertion by runtime check to error out if passed value is strictly + negative. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2535 + + * tools/tiffcrop.c: remove extraneous TIFFClose() in error code path, that + caused double free. + Related to http://bugzilla.maptools.org/show_bug.cgi?id=2535 + +2017-01-11 Even Rouault + + * libtiff/tif_jpeg.c: avoid integer division by zero in + JPEGSetupEncode() when horizontal or vertical sampling is set to 0. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2653 + +2017-01-03 Even Rouault + + * libtiff/tif_jpeg.c: increase libjpeg max memory usable to + 10 MB instead of libjpeg 1MB default. This helps when creating files + with "big" tile, without using libjpeg temporary files. + Related to https://trac.osgeo.org/gdal/ticket/6757 + +2016-12-20 Even Rouault + + * tools/tiff2pdf.c: avoid potential heap-based overflow in + t2p_readwrite_pdf_image_tile(). + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2640 + +2016-12-20 Even Rouault + + * tools/tiff2pdf.c: avoid potential invalid memory read in + t2p_writeproc. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2639 + +2016-12-20 Even Rouault + + * tools/tiff2pdf.c: fix wrong usage of memcpy() that can trigger + unspecified behaviour. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2638 + +2016-12-18 Even Rouault + + * libtiff/tif_getimage.c: fix potential memory leaks in error code + path of TIFFRGBAImageBegin(). + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2627 + +2016-12-18 Even Rouault + + * tools/tiff2pdf.c: prevent heap-based buffer overflow in -j mode + on a paletted image. Note: this fix errors out before the overflow + happens. There could probably be a better fix. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2635 + +2016-12-17 Even Rouault + + * libtiff/tiffio.h, libtiff/tif_getimage.c: add TIFFReadRGBAStripExt() + and TIFFReadRGBATileExt() variants of the functions without ext, with + an extra argument to control the stop_on_error behaviour. + +2016-12-17 Even Rouault + + * tools/tiff2ps.c: fix 2 heap-based buffer overflows (in PSDataBW + and PSDataColorContig). Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2633 and + http://bugzilla.maptools.org/show_bug.cgi?id=2634. + +2016-12-13 Even Rouault + + * libtiff/tif_fax3.h: revert change done on 2016-01-09 that made + Param member of TIFFFaxTabEnt structure a uint16 to reduce size of + the binary. It happens that the Hylafax software uses the tables that + follow this typedef (TIFFFaxMainTable, TIFFFaxWhiteTable, + TIFFFaxBlackTable), although they are not in a public libtiff header. + Raised by Lee Howard. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2636 + +2016-12-04 Even Rouault + + * html/man/Makefile.am: remove thumbnail.1.html and rgb2ycbcr.1.html + from installed pages since the corresponding utilities are no longer + installed. Reported by Havard Eidnes + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2606 + +2016-12-03 Even Rouault + + * libtiff/tif_write.c: fix misleading indentation as warned by GCC. + +2016-12-03 Even Rouault + + * tools/tiffcp.c: replace assert( (bps % 8) == 0 ) by a non assert check. + Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2605 + +2016-12-03 Even Rouault + + * tools/tiffcp.c: fix uint32 underflow/overflow that can cause heap-based + buffer overflow. + Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2610 + +2016-12-03 Even Rouault + + * tools/tiffcp.c: avoid potential division by zero is BitsPerSamples tag is + missing. + Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2607 + +2016-12-03 Even Rouault + + * man/Makefile.am: remove thumbnail.1 and rgb2ycbcr.1 from installed man + pages since the corresponding utilities are no longer installed. + Reported by Havard Eidnes + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2606 + +2016-12-03 Even Rouault + + * tools/tif_dir.c: when TIFFGetField(, TIFFTAG_NUMBEROFINKS, ) is called, + limit the return number of inks to SamplesPerPixel, so that code that parses + ink names doesn't go past the end of the buffer. + Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2599 + +2016-12-03 Even Rouault + + * tools/tiffcp.c: avoid potential division by zero is BitsPerSamples tag is + missing. + Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2597 + +2016-12-03 Even Rouault + + * tools/tiffinfo.c: fix null pointer dereference in -r mode when the image has + no StripByteCount tag. + Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2594 + +2016-12-03 Even Rouault + + * tools/tiffcrop.c: fix integer division by zero when BitsPerSample is missing. + Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2619 + +2016-12-03 Even Rouault + + * tools/tiffcrop.c: add 3 extra bytes at end of strip buffer in + readSeparateStripsIntoBuffer() to avoid read outside of heap allocated buffer. + Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2621 + +2016-12-03 Even Rouault + + * tools/tiffcrop.c: fix readContigStripsIntoBuffer() in -i (ignore) mode so + that the output buffer is correctly incremented to avoid write outside bounds. + Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2620 + +2016-12-03 Even Rouault + + * libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of failure in + OJPEGPreDecode(). This will avoid a divide by zero, and potential other issues. + Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2611 + +2016-12-03 Even Rouault + + * libtiff/tif_dirread.c: modify ChopUpSingleUncompressedStrip() to + instanciate compute ntrips as TIFFhowmany_32(td->td_imagelength, rowsperstrip), + instead of a logic based on the total size of data. Which is faulty is + the total size of data is not sufficient to fill the whole image, and thus + results in reading outside of the StripByCounts/StripOffsets arrays when + using TIFFReadScanline(). + Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2608. + + * libtiff/tif_strip.c: revert the change in TIFFNumberOfStrips() done + for http://bugzilla.maptools.org/show_bug.cgi?id=2587 / CVE-2016-9273 since + the above change is a better fix that makes it unnecessary. + +2016-12-03 Even Rouault + + * libtiff/tif_pixarlog.c, libtiff/tif_luv.c: fix heap-based buffer + overflow on generation of PixarLog / LUV compressed files, with + ColorMap, TransferFunction attached and nasty plays with bitspersample. + The fix for LUV has not been tested, but suffers from the same kind + of issue of PixarLog. + Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2604 + +2016-12-02 Even Rouault + + * tools/tiffcp.c: avoid uint32 underflow in cpDecodedStrips that + can cause various issues, such as buffer overflows in the library. + Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2598 + +2016-12-02 Even Rouault + + * libtiff/tif_read.c, libtiff/tiffiop.h: fix uint32 overflow in + TIFFReadEncodedStrip() that caused an integer division by zero. + Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2596 + +2016-11-20 Even Rouault + + * libtiff/tif_getimage.c, libtiff/tif_open.c: add parenthesis to + fix cppcheck clarifyCalculation warnings + * libtiff/tif_predict.c, libtiff/tif_print.c: fix printf unsigned + vs signed formatting (cppcheck invalidPrintfArgType_uint warnings) + +2016-11-20 Bob Friesenhahn + + * tools/fax2tiff.c (main): Applied patch by Jörg Ahrens to fix + passing client data for Win32 builds using tif_win32.c + (USE_WIN32_FILEIO defined) for file I/O. Patch was provided via + email on November 20, 2016. + +2016-11-19 Bob Friesenhahn + + * libtiff 4.0.7 released. + + * configure.ac: Update for 4.0.7 release. + + * tools/tiffdump.c (ReadDirectory): Remove uint32 cast to + _TIFFmalloc() argument which resulted in Coverity report. Added + more mutiplication overflow checks. + +2016-11-18 Even Rouault + + * tools/tiffcrop.c: Fix memory leak in (recent) error code path. + Fixes Coverity 1394415. + +2016-11-17 Bob Friesenhahn + + * libtiff/tif_getimage.c: Fix some benign warnings which appear in + 64-bit compilation under Microsoft Visual Studio of the form + "Arithmetic overflow: 32-bit value is shifted, then cast to 64-bit + value. Results might not be an expected value.". Problem was + reported on November 16, 2016 on the tiff mailing list. + +2016-11-16 Even Rouault + + * libtiff/tif_dirread.c: in TIFFFetchNormalTag(), do not dereference + NULL pointer when values of tags with TIFF_SETGET_C16_ASCII / TIFF_SETGET_C32_ASCII + access are 0-byte arrays. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2593 (regression introduced + by previous fix done on 2016-11-11 for CVE-2016-9297). + Reported by Henri Salo. Assigned as CVE-2016-9448 + +2016-11-12 Bob Friesenhahn + + * tools/tiffinfo.c (TIFFReadContigTileData): Fix signed/unsigned + comparison warning. + (TIFFReadSeparateTileData): Fix signed/unsigned comparison + warning. + + * tools/tiffcrop.c (readContigTilesIntoBuffer): Fix + signed/unsigned comparison warning. + + * html/v4.0.7.html: Add a file to document the pending 4.0.7 + release. + +2016-11-11 Even Rouault + + * tools/tiff2pdf.c: avoid undefined behaviour related to overlapping + of source and destination buffer in memcpy() call in + t2p_sample_rgbaa_to_rgb() + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2577 + +2016-11-11 Even Rouault + + * tools/tiff2pdf.c: fix potential integer overflows on 32 bit builds + in t2p_read_tiff_size() + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2576 + +2016-11-11 Even Rouault + + * libtiff/tif_aux.c: fix crash in TIFFVGetFieldDefaulted() + when requesting Predictor tag and that the zip/lzw codec is not + configured. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2591 + +2016-11-11 Even Rouault + + * libtiff/tif_dirread.c: in TIFFFetchNormalTag(), make sure that + values of tags with TIFF_SETGET_C16_ASCII / TIFF_SETGET_C32_ASCII + access are null terminated, to avoid potential read outside buffer + in _TIFFPrintField(). + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2590 (CVE-2016-9297) + +2016-11-11 Even Rouault + + * libtiff/tif_dirread.c: reject images with OJPEG compression that + have no TileOffsets/StripOffsets tag, when OJPEG compression is + disabled. Prevent null pointer dereference in TIFFReadRawStrip1() + and other functions that expect td_stripbytecount to be non NULL. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2585 + +2016-11-11 Even Rouault + + * tools/tiffcrop.c: fix multiple uint32 overflows in + writeBufferToSeparateStrips(), writeBufferToContigTiles() and + writeBufferToSeparateTiles() that could cause heap buffer overflows. + Reported by Henri Salo from Nixu Corporation. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2592 (CVE-2016-9532) + +2016-11-10 Even Rouault + + * libtiff/tif_strip.c: make TIFFNumberOfStrips() return the td->td_nstrips + value when it is non-zero, instead of recomputing it. This is needed in + TIFF_STRIPCHOP mode where td_nstrips is modified. Fixes a read outsize of + array in tiffsplit (or other utilities using TIFFNumberOfStrips()). + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2587 (CVE-2016-9273) + +2016-11-04 Even Rouault + + * libtiff/tif_predic.c: fix memory leaks in error code paths added in + previous commit (fix for MSVR 35105) + +2016-10-31 Even Rouault + + * libtiff/tif_predict.h, libtiff/tif_predict.c: + Replace assertions by runtime checks to avoid assertions in debug mode, + or buffer overflows in release mode. Can happen when dealing with + unusual tile size like YCbCr with subsampling. Reported as MSVR 35105 + by Axel Souchet & Vishal Chauhan from the MSRC Vulnerabilities & Mitigations + team. + +2016-10-26 Even Rouault + + * tools/fax2tiff.c: fix segfault when specifying -r without + argument. Patch by Yuriy M. Kaminskiy. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2572 + +2016-10-25 Even Rouault + + * libtiff/tif_dir.c: discard values of SMinSampleValue and + SMaxSampleValue when they have been read and the value of + SamplesPerPixel is changed afterwards (like when reading a + OJPEG compressed image with a missing SamplesPerPixel tag, + and whose photometric is RGB or YCbCr, forcing SamplesPerPixel + being 3). Otherwise when rewriting the directory (for example + with tiffset, we will expect 3 values whereas the array had been + allocated with just one), thus causing a out of bound read access. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2500 + (CVE-2014-8127, duplicate: CVE-2016-3658) + + * libtiff/tif_dirwrite.c: avoid null pointer dereference on td_stripoffset + when writing directory, if FIELD_STRIPOFFSETS was artificially set + for a hack case in OJPEG case. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2500 + (CVE-2014-8127, duplicate: CVE-2016-3658) + +2016-10-25 Even Rouault + + * tools/tiffinfo.c: fix out-of-bound read on some tiled images. + (http://bugzilla.maptools.org/show_bug.cgi?id=2517) + + * libtiff/tif_compress.c: make TIFFNoDecode() return 0 to indicate an + error and make upper level read routines treat it accordingly. + (linked to the test case of http://bugzilla.maptools.org/show_bug.cgi?id=2517) + +2016-10-14 Even Rouault + + * tools/tiffcrop.c: fix out-of-bound read of up to 3 bytes in + readContigTilesIntoBuffer(). Reported as MSVR 35092 by Axel Souchet + & Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team. + +2016-10-09 Even Rouault + + * tools/tiff2pdf.c: fix write buffer overflow of 2 bytes on JPEG + compressed images. Reported by Tyler Bohan of Cisco Talos as + TALOS-CAN-0187 / CVE-2016-5652. + Also prevents writing 2 extra uninitialized bytes to the file stream. + +2016-10-08 Even Rouault + + * tools/tiffcp.c: fix out-of-bounds write on tiled images with odd + tile width vs image width. Reported as MSVR 35103 + by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & + Mitigations team. + +2016-10-08 Even Rouault + + * tools/tiff2pdf.c: fix read -largely- outsize of buffer in + t2p_readwrite_pdf_image_tile(), causing crash, when reading a + JPEG compressed image with TIFFTAG_JPEGTABLES length being one. + Reported as MSVR 35101 by Axel Souchet and Vishal Chauhan from + the MSRC Vulnerabilities & Mitigations team. CVE-2016-9453 + +2016-10-08 Even Rouault + + * tools/tiffcp.c: fix read of undefined variable in case of missing + required tags. Found on test case of MSVR 35100. + * tools/tiffcrop.c: fix read of undefined buffer in + readContigStripsIntoBuffer() due to uint16 overflow. Probably not a + security issue but I can be wrong. Reported as MSVR 35100 by Axel + Souchet from the MSRC Vulnerabilities & Mitigations team. + +2016-09-25 Bob Friesenhahn + + * html: Change as many remotesensing.org broken links to a working + URL as possible. + +2016-09-24 Bob Friesenhahn + + * libtiff/tif_getimage.c (TIFFRGBAImageOK): Reject attempts to + read floating point images. + + * libtiff/tif_predict.c (PredictorSetup): Enforce bits-per-sample + requirements of floating point predictor (3). Fixes CVE-2016-3622 + "Divide By Zero in the tiff2rgba tool." + +2016-09-23 Even Rouault + + * tools/tiffcrop.c: fix various out-of-bounds write vulnerabilities + in heap or stack allocated buffers. Reported as MSVR 35093, + MSVR 35096 and MSVR 35097. Discovered by Axel Souchet and Vishal + Chauhan from the MSRC Vulnerabilities & Mitigations team. + * tools/tiff2pdf.c: fix out-of-bounds write vulnerabilities in + heap allocate buffer in t2p_process_jpeg_strip(). Reported as MSVR + 35098. Discovered by Axel Souchet and Vishal Chauhan from the MSRC + Vulnerabilities & Mitigations team. + * libtiff/tif_pixarlog.c: fix out-of-bounds write vulnerabilities + in heap allocated buffers. Reported as MSVR 35094. Discovered by + Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & + Mitigations team. + * libtiff/tif_write.c: fix issue in error code path of TIFFFlushData1() + that didn't reset the tif_rawcc and tif_rawcp members. I'm not + completely sure if that could happen in practice outside of the odd + behaviour of t2p_seekproc() of tiff2pdf). The report points that a + better fix could be to check the return value of TIFFFlushData1() in + places where it isn't done currently, but it seems this patch is enough. + Reported as MSVR 35095. Discovered by Axel Souchet & Vishal Chauhan & + Suha Can from the MSRC Vulnerabilities & Mitigations team. + +2016-09-20 Bob Friesenhahn + + * html/man/index.html: Comment out links to documentation for + abandoned utilities. + +2016-09-17 Even Rouault + + * libtiff/tif_lzma.c: typo fix in comment + +2016-09-04 Even Rouault + + * libtiff/*.c: fix warnings raised by clang 3.9 -Wcomma + +2016-09-03 Even Rouault + + * libtiff/tif_dirwrite.c, libtiff/tif_color.c: fix warnings raised + by GCC 5 / clang -Wfloat-conversion + +2016-08-16 Even Rouault + + * tools/tiffcrop.c: fix C99'ism. + +2016-08-15 Even Rouault + + * tools/tiff2bw.c: fix weight computation that could result of color + value overflow (no security implication). Fix bugzilla #2550. + Patch by Frank Freudenberg. + +2016-08-15 Even Rouault + + * tools/rgb2ycbcr.c: validate values of -v and -h parameters to + avoid potential divide by zero. Fixes CVE-2016-3623 (bugzilla #2569) + +2016-08-15 Even Rouault + + * tools/tiffcrop.c: Fix out-of-bounds write in loadImage(). + From patch libtiff-CVE-2016-3991.patch from + libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro (bugzilla #2543) + +2016-08-15 Even Rouault + + * libtiff/tif_pixarlog.c: Fix write buffer overflow in PixarLogEncode + if more input samples are provided than expected by PixarLogSetupEncode. + Idea based on libtiff-CVE-2016-3990.patch from + libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro, but with different and + simpler check. (bugzilla #2544) + +2016-08-15 Even Rouault + + * tools/tiff2rgba.c: Fix integer overflow in size of allocated + buffer, when -b mode is enabled, that could result in out-of-bounds + write. Based initially on patch tiff-CVE-2016-3945.patch from + libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro, with correction for + invalid tests that rejected valid files. (bugzilla #2545) + +2016-07-11 Even Rouault + + * tools/tiffcrop.c: Avoid access outside of stack allocated array + on a tiled separate TIFF with more than 8 samples per pixel. + Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360 + (CVE-2016-5321 / CVE-2016-5323 , bugzilla #2558 / #2559) + +2016-07-10 Even Rouault + + * libtiff/tif_read.c: Fix out-of-bounds read on + memory-mapped files in TIFFReadRawStrip1() and TIFFReadRawTile1() + when stripoffset is beyond tmsize_t max value (reported by + Mathias Svensson) + +2016-07-10 Even Rouault + + * tools/tiffdump.c: fix a few misaligned 64-bit reads warned + by -fsanitize + +2016-07-03 Even Rouault + + * libtiff/tif_read.c: make TIFFReadEncodedStrip() and + TIFFReadEncodedTile() directly use user provided buffer when + no compression (and other conditions) to save a memcpy(). + + * libtiff/tif_write.c: make TIFFWriteEncodedStrip() and + TIFFWriteEncodedTile() directly use user provided buffer when + no compression to save a memcpy(). + +2016-07-01 Even Rouault + + * libtiff/tif_luv.c: validate that for COMPRESSION_SGILOG and + PHOTOMETRIC_LOGL, there is only one sample per pixel. Avoid + potential invalid memory write on corrupted/unexpected images when + using the TIFFRGBAImageBegin() interface (reported by + Clay Wood) + +2016-06-28 Even Rouault + + * libtiff/tif_pixarlog.c: fix potential buffer write overrun in + PixarLogDecode() on corrupted/unexpected images (reported by Mathias Svensson) + (CVE-2016-5875) + +2016-06-15 Bob Friesenhahn + + * libtiff/libtiff.def: Added _TIFFMultiply32 and _TIFFMultiply64 + to libtiff.def + +2016-06-05 Bob Friesenhahn + + * tools/Makefile.am: The libtiff tools bmp2tiff, gif2tiff, + ras2tiff, sgi2tiff, sgisv, and ycbcr are completely removed from + the distribution. The libtiff tools rgb2ycbcr and thumbnail are + only built in the build tree for testing. Old files are put in + new 'archive' subdirectory of the source repository, but not in + distribution archives. These changes are made in order to lessen + the maintenance burden. + +2016-05-10 Bob Friesenhahn + + * libtiff/tif_config.vc.h (HAVE_SNPRINTF): Add a '1' to the + HAVE_SNPRINTF definition.' + +2016-05-09 Bob Friesenhahn + + * libtiff/tif_config.vc.h (HAVE_SNPRINTF): Applied patch by Edward + Lam to define HAVE_SNPRINTF for Visual Studio 2015. + +2016-04-27 Even Rouault + + * libtiff/tif_dirread.c: when compiled with DEFER_STRILE_LOAD, + fix regression, introduced on 2014-12-23, when reading a one-strip + file without a StripByteCounts tag. GDAL #6490 + +2016-04-07 Bob Friesenhahn + + * html/bugs.html: Replace Andrey Kiselev with Bob Friesenhahn for + purposes of security issue reporting. + +2016-01-23 Even Rouault + + * libtiff/*: upstream typo fixes (mostly contributed by Kurt Schwehr) + coming from GDAL internal libtiff + +2016-01-09 Even Rouault + + * libtiff/tif_fax3.h: make Param member of TIFFFaxTabEnt structure + a uint16 to reduce size of the binary. + +2016-01-03 Even Rouault + + * libtiff/tif_read.c, tif_dirread.c: fix indentation issues raised + by GCC 6 -Wmisleading-indentation + +2015-12-27 Even Rouault + + * libtiff/tif_pixarlog.c: avoid zlib error messages to pass a NULL + string to %s formatter, which is undefined behaviour in sprintf(). + +2015-12-27 Even Rouault + + * libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode() + triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif + (bugzilla #2508) + +2015-12-27 Even Rouault + + * libtiff/tif_luv.c: fix potential out-of-bound writes in decode + functions in non debug builds by replacing assert()s by regular if + checks (bugzilla #2522). + Fix potential out-of-bound reads in case of short input data. + +2015-12-26 Even Rouault + + * libtiff/tif_getimage.c: fix out-of-bound reads in TIFFRGBAImage + interface in case of unsupported values of SamplesPerPixel/ExtraSamples + for LogLUV / CIELab. Add explicit call to TIFFRGBAImageOK() in + TIFFRGBAImageBegin(). Fix CVE-2015-8665 reported by limingxing and + CVE-2015-8683 reported by zzf of Alibaba. + +2015-12-21 Even Rouault + + * libtiff/tif_dirread.c: workaround false positive warning of Clang Static + Analyzer about null pointer dereference in TIFFCheckDirOffset(). + +2015-12-19 Even Rouault + + * libtiff/tif_fax3.c: remove dead assignment in Fax3PutEOLgdal(). Found + by Clang Static Analyzer + +2015-12-18 Even Rouault + + * libtiff/tif_dirwrite.c: fix truncation to 32 bit of file offsets in + TIFFLinkDirectory() and TIFFWriteDirectorySec() when aligning directory + offsets on a even offset (affects BigTIFF). This was a regression of the + changeset of 2015-10-19. + +2015-12-12 Even Rouault + + * libtiff/tif_write.c: TIFFWriteEncodedStrip() and TIFFWriteEncodedTile() + should return -1 in case of failure of tif_encodestrip() as documented + * libtiff/tif_dumpmode.c: DumpModeEncode() should return 0 in case of + failure so that the above mentionned functions detect the error. + +2015-12-06 Even Rouault + + * libtiff/uvcode.h: const'ify uv_code array + +2015-12-06 Even Rouault + + * libtiff/tif_dirinfo.c: const'ify tiffFields, exifFields, + tiffFieldArray and exifFieldArray arrays + +2015-12-06 Even Rouault + + * libtiff/tif_print.c: constify photoNames and orientNames arrays + +2015-12-06 Even Rouault + + * libtiff/tif_close.c, libtiff/tif_extension.c : rename link + variable to avoid -Wshadow warnings + +2015-11-22 Even Rouault + + * libtiff/*.c: fix typos in comments (patch by Kurt Schwehr) + +2015-11-22 Even Rouault + + * libtiff/*.c: fix MSVC warnings related to cast shortening and + assignment within conditional expression + +2015-11-18 Even Rouault + + * libtiff/*.c: fix clang -Wshorten-64-to-32 warnings + +2015-11-18 Even Rouault + + * libtiff/tif_dirread.c: initialize double* data at line 3693 to NULL + to please MSVC 2013 + +2015-11-17 Even Rouault + + * libtiff/tif_dirread.c: prevent reading ColorMap or TransferFunction + if BitsPerPixel > 24, so as to avoid huge memory allocation and file + read attempts + +2015-11-02 Even Rouault + + * libtiff/tif_dirread.c: remove duplicated assignment (reported by + Clang static analyzer) + +2015-10-28 Even Rouault + + * libtiff/tif_dir.c, libtiff/tif_dirinfo.c, libtiff/tif_compress.c, + libtiff/tif_jpeg_12.c: suppress warnings about 'no previous + declaration/prototype' + +2015-10-19 Even Rouault + + * libtiff/tiffiop.h, libtiff/tif_dirwrite.c: suffix constants by U to fix + 'warning: negative integer implicitly converted to unsigned type' warning + (part of -Wconversion) + +2015-10-17 Even Rouault + + * libtiff/tif_dir.c, libtiff/tif_dirread.c, libtiff/tif_getimage.c, + libtiff/tif_print.c: fix -Wshadow warnings (only in libtiff/) + +2015-09-12 Bob Friesenhahn + + * libtiff 4.0.6 released. + + * html/v4.0.6.html: Added release notes for 4.0.6. + +2015-09-06 Bob Friesenhahn + + * tools/tiffgt.c: Silence glut API deprecation warnings on MacOS + X. Patch by Roger Leigh. + + * Makefile.am: Added a 'coverity' rule to assist with Coverity + submissions. + + * tools/tiff2pdf.c: Fix compiler warning about unused function + when JPEG is not available. + + * tools/fax2ps.c (main): Detect failure to write to temporary + file. + +2015-09-05 Bob Friesenhahn + + * libtiff/tif_dirread.c (TIFFReadDirEntryCheckRangeSlongSlong8): + Change implementation so that it does not sometimes overflow the + range of a 32-bit int and to avoid a signed vs unsigned compare + compiler warning. + (TIFF_INT64_MAX): Avoid use of platform-specific large constants. + (TIFF_UINT32_MAX): Avoid use of platform-specific large constants. + +2015-09-01 Bob Friesenhahn + + * Makefile.am (distcheck-hook), configure.ac: Applied patches by + Roger Leigh (via tiff mailing list on 2015-09-01) to fix issue + with BSD make and to make use of cmake in 'distcheck' target + conditional on if cmake is available. + + * CMakeLists.txt, Makefile.am, configure.ac: Applied patches by + Roger Leigh (via tiff mailing list on 2015-09-01). + + CMake build is now included in 'distcheck' target. + + Builds with CMake 2.8.9 and newer. + + Tar is now resquested to use POSIX PAX format. + +2015-08-31 Bob Friesenhahn + + * CMakeLists.txt, libtiff/test/Makefile.am: Applied patches by + Roger Leigh (via tiff mailing list on 2015-08-31. + + CMake reads all version information directly from configure.ac to + avoid duplication of values. This basically greps over the file + for the LIBTIFF_* variables, then translates them to the form + needed for cmake. This includes the release version and libtool + shared library version information. + + Make shared/static library building configurable. Currently it + always builds shared libraries, with static libs having a _static + suffix (copying zlib, but it means it's got a non-standard name). + CMake has a -DBUILD_SHARED_LIBS=ON|OFF option to select one or the + other, which is now used instead. There's now a single "tiff" + target to build either shared or static as required, and all the + tests and tools are linked with this. Note: the Windows tests fail + when linked with a static libtiff (says: libtiff.dll not found). + Not really a regression since this was not tested up to this + point, and it's likely the unit tests haven't (ever?) been run on + Windows with a static libtiff, so there's some additional + portability issue here to address. Works fine on UNIX systems, + and fine on Windows with the default to build a DLL. + + Add a missing file which wasn't being distributed, causing unit + tests to fail. Note that "find . -name '*.cmake'" lists all the + CMake files which need distributing in addition to all the + CMakeLists.txt files (which now are distributed). + +2015-08-31 Even Rouault + + * libtiff/tif_predict.c: pedantic change to add explicit masking + with 0xff before casting to uchar in floating-point horizontal + differencing and accumulation routines. + +2015-08-31 Even Rouault + + * libtiff/tif_predict.c: fix generation of output with 16 bit + or 32 bit integer, when byte swapping is needed, in + horizontal predictor (#2521). Also fixes decoding when there is + a single pixel to code (unlikely case...) and byte swapping is + involved. + +2015-08-30 Even Rouault + + * libtiff/tif_lzw.c: make nextdata a unsigned type to avoid + undefined behaviour with shifts (gcc -fsanitize=shift) + +2015-08-30 Even Rouault + + * libtiff/tif_fax3.c, libtiff/tif_lzw.c, libtiff/tif_predict.c: + add explicit masking with 0xff before casting + to unsigned char (make icc -check=conversions happy) + + * libtiff/tif_predict.c: operate on unsigned datatypes when + computing/applying differences to avoid undefined behaviour of + signed types (C standard compliance) + +2015-08-30 Bob Friesenhahn + + * configure.ac: libtiff 4.0.5 released. + +2015-08-29 Bob Friesenhahn + + * CMakeLists.txt: Applied patch by Roger Leigh (via tiff mailing + list on 2015-08-29) to add ld-version-script option to cmake build + to match autoconf. Note: defaults to 'on' to be ABI-compatible by + default with common Linux distribution builds. Note that the + autoconf configure script defaults to 'off'. + + * html/build.html: Applied patch by Roger Leigh (via tiff mailing + list on 2015-08-29) to describe how to use CMake to build libtiff. + +2015-08-28 Bob Friesenhahn + + * html/v4.0.5.html: Added HTML file describing the changes which + will appear in the 4.0.5 release. + +2015-08-23 Bob Friesenhahn + + * libtiff/tiffiop.h: For MinGW comiles, make sure that build + supports necessary __MSVCRT_VERSION__ (at least at least 0x800). + Otherwise large files can not be supported for POSIX-style I/O. + + * tools/fax2tiff.c (main): Eliminate a compiler warning in 64-bit + builds about cast to thandle_t. + + * test/rewrite_tag.c (main): Does not require any arguments. + +2015-08-20 Bob Friesenhahn + + * tools/CMakeLists.txt, port/snprintf.c: Patch by Roger Leigh to + fix build issues when using Cmake due to Windows large file + changes. + +2015-08-18 Bob Friesenhahn + + * libtiff/tiffiop.h: First cut at supporting large files under + Microsoft Windows using tif_unix.c and the libtiff tools. This + only works if the Windows CDK is new enough to support the APIs + used (Visual C++ 2005 or later). Support for large files is not + actually tested yet. + +2015-08-15 Bob Friesenhahn + + * libtiff/tif_jpeg.c: Applied patch by Räisä Olli to assure that + client_data is initialized to a known value, and to report an + error on two memory allocation failures. + +2015-08-13 Bob Friesenhahn + + * CMakeLists.txt: Applied patch by Roger Leigh to fix libtiffxx + symbol versioning. Patch was mailed to libtiff list on Thu, 13 + Aug 2015. + +2015-07-04 Bob Friesenhahn + + * cmake: Add d suffix to debug libraries with MSVC. Patch #3 of 3 + by Roger Leigh posted to tiff list on Wed, 1 Jul 2015 15:58:20 + +0100. + + * cmake: Add extra warning flags. Patch #2 of 3 by Roger Leigh + posted to tiff list on Wed, 1 Jul 2015 15:58:20 +0100. + + * cmake: Correct snprintf fallback for VS2015. Patch #1 of 3 by + Roger Leigh posted to tiff list on Wed, 1 Jul 2015 15:58:20 +0100. + +2015-06-24 Bob Friesenhahn + + * CMakeLists.txt: Add CMake patchset by Roger Leigh as posted to + libtiff mailing list on Mon, 22 Jun 2015 21:21:01 +0100. Several + corrections to ensure that the autotools build still works were + added by me. I have not yet tested the build using 'cmake' or + MSVC with 'nmake'. + +2015-06-21 Bob Friesenhahn + + * test/Makefile.am: tiff2rgba-quad-tile.jpg.sh depends on the JPEG + library so only execute if JPEG is available. + + * libtiff 4.0.4 released. + + * configure.ac: Add a HAVE_FOO Automake conditional for each + add-on library. + + * test/Makefile.am (JPEG_DEPENDENT_CHECK_PROG): raw_decode + requires JPEG support to compile. Use Automake conditional to + only include it when JPEG support is available. + + * html/build.html: Try to improve the nmake-based VC++ build + description. + + * libtiff/tiffconf.vc.h: Build fixes based on testing. + + * libtiff/tif_config.vc.h: Build fixes based on testing. + + * libtiff/libtiff.def: TIFFRasterScanline does not exist so remove + export for it. + +2015-06-20 Bob Friesenhahn + + * libtiff/tif_config.vc.h: Make adjustments to match the new + definitions that configure produces, including for WIN64. Still + needs to be tested. + + * configure.ac: For 64-bit MinGW, fix SSIZE_FORMAT formatting + specifier. 64-bit MinGW supports 'long long' but support for + 'lld' is not assured by the run-time DLLs and so GCC warns. + Add TIFF_SIZE_T and TIFF_SIZE_FORMAT to provide a type definition + and printf format specifier to deal with printing values of + 'size_t' type. In particular, this was necessary for WIN64. + Added a configure test for if the system headers provide 'optarg' + (normal case) and block out the many explicit 'extern' statements + in the utilities. This was found to be necessary under Windows + when getopt is in a DLL and the symbols are already imported with + dllimport via standard header files. + + * test/raw_decode.c (XMD_H): Avoid conflicting typedefs for INT32 + and boolean in MinGW build due to including jpeglib.h. + + * test/rewrite_tag.c (main): Fix problem with location of variable + declaration. + + * libtiff/libtiff.def: Added exports for TIFFGetConfiguredCODECs, + TIFFReadRGBAImageOriented, TIFFSetCompressionScheme, + TIFFSwabArrayOfTriples, TIFFVGetFieldDefaulted, _TIFFCheckRealloc, + TIFFRasterScanline, TIFFSetErrorHandlerExt, + TIFFSetWarningHandlerExt, TIFFNumberOfDirectories, + TIFFCreateCustomDirectory, TIFFCreateEXIFDirectory, + TIFFWriteCustomDirectory, _TIFFRewriteField as recommended by + Roger Leigh and justified by use in libtiff tests, documentation, + and changelog notes. Also sorted symbol list and removed + duplicate entries. + +2015-06-16 Bob Friesenhahn + + * libtiff/tif_getimage.c: Fix four Coverity issues related to + unintended sign extension. + +2015-06-16 Even Rouault + + * libtiff/tif_unix.c: fix compilation with MSVC (fix by Jeff McKenna) + +2015-06-14 Lee Howard + + * libtiff/tif_unix.c: contribution from Vadim Zeitlin on + Bugzilla Bug #2510 fixes several harmless but still annoying + warnings + + * configure: contribution from Ludolf Holzheid on Bugzilla + Bug #2498. Adds an option to select the file I/O style on + Windows hosts. + + * libtiff/tif_getimage.c: contribution from Gary Cramblitt + on Bugzilla Bug #2409. Correct reading of certain tiled TIFFs. + + * configure, configure.ac: contribution from Marcos H. Woehrmann + on Bugzilla Bug #2405. Correct shell equality operator. + + * tools/tiffgt.c (raster_draw): contribution from Jay Berkenbilt + on Bugzilla Bug #2401. Appropriately call glFlush(). + + * tools/tiff2pdf.c: change ColorTransform from "0" to "1" + following Bugzilla Bug #2150. + +2015-06-13 Lee Howard + + * libtiff/tif_lzw.c: contribution from Andy Cave - decode + files that contain consecutive CODE_CLEAR codes. + + * tools/tiff2pdf.c: contribution from Antti S. Lankila on + Bugzilla Bug #2078. Suppress initial output of the header. + + * tools/tiff2pdf.c: contribution from Yuriy M. Kaminskiy - + Take care in using the return value from snprintf(). + + * tools/tiffcrop.c: contribution from Eduardo Robles Elvira - + correctly copy the compression tag from the source TIFF. + + * tools/tiff2ps.c: contribution from Eduardo Robles Elvira - + correct sizing and scaling problems with output document. + +2015-06-10 Bob Friesenhahn + + * libtiff/tif_jpeg.c (JPEGDecode): Split JPEGDecode() into two + clean implementations in order to avoid pre-processor hell. Only + one of the implementations is used in a given build. + +2015-06-08 Even Rouault + + * libtiff/tif_jpeg.c: Fix compilation in BITS_IN_JSAMPLE == 12 + case + +2015-06-07 Bob Friesenhahn + + * libtiff/tif_write.c (TIFFWriteEncodedStrip): Fix Coverity 715975 + "Division or modulo by zero". + (TIFFWriteEncodedTile): Fix Coverity 715976 and 715977 "Division + or modulo by zero". + (TIFFWriteRawStrip): Fix Coverity 715978 "Division or modulo by + zero". + (TIFFWriteScanline): Fix Coverity 715979 "Division or modulo by + zero". + + * libtiff/tif_read.c (TIFFStartTile): Fix Coverity 715973 and + 715974 "Division or modulo by zero". + +2015-05-31 Bob Friesenhahn + + * libtiff/tif_dir.c (TIFFNumberOfDirectories): Quiet Coverity + 1134470 "Logically dead code" by making the roll-over check + explicit. + + * libtiff/tif_luv.c (LogLuvDecodeTile): Fix Coverity 991227 + "Division or modulo by zero". + (LogLuvDecodeStrip): Fix Coverity 991239 "Division or modulo by + zero". + (LogLuvEncodeStrip): Fix Coverity 991240 "Division or modulo by + zero". + (LogLuvEncodeTile): Fix Coverity 991241 "Division or modulo by + zero". + + * libtiff/tif_dirread.c (TIFFReadDirEntryDoubleArray): Fix + Coverity 298626 "Logically dead code". + (TIFFReadDirEntryFloatArray): Fix Coverity 298627 "Logically dead + code". + (TIFFReadDirEntryIfd8Array): Fix Coverity 298628 "Logically dead + code". + (TIFFReadDirEntrySlong8Array): Fix Coverity 298629 "Logically dead + code" + + * libtiff/tif_dir.c (TIFFNumberOfDirectories): Don't depend on ++ + operator precedenc in evaluation. Might quench Coverity 1134470 + "Logically dead code". + + * libtiff/tif_jpeg.c (JPEGDecode): Fix Coverity 602597 "Operands + don't affect result". This change uses ifdefs to include + applicable code based on properties of libjpeg. Still needs to be + re-tested with 12-bit "6b" and "MK1". + +2015-05-30 Bob Friesenhahn + + * libtiff/tif_dirwrite.c (_TIFFRewriteField): Fix Coverity 1024310 + "Resource leak". + + * libtiff/tif_ojpeg.c (OJPEGReadHeaderInfoSecStreamDht): Fix + Coverity 601720 "Resource leak". + + * libtiff/tif_jpeg.c (JPEGCleanup): Fix Coverity 298624 + "Dereference before null check". + + * libtiff/tif_ojpeg.c (OJPEGReadBufferFill): Fix Coverity 603400 + "Missing break in switch". + + * contrib/addtiffo/tif_overview.c (TIFF_DownSample): Check buffer + size calculation for overflow. + + * contrib/addtiffo/addtiffo.c (main): Possibly address Coverity + 1024226 "Untrusted value as argument". + + * tools/gif2tiff.c (readgifimage): Fix Coverity 1024222 "Untrusted + value as argument". + (checksignature): Fix Coverity 1024894 "Ignoring number of bytes + read". + (readextension): Fix Coverity 1024893 "Ignoring number of bytes + read". + (readgifimage): Fix Coverity 1024890 "Ignoring number of bytes + read". + (readraster): Fix Coverity 1024891 "Ignoring number of bytes + read". + (readgifimage): Fix Coverity 1024892 "Ignoring number of bytes + read". + + * tools/tiff2pdf.c (t2p_readwrite_pdf_image): Fix Coverity 1024181 + "Structurally dead code". + + * tools/raw2tiff.c (main): Fix Coverity 1024887 "Unchecked return + value from library". + (guessSize): Fix Coverity 1024888 "Unchecked return value from + library". + (guessSize): Fix Coverity 1214162 "Ignoring number of bytes read". + (guessSize): Fix Coverity 1024889 "Unchecked return value from + library". + + * tools/tiff2pdf.c (t2p_readwrite_pdf_image): Fix Coverity 298621 + "Resource leak". + (t2p_readwrite_pdf_image): Fix Coverity 1024181 "Structurally dead + code". + (t2p_write_pdf): Fix Coverity 1227690 "Unused value". + +2015-05-29 Bob Friesenhahn + + * contrib/iptcutil/iptcutil.c (formatIPTC): Fix Coverity 1024468 + "Infinite loop". + (formatIPTC): Fix Coverity 1024727 "Truncated stdio return value". + (formatIPTC): Fix Coverity 1214240 "Untrusted loop bound". + +2015-05-28 Bob Friesenhahn + + * contrib/addtiffo/tif_ovrcache.c (TIFFCreateOvrCache): Fix + Coverity 298615 "Resource leak". + (TIFFGetOvrBlock): Fix Coverity 1024649 "Unintended sign + extension". + + * tools/bmp2tiff.c (main): Fix Coverity 1024225 "Untrusted value + as argument". + (main): Fix Coverity 1024678 "Unchecked return value from + library". + (main): Fix Coverity 1024679 "Unchecked return value from + library". + (main): Fix Coverity 1214160 "Ignoring number of bytes read". + + * contrib/addtiffo/tif_ovrcache.c (TIFFCreateOvrCache): Fix + Coverity 298615 "Resource leak". + + * tools/tiffcp.c: Fix Coverity 1024306, 1024307, 1024308, 1024309 + "Resource leak". + + * tools/tiffsplit.c (cpTiles): Fix Coverity 1024304 "Resource + leak". + (cpStrips): Fix Coverity 1024305 "Resource leak". + +2015-05-27 Bob Friesenhahn + + * tools/ras2tiff.c: Fix Sun Raster header definition to be safe + for 64-bit systems. Add some header validations. Should fix many + Coverity issues. + (main): Fix Coverity 1301206: "Integer handling issues (BAD_SHIFT)". + (main): Quiet Coverity 1024223 "Untrusted value as argument". + + * tools/tiffmedian.c (GetInputLine): Fix Coverity 1024795 "Nesting + level does not match indentation". + (get_histogram): Quiet Coverity 1024386 "Out-of-bounds read". + This was a benign mis-diagnosis but added code to enforce against + buffer overflow. + + * tools/tiffcrop.c (ROTATE_ANY): Fix Coverity 1294542 "Logical + vs. bitwise operator". + (readContigStripsIntoBuffer): Fix Coverity 1024545 "Division or + modulo by zero". + (readContigTilesIntoBuffer): Fix Coverity 1024586 "Logically dead + code". + (writeSingleSection): Fix Coverity 1024796 "Nesting level does not + match indentation". + (writeCroppedImage): Fix Coverity 1024797 "Nesting level does not + match indentation". + (loadImage): Fix Coverity 1299741 "Dereference before null check". + (loadImage): Fix Coverity 1299740 "Out-of-bounds write". + +2015-03-02 Even Rouault + + * tools/tiffdither.c: check memory allocations to avoid writing to + NULL pointer. Also check multiplication overflow. Fixes #2501, + CVE-2014-8128. Derived from patch by Petr Gajdos. + +2015-01-26 Even Rouault + + * add html/v4.0.4beta.html under version control + * HOWTO-RELEASE: write that cvs add html/vX.X.html must be used + +2015-01-26 Even Rouault + + * libtiff 4.0.4beta released + +2015-01-26 Even Rouault + + * automake: updated to 1.15 + * libtool: updated to 2.4.5 + +2015-01-22 Even Rouault + + * tools/tiff2pdf.c: Fix two crashes (oCERT-2014-013) + +2015-01-05 Frank Warmerdam + + * html/bugs.html: remove note about needing to email the tiff mailing + list administrator about being approved for membership, this appears + not to be true. + +2015-01-05 Olivier Paquet + + * tools/tiff2pdf.c: Fixed unsigned integer addition overflow detection. + +2015-01-03 Even Rouault + + * libtiff/tif_dirread.c: in TIFFCheckDirOffset(), avoid uint16 overflow + when reading more than 65535 directories, and effectively error out when + reaching that limit. + +2014-12-29 Even Rouault + + * libtiff/tif_jpeg.c: in JPEGFixupTags(), recognize SOF2, SOF9 and SOF10 + markers to avoid emitting a warning (even if, according to the TechNote, + there are admittedly unusual/not recommended or even forbidden variants, but + they do work well with libjpeg for SOF2, and with libjpeg-turbo for SOF2, + SOF9 and SOF10). + Define in_color_space and input_components to the right values in + JPEGSetupEncode(), before calling jpeg_set_defaults(), as specified by + libjpeg API documentation, so as to be compatible with mozjpeg library. + Note: the default settings of mozjpeg will produce progressive scans, which + is forbidden by the TechNote. + +2014-12-29 Even Rouault + + * libtiff/tif_getimage.c: move test on vertical value of YCbCr subsampling. + to avoid buffer leak (fix previous fix, found by Coverity scan) + +2014-12-29 Even Rouault + + * libtiff/tif_next.c: add new tests to check that we don't read outside of + the compressed input stream buffer. + + * libtiff/tif_getimage.c: in OJPEG case, fix checks on strile width/height + in the putcontig8bitYCbCr42tile, putcontig8bitYCbCr41tile and + putcontig8bitYCbCr21tile cases. + +2014-12-27 Even Rouault + + * libtiff/tif_dir.c: in TIFFDefaultDirectory(), reset any already existing + extented tags installed by user code through the extender mechaninm before + calling the extender callback (GDAL #5054) + +2014-12-26 Bob Friesenhahn + + * tools/tiffcrop.c: Fix warnings about variables set but not used. + + * contrib/iptcutil/iptcutil.c: Fix warnings about variables set + but not used. + + * tools/tiffgt.c: Fix warnings about unused parameters. + + * libtiff/tif_stream.cxx: Fix warnings about unused parameters. + +2014-12-25 Even Rouault + + * libtiff/tif_getimage.c, libtiff/tif_ojpeg.c, libtiff/tif_zip.c: fix + various typos found by Debian lintian tool (GDAL #5756) + +2014-12-24 Even Rouault + + * libtiff/tif_getimage.c: avoid divide by zero on invalid YCbCr subsampling. + http://bugzilla.maptools.org/show_bug.cgi?id=2235 + +2014-12-24 Even Rouault + + * tools/tiff2pdf.c: fix buffer overflow on some YCbCr JPEG compressed images. + http://bugzilla.maptools.org/show_bug.cgi?id=2445 + +2014-12-24 Even Rouault + + * tools/tiff2pdf.c: fix buffer overflow on YCbCr JPEG compressed image. + Derived from patch by Petr Gajdos, + http://bugzilla.maptools.org/show_bug.cgi?id=2443 + +2014-12-23 Even Rouault + + * libtiff/tif_dirread.c: In EstimateStripByteCounts(), check return code + of _TIFFFillStriles(). This solves crashing bug on corrupted + images generated by afl. + +2014-12-23 Even Rouault + + * libtiff/tif_read.c: fix several invalid comparisons of a uint64 value with + <= 0 by casting it to int64 first. This solves crashing bug on corrupted + images generated by afl. + +2014-12-21 Bob Friesenhahn + + * tools/tiffdump.c: Guard against arithmetic overflow when + calculating allocation buffer sizes. + +2014-12-21 Even Rouault + + * tools/tiff2bw.c: when Photometric=RGB, the utility only works if + SamplesPerPixel = 3. Enforce that + http://bugzilla.maptools.org/show_bug.cgi?id=2485 (CVE-2014-8127) + +2014-12-21 Even Rouault + + * tools/pal2rgb.c, tools/thumbnail.c: fix crash by disabling TIFFTAG_INKNAMES + copying. The right fix would be to properly copy it, but not worth the burden + for those esoteric utilities. + http://bugzilla.maptools.org/show_bug.cgi?id=2484 (CVE-2014-8127) + +2014-12-21 Even Rouault + + * tools/thumbnail.c: fix out-of-buffer write + http://bugzilla.maptools.org/show_bug.cgi?id=2489 (CVE-2014-8128) + +2014-12-21 Even Rouault + + * tools/thumbnail.c, tools/tiffcmp.c: only read/write TIFFTAG_GROUP3OPTIONS + or TIFFTAG_GROUP4OPTIONS if compression is COMPRESSION_CCITTFAX3 or + COMPRESSION_CCITTFAX4 + http://bugzilla.maptools.org/show_bug.cgi?id=2493 (CVE-2014-8128) + +2014-12-21 Even Rouault + + * libtiff/tif_next.c: check that BitsPerSample = 2. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2487 (CVE-2014-8129) + +2014-12-21 Even Rouault + + * tools/tiff2pdf.c: check return code of TIFFGetField() when reading + TIFFTAG_SAMPLESPERPIXEL + +2014-12-21 Even Rouault + + * tools/tiffcp.c: fix crash when converting YCbCr JPEG-compressed to none. + Based on patch by Tomasz Buchert (http://bugzilla.maptools.org/show_bug.cgi?id=2480) + Description: fix for Debian bug #741451 + tiffcp crashes when converting JPEG-encoded TIFF to a different + encoding (like none or lzw). For example this will probably fail: + tiffcp -c none jpeg_encoded_file.tif output.tif + The reason is that when the input file contains JPEG data, + the tiffcp code forces conversion to RGB space. However, + the output normally inherits YCbCr subsampling parameters + from the input, which leads to a smaller working buffer + than necessary. The buffer is subsequently overrun inside + cpStripToTile() (called from writeBufferToContigTiles). + Note that the resulting TIFF file would be scrambled even + if tiffcp wouldn't crash, since the output file would contain + RGB data intepreted as subsampled YCbCr values. + This patch fixes the problem by forcing RGB space on the output + TIF if the input is JPEG-encoded and output is *not* JPEG-encoded. + Author: Tomasz Buchert + +2014-12-21 Even Rouault + + Fix various crasher bugs on fuzzed images. + * libtiff/tif_dir.c: TIFFSetField(): refuse to set negative values for + TIFFTAG_XRESOLUTION and TIFFTAG_YRESOLUTION that cause asserts when writing + the directory + * libtiff/tif_dirread.c: TIFFReadDirectory(): refuse to read ColorMap or + TransferFunction if BitsPerSample has not yet been read, otherwise reading + it later will cause user code to crash if BitsPerSample > 1 + * libtiff/tif_getimage.c: TIFFRGBAImageOK(): return FALSE if LOGLUV with + SamplesPerPixel != 3, or if CIELAB with SamplesPerPixel != 3 or BitsPerSample != 8 + * libtiff/tif_next.c: in the "run mode", use tilewidth for tiled images + instead of imagewidth to avoid crash + * tools/bmp2tiff.c: fix crash due to int overflow related to input BMP dimensions + * tools/tiff2pdf.c: fix crash due to invalid tile count (should likely be checked by + libtiff too). Detect invalid settings of BitsPerSample/SamplesPerPixel for CIELAB / ITULAB + * tools/tiffcrop.c: fix crash due to invalid TileWidth/TileHeight + * tools/tiffdump.c: fix crash due to overflow of entry count. + +2014-12-15 Even Rouault + + * libtiff/tif_jpeg.c: Fix regression introduced on 2010-05-07 that caused + all tiles/strips to include quantization tables even when the jpegtablesmode + had the JPEGTABLESMODE_QUANT bit set. + Also add explicit removal of Huffman tables when jpegtablesmode has the + JPEGTABLESMODE_HUFF bit set, which avoids Huffman tables to be emitted in the + first tile/strip (only useful in update scenarios. create-only was + fine) + +2014-12-09 Bob Friesenhahn + + * tools/tiff2pdf.c: Assure that memory size calculations for + _TIFFmalloc() do not overflow the range of tmsize_t. + +2014-12-07 Even Rouault + + * tools/thumbnail.c, tools/tiffcrop.c: "fix" heap read over-run found with + Valgrind and Address Sanitizer on test suite + +2014-12-07 Bob Friesenhahn + + * tools/tiff2pdf.c (t2p_read_tiff_init): TIFFTAG_TRANSFERFUNCTION + tag can return one channel, with the other two channels set to + NULL. The tiff2pdf code was expecting that other two channels + were duplicate pointers in the case where there is only one + channel. Detect this condition in order to avoid a crash, and + presumably perform correctly with just one channel. + +2014-12-06 Bob Friesenhahn + + * tools/tiffdump.c: Fix double-free bug. + +2014-11-27 Even Rouault + + * libtiff/tif_config.vc.h: no longer use "#define snprintf _snprintf" with + Visual Studio 2015 aka VC 14 aka MSVC 1900 + +2014-11-20 Even Rouault + + * libtiff/tif_lzw.c: prevent potential null dereference of + sp->dec_codetab in LZWPreDecode (bug #2459) + + * libtiff/tif_read.c: in TIFFReadBufferSetup(), avoid passing -1 size + to TIFFmalloc() if passed user buffer size is 0 (bug #2459) + + * libtiff/tif_ojpeg.c: make Coverity happier (not a bug, #2459) + + * libtiff/tif_dir.c: in _TIFFVGetField() and _TIFFVSetField(), make + Coverity happier (not a bug, #2459) + + * libtiff/tif_dirread.c: in TIFFFetchNormalTag(), make Coverity happier + (not a bug, #2459) + + * tools/tiff2pdf.c: close PDF file (bug #2479) + + * tools/fax2ps.c: check malloc()/realloc() result (bug #2470) + + * tools/tiffdump.c: detect cycle in TIFF directory chaining (bug #2463) + and avoid passing a NULL pointer to read() if seek() failed before (bug #2459) + + * tools/tiffcrop.c: fix segfault if bad value passed to -Z option + (bug #2459) and add missing va_end in dump_info (#2459) + + * tools/gif2tif.c: apply patch for CVE-2013-4243 (#2451) + +2014-11-20 Even Rouault + * libtiff/tif_jpeg.c: fix segfault in JPEGFixupTagsSubsampling() on + corrupted image where tif->tif_dir.td_stripoffset == NULL (bug #2471) + +2014-11-20 Even Rouault + * automake: updated to 1.14.1 + * libtool: updated to 2.4.3 + * HOWTO-RELEASE: small update about autotools building order + +2014-10-20 Olivier Paquet + * tools/tiff2pdf.c: Preserve input file directory order when pages + are tagged with the same page number. + +2014-08-31 Bob Friesenhahn + + * libtiff/tif_dirread.c (TIFFReadDirEntryOutputErr): Incorrect + count for tag should be a warning rather than an error since + errors terminate processing. + +2014-06-07 Bob Friesenhahn + + * tools/tiff2rgba.c (]): Fixed tiff2rgba usage message in that zip + was wrongly described. Fix suggested by Miguel Medalha. + +2014-05-06 Bob Friesenhahn + + * libtiff/tif_dirinfo.c (TIFFField) : Fix data type for + TIFFTAG_GLOBALPARAMETERSIFD tag. Patch by Steve Underwood. + Reviewed and forwarded by Lee Howard. + +2013-11-30 Frank Warmerdam + + * libtiff/tif_dir.c: fix last fix for TIFFNumberOfDirectories() + +2013-10-21 Frank Warmerdam + + * libtiff/tif_dir.c: generate error in case of directory count + overflow. + +2013-10-01 Frank Warmerdam + + * libtiff/tiff.h, libtiff/tif_dirinfo.c: add definitions for + TIFF/EP CFARepeatPatternDim and CFAPattern tags (bug #2457) + +2013-09-12 Bob Friesenhahn + + * libtiff/tif_dir.c (TIFFAdvanceDirectory): If nextdir is found to + be defective, then set it to zero before returning error in order + to terminate processing of truncated TIFF. Issue found and fix + suggested by Richard Nolde. + +2013-08-14 Frank Warmerdam + + * tools/gif2tiff.c: fix possible OOB write (#2452, CVE-2013-4244) + +2013-08-13 Frank Warmerdam + + * tools/gif2tiff.c: Be more careful about corrupt or + hostile input files (#2450, CVE-2013-4231) + + * tools/tiff2pdf.c: terminate after failure of allocating + ycbcr buffer (bug #2449, CVE-2013-4232) + +2013-07-09 Frank Warmerdam + + * tools/tiffinfo.c: Default various values fetched with + TIFFGetField() to avoid being uninitialized. + +2013-05-02 Tom Lane + + * tools/tiff2pdf.c: Rewrite JPEG marker parsing in + t2p_process_jpeg_strip to be at least marginally competent. The + approach is still fundamentally flawed, but at least now it won't + stomp all over memory when given bogus input. Fixes CVE-2013-1960. + +2013-05-02 Tom Lane + + * contrib/dbs/xtiff/xtiff.c, libtiff/tif_codec.c, + libtiff/tif_dirinfo.c, tools/rgb2ycbcr.c, tools/tiff2bw.c, + tools/tiff2pdf.c, tools/tiff2ps.c, tools/tiffcrop.c, + tools/tiffdither.c: Enlarge some fixed-size buffers that weren't + large enough, and eliminate substantially all uses of sprintf(buf, + ...) in favor of using snprintf(buf, sizeof(buf), ...), so as to + protect against overflow of fixed-size buffers. This responds in + particular to CVE-2013-1961 concerning overflow in tiff2pdf.c's + t2p_write_pdf_page(), but in general it seems like a good idea to + deprecate use of sprintf(). + +2013-03-29 Bob Friesenhahn + + * configure.ac: Applied patch by Brad Smith to improve pkg-config + static linking by adding -lm to Libs.private when needed. + +2013-03-05 Tom Lane + + * html/man/tiff2ps.1.html, html/man/tiffcp.1.html, + html/man/tiffdither.1.html, man/tiff2ps.1, man/tiffcp.1, + man/tiffdither.1, tools/tiff2ps.c, tools/tiffcp.c, + tools/tiffdither.c: Sync tool usage printouts and man pages with + reality (quite a few options had escaped being documented in one + or both places). Per an old report from Miroslav Vadkerti. + +2013-01-25 Bob Friesenhahn + + * tools/tiff2ps.c:Fix bug in auto rotate option code. Once a + rotation angle was set by the auto rotate check, it was retained + for all pages that followed instead ofa being retested for each + page. Patch by Richard Nolde. + +2013-01-18 Frank Warmerdam + + * libtiff/tif_write.c: tmsize_t related casting warning fixed for + 64bit linux. + + * libtiff/tif_read.c: uint64/tmsize_t change for MSVC warnings. + http://bugzilla.maptools.org/show_bug.cgi?id=2427 + +2012-12-20 Tom Lane + + * test/raw_decode.c: Relax raw_decode's pixel-value checks so that + it will pass with more versions of libjpeg. (There are at least + three in active use now, and JPEG_LIB_VERSION doesn't tell us + enough to uniquely identify expected results.) + +2012-12-12 Tom Lane + + * libtiff/tif_print.c: Fix TIFFPrintDirectory's handling of + field_passcount fields: it had the TIFF_VARIABLE and + TIFF_VARIABLE2 cases backwards. + +2012-12-10 Tom Lane + + * tools/ppm2tiff.c: Improve previous patch for CVE-2012-4564: + check the linebytes calculation too, get the max() calculation + straight, avoid redundant error messages, check for malloc + failure. + +2012-12-10 Tom Lane + + * libtiff/tif_pixarlog.c: Improve previous patch for CVE-2012-4447 + (to enlarge tbuf for possible partial stride at end) so that + overflow in the integer addition is detected. Per gripe from + Huzaifa Sidhpurwala. + +2012-12-03 Bob Friesenhahn + + * tools/tiffset.c: tiffset now supports a -u option to unset a + tag. Patch by Zach Baker. See + http://bugzilla.maptools.org/show_bug.cgi?id=2419 + +2012-11-18 Bob Friesenhahn + + * automake: Update Automake to 1.12.5 release. + + * libtiff/tif_{unix,vms,win32}.c (_TIFFmalloc): ANSI C does not + require malloc() to return NULL pointer if requested allocation + size is zero. Assure that _TIFFmalloc does. + +2012-11-01 Frank Warmerdam + + * tools/ppm2tiff.c: avoid zero size buffer vulnerability. + CVE-2012-4564 - Thanks to Huzaifa Sidhpurwala of the + Red Hat Security Response team for the fix. + +2012-10-18 Frank Warmerdam + + * tif_zip.c: Avoid crash on NULL error messages. + +2012-09-22 Bob Friesenhahn + + * libtiff 4.0.3 released. + +2012-09-20 Bob Friesenhahn + + * Makefile.am: Update to Automake 1.12.4 + +2012-08-19 Bob Friesenhahn + + * Makefile.in: Update to Automake 1.12.3 + + * libtiff{tiff.h, tif_print.c, tif_dirinfo.c, tif_dirread.c}: Add + some TIFF/FX support in libtiff. Add the tag definitions to + tiff.h. Add the related TIFF field definitions to tif_dirinfo.c, + and also fixes an error in a comment. Adds the photometric values + to tif_print.c, and fixes a bug. These changes are by Steve + Underwood. + +2012-08-13 Frank Warmerdam + + * libtiff/tif_write.c: Fix bug rewriting image tiles in a + compressed file: http://trac.osgeo.org/gdal/ticket/4771 + +2012-08-02 Frank Warmerdam + + * libtiff/tif_dirread.c: report error in case of mismatch value + counts for tags (ie. DotRange). + +2012-07-26 Tom Lane + + * libtiff/{tiffio.h, tif_dirinfo.c, libtiff.def}: Add six new + functions TIFFFieldTag(), TIFFFieldName(), TIFFFieldDataType(), + TIFFFieldPassCount(), TIFFFieldReadCount(), TIFFFieldWriteCount() + as external accessors for the opaque type TIFFField. + + * tools/tiffset.c: Make tiffset use the above functions instead of + relying on library private headers. + +2012-07-19 Tom Lane + + * tools/tiff2pdf.c: Fix two places where t2p_error didn't get set + after a malloc failure. No crash risk AFAICS, but the program + might not report exit code 1 as desired. h/t mancha@mac.hush.com + +2012-07-18 Tom Lane + + * tools/tiff2pdf.c: Fail when TIFFSetDirectory() fails. This + prevents core dumps or perhaps even arbitrary code execution when + processing a corrupt input file (CVE-2012-3401). + +2012-07-06 Bob Friesenhahn + + * test/raw_decode.c (main): Test fixes to work with IJG JPEG 7+. + IJG JPEG 7+ uses a different upsampling algorithm which produces + different numeric results. + + * libtiff/tif_jpeg.c (JPEGPreDecode): Patch from Even Rouault to + work with IJG JPEG 7+. + +2012-07-04 Bob Friesenhahn + + * test/raw_decode.c: Add changes so that test can run with build + directory outside of source directory. + +2012-07-02 Frank Warmerdam + + * libtiff/tif_jpeg.c: Fix handling when writing RGBA jpeg compressed + imagery (http://trac.osgeo.org/gdal/ticket/4732) + +2012-06-20 Frank Warmerdam + + * libtiff/tif_fax3.c: fix memory initialization of runs, only + partly done. + + * libtiff/tif_pixarlog.c: Make sure tbuf is large enough for one + full "stride" past the end. + +2012-06-19 Frank Warmerdam + + * libtiff/tif_packbits.c: fix read past end of data buffer. + +2012-06-15 Frank Warmerdam + + * libtiff 4.0.2 released. + + * tools/tif2pdf.c, tools/tifdump.c: avoid unitialized variable + warnings with clang. + +2012-06-15 Tom Lane + + * tools/tiff2pdf.c: Defend against integer overflows while + calculating required buffer sizes (CVE-2012-2113). + +2012-06-12 Frank Warmerdam + + * libtiff/tif_print.c: Be careful about printing corrupt inknames. + + * libtiff/tif_fax3.c: Ensure runs array is initialized to zeros. + +2012-06-07 Frank Warmerdam + + * libtiff/tif_print.c: avoid pretty printing other fields when + we don't have the proper amount and type of data or if the field + is actually autodefined. + +2012-06-05 Frank Warmerdam + + * libtiff/tif_tile.c, libtiff/tif_strip.c: Ensure that illegal + ycbcrsubsampling values result in a runtime error, not just an + assertion. + + * tests/custom_dir.c: Add testing of EXIF and custom directory + reading and writing. + + * libtiff/tif_dir.c, libtiff/tiffio.h: Add TIFFCreateCustomDirectory() + and TIFFCreateEXIFDirectory() functions. + + * libtiff/tif_dir.c, tif_print.c : Remove FIELD_CUSTOM handling for + PAGENUMBER, HALFTONEHINTS, and YCBCRSUBSAMPLING. Implement DOTRANGE + differently. This is to avoid using special TIFFGetField/TIFFSetField + rules for these fields in non-image directories (like EXIF). + +2012-06-04 Frank Warmerdam + + * libtiff/tif_jpeg.c: Remove code for fixing up h_sampling and v_sampling + in JPEGPreDecode(). If a fixup will be done it needs to be done sooner + in JPEGFixupTagsSubsampling() or else buffer sized may be wrong. + +2012-06-01 Frank Warmerdam + + * tools/tiffinfo.c: Do not try to read image data in EXIF directories. + + * libtiff/tif_getimage.c: added support for _SEPARATED CMYK images. + http://bugzilla.maptools.org/show_bug.cgi?id=2379 + + * libtiff/tif_unix.c: use strerror() to return a more specific error message + on failed open. + http://bugzilla.maptools.org/show_bug.cgi?id=2341 + + * libtiff/tif_jpeg.c: Fix JPEGDecodeRaw() bugs. + http://bugzilla.maptools.org/show_bug.cgi?id=2386 + + * tests/decode_raw.c, tests/images/quad-tile.jpg.tiff: add limited support + for testing jpeg in tiff image decoding including the "raw" decode interface. + +2012-05-31 Frank Warmerdam + + * libtiff/tif_jpeg.c: avoid overrunning the end of the output buffer in + JPEGDecodeRaw() - mostly likely to occur when there is confusion about + sampling values. + + * libtiff/tif_read.c: Make sure tif_rawdatasize is cleared when tif_rawdata is freed. + + * libtiff/tif_getimage.c: Add support for greyscale+alpha c/o Jérémie Laval. + http://bugzilla.maptools.org/show_bug.cgi?id=2398 + +2012-05-29 Frank Warmerdam + + * libtiff/tif_dir.c: avoid using specific set/get logic to process fields in custom directories, + like EXIF directories. This fixes problems like a tag "320" existing in a custom directory getting + processed as if it were a colormap when it isn't really. Damn the wide variety of argument formulations + to get/set functions for different tags! + + * libtiff/tif_dir.c: Ensure that we keep track of when tif_rawdata + is a pointer into an mmap()ed file via TIFF_BUFFERMMAP flag. + +2012-05-24 Frank Warmerdam + + * libtiff/tif_pixarlog.c: Allocate working buffer one word larger since we "forward + accumulate" and overwrite the end by one word in at least some cases. + +2012-05-23 Frank Warmerdam + + * libtiff/tif_pixarlog.c: avoid accessing out of the lookup arrays for out of range inputs. + + * tools/tiffinfo.c: initialize h=0 to avoid undefined variable for degenerate files. + + * libtiff/tif_ojpeg.c: if OJPEGWriteHeader() fails once do not bother trying again on + the same image. + + * libtiff/tif_ojpeg.c: make things more resilient in the face of files without + stripbytecounts or stripoffsets or where loading these fails. + + * libtiff/tif_print.c: be careful about whether min/max values are singular + or one per sample. + + * libtiff/tif_print.c: Avoid confusion about count size when printing custom fields. + May affect things like ISOSpeedRatings. + + * libtiff/tif_dir.c: avoid one byte past end of ink names reading + in some cases. + +2012-05-19 Bob Friesenhahn + + * man/TIFFGetField.3tiff: Correct the 'count' field type in the + example for how to retrieve the value of unsupported tags. + +2012-03-30 Frank Warmerdam + + * tif_getimage.c: Fix size overflow (zdi-can-1221,CVE-2012-1173) + care of Tom Lane @ Red Hat. + +2012-02-18 Bob Friesenhahn + + * libtiff 4.0.1 released. + + * Update automake used to 1.11.3. + + * libtiff/tiffio.h: Use double-underbar syntax in GCC printf + attribute specification to lessen the risk of accidental macro + substitution. Patch from Vincent Torri. + +2012-01-31 Frank Warmerdam + + * libtiff/tif_dir.c, libtiff/tif_dirread.c: Extra caution around + assumption tag fetching is always successful. + + * libtiff/tif_jpeg.c: Extra caution for case where sp is NULL. + +2012-01-22 Bob Friesenhahn + + * configure.ac: Add support for using library symbol versioning on + ELF systems with the GNU linker. Support is enabled via + --enable-ld-version-script. Disabled by default for now until + there is a decision for how to deploy a libtiff with versioned + symbols after libtiff 4.0.0 was already released. + +2011-12-22 Bob Friesenhahn + + * libtiff/tif_win32.c: Eliminate some minor 64-bit warnings in + + tif_win32.c. Patch by Edward Lam. + + * configure.ac: Add libtiff private dependency on -llzma for + pkg-config. Patch by Mark Brand. + Updated Automake to 1.11.2. + +2011-12-21 Bob Friesenhahn + + * libtiff 4.0.0 released. + +2011-12-08 Frank Warmerdam + + * libtiff/tif_dirread.c, libtiff/tif_read.c: more cautious checking + of _TIFFFillStriles() results (#gdal 4372) + +2011-12-07 Frank Warmerdam + + * libtiff/tif_dirread.c: fixes to deal with invalid files where + _TIFFFillStriles() fails, and we try to chop up strips (gdal #4372) + + * libtiff/tif_dirread.c: fix error reporting when there is no + tag information struct and name (gdal #4373) + +2011-10-22 Bob Friesenhahn + + * Update GNU libtool to 2.4.2. + + * tools/tiffsplit.c (tiffcp): TIFFGetField count field should be + uint32 type for TIFFTAG_JPEGTABLES. Patch by Christophe + Deroulers. + +2011-06-21 Frank Warmerdam + + * libtiff/libtiff.def: Restore TIFFMergeFieldInfo. + +2011-05-31 Jim Meyering + + * libtiff/tif_dirread.c (TIFFFetchStripThing): Free "data" also + upon failure to allocate "resizeddata". + * tools/tiff2ps.c (PSDataBW): Zero buffer *after* checking for + allocation failure, not before. + * libtiff/tif_ojpeg.c: plug leaks on OJPEG read failure path + * tools/rgb2ycbcr.c (cvtRaster): unchecked malloc + * libtiff/tif_jpeg.c, tools/tiff2pdf.c, tools/tiff2ps.c: mark + NULL-deref and possible overflow + * tools/tiff2pdf.c: remove decl+set of set-but-not-used local, "written" + * libtiff/tif_jpeg.c (JPEGInitializeLibJPEG): Remove declaration + and set of otherwise unused local, data_is_empty. + * libtiff/tif_jpeg.c (JPEGDecodeRaw) [JPEG_LIB_MK1_OR_12BIT]: + Diagnose out-of-memory failure and return 0 rather than + dereferencing NULL. + +2011-05-24 Frank Warmerdam + + * libtiff/tif_dirread.c: produce special error message for zero tag + directories instead of error out on the malloc(0) failure. + +2011-05-16 Frank Warmerdam + + * libtiff/tif_dirinfo.c: Restore TIFFMergeFieldInfo() and + related declarations as they are in active use by libraries + such as libgeotiff, and work just fine. (#2315) + +2011-04-20 Frank Warmerdam + + * libtiff/tif_dirinfo.c,tiffio.h: Remove the obsolete + TIFFMergeFieldInfo/TIFFFindFieldInfo/TIFFFindFieldInfoByName API. + http://bugzilla.maptools.org/show_bug.cgi?id=2315 + + * libtiff/libtiff.def: add some missing (64bit) APIs. + http://bugzilla.maptools.org/show_bug.cgi?id=2316 + +2011-04-09 Bob Friesenhahn + + * libtiff 4.0.0beta7 released. + +2011-04-09 Bob Friesenhahn + + * configure.ac: Should use AC_CANONICAL_HOST since host specifies + the run-time target whereas target is used to specify the final + output target if the package is a build tool (like a compiler), + which libtiff is not. Resolves libtiff bug 2307 "Use + AC_CANONICAL_HOST macro". + +2011-04-02 Bob Friesenhahn + + * configure.ac: Support configuring TIFF_INT64_FORMAT and + TIFF_UINT64_FORMAT appropriately for MinGW32. + + * tools/tiffdump.c (ReadDirectory): MinGW32 needs to use WIN32 + printf conventions for 64-bit types because it uses the WIN32 CRT. + + * libtiff/{tif_dumpmode.c,tif_luv.c,tif_lzw.c,tif_print.c, + tif_read.c,tif_strip.c,tif_thunder.c}: MinGW32 needs to use WIN32 + printf conventions for 64-bit types because it uses the WIN32 CRT. + + * tools/tiff2pdf.c (t2p_write_pdf_string): Fix printf syntax not + understood by WIN32 CRT. + + * libtiff/tif_ojpeg.c: Fixes to compile with MinGW32 GCC. + + * tools/fax2ps.c (main): Use tmpfile() rather than mkstemp() since + it is much more portable. Tmpfile is included in ISO/IEC + 9899:1990 and the WIN32 CRT. + +2011-03-26 Frank Warmerdam + + * tools/tiffset.c: add -d and -sd switches to allow operation on + a particular directory, not just the first (jef). + +2011-03-21 Frank Warmerdam + + * libtiff/tif_thunder.c: Correct potential buffer overflow with + thunder encoded files with wrong bitspersample set. The libtiff + development team would like to thank Marin Barbella and TippingPoint's + Zero Day Initiative for reporting this vulnerability (ZDI-CAN-1004, + CVE-2011-1167). + http://bugzilla.maptools.org/show_bug.cgi?id=2300 + +2011-03-10 Frank Warmerdam + + * libtiff/tif_fax3.h: Fix to last change allowing zero length + runs at the start of a scanline - needed for legal cases. + +2011-03-02 Frank Warmerdam + + * libtiff/tif_fax3.h: Protect against a fax VL(n) codeword commanding + a move left. Without this, a malicious input file can generate an + indefinitely large series of runs without a0 ever reaching the right + margin, thus overrunning our buffer of run lengths. Per CVE-2011-0192. + This is a modified version of a patch proposed by Drew Yao of Apple + Product Security. It adds an unexpected() report, and disallows the + equality case, since emitting a run without increasing a0 still allows + buffer overrun. + +2011-02-23 Frank Warmerdam + + * libtiff/tif_jpeg.c: avoid divide by zero in degenerate case (#2296) + + * tools/tiff2rgba.c: close source file on error to make leak + detection easier. + + * libtiff/tif_getimage.c: avoid leaks if TIFFRGBAImageBegin() fails. + + http://bugzilla.maptools.org/show_bug.cgi?id=2295 + +2011-02-22 Frank Warmerdam + + * libtiff/tif_lzma.c: Maintain tif_rawcc/tif_rawcp (CHUNKY_STRING_READ + _SUPPORT) + +2011-02-18 Frank Warmerdam + + * configure.ac, configure: Added support for --enable-chunky-strip-read + configure option to enable the experimental feature from a couple + months ago for reading big strips in chunks. + + * configure.ac, tif_read.c, tif_readdir.c, tif_dir.h, tiffiop.h, + tif_write.c, tif_print.c, tif_jpeg.c, tif_dirwrite.c, tif_write.c: + Implement optional support for deferring the load of strip/tile + offset and size tags for optimized scanning of directories. Enabled + with the --enable-defer-strile-load configure option (DEFER_STRILE_LOAD + #define in tif_config.h). + +2011-02-11 Frank Warmerdam + + * libtiff/tif_print.c: remove unused variable. + +2011-02-09 Frank Warmerdam + + * libtiff/tif_win32.c: avoid error/warning buffer overrun problem + with non-console (popup message) builds on win32. + + http://bugzilla.maptools.org/show_bug.cgi?id=2293 + +2011-01-24 Olivier Paquet + + * libtiff/{tif_dir.{h,c}, tif_dirinfo.c, tif_dirread.c, tif_dirwrite.c, + tif_print.c, tiff.h, tiffiop.h} : Added support for + TIFFTAG_SMINSAMPLEVALUE and TIFFTAG_SMAXSAMPLEVALUE to have different + values for each sample. Presents the min/max of all samples by default for + compatibility. TIFFSetField/TIFFGetField can be made to handle those tags + as arrays by changing the new TIFFTAG_PERSAMPLE pseudo tag. + http://www.asmail.be/msg0055458208.html + +2011-01-06 Frank Warmerdam + + * libtiff/tif_pixarlog.c: Note that tif_rawcc/tif_rawcp are not + maintained. + + * libtiff/tif_zip.c: Maintain tif_rawcc/tif_rawcp when decoding + for CHUNKY_STRIP_READ_SUPPORT. + + * libtiff/tif_jpeg.c: ensure that rawcc and rawcp are maintained + during JPEGPreDecode and JPEGDecode calls. + * libtiff/tif_read.c: larger read ahead for CHUNKY_STRIP_READ_SUPPORT, + as compression formats like JPEG keep 16 lines interleaved in a sense + and might need to touch quite a bit of data. + + http://trac.osgeo.org/gdal/ticket/3894 + +2011-01-03 Lee Howard + + * libtiff/tif_jpeg.c: Fix regressions with 2 and 3 band images + caused by commit on 2010-12-14. Submitted by e-mail from + Even Rouault + +2010-12-31 Olivier Paquet + + * libtiff/tif_dirwrite.c: Fixed writing of TIFFTAG_REFERENCEBLACKWHITE. + http://bugzilla.maptools.org/show_bug.cgi?id=2266 + +2010-12-23 Andrey Kiselev + + * tools/tiffcp.c, man/tiffcp.1: Added support for specifying the + compression level parameter (preset) for Deflate and LZMA encoders, + e.g "-c lzma:p1" or "-c zip:p9". + + * libtiff/tif_lzma.c: Properly set the LZMA2 compression level + (preset) in LZMAVSetField(). + +2010-12-18 Bob Friesenhahn + + * libtiff/Makefile.am (libtiff_la_SOURCES): Added tif_lzma.c to + Makefile. + +2010-12-14 Andrey Kiselev + + * configure.ac, libtiff/{tif_codec.c, tif_config.h.in, tiff.h, + tiffiop.h, tif_lzma.c}, tools/tiffcp.c, man/tiffcp.1: Implement a new + TIFF compression scheme LZMA reserving a new value 34925 for + Compression tag. As per + bug http://bugzilla.maptools.org/show_bug.cgi?id=2221 + +2010-12-14 Lee Howard + + * libtiff/tif_dirread.c: tolerate some cases where + FIELD_COLORMAP is missing + http://bugzilla.maptools.org/show_bug.cgi?id=2189 + +2010-12-14 Lee Howard + + * libtiff/tif_read.c: change read_ahead to tmsize_t + http://bugzilla.maptools.org/show_bug.cgi?id=2222 + +2010-12-14 Lee Howard + + * configure.ac, libtiff/Makefile.am: Build tif_win32.c on + Windows except on Cygwin + http://bugzilla.maptools.org/show_bug.cgi?id=2224 + +2010-12-14 Lee Howard + + * tools/gif2tiff.c: fix buffer overrun + http://bugzilla.maptools.org/show_bug.cgi?id=2270 + +2010-12-14 Lee Howard + + * libtiff/tif_jpeg.c: reduce usage of JCS_UNKNOWN in order + to improve compatibility with various viewers + submitted by e-mail from Dwight Kelly + +2010-12-13 Lee Howard + + * tools/fax2ps.c: be consistent with page-numbering + http://bugzilla.maptools.org/show_bug.cgi?id=2225 + +2010-12-13 Lee Howard + + * libtiff/tif_color.c: prevent crash in handling bad TIFFs + resolves CVE-2010-2595 + http://bugzilla.maptools.org/show_bug.cgi?id=2208 + +2010-12-13 Lee Howard + + * tools/tiffcrop.c: new release by Richard Nolde + http://bugzilla.maptools.org/show_bug.cgi?id=2004 + +2010-12-12 Lee Howard + + * tools/tiff2pdf.c: fix colors for images with RGBA + interleaved data + http://bugzilla.maptools.org/show_bug.cgi?id=2250 + +2010-12-12 Lee Howard + + * libtiff/tif_dirread.c: fix for Zeiss LSM and Canon CR2 files + http://bugzilla.maptools.org/show_bug.cgi?id=2164 + +2010-12-11 Lee Howard + + * tools/tiff2pdf.c: remove invalid duplication for Lab + http://bugzilla.maptools.org/show_bug.cgi?id=2162 + +2010-12-11 Lee Howard + + * libtiff/tif_jpeg.c: fix use of clumplines calculation + http://bugzilla.maptools.org/show_bug.cgi?id=2149 + +2010-12-11 Lee Howard + + * tools/fax2ps.c: replace unsafe tmpfile() with mkstemp() + http://bugzilla.maptools.org/show_bug.cgi?id=2118 + +2010-12-11 Lee Howard + + * libtiff/tif_ojpeg.c, libtiff/tif_pixarlog.c, + libtiff/tif_zip.c: fix build errors for VC6 + http://bugzilla.maptools.org/show_bug.cgi?id=2105 + +2010-12-11 Lee Howard + + * libtiff/tif_stream.cxx: warnings cleanup + http://bugzilla.maptools.org/show_bug.cgi?id=2091 + * libtiff/tif_dirread.c: warnings cleanup + http://bugzilla.maptools.org/show_bug.cgi?id=2092 + +2010-12-11 Lee Howard + + * tools/tiff2pdf.c: add fill-page option + http://bugzilla.maptools.org/show_bug.cgi?id=2051 + +2010-12-11 Lee Howard + + * libtiff/tif_dirread.c: modify warnings + http://bugzilla.maptools.org/show_bug.cgi?id=2016 + +2010-12-11 Lee Howard + + * libtiff/tif_ojpeg.c: fix buffer overflow on problem data + http://bugzilla.maptools.org/show_bug.cgi?id=1999 + +2010-12-11 Lee Howard + + * tools/tiffinfoce.c: strip byte counts are uint64* now + +2010-12-11 Lee Howard + + * libtiff/tif_ojpeg.c: fix crash when reading a TIFF with a zero + or missing byte-count tag + * tools/tiffsplit.c: abort when reading a TIFF without a byte-count + per http://bugzilla.maptools.org/show_bug.cgi?id=1996 + +2010-12-08 Lee Howard + + * libtiff/tif_dirread.c: fix crash when reading a badly-constructed + TIFF per http://bugzilla.maptools.org/show_bug.cgi?id=1994 + +2010-12-06 Lee Howard + + * libtiff/tif_open.c: Fix mode check before opening a file. + http://bugzilla.maptools.org/show_bug.cgi?id=1906 + +2010-11-27 Bob Friesenhahn + + * libtiff-4.pc.in: Added libtiff pkg-config .pc file support. + Patch by Vincent Torri. + +2010-10-21 Frank Warmerdam + + * tools/tiffinfo.c: avoid direct reference to _TIFFerrorHandler. + + * libtiff/tif_config.vc.h: define snprintf to _snprintf for tiff2pdf. + + * libtiff/libtiff.def: export _TIFFCheckMalloc for tools. + +2010-09-25 Lee Howard + + * tools/tiff2ps.c: improvements and enhancements from Richard Nolde + with additional command line options for Document Title, + Document Creator, and Page Orientation + +2010-07-13 Bob Friesenhahn + + * tools/tiffcrop.c: Patch from Richard Nolde to avoid a + potentially unterminated buffer due to using an exceptionally long + file name. + +2010-07-08 Andrey Kiselev + + * tools/tiff2pdf.c: Fixed ID buffer filling in + t2p_write_pdf_trailer(), thanks to Dmitry V. Levin. + +2010-07-07 Andrey Kiselev + + * libtiff/tif_dirread.c: Really reset the tag count in CheckDirCount() + to expected value as the warning message suggests. As per bug + http://bugzilla.maptools.org/show_bug.cgi?id=1963 + +2010-07-06 Andrey Kiselev + + * tools/tiffset.c: Properly handle TIFFTAG_PAGENUMBER, + TIFFTAG_HALFTONEHINTS, TIFFTAG_YCBCRSUBSAMPLING, TIFFTAG_DOTRANGE + which should be set by value. + + * libtiff/tif_dirinfo.c: Don't use assertions in _TIFFFieldWithTag() + and _TIFFFieldWithName() if the tag is not found in the tag table. + This should be normal situation and returned NULL value should be + properly handled by the caller. + +2010-07-02 Andrey Kiselev + + * libtiff/tif_getimage.c: Avoid wrong math du to the signed/unsigned + integer type conversions. As per bug + http://bugzilla.maptools.org/show_bug.cgi?id=2207 + + * tools/{tiff2bw.c, thumbnail.c, pal2rgb.c}: Fix the count for + WhitePoint tag as per bug + http://bugzilla.maptools.org/show_bug.cgi?id=2042 + + * libtiff/tif_getimage.c: Check the number of samples per pixel when + working with YCbCr image in PickContigCase(). As per bug + http://bugzilla.maptools.org/show_bug.cgi?id=2216 + + * libtiff/tif_dir.c: Set the bogus post-decoding hook when processing + TIFFTAG_BITSPERSAMPLE in _TIFFVSetField() for the case of 8 bit when + we don't need any post-processing. That helps to reset the hook if we + previously set this field to some other value and the hook was + initialized accordingly. As per bug + http://bugzilla.maptools.org/show_bug.cgi?id=2035 + +2010-07-01 Andrey Kiselev + + * tools/tiffgt.c: Properly check the raster buffer allocations for + integer overflows. As per bug + http://bugzilla.maptools.org/show_bug.cgi?id=2108 + + * m4/acinclude.m4: Update GL/GLU/GLUt/Pthread macros from the + upstream. + + * libtiff/{tif_aux.c, tif_strip.c, tif_tile.c, tiffiop.h}: Move + multiply_32() and multiply_64() functions into tif_aux.c file and + rename them into _TIFFMultiply32() and _TIFFMultiply64() respectively. + +2010-06-30 Andrey Kiselev + + * tools/tiff2pdf.c: Better generation of ID field in + t2p_write_pdf_trailer(). Get rid of GCC aliasing warnings. + + * tools/tiff2pdf.c: Fixed computation of the tile buffer size when + converting JPEG encoded tiles. + + * tools/tiff2pdf.c: Better handling of string fields, use static + string buffers instead of dynamically allocated, use strncpy() instead + of strcpy(), control the string lengths. + +2010-06-25 Andrey Kiselev + + * tools/tiffcp.c: Initialize buffer arrays with zero to avoid + referencing to uninitialized memory in some cases (e.g. when tile size + set bigger than the image size). + +2010-06-15 Bob Friesenhahn + + * tools/tiffcrop.c: Patch from Richard Nolde. Reject YCbCr + subsampled data since tiffcrop currently doesn't support it. Fix + JPEG support. + +2010-06-13 Frank Warmerdam + + * libtiff/tif_dirinfo.c: Fix invocation of tag compare function (#2201) + + * tools/tiff2pdf.c: Fix assorted bugs in tiff2pdf: missing "return" + in t2p_read_tiff_size() causes t2p->tiff_datasize to be set entirely + wrong for COMPRESSION_JPEG case, resulting in memory stomp if actual + size is larger. Also, there are a bunch of places that try to + memset() a malloc'd buffer before checking for malloc failure, which + would result in core dump if there actually were a failure. (#2211) + +2010-06-11 Bob Friesenhahn + + * libtiff/tiffiop.h (TIFFSafeMultiply): Need more castings to + avoid compiler warnings if parameter types are not sign + consistent. + + * libtiff 4.0.0alpha6 released. + + * tools/tiffcrop.c: Applied patch from Richard Nolde: Corrected + European page size dimensions. Added an option to allow the user + to specify a custom page size on the command line. Fix the case + where a page size specified with a fractional part was being + coerced to an integer by retyping the variables that define the + paper size. + + * html/index.html: Update for the 3.9.3 release. + + * tools/tiffcp.c (tiffcp): Applied Tom Lane's patch to reject + YCbCr subsampled data since tiffcp currently doesn't support it. + http://bugzilla.maptools.org/show_bug.cgi?id=2097 + + * Update libtool to version 2.2.10. + +2010-06-10 Bob Friesenhahn + + * libtiff/tiffiop.h (TIFFSafeMultiply): Work properly if + multiplier is zero. + +2010-06-09 Bob Friesenhahn + + * libtiff/tif_fax3.c (Fax3SetupState): Yesterday's fix for + CVE-2010-1411 was not complete. + + * libtiff/tiffiop.h (TIFFSafeMultiply): New macro to safely + multiply two integers. Returns zero if there is an integer + overflow. + + * tools/tiffcp.c (main): tiffcp should not leak memory if an error + is reported when reading the input file. + +2010-06-08 Bob Friesenhahn + + * Update libtool to version 2.2.8. + + * libtiff/tif_fax3.c (Fax3SetupState): Avoid under-allocation of + buffer due to integer overflow in TIFFroundup() and several other + potential overflows. In conjunction with the fix to TIFFhowmany(), + fixes CVE-2010-1411. + + * libtiff/tiffiop.h (TIFFhowmany): Return zero if parameters would + result in an integer overflow. This causes TIFFroundup() to also + return zero if there would be an integer overflow. + + * contrib: Add an emacs formatting mode footer to all source files + so that emacs can be effectively used. + +2010-06-03 Oliver Chen Feng + + * libtiff/tools/tiffcp.c: add a new option -x to force merged tiff + file PAGENUMBER value in sequence for users who care the page + sequence, this will also prevent tiff2pdf from creating pdf file from + the merged tiff file with wrong page sequence. + +2010-05-08 Olivier Paquet + + * libtiff/tif_dirread.c: Restored TIFFReadDirEntryFloat function in order + to add missing TIFF_SETGET_FLOAT case to TIFFFetchNormalTag. + * libtiff/tif_dirinfo.c: Use correct set_field_type for + TIFFTAG_PIXAR_FOVCOT so it is readable again (regression from 3.9.2). + http://bugzilla.maptools.org/show_bug.cgi?id=2192 + +2010-05-07 Frank Warmerdam + + * libtiff/tif_jpeg.c: Ensure that quality is always set in + JPEGPreEncode(), not just when we want to output local tables. + Otherwise the quality used during compression may not be right and + might not match the tables in the tables tag. This bug only occurs + when seeking between directories in the midst of writing blocks. + http://trac.osgeo.org/gdal/ticket/3539 + +2010-05-06 Andrey Kiselev + + * html/man/TIFFGetField.3tiff.html, html/man/TIFFSetField.3tiff.html: + Regenerated from the source. + +2010-05-05 Olivier Paquet + + * libtiff/tif_print.c: Fixed printing of TIFFTAG_REFERENCEBLACKWHITE which + had stopped working. Also made it always print 6 floats instead of + 2*SamplesPerPixel. + http://bugzilla.maptools.org/show_bug.cgi?id=2191 + http://bugzilla.maptools.org/show_bug.cgi?id=2186 + * man/TIFFGetField.3tiff, man/TIFFSetField.3tiff: Fixed doc to reflect the + fact that libtiff considers TIFFTAG_REFERENCEBLACKWHITE to be 6 floats. + +2010-05-05 Frank Warmerdam + + * libtiff/tif_jpeg.c: Fix to use memcmp(), not memcpy() when checking + if the jpeg table was written. This is a fix for the last fix on 04-21. + +2010-04-21 Frank Warmerdam + + * libtiff/tif_jpeg.c: avoid preparing jpeg tables every time + JPEGSetupEncode() is called if the tables already seem to be + established. This prevents spurious updates and rewriting of + directories with jpegtables when doing updates to existing images. + http://trac.osgeo.org/gdal/ticket/3539 + +2010-04-20 Olivier Paquet + + * libtiff/tif_dirinfo.c: Use correct set_field_type for + TIFFTAG_PIXAR_IMAGEFULLWIDTH, TIFFTAG_PIXAR_IMAGEFULLLENGTH, + TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN and TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA. + They were unreadable with TIFF_SETGET_UNDEFINED, a regression from 3.9.2. + http://bugzilla.maptools.org/show_bug.cgi?id=2139 + +2010-04-10 Bob Friesenhahn + + * libtiff/tif_dir.c (_TIFFVSetField): Add a special error case for + when the tag count value is zero. Error handling is still a + regression since in 3.9.2, empty tags are skipped (with a warning) + rather than returning a hard error and refusing to read the file. + + * tools/ppm2tiff.c (main): While case for parsing comment line + requires extra parenthesis to work as expected. Reported by + Thomas Sinclair. + +2010-04-02 Frank Warmerdam + + * libtiff/tif_read.c (primarily): Add support for + CHUNKY_STRIP_READ_SUPPORT where large strips are + read in chunks for applications using TIFFReadScanline(). + This is intended to make it more practical work with very + large compressed one-strip files. Feature is off by default. + Enable by defining CHUNK_STRIP_READ_SUPPORT as a macro. + http://trac.osgeo.org/gdal/ticket/3514 + +2010-03-31 Frank Warmerdam + + * libtiff/tif_flush.c: Use TIFFRewriteDirectory() when flushing + directories so previously placed directories will be migrated to + the end of file if needed. + +2010-03-30 Frank Warmerdam + + * libtiff/tif_lzw.c: change type of dec_bitsleft field to uint64 + to support operating on strips/tiles of more than 256MB. + http://trac.osgeo.org/gdal/ticket/3512 + +2010-03-10 Bob Friesenhahn + + * libtiff/tif_aux.c (_TIFFCheckRealloc): Improve error message so + that it is clearly a memory allocation error message, and also + includes the size of the allocation request. + +2010-02-22 Lee Howard + + * libtiff/tif_jpeg.c: Do not generate a JPEGTables tag when creating + the JPEG TIFF as is is not required in order to prevent it from + being unused and filled with invalid data. (Leave it to be + generated by later activity.) + http://bugzilla.maptools.org/show_bug.cgi?id=2135 + * tools/tiff2pdf.c: Write the JPEG SOI headers into the TIFF strip + data rather than skipping them. This fixes the ability to view in + Acrobat Reader, Evince, and Ghostscript. + http://bugzilla.maptools.org/show_bug.cgi?id=2135 + * libtiff/tif_fax3.c: Don't return error on badly-terminated MMR + strips. + http://bugzilla.maptools.org/show_bug.cgi?id=2029 + +2009-12-03 Frank Warmerdam + + * libtiff/tif_jpeg.c: Made JPEGDecodeRaw() check for buffer overruns. + Made so that when working with downsampled images a stub function + reporting an error is used for tif_decoderow. We cannot meaningfully + support reading scanlines in this situation. (#1936) + + * libtiff/tif_jpeg.c: Ensure that tif_scanlinesize is computed after + resetting of the upsampling values (gdal:#3259). + http://bugzilla.maptools.org/show_bug.cgi?id=1936 + +2009-11-30 Frank Warmerdam + + * contrib/dbs/tiff-grayscale.c, contrib/tif-palette.c, + tools/ras2tiff.c: Fix resource leaks on error. + http://bugzilla.maptools.org/show_bug.cgi?id=2121 + + * libtiff/tif_{aux.c,dir.c,dir.h,dirinfo.c}: Return to handling + TIFFTAG_REFERENCEBLACKWHITE as a field in the TIFF directory instead + of as a custom(generic) field to avoid a potential reentrancy problem. + http://bugzilla.maptools.org/show_bug.cgi?id=2125 + + * libtiff/tif_color.c, libtiff/tif_getimage.c, libtiff/tiffio.h, + man/TIFFcolor.3tiff: Make TIFFDisplay argument in TIFFCIELabToRGBInit + const, and display_sRGB static and const. + http://bugzilla.maptools.org/show_bug.cgi?id=2124 + +2009-11-04 Bob Friesenhahn + + * libtiff 4.0.0alpha5 released. + +2009-11-03 Bob Friesenhahn + + * tools/tiffcrop.c: Updated tiffcrop from Richard Nolde. This + version has undergone substantial testing with arbitrary sample + bit depths. Also eliminates GCC compilation warnings. + +2009-11-02 Bob Friesenhahn + + * port/libport.h: Add extern declarations for getopt standard + globals. + +2009-10-31 Bob Friesenhahn + + * libtiff/tif_lzw.c (LZWDecode, LZWDecodeCompat): Fix warnings + noticed in 64-bit build of libtiff with Visual Studio 2005. + Resolves "Bug 2067 - Visual Studio 2005 64-bit warnings in + tif_lzw.c", http://bugzilla.maptools.org/show_bug.cgi?id=2067 + + * libtiff/tif_pixarlog.c (PixarLogEncode): Fix non-important + warning noticed in Visual Studio 2005 build. Resolves "Bug 2068 - + Visual Studio 2005 64-bit warning in tif_pixarlog.c", + http://bugzilla.maptools.org/show_bug.cgi?id=2068 + +2009-10-29 Bob Friesenhahn + + * libtiff/tif_dirread.c: Eliminate GCC "dereferencing type-punned + pointer" warnings. + +2009-10-28 Bob Friesenhahn + + * html/tools.html: Add manual page links, and a summary + description of tiffcrop. + +2009-10-07 Bob Friesenhahn + + * configure.ac: x86_64 should use the same fill order as i386. + +2009-09-24 Bob Friesenhahn + + * tools/tiffcrop.c, man/tiffcrop.1: New tiffcrop from Richard + Nolde. Major updates to add significant functionality for reading + and writing tile based images with bit depths not a multiple of 8 + which cannot be handled by tiffcp. + +2009-09-03 Bob Friesenhahn + + * libtiff/tif_ojpeg.c (OJPEGWriteHeaderInfo): IJG JPEG 7 needs + do_fancy_upsampling=FALSE in order to read raw data. Resolves + "Bug 2090 - OJPEG crash with libjpeg v7". + http://bugzilla.maptools.org/show_bug.cgi?id=2090 + +2009-09-03 Frank Warmerdam + + * libtiff/tif_getimage.c: Fixed error recognition handling in RGBA + interface when stoponerror is set. + http://bugzilla.maptools.org/show_bug.cgi?id=2071 + +2009-08-30 Bob Friesenhahn + + * tools/{tiffcrop.c,tiffgt.c}: Applied patch from Oden Eriksson to + fix build with gcc when using the "-Wformat + -Werror=format-security" flags. + +2009-08-29 Bob Friesenhahn + + * test/{bmp2tiff_palette.sh, bmp2tiff_rgb.sh, gif2tiff.sh, + ppm2tiff_pbm.sh, ppm2tiff_pgm.sh, ppm2tiff_ppm.sh}: Additional + utilities tests. + +2009-08-28 Bob Friesenhahn + + * tools/tiffinfo.c: tiffinfo should return error status to the + caller. Register a private error callback to accomplish that. + + * test/Makefile.am (TIFFIMAGES): Add test images in BMP, GIF, and + PNM formats so that we will be able to test more of the tools. + While adding these test images I notice that bmp2tiff and gif2tiff + only support ancient versions of their respective formats. + +2009-08-27 Bob Friesenhahn + + * libtiff 4.0.0alpha4 released. + + * HOWTO-RELEASE: Improved release instructions. + +2009-08-24 Bob Friesenhahn + + * man/{TIFFClose.3tiff,raw2tiff.1,tiffcmp.1,tiffsplit.1}: Applied + fixes for "Bug 2023 - nroff errors in manual pages". + http://bugzilla.maptools.org/show_bug.cgi?id=2023 + + * tools/{rgb2ycbcr.c, tiff2rgba.c}: Applied fixes for "Bug 2079 - + CVE-2009-2347 libtiff: integer overflows in various inter-color + space conversion tools". + http://bugzilla.maptools.org/show_bug.cgi?id=2079 + + * libtiff/tif_print.c (TIFFPrintDirectory): Apply fix from Jay + Berkenbilt for "Bug 2024 - possible null pointer dereference with + one-line fix". + http://bugzilla.maptools.org/show_bug.cgi?id=2024 + + * libtiff/tif_dirread.c (TIFFReadCustomDirectory): Apply patch + from Jay Berkenbilt for "Bug 1895 - logic error in tif_dirread.c: + segfault after setting tdir_tag = IGNORE". + http://bugzilla.maptools.org/show_bug.cgi?id=1895 + +2009-08-23 Bob Friesenhahn + + * test/Makefile.am, test/tiffcrop*.sh: Split previously existing + tiffcrop.sh into a collection of many specific tests. Re-wrote + all of the existing tests to be based on some simple shell + functions. Make distcheck works again. + + Export certain variables (MAKE, MAKEFLAGS, MEMCHECK) to tests and + added 'memcheck' and 'ptrcheck' targets to make it easy to run the + tests under valgrind. + +2009-08-21 Bob Friesenhahn + + * test/tiffcp-logluv.sh: Fix test so that it works with a VPATH + build. + + * test/Makefile.am (AUTOMAKE_OPTIONS): Colorized tests was not + actually activated since it needed to be enabled in this + Makefile.am. Also activated parallel-tests mode since it offers + useful features such as per-test .log files and a summary test + report .log file. + +2009-08-20 Bob Friesenhahn + + * configure.ac: Updated autotools. Autoconf 2.64, Automake 1.11, + libtool 2.2.6. Enabled support for silent build rules + (--enable-silent-rules or 'make V=0') and colorized tests. + + * html/{index.html, v3.9.0.html}: Update for 3.9.0 release. + +2009-06-30 Frank Warmerdam + + * tests/tiffcp-logluv.sh: minimal testing of sgilog compression. + + * tools/tiffcp.c: add -c sgilog support. + + * libtiff/tif_luv.c: correct return codes from encoderow to be + 1 on success instead of zero. + http://bugzilla.maptools.org/show_bug.cgi?id=2069 + + * libtiff/tif_lzw.c: back out patch from #2065 and apply patch from + #1085 for a better underflow fix that errors properly. + http://bugzilla.maptools.org/show_bug.cgi?id=2065 + http://bugzilla.maptools.org/show_bug.cgi?id=1985 + +2009-06-26 Frank Warmerdam + + * libtiff/tif_strip.c: Remove an inappropriate assertion that often + fails on oddly sized 12bit jpeg compressed ycbcr images. + +2009-06-22 Frank Warmerdam + + * libtiff/tif_lzw.c: Fix buffer underflow bug. + http://bugzilla.maptools.org/show_bug.cgi?id=2065 + +2009-06-21 Frank Warmerdam + + * configure.ac, libtiff/tif_jpeg.c, libtiff/tif_jpeg_12.c: add support + for dual mode 8/12 bit jpeg support. + +2009-06-03 Frank Warmerdam + + * libtiff/tif_write.c: do not override the planar configuration to be + contig for one sample files if planar configuration is already set. + http://bugzilla.maptools.org/show_bug.cgi?id=2057 + +2009-06-02 Frank Warmerdam + + * libtiff/libtiff.def: Add TIFFUnsetField. + +2009-05-03 Frank Warmerdam + + * libtiff/{tif_jpeg.c,tif_ojpeg.c,tif_getimage.c}: Fixed various + error reports to use "%s" as format string. + http://trac.osgeo.org/gdal/ticket/2976 + +2009-03-12 Frank Warmerdam + + * libtiff/{tif_fax3.c,tif_jpeg.c,tif_ojpeg.c}: Fix printdir chaining + for some codecs (#2020). + +2009-02-12 Frank Warmerdam + + * libtiff/tif_luv.c: Fix handling of tiled logluv images. + http://bugzilla.maptools.org/show_bug.cgi?id=2005 + +2009-02-09 Frank Warmerdam + + * libtiff/tif_dirread.c: Improve allocation safety when allocated + buffer for large tags. (#1998) Related to (#1993) + +2009-02-06 Frank Warmerdam + + * tools/tiffcrop.c: Don't default image->res_unit to INCH. Now the + test suite should pass. + +2009-02-05 Frank Warmerdam + + * libtiff/tif_dirread.c: Re-incorporated a sanity check on tag size, + but at the 2GB boundary to avoid overflow on 32bit systems. + http://bugzilla.maptools.org/show_bug.cgi?id=1993 + + * libtiff/tif_dirread.c: Remove some assertions that blow due to + corrupt files rather than in response to library internal + inconsistencies. + http://bugzilla.maptools.org/show_bug.cgi?id=1995 + http://bugzilla.maptools.org/show_bug.cgi?id=1991 + + * libtiff/tif_dirread.c: Fixed testing for failed result from + TIFFReadDirectoryFindFieldInfo(). + http://bugzilla.maptools.org/show_bug.cgi?id=1992 + +2009-01-23 Frank Warmerdam + + * libtiff/tif_predict.c: Add support for 32bit integer horz. predictors. + http://bugzilla.maptools.org/show_bug.cgi?id=1911 + + * libtiff/tif_dirwrite.c: Fix byte swapping of next directory offset. + + http://bugzilla.maptools.org/show_bug.cgi?id=1924 + + * tools/tiffcrop.c: initialize xres/yres values. + + * test/*.sh - default ${srcdir} to local directory. + + * test/common.sh - start verbose mode after common settings. + + * libtiff/tif_dirinfo.c: Replace lfind() with local equivalent to + avoid type mismatches on different platforms. + http://bugzilla.maptools.org/show_bug.cgi?id=1889 + +2009-01-22 Frank Warmerdam + + * tools/{fax2tiff.c,thumbnail.c,tiff2pdf.c,tiff2ps.c,tiffdump.c, + tiffsplit.c}: avoid warnings, mostly 32bit/64bit casting issues. + + * port,tools: Introduce libport.h, and include in tools if NEED_LIBPORT + defined, primarily to reduce prototype warnings on windows. + + * libtiff/tif_dirinfo.c,tif_dirread.c: Avoid warnings + about unused parameters, and uninitialized variables. + +2009-01-21 Bob Friesenhahn + + * test/common.sh: Execute tests like 'make VERBOSE=TRUE check' in + order to trace full execution detail while executing the test suite. + +2009-01-20 Frank Warmerdam + + * tools/tiffsplit.c: fix sampleformat to be shortv instead of longv. + +2009-01-20 Bob Friesenhahn + + * test/Makefile.am (CLEANFILES): Make sure that test output files + are removed by 'make clean' + + * Update autotools for 4.0.0 beta3 + + * 4.0.0 beta3 produced. + +2009-01-12 Bob Friesenhahn + + * test/tiffcrop.sh: New test script for tiffcrop from Richard + Nolde. + + * tools/tiff2ps.c: Remove spurious message to stderr. + +2009-01-11 Bob Friesenhahn + + * tools/tiff2ps.c: Incorporated significant functionality update + from Richard Nolde. In particular, support for rotating the image + by 90, 180, 270, and 'auto' has been added. + + * man/tiffcrop.1: Incorporated documentation updates from Richard + Nolde. + + * tools/tiffcrop.c: Incorporated significant functionality update + from Richard Nolde. + +2008-12-31 Bob Friesenhahn + + * libtiff/tiffio.h: GCC will now validate format specifications + for TIFFError(), TIFFErrorExt(), TIFFWarning(), and + TIFFWarningExt() in order to reveal bugs. + + * Many fixes throughout to work better as a 64-bit build. + +2008-12-30 Bob Friesenhahn + + * tools/{tiff2pdf.c, tiff2ps.c, tiffinfo.c}: Offset and length + tags now require 64-bit parameter rather than 32-bit. + + * libtiff/tif_dirread.c: Fixed issues with unaligned access to + 64-bit values. + + * tools/thumbnail.c: Eliminate crash noticed while running test + suite. + +2008-12-29 Bob Friesenhahn + + * libtiff/tif_ojpeg.c (OJPEGLibjpegJpegSourceMgrFillInputBuffer): + Initialize stack variables to avoid compiler warning. + + * tools/tiffinfoce.c (main): Use toff_t for offset type when + retrieving offset of EXIF IFD. + + * libtiff/tiffio.h: Undeprecate toff_t and restore its use in the + TIFFClientOpen() callback and other external function definitions. + + * tools/tiffinfo.c (main): Offset to EXIF IFD requires a 64-bit + type now. Fixes crash when dumping files containing an EXIF IFD. + + * m4/libtool.m4: Update to libtool 2.2.6. + +2008-12-21 Frank Warmerdam + + * libtiff/tif_dir.c, tiffio.h: Introduce TIFFUnsetField() function. + + * libtiff/tif_jpeg.c: Avoid errors if the application writes a full + strip for the last partial strip in a jpeg compressed file. + http://bugzilla.maptools.org/show_bug.cgi?id=1981 + +2008-10-29 Frank Warmerdam + + * libtiff/tif_flush.c: Make sure that BEENWRITING is cleared when + we take the shortcut to only update the strip/tile offsets in place. + http://trac.osgeo.org/gdal/ticket/2621 + +2008-10-21 Andrey Kiselev + + * libtiff/tif_jbig.c: Support the JBIG-KIT 2.0 (compatibility with + the older versions retained). + +2008-10-09 Frank Warmerdam + + * libtiff/tif_jpeg.c: Add #ifdefs for changes needed if using + IPP enabled version of libjpeg from Intel. + http://bugzilla.maptools.org/show_bug.cgi?id=1951 + +2008-09-05 Andrey Kiselev + + * tools/tiffsplit.c: Use byte counts of proper size (uint64). + Required for libtiff 4.0. + + * tools/tiffsplit.c: Use dynamically allocated array instead of static + when constructing output file names. + +2008-09-03 Andrey Kiselev + + * tools/tiffsplit.c: Get rid of unsafe strcpy()/strcat() calls when + doing the filename/path construction. + + * tools/tiff2pdf.c: More appropriate format string in + t2p_write_pdf_string(); avoid signed/unsigned mismatch. + + * libtiff/tif_lzw.c: Properly zero out the codetable. As per bug + + http://bugzilla.maptools.org/show_bug.cgi?id=1929 + + * libtiff/tif_lzw.c: Properly zero out the string table. Fixes + CVE-2008-2327 security issue. + +2008-09-01 Frank Warmerdam + + * libtiff/tif_dirread.c: Avoid unused TIFFReadDirEntryFloat() function. + + * libtiff/tif_dirwrite.c: modified to write IFDs as either IFD8 or IFD + depending on whether the file is bigtiff or classic tiff. + http://bugzilla.maptools.org/show_bug.cgi?id=1917 + +2008-08-12 Edward Lam + + * tools/tiffdump.c: When compiling for Microsoft Windows, apply + consistent (__int64) casting when testing if _lseeki64 has + successfully sought as requested. This is necessary for large + file support to work since off_t is only 32-bit. + +2008-07-29 Frank Warmerdam + + * tif_strip.c: Replace assertions related to samplesperpixel != 3 or + the subsampling values not being 1, 2 or 4 (for jpeg compressed images) + with control logic to return runtime errors (c/o Even Rouault) (#1927). + +2008-06-17 Frank Warmerdam + + * tools/tiffcrop.c: Fix some portability problems. + + * libtiff/tif_ojpeg.c: Use same jpeg/win32 boolean/FAR hacks as are + used in tif_jpeg.c. + + * libtiff/tif_win32.c: Ensure TIFFOpenW() uses same FILE_SHARE flags + as TIFFOpen(). + +2008-06-01 Frank Warmerdam + + * libtiff/tif_dirwrite.c: Fix alignment problems affecting architectures + like Sparc/Solaris. + http://bugzilla.maptools.org/show_bug.cgi?id=1892 + +2008-05-27 Frank Warmerdam + + * libtiff.def: Add TIFFFindField + http://bugzilla.maptools.org/show_bug.cgi?id=1891 + +2008-05-26 Frank Warmerdam + + * tif_config.*.h, tiffconf.*.h: Remove SIZEOF_LONG definition, unused. + + * li2008-04-15 Andrey Kiselev + +btiff/tif_win32.c: Replace custom Win32 memory api with generic + POSIX one. No apparent value to use of GlobalAlloc() in the modern + age. http://bugzilla.maptools.org/show_bug.cgi?id=1885 + + * libtiff/tiffconf.vc.h: Added JBIG_SUPPORT and MDI_SUPPORT items + in windows version (care of Edward Lam). + +2008-05-24 Frank Warmerdam + + * tif_codec.c: Avoid NULL pointer dereferencing for exotic + compression codec codes. + + * tif_dirwrite.c: fix potential memory leak. + + * tif_dirread.c: Fix unchecked malloc result. + +2008-05-24 Bob Friesenhahn + + * test {tiff2pdf.sh tiff2ps-EPS1.sh tiff2ps-PS1.sh tiff2ps-PS2.sh + tiff2ps-PS3.sh tiffcp-g3-1d-fill.sh tiffcp-g3-1d.sh + tiffcp-g3-2d-fill.sh tiffcp-g3-2d.sh tiffcp-g3.sh tiffcp-g4.sh + tiffcp-split-join.sh tiffcp-split.sh tiffcp-thumbnail.sh + tiffdump.sh tiffinfo.sh}: Added more test scripts based on + suggestions from Lee Howard posted to the tiff list on 13 Sep + 2007. + +2008-05-23 Frank Warmerdam + + * libtiff/tif_fax3.c: Add an assert in an effort to detect a + possible runtime problem reported by coverity. + + * contrib/iptcutil/iptcutil.c: Fixed memory leak of str. + + * tools/tiffcrop.c, man/tiffcrop.1: Major update from Richard Nolde. + http://bugzilla.maptools.org/show_bug.cgi?id=1888 + + * tools/tiffdither.c: remove dead onestrip code. avoid memory leak. + + * tools/rgb2ycbcr.c: fix memory leak of raster buffer. + + * tools/tiffcp.c: Simplify inknames code to avoid pointless test. + Cleanup scanline allocation to avoid coverity warning. + + * tools/thumbnail.c: Check for TIFFOpen() failure. + +2008-05-18 Frank Warmerdam + + * libtiff/tif_dirinfo.c: Use TIFF_SETGET_ASCII for PIXAR_TEXTUREFORMAT + and PIXAR_WRAPMODES instead of TIFF_SETGET_UNDEFINED. Not exactly clear + why this is needed. + +2008-05-09 Bob Friesenhahn + + * Makefile.am (ACLOCAL_AMFLAGS): Libtool 2.2.4 does not like + "ACLOCAL_AMFLAGS=-I ./m4". It wants "ACLOCAL_AMFLAGS=-I m4". + +2008-04-15 Andrey Kiselev + + * test/: Test suite updated. Everything is passed now. + + * libtiff/tif_dirinfo.c: Fixed description of the + TIFFTAG_NUMBEROFINKS tag. + +2008-04-14 Andrey Kiselev + + * libtiff/{tif_dirread.c, tif_dirwrite.c, tiffiop.h}: + Get rid of some of "dereferencing type-punned" warnings by converting + tdir_offset field of TIFFDirEntry structure into union. + +2008-04-10 Andrey Kiselev + + * libtiff/{tif_flush.c, tif_dirwrite.c, tiffio.h, tiffiop.h}: + TIFFRewriteField() renamed into _TIFFRewriteField() and moved out + from the public interface. Type of its 'count' parameter changed + from uint32 to tmsize_t. + + * /libtiff/tiffiop.h: Make tif_nfields and tif_nfieldscompat fields + of the tiff structure have the size_t type instead of uint32. + +2008-04-09 Andrey Kiselev + + * tools/tiffdump.c: Added support for MSVS 6.0. + + * libtiff/tif_dirread.c: Use custom functions _TIFFUInt64ToFloat() + and _TIFFUInt64ToDouble() to convert 64-bit integers into floating + point values on MSVS 6.0 platform. + +2008-03-14 Frank Warmerdam + + * tif_dirread.c: Removed sanity checks on tags larger than 4MB in + TIFFReadDirEntryArray() since they are interfering with seemingly + legitimate files. http://trac.osgeo.org/gdal/ticket/2005 + +2008-02-09 Joris Van Damme + + * tif_dirread.c: Added handling for the case of number of values for + PageNumber tag different from 2 (previously resulted in an assert + indicating lack of handling and was forgotten about) + +2008-02-01 Frank Warmerdam + + * libtiff/tif_jpeg.c: Do not try to fixup subsampling tags based on + the actual jpeg data stream if the first strip/tile has zero size. + This is the case when GDAL creates a new file with zero sizes, closes + and reopens it. + +2008-01-07 Frank Warmerdam + + * tools/tiff2ps.c: fix up 64bit issues (from Edward Lam). + +2008-01-01 Frank Warmerdam + + * libtiff/tif_dirwrite.c: #ifdef out lots of unused functions. + + * Makefile.vc, libtiff/Makefile.vc, tools/Makefile.vc: Improve clean + targets. + + * tools/tiffinfo.c, tools/tiffcmp.c, tools/gif2tiff.c, tools/bmp2tiff.c + tools/tiff2pdf.c: Fix 64-bit warnings when compiling under MSVC 2005 + (x64). + + * tools/tiffset.c: Changes to reflect the fact that TIFFFieldWithTag() + and TIFFFieldWithName() now return TIFFField pointers instead of + TIFFFieldInfo pointers. + + * tools/tiffdump.c: Added ssize_t typedef on Windows since it doesn't + exist. This makes it compile again on Windows + + * tif_aux.c, tif_getimage.c, tif_next.c, tif_predict.c, tif_win32.c, + tiffconf.vc.h: Various 64bit fixes from Edward Lam identified on win64. + + * test/rewrite_tag.c: New test for TIFFRewriteField(). + +2007-12-31 Frank Warmerdam + + * tif_dirwrite.c: Added TIFFRewriteField(). This new function + rewrites one field "on disk" updating an existing directory + entry. Lots of limitations still... + + * tiffiop.h, tif_write.c, tif_dirread.c, tif_flush.c: Keep track of + TIFF_DIRTYSTRIP separately from TIFF_DIRTYDIRECT to indicate that + the strip offset/size values are dirty but nothing else about the + directory is dirty. In flush handle "just stripmaps dirty" as a + special case that just rewrites these values without otherwise + modifying the directory on disk using TIFFRewriteField(). + + We also modify logic so that in update mode the directory is not + marked dirty on read, but only when something is changed. This + means we need to keep track of updates to the stripmap stuff in + TIFFAppendToStrip(). + +2007-12-10 Frank Warmerdam + + * tif_jpeg.c: Improve ability to switch between encoding and decoding + in the jpeg code (gdal bug #2033). + +2007-11-23 Frank Warmerdam + + * tif_dir.c, tif_dirread.c, tif_dirwrite.c, tif_read.c, tif_write.c, + tiffiop.h: Added TIFF_BUF4WRITE flag to indicate if contents of the + rawcp/rawcc buffer are for writing and thus may require flushing. + Necessary to distinguish whether they need to be written to disk when + in mixed read/write mode and doing a mixture of writing followed by + reading. http://trac.osgeo.org/gdal/ticket/1758 + +2007-11-23 Andrey Kiselev + + * configure.com, libtiff/tif_vms.c: Better OpenVMS support. Patches + from Alexey Chupahin. + +2007-11-02 Frank Warmerdam + + * tif_write.c: Rip out the fancy logic in TIFFAppendToStrip() for + establishing if an existing tile can be rewritten to the same location + by comparing the current size to all the other blocks in the same + directory. This is dangerous in many situations and can easily + corrupt a file. (observed in esoteric GDAL situation that's hard to + document). This change involves leaving the stripbytecount[] values + unaltered till TIFFAppendToStrip(). Now we only write a block back + to the same location it used to be at if the new data is the same + size or smaller - otherwise we move it to the end of file. + + * tif_dirwrite.c: Try to avoid writing out a full readbuffer of tile + data when writing the directory just because we have BEENWRITING at + some point in the past. This was causing odd junk to be written out + in a tile of data when a single tile had an interleaving of reading + and writing with reading last. (highlighted by gdal + autotest/gcore/tif_write.py test 7. + + * tif_predict.c: use working buffer in PredictorEncodeTile to avoid + modifying callers buffer. + http://trac.osgeo.org/gdal/ticket/1965 + + * tif_predict.c/h: more fixes related to last item, keeping a + distinct pfunc for encode and decode cases as these were getting + mixed up sometimes. + http://trac.osgeo.org/gdal/ticket/1948 + +2007-11-01 Frank Warmerdam + + * tif_predict.c/h, tif_lzw.c, tif_zip.c: Improvements so that + predictor based encoding and decoding works in read-write update + mode properly. + http://trac.osgeo.org/gdal/ticket/1948 + +2007-10-24 Joris Van Damme + + * tif_dirread.c: Fixed problem with bogus file triggering + assert(td->td_planarconfig == PLANARCONFIG_CONTIG) in + ChopUpSingleUncompressedStrip + +2007-10-22 Joris Van Damme + + * tif_jpeg.c: Resolved buffer incrementation bug that lead to faulty images + at best, access violation at worst, when subsampled JPEG compressed imagery + is decoded without the JPEG_COLORMODE feature + +2007-10-11 Frank Warmerdam + + * html/index.html: Update "people responsible" section. + +2007-10-05 Frank Warmerdam + + * tools/tiff2pdf.c: Fix problem with alpha setting in some cases + as reported on the mailing list. + +2007-10-01 Joris Van Damme + + * changed some more incorrect %lud printf flags to %lu + +2007-09-29 Joris Van Damme + + * tif_dirread.c: Strip chopping interfered badly with uncompressed + subsampled images because it tried to divide subsampled rowblocks, + leading to all sorts of errors throughout the library for these + images. Fixed by making strip chopping divide in row counts that + are a multiple of vertical subsampling value. + +2007-09-28 Joris Van Damme + + * tif_dirread.c: Logical cast working around compiler warning + + * tif_read.c: Correction of some error flags and parameter lists + +2007-09-27 Joris Van Damme + + * tif_dirread.c: Made calculation of td_maxsamplevalue more robust + when dealing with large bitspersample values, shutting up purification + tools that warn about truncation, though it remains incorrect and + indicates a conceptual problem there. + + * tif_open.c: Moved early exit in case of 'h' flag (to disable reading + of first IFD) to proper place because it badly interfered with memory + mapping, resulting in mapping flag even with dummy mapping functions + that returned 0 whilst at the same time the mapping tif_size wasn't + set, thus resulting in continuous incorrect beyond-eof errors. + +2007-09-24 Joris Van Damme + + * tif_dirinfo.c: Fixed (MSVC) compiler reports about + inconsistent use of const in tiffFields and exifFields definition + +2007-09-20 Frank Warmerdam + + * tif_dirwrite.c: Always write tile/strip offsets and sizes + using LONG8 type when output format is BigTIFF. The + TIFFWriteDirectoryTagLongLong8Array() function was restructured + accordingly. + + * tif_dirread.c: Improvements to error reporting text in + TIFFFetchDirectory(). + +2007-09-19 Bob Friesenhahn + + * test/images: Added a small collection of test images for use by + test programs and scripts. + * test/tiffinfo.sh: A trivial example test script. + * test/common.sh: Added small script for setting the environment + used by script-based tests. + +2007-08-24 Frank Warmerdam + + * tif_dirwrite.c: Write the tif_nextdiroff value instead of a fixed + zero when writing directory contents to preserve the ability to + rewrite directories in place, even in the middle of a directory + chain. + + * tif_dirinfo.c: _TIFFMergeFields() now only merges in field + definitions that are missing. Existing definitions are silently + ignored. + + * tif_dirread.c: Add runtime error for fields for which no definition + is found (in addition to an assert for developers) in + TIFFFetchNormalTag(). Not sure if this is needed, but it seems + prudent. + +2007-08-10 Joris Van Damme + + * libtiff/tif_getimage.c: removed SubsamplingHor and SubsamplingVer + from _TIFFRGBAImage structure to revert unwanted ABI change. + +2007-08-10 Joris Van Damme + + * libtiff/tif_win32.c: use SetFilePointer instead of + SetFilePointerEx, as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1580 + +2007-07-19 Andrey Kiselev + + * libtiff/tif_stream.cxx: Put all callback functions declarations + inside extern "C" block. + + * libtiff/{tif_lzw.c, tif_luv.c, tif_dumpmode.c, tif_print.c, + tif_read.c, tif_strip.c, tif_thunder.c}: Use "%I64d" printf() + formatter instead of "%lld" with MSVC compiler. + + * libtiff/{tiffiop.h, tif_aux.c}: Added _TIFFUInt64ToFloat() and + _TIFFUInt64ToDouble() functions. + +2007-07-18 Andrey Kiselev + + * libtiff/tif_dirread.c: Handle the case of MSVC 6 when using 64-bit + integer constants. + + * libtiff/{Makefile.am, Makefile.v}: Do not distribute tiffconf.h, + remove tif_config.h/tiffconf.h during cleaning. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1573 + + * libtiff/tif_unix.c: Do not use O_LARGEFILE. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1577 + +2007-07-13 Andrey Kiselev + + * libtiff 4.0.0alpha released. + +2007-07-12 Andrey Kiselev + + * tools/tiff2pdf.c: Added missed extern optind as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1567 + + * libtiff/{tif_close.c, tif_dirinfo.c, tiffiop.c, tif_dirread.c, + tif_dir.h, tif_dir.c, tiffio.h}: Transition to the new-style tag + extending scheme completed. + +2007-07-11 Bob Friesenhahn + + * libtiff/tif_stream.cxx: Adapt to use toff_t again. Update to + use standard C++ library size types and attempt to detect overflow + cases. + +2007-07-08 Andrey Kiselev + + * libtiff/{tif_jpeg.c, tif_dir.h, tif_dir.c, tif_dirinfo.c, tiffio.h, + tif_ojpeg.c, tif_print.c, tif_fax3.c, tif_dirread.c}: More work on new + tag extending scheme. Use the new scheme everywhere. + + * libtiff/{tif_zip.c, tif_predict.c, tif_pixarlog.c, tif_luv.c, + tif_fax3.c, tif_dirread.c, tif_dirwrite.c, tif_close.c, tif_ojpeg.c, + tif_jpeg.c, tif_dirinfo.c, tif_dir.h, tiffio.h, tiffiop.h}: + TIFFFIeldInfo structure replaced with TIFFField structure. + TIFFFieldInfo retained for the backward compatibility. + +2007-07-05 Bob Friesenhahn + + * tools/tiff2pdf.c: Fix a compile problem when JPEG_SUPPORT is not + defined. + +2007-07-04 Andrey Kiselev + + * libtiff/{tif_dir.c, tiff.h, tiffio.h, libtiff.def}: Unused + TIFFReassignTagToIgnore() function and TIFFIgnoreSense enumeration + removed. + + * libtiff/{tif_dirinfo.c, tif_fax3.c, tif_jbig.c, tif_jpeg.c}: Move + tags TIFFTAG_FAXRECVPARAMS, TIFFTAG_FAXSUBADDRESS, + TIFFTAG_FAXRECVTIME and TIFFTAG_FAXDCS to the common tag directory. + These tags are not codec-specific and relate to image content, so + process them as other normal tags. + + * libtiff/{tiffio.h, tif_dir.h}: TIFFTagValue structure moved from the + public tiffio.h to private tif_dir.h. + + * contrib/{acorn, mac-cw, mac-mpw}: Removed as unmaintained and + outdated. + +2007-07-03 Andrey Kiselev + + * libtiff{tif_acorn.c, tif_apple.c, tif_atari.c, tif_msdos.c, + tif_win3.c}: Obsoleted portability stuff removed. + + * tools/tiff2ps.c: Added support 16-bit images as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1566 + + Patch from William Bader. + + * tools/tiff2pdf.c: Fix for TIFFTAG_JPEGTABLES tag fetching and + significant upgrade of the whole utility as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1560 + + Now we don't need tiffiop.h in tiff2pdf anymore and will open output + PDF file using TIFFClientOpen() machinery as it is implemented + by Leon Bottou. + +2007-06-26 Bob Friesenhahn + + * configure.ac: Fix typo when substituting value for unsigned 8 bit type. + Added support for a TIFF_PTRDIFF_T type to use when doing pointer arithmetic. + Added support for a TIFF_SSIZE_T in order to return memory sizes but still + allow returning -1 for errors. + * libtiff/tiffconf.vc.h: Add porting type defintions for WIN32. + +2007-06-25 Bob Friesenhahn + + * port/strtoull.c: New porting function in case strtoull() is not + available on the target system. + * configure.ac: Add configure support for determining sized types + in a portable way and performing necessary substitutions in + tif_config.h and tiffconf.h. Updated tiff.h to use the new + definitions. + +2007-04-27 Andrey Kiselev + + * tools/tiff2pdf.c: Check the tmpfile() return status as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=154 + +2007-04-07 Andrey Kiselev + + * libtiff/{tif_dir.h, tif_dirread.c, tif_dirinfo.c, tif_jpeg.c, + tif_fax3.c, tif_jbig.c, tif_luv.c, tif_ojpeg.c, tif_pixarlog.c, + tif_predict.c, tif_zip.c}: Finally fix bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1274 + + by introducing _TIFFMergeFieldInfo() returning integer error status + instead of void in case of problems with field merging (e.g., if the + field with such a tag already registered). TIFFMergeFieldInfo() in + public API remains void. Use _TIFFMergeFieldInfo() everywhere and + check returned value. + +2007-04-07 Frank Warmerdam + + * contrib/addtiffo/tif_overview.c: Fix problems with odd sized output + blocks in TIFF_DownSample_Subsampled() (bug 1542). + +2007-04-06 Frank Warmerdam + + * libtiff/tif_jpeg.c: Changed JPEGInitializeLibJPEG() so that it + will convert from decompressor to compressor or compress to decompress + if required by the force arguments. This works around a problem in + where the JPEGFixupTestSubsampling() may cause a decompressor to + be setup on a directory when later a compressor is required with the + force flag set. Occurs with the addtiffo program for instance. + +2007-04-06 Andrey Kiselev + + * tools/tiffcrop.c, man/tiffcrop.1: Significant update in + functionality from Richard Nolde. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1525 + +2007-03-28 Frank Warmerdam + + * libtiff/tif_fax3.c: "inline static" -> "static inline" for IRIC CC. + +2007-03-17 Joris Van Damme + + * start of BigTIFF upgrade - CVS HEAD unstable until further notice + +2007-03-07 Joris Van Damme + + * libtiff/tif_getimage.c: workaround for 'Fractional scanline' error reading + OJPEG images with rowsperstrip that is not a multiple of vertical subsampling + factor. This bug is mentioned in: + http://bugzilla.remotesensing.org/show_bug.cgi?id=1390 + http://www.asmail.be/msg0054766825.html + +2007-03-07 Joris Van Damme + + * libtiff/tif_win32.c: made inclusion of windows.h unconditional + + * libtiff/tif_win32.c: replaced preprocessor indication for consiously + unused arguments by standard C indication for the same + +2007-02-27 Andrey Kiselev + + * libtiff/tif_dirread.c: Use uint32 type instead of tsize_t in byte + counters in TIFFFetchData(). Should finally fix the issue + + http://bugzilla.remotesensing.org/show_bug.cgi?id=890 + +2007-02-24 Andrey Kiselev + + * tools/tiffset.c: Properly handle tags with TIFF_VARIABLE writecount. + As per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1350 + + * libtiff/tif_dirread.c: Added special function to handle + SubjectDistance EXIF tag as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1362 + + * tools/tiff2pdf.c: Do not assume inches when the resolution units + do not specified. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1366 + + * tools/{tiffcp.c, tiffcrop.c}: Do not change RowsPerStrip value if + it was set as infinite. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1368 + + * tools/tiffcrop.c, man/tiffcrop.1: New tiffcrop utility contributed + by Richard Nolde. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1383 + +2007-02-22 Andrey Kiselev + + * libtiff/tif_dir.c: Workaround for incorrect TIFFs with + ExtraSamples == 999 produced by Corel Draw. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1490 + + * libtiff/{tif_dirread.c, tif_read.c}: Type of the byte counters + changed from tsize_t to uint32 to be able to work with data arrays + larger than 2GB. Fixes bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=890 + + Idea submitted by Matt Hancher. + +2007-01-31 Andrey Kiselev + + * tools/tif2rgba.c: This utility does not work properly on big-endian + architectures. It was fixed including the bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1149 + +2007-01-15 Mateusz Loskot + + * Submitted libtiff port for Windows CE platform + * libtiff/tif_config.wince.h: Added configuration header for WinCE. + * libtiff/tiffconf.wince.h: Ported old configuration header for WinCE. + * libtiff/tif_wince.c: Added WinCE-specific implementation of some + functons from tif_win32.c. + * libtiff/tif_win32.c: Disabled some functions already reimplemented in tif_wince.c. + * libtiff/tiffiop.h, port/lfind.c: Added conditional include of some + standard header files for Windows CE build. + * tools/tiffinfoce.c: Ported tiffinfo utility for Windows CE. + +2006-11-19 Frank Warmerdam + + * libtiff/tif_write.c: TIFFAppendToStrip() - clear sorted flag if + we move a strip. + http://bugzilla.remotesensing.org/show_bug.cgi?id=1359 + +2006-10-13 Andrey Kiselev + + * libtiff/tif_dir.c: More fixes for vulnerabilities, reported + in Gentoo bug (): + + http://bugs.gentoo.org/show_bug.cgi?id=142383 + + * libtiff/contrib/dbs/xtiff/xtiff.c: Make xtiff utility compilable. + Though it is still far from the state of being working and useful. + +2006-10-12 Andrey Kiselev + + * libtiff/tif_fax3.c: Save the state of printdir codec dependent + method. + + * libtiff/tif_jpeg.c: Save the state of printdir codec dependent method + as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1273 + + * libtiff/tif_win32.c: Fixed problem with offset value manipulation + as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1322 + + * libtiff/{tif_read.c, tif_jpeg.c, tif_dir.c}: More fixes for + vulnerabilities, reported in Gentoo bug (): + + http://bugs.gentoo.org/show_bug.cgi?id=142383 + +2006-09-28 Andrey Kiselev + + * libtiff/{tif_fax3.c, tif_next.c, tif_pixarlog.c}: Fixed multiple + vulnerabilities, as per Gentoo bug (): + + http://bugs.gentoo.org/show_bug.cgi?id=142383 + +2006-09-27 Frank Warmerdam + + * libtiff/tif_lzw.c, libtiff/tif_zip.c: Fixed problems with mixing + encoding and decoding on the same read-write TIFF handle. The LZW + code can now maintain encode and decode state at the same time. The + ZIP code will switch back and forth as needed. + http://bugzilla.remotesensing.org/show_bug.cgi?id=757 + +2006-09-20 Frank Warmerdam + + * libtiff: Rename config.h.vc and tif_config.h.vc to config.vc.h and + tif_config.vc.h for easier identification by folks using an IDE. + +2006-07-25 Frank Warmerdam + + * tif_msdos.c: Avoid handle leak for failed opens. c/o Thierry Pierron + +2006-07-19 Frank Warmerdam + + * tif_dirwrite.c: take care not to flush out buffer of strip/tile + data in _TIFFWriteDirectory if TIFF_BEENWRITING not set. Relates + to bug report by Peng Gao with black strip at bottom of images. + +2006-07-12 Frank Warmerdam + + * tif_dirwrite.c: make sure to use uint32 for wordcount in + TIFFWriteNormanTag if writecount is VARIABLE2 for ASCII fields. + It already seems to have been done for other field types. Needed + for "tiffset" on files with geotiff ascii text. + +2006-07-04 Bob Friesenhahn + + * {configure.ac, libtiff/tif_config.h.vc, libtiff/tif_jbig.c} + (JBIGDecode): jbg_newlen is not available in older JBIG-KIT and + its use does not appear to be required, so use it only when it is + available. + +2006-06-24 Andrey Kiselev + + * libtiff/tif_dirinfo.c: Added missed EXIF tag ColorSpace (40961). + + * libtiff/tif_dirread.c: Move IFD fetching code in the separate + function TIFFFetchDirectory() avoiding code duplication in + TIFFReadDirectory() and TIFFReadCustomDirectory(). + +2006-06-19 Frank Warmerdam + + * tools/tiff2pdf.c: Fix handling of -q values. + http://bugzilla.remotesensing.org/show_bug.cgi?id=587 + +2006-06-17 Frank Warmerdam + + * tif_readdir.c: Added case in EstimateStripByteCounts() for tiled + files. Modified TIFFReadDirectory() to not invoke + EstimateStripByteCounts() for case where entry 0 and 1 are unequal + but one of them is zero. + http://bugzilla.remotesensing.org/show_bug.cgi?id=1204 + +2006-06-08 Andrey Kiselev + + * libtiff/{tif_open.c, tif_dirread.c, tiffiop.h}: Move IFD looping + checking code in the separate function TIFFCheckDirOffset(). + + * libtiff/tif_aux.c: Added _TIFFCheckRealloc() function. + + * tools/tiffcmp.c: Fixed floating point comparison logic as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1191 + + * libtiff/tif_fax3.c: Fixed problems in fax decoder as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1194 + + * tools/tiff2pdf.c: Fixed buffer overflow condition in + t2p_write_pdf_string() as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1196 + +2006-06-07 Andrey Kiselev + + * {configure, configure.ac, libtiff/tif_jbig.c, tools/tiffcp.c}: Added + support for JBIG compression scheme (34661 code) contributed by Lee + Howard. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=896 + + * configure, configure.ac: OJPEG support enabled by default. + + * contrib/ojpeg/: Removed. New OJPEG support does not need this patch. + +2006-06-03 Bob Friesenhahn + + * libtiff/{tif_dirinfo.c, tif_print.c} : Fix crash in + TIFFPrintDirectory(). Joris Van Damme authored the fix. + +2006-04-21 Andrey Kiselev + + * tools/tiff2pdf.c: Unified line ending characters (always use '\n') + as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1163 + + * README.vms, Makefile.am, configure.com, libtiff/{Makefile.am, + tif_config.h-vms, tif_stream.cxx, tif_vms.c, tiffconf.h-vms}: + Added support for OpenVMS by Alexey Chupahin, elvis_75@mail.ru. + +2006-04-20 Andrey Kiselev + + * tools/{fax2ps.c, fax2tiff.c, ppm2tiff.c, ras2tiff.c, tiff2pdf.c}: + Properly set the binary mode for stdin stream as per bug + http://bugzilla.remotesensing.org/show_bug.cgi?id=1141 + + * man/{bmp2tiff.1, fax2ps.1, fax2tiff.1, gif2tiff.1, ras2tiff.1, + raw2tiff.1, rgb2ycbcr.1, sgi2tiff.1, tiff2bw.1, tiff2pdf.1, tiff2ps.1, + tiff2rgba.1, tiffcmp.1, tiffcp.1, tiffdither.1, tiffdump.1, tiffgt.1, + tiffset.1}: Improvements in page formatting as per bug + http://bugzilla.remotesensing.org/show_bug.cgi?id=1140 + + * html/tools.html, html/man/Makefile.am, tools/tiff2pdf.c: Fixed + typos as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1139 + +2006-04-18 Frank Warmerdam + + * nmake.opt: use /EHsc for VS2005 compatibility. Also define + _CRT_SECURE_NO_DEPRECATE to avoid noise on VS2005. + +2006-04-12 Joris Van Damme + + * libtiff/tif_getimage.c: Added support for planarconfig separate + non-subsampled YCbCr (i.e. separate YCbCr with subsampling [1,1]) + +2006-04-11 Joris Van Damme + + * libtiff/tif_getimage.c: Revision of all RGB(A) put routines + - Conversion of unassociated alpha to associated alpha now done with + more performant LUT, and calculation more correct + - Conversion of 16bit data to 8bit data now done with + more performant LUT, and calculation more correct + - Bugfix of handling of 16bit RGB with unassociated alpha + +2006-04-11 Joris Van Damme + + * libtiff/tif_getimage.c: + - When there is no alpha, gtTileSeparate and gtStripSeparate allocated + buffer for alpha strile and filled it, only to never read it back. + Removed allocation and fill. + - Minor rename of vars in gtTileSeparate and gtStripSeparate + anticipating planned functionality extension + +2006-04-08 Joris Van Damme + + * libtiff/tif_getimage.c: renamed pickTileContigCase to PickContigCase + and pickTileSeparateCase to PickSeparateCase as both work on strips as + well + + * libtiff/tif_getimage.c: moved img->get selection from + TIFFRGBAImageBegin into PickContigCase and PickSeparateCase to create + logical hook for planned functionality extension + +2006-04-08 Joris Van Damme + + * libtiff/tif_ojpeg.c: resolved memory leak that was a consequence + of inappropriate use of jpeg_abort instead of jpeg_destroy + +2006-04-07 Joris Van Damme + + * libtiff/tif_getimage.c: replaced usage of TIFFScanlineSize in + gtStripContig with TIFFNewScanlineSize so as to fix buggy behaviour + on subsampled images - this ought to get sorted when we feel brave + enough to replace TIFFScanlineSize altogether + + * libtiff/tif_ojpeg.c: fixed bug in OJPEGReadSkip + +2006-04-04 Joris Van Damme + + * libtiff/tiffio.h: added new type tstrile_t + + * libtiff/tif_dir.h: changed types of td_stripsperimage and td_nstrips + to new tstrile_t, types of td_stripoffset and td_stripbytecount to + toff_t* + + * libtiff/tif_ojpeg.c: totally new implementation + + * libtiff/tif_dirread.c: added several hacks to suit new support of + OJPEG + + * libtiff/tif_getimage.c: removed TIFFTAG_JPEGCOLORMODE handling + of OJPEG images in favor of tif_getimage.c native handling of + YCbCr and desubsampling + +2006-03-29 Frank Warmerdam + + * libtiff/tif_jpeg.c: JPEGVSetField() so that altering the photometric + interpretation causes the "upsampled" flag to be recomputed. Fixes + peculiar bug where photometric flag had to be set before jpegcolormode + flag. + +2006-03-25 Joris Van Damme + + * libtiff/tif_jpeg.c: strip size related bugfix in encode raw + + * libtiff/tif_strip.c: temporarilly added two new versions of + TIFFScanlineSize + - TIFFNewScanlineSize: proposed new version, after all related + issues and side-effects are sorted out + - TIFFOldScanlineSize: old version, from prior to 2006-03-21 change + This needs further sorting out. + +2006-03-25 Joris Van Damme + + * contrib/addtiffo/tif_ovrcache.c: bugfix to correctly pass size + of last truncated strip data to TIFFWriteEncodedStrip + +2006-03-25 Joris Van Damme + + * libtiff/{tif_jpeg.c, tif_strip.c}: bugfix of tif_jpeg decode raw + +2006-03-25 Joris Van Damme + + * libtiff/tif_getimage.c: bugfix/rewrite of putcontig8bitYCbCr22tile + + * libtiff/tif_getimage.c: added putcontig8bitYCbCr12tile + + * libtiff/tif_read.c: added support for new TIFF_NOREADRAW flag to + prepare the path for new tif_ojpeg.c + +2006-03-23 Andrey Kiselev + + * libtiff 3.8.2 released. + + * tools/Makefile.am: Use runtime paths linker flags when rpath + option enabled. + +2006-03-21 Andrey Kiselev + + * libtiff/libtiff.def: Added missed exports as per bug + http://bugzilla.remotesensing.org/attachment.cgi?id=337 + + * contrib/addtiffo/Makefile.vc, libtiff/Makefile.vc, port/Makefile.vc, + tools/Makefile.vc: Makefiles improvements as per bug + http://bugzilla.remotesensing.org/show_bug.cgi?id=1128 + + * nmake.opt libtiff/{tif_config.h.vc, tif_unix.c, tiffio.h}, + tools/{fax2ps.c, fax2tiff.c, tiff2pdf.c}: Fixed win32 I/O functions + usage as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1127 + + * libtiff/tif_strip.c: Take subsampling in account when calculating + TIFFScanlineSize(). + + * tools/tiffcp.c: Do not set RowsPerStrip bigger than image length. + +2006-03-17 Andrey Kiselev + + * tools/fax2tiff.c: Fixed wrong TIFFerror() invocations as per bug + http://bugzilla.remotesensing.org/show_bug.cgi?id=1125 + + * tools/fax2ps.c: Fixed reading the input stream from stdin as per bug + http://bugzilla.remotesensing.org/show_bug.cgi?id=1124 + +2006-03-16 Andrey Kiselev + + * libtiff/tiffiop.h: Added decalration for + _TIFFSetDefaultCompressionState(). + + * libtiff/{tif_jpeg.c, tif_fax3.c, tif_zip.c, tif_pixarlog.c, + tif_lzw.c, tif_luv.c}: Use _TIFFSetDefaultCompressionState() in all + codec cleanup methods. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1120 + +2006-03-15 Andrey Kiselev + + * libtiff/tif_jpeg.c: Do not cleanup codec state in TIFFInitJPEG(). As + per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1119 + + * tools/raw2tiff.c: Do not set RowsPerStrip larger than ImageLength. + As per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1110 + + * libtiff/tiffiop.h: dblparam_t typedef removed; GLOBALDATA macro + removed; move here the STRIP_SIZE_DEFAULT macro definition. + + * libtiff/{tif_dirread.c, tif_strip.c}: Removed STRIP_SIZE_DEFAULT + macro definition. + + * libtiff/tif_dir.c: Use double type instead of dblparam_t. + +2006-03-14 Andrey Kiselev + + * libtiff/tif_dirread.c: Do not check the PlanarConfig tag presence + in TIFFReadDirectory, because it is always set at the start of + function and we allow TIFFs without that tag set. + +2005-03-13 Andrey Kiselev + + * libtiff 3.8.1 released. + +2006-03-07 Andrey Kiselev + + * libtiff/tif_dirread.c: Fixed error reporting in TIFFFetchAnyArray() + function as per bug + http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 + + * libtiff/tif_dirread.c: More wise check for integer overflow + condition as per bug + http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 + + * libtiff/{tif_jpeg.c, tif_pixarlog.c, tif_fax3.c, tif_zip.c}: + Properly restore setfield/getfield methods in cleanup functions. As + per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 + +2006-03-03 Andrey Kiselev + + * libtiff/{tif_predict.c, tif_predict.h}: Added new function + TIFFPredictorCleanup() to restore parent decode/encode/field methods. + + * libtiff/{tif_lzw.c, tif_pixarlog.c, tif_zip.c}: Use + TIFFPredictorCleanup() in codec cleanup methods. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 + + * libtiff/tif_dirread.c: Fixed integer overflow condition in + TIFFFetchData() function. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1102 + +2006-03-01 Andrey Kiselev + + * libtiff/tif_ojpeg.c: Set the ReferenceBlackWhite with the + TIFFSetField() method, not directly. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1043 + + * tools/ppm2tiff.c: Added support for PBM files as per bug + http://bugzilla.remotesensing.org/show_bug.cgi?id=1044 + +2006-02-27 Andrey Kiselev + + * libtiff/tif_write.c: Small code rearrangement in TIFFWriteScanline() + to avoid crash as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1081. + +2006-02-26 Andrey Kiselev + + * tools/tiff2pdf.c: Functions t2p_sample_rgbaa_to_rgb() and + t2p_sample_rgba_to_rgb() was used in place of each other, that was + resulted in problems with RGBA images with associated alpha. + As per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1097 + +2006-02-23 Andrey Kiselev + + * libtiff/tif_dirwrite.c: Properly write TIFFTAG_DOTRANGE tag as per + bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1088. + + * libtiff/tif_print.c: Properly read TIFFTAG_PAGENUMBER, + TIFFTAG_HALFTONEHINTS, TIFFTAG_YCBCRSUBSAMPLING and TIFFTAG_DOTRANGE + tags as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1088. + + * tools/tiff2ps.c: Properly scale all the pages when converting + multipage TIFF with /width/height/center options set. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1080 + +2006-02-15 Andrey Kiselev + + * tools/tiff2pdf.c: Do not create output file until all option checks + will be done. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1072 + + * tools/bmp2tiff.c: Added ability to create multipage TIFFs from the + list of input files as per bug: + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1077 + +2006-02-09 Andrey Kiselev + + * libtiff/tif_tile.c: Fix error reporting in TIFFCheckTile() as per + bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1063. + + * tools/tiffgt.c: Avoid crashing in case of image unsupported by + TIFFRGBAImage interface. + + * libtiff/tif_color.c: Avoid overflow in case of wrong input as per + bug http://bugzilla.remotesensing.org/show_bug.cgi?id=1065. + +2006-02-07 Frank Warmerdam + + * tools/tiff2pdf.c: Fixed support for non-YCbCr encoded JPEG + compressed TIFF files, per submission from Dan Cobra. + +2006-02-07 Andrey Kiselev + + * libtiff/{tif_dirread.c, tif_packbits.c, tif_win32.c}: Properly + cast values to avoid warnings. As per bug + http://bugzilla.remotesensing.org/show_bug.cgi?id=1033. + + * libtiff/tif_dirinfo.c: Use TIFF_NOTYPE instead of 0 when + appropriate. As per bug + http://bugzilla.remotesensing.org/show_bug.cgi?id=1033. + + * libtiff/tif_aux.c: Fixed type of temporary variable in + _TIFFCheckMalloc() as per bug + http://bugzilla.remotesensing.org/show_bug.cgi?id=1033. + +2006-02-06 Andrey Kiselev + + * libtiff/tif_aux.c: Return static array when fetching default + YCbCrCoefficients (another problem, reported a the + http://bugzilla.remotesensing.org/show_bug.cgi?id=1029 entry). + +2006-02-03 Andrey Kiselev + + * libtiff/tif_dir.c: Special handling for PageNumber, HalftoneHints, + YCbCrSubsampling and DotRange tags as per bugs + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1029 + http://bugzilla.remotesensing.org/show_bug.cgi?id=1034 + + * libtiff/tif_dirread.c: Use _TIFFGetExifFieldInfo() instead of + _TIFFGetFieldInfo() in TIFFReadEXIFDirectory() call as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1026. + +2006-01-23 Andrey Kiselev + + * libtool related stuff updated from the 2.1a branch. + +2006-01-11 Frank Warmerdam + + * tools/bmp2tiff,pal2rgb,ppm2tiff,ras2tiff,raw2tiff,sgi2tiff, + tiff2bw,tiffcp: Fixed jpeg option processing so -c jpeg:r:50 works + properly as per bug: + http://bugzilla.remotesensing.org/show_bug.cgi?id=1025 + +2006-01-09 Bob Friesenhahn + + * configure.ac: Fix with_default_strip_size comparison as reported + by Norihiko Murase. + +2006-01-08 Bob Friesenhahn + + * test/Makefile.am (LIBTIFF): Due to linking against libtiff + incorrectly, tests were not actually testing the uninstalled + libtiff. Now they are. + +2006-01-04 Andrey Kiselev + + * libtiff/tif_dirinfo.c: Change definitions for TIFFTAG_ICCPROFILE, + TIFFTAG_PHOTOSHOP, TIFFTAG_RICHTIFFIPTC, TIFFTAG_XMLPACKET: readcount + should be uint32 value. + +2006-01-02 Bob Friesenhahn + + * html/man/Makefile.am (htmldoc): Fix htmldoc rule so that it can + be used if build directory is not the same as source directory. + * man/{TIFFGetField.3tiff, TIFFSetField.3tiff}: Documented + TIFFTAG_PHOTOSHOP, TIFFTAG_RICHTIFFIPTC, and TIFFTAG_XMLPACKET, + and re-sorted tag names in alphabetical order. + +2005-12-29 Andrey Kiselev + + * libtiff 3.8.0 released. + +2005-12-28 Bob Friesenhahn + + * tools/bmp2tiff.c (main): Fixed warning regarding returning + inconsistent types from a condition. + * tools/tiffcmp.c (CheckLongTag): Eliminate warning due to printf + format. + * tools/bmp2tiff.c: Reduce compilation warnings on big-endian CPUs. + +2005-12-28 Joris Van Damme + + * html/{index.html, support.hml, libtiff.html}: Cleaned up HTML + +2005-12-27 Andrey Kiselev + + * libtiff/tiffio.h: Added VC_EXTRALEAN definition before including + windows.h, to reduce the compile time. + +2005-12-26 Bob Friesenhahn + + * libtiff/tif_jpeg.c: Improve compilation under MinGW. + +2005-12-26 Andrey Kiselev + + * libtiff/{tif_dir.c, tif_dir.h, tif_dirread.c, tif_dirinfo.c}: + tiffFieldInfo and exifFieldInfo arrays definitions moved back to + tif_dirinfo.c; added _TIFFGetFieldInfo() and _TIFFGetExifFieldInfo() + private functions to retrieve FieldInfo arrays. + +2005-12-24 Bob Friesenhahn + + * html/build.html: Added some additional instructions for when + building using MSVC under Windows. Also fixed two HTML syntax + errors and used HTML Tidy to tidy up the HTML syntax and + formatting. + +2005-12-24 Andrey Kiselev + + * libtiff/{tif_aux.c, tif_dir.c, tif_dir.h, tif_dirwrite.c, + tif_print.c, tif_getimage.c}: Make InkSet, NumberOfInks, DotRange and + StoNits tags custom. + +2005-12-23 Andrey Kiselev + + * libtiff/{tif_aux.c, tif_dir.c, tif_dir.h, tif_print.c}: Make + WhitePoint tag custom. + + * libtiff/{tif_dir.h, tiff.h}: More EXIF tags added. + +2005-12-23 Joris Van Damme + + * libtiff/tiffio.h: fixed typo that potentially resulted in + redefininition of USE_WIN32_FILEIO + + * libtiff/*: Added more 'dual-mode' error handling: Done TIFFWarning + calls in core LibTiff. + +2005-12-21 Andrey Kiselev + + * libtiff/{tif_dir.c, tif_dir.h, tif_print.c}: Make RichTIFFIPTC, + Photoshop and ICCProfile tags custom. + +2005-12-21 Joris Van Damme + + * libtiff/*, contrib/*: Added 'dual-mode' error handling, enabling + newer code to get context indicator in error handler and still + remain compatible with older code: Done TIFFError calls everywhere + except in tools + +2005-12-20 Andrey Kiselev + + * tools/tiffcp.c: Added many error reporting messages; fixed integer + overflow as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=789 + +2005-12-16 Frank Warmerdam + + * contrib/addtiffo/*: Major upgrade by Joris to support subsampled + YCbCr images in jpeg compressed TIFF files. + +2005-12-14 Andrey Kiselev + + * tools/tiffcp.c: Return non-zero status when reading fails (again). + +2005-12-13 Andrey Kiselev + + * tools/tiffcp.c: Return non-zero status when reading fails. + +2005-12-12 Andrey Kiselev + + * libtiff/{tif_dir.h, tiff.h}: Added more EXIF tags. + +2005-12-09 Andrey Kiselev + + * libtiff/{tif_dir.c, tif_dir.h, tif_print.c}: Make XMLPacket tag + custom. + + * tools/tiffinfo.c: Print EXIF directory contents if exist. + + * libtiff/tiff.h: Few EXIF tag numbers added. + + * libtiff/{tif_dirinfo.c, tif_dirread.c, tif_dir.h, tif_dir.c, + tiffio.h}: Preliminary support to read custom directories. New + functions: TIFFReadCustomDirectory() and TIFFReadEXIFDirectory(). + +2005-12-07 Andrey Kiselev + + * libtiff/{tif_dirinfo.c, tif_dirread.c, tif_dir.h, tif_dir.c}: + More work to implement custom directory read support. + + * libtiff/{tif_aux.c, tif_dirinfo.c, tif_dirread.c, tif_dir.h, + tif_dir.c, tif_print.c}: Make YCbCrCoefficients and ReferenceBlackWhite + tags custom. + +2005-12-05 Andrey Kiselev + + * libtiff/tif_dirread.c: One more workaround for broken + StripByteCounts tag. Handle the case when StripByteCounts array filled + with completely wrong values. + +2005-11-30 Andrey Kiselev + + * libtiff/tif_dirinfo.c: Release file descriptor in case of failure + in the TIFFOpenW() function as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1003 + + * libtiff/tif_dirinfo.c: Correctly yse bsearch() and lfind() + functions as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=1008 + +2005-11-20 Frank Warmerdam + + * tif_open.c, tiff.h, tiffdump.c: Incorporate preliminary support + for MS MDI format. + http://bugzilla.remotesensing.org/show_bug.cgi?id=1002 + + * .cvsignore: many files added, and a few update according + to suggestion of Brad HArds on tiff mailing list. + +2005-11-03 Frank Warmerdam + + * libtiff/libtiff.def, tiffiop.h, tiffio.h: Made TIFFFreeDirectory + public. + +2005-10-31 Andrey Kiselev + + * tools/fax2tiff.c: Properly calculate sizes of temporary arrays + as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=943 + + * tools/fax2tiff.c: Added option '-r' to set RowsPerStrip parameter + as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=944 + + * tools/tiffdump.c: Fixed typeshift and typemask arrays initialization + problem as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=946 + + * tools/bmp2tiff.c: Fixed possible integer overflow error as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=965 + + * libtiff/tif_dirinfo.c: Make XResolution, YResolution and + ResolutionUnit tags modifiable during write process. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=977 + + * tools/tiffsplit.c: Copy fax related fields over splitted parts + as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=983 + +2005-10-21 Frank Warmerdam + + * tif_dirread.c: Don't try and split single strips into "0" strips + in ChopUpSingleUncompressedStrip. This happens in some degenerate + cases (like 1x1 files with stripbytecounts==0 (gtsmall.jp2 embed tiff) + +2005-10-20 Joris Van Damme + + * tif_fax3.c: changed 'at scanline ...' style warning/errors + with incorrect use of tif_row, to 'at line ... of + strip/tile ...' style + +2005-10-15 Frank Warmerdam + + * tif_write.c: fixed setting of planarconfig as per bug report + on the mailing list from Joris. + +2005-10-07 Andrey Kiselev + + * configure.ac, configure, nmake.opt, libtiff/{tif_config.h, + tif_dirread.c}: Make the default strip size configurable via the + --with-default-strip-size and STRIP_SIZE_DEFAULT options. + +2005-09-30 Bob Friesenhahn + + * html/support.html: Fixed link to documentation on Greg Ward's + LogLuv TIFF format. + +2005-09-28 Andrey Kiselev + + * tools/tiffdump.c: Fixed crash when reading malformed tags. + +2005-09-20 Andrey Kiselev + + * tools/tiff2pdf.c: Added missed 'break' statement as per bug + http://bugzilla.remotesensing.org/show_bug.cgi?id=932 + +2005-09-12 Andrey Kiselev + + * libtiff 3.7.4 released. + + * {configure, configure.ac, Makefile.am, autogen.sh}: Applied patch + from Patrick Welche (all scripts moved in the 'config' and 'm4' + directories). + +2005-09-12 Frank Warmerdam + + * libtiff/tif_open.c: reintroduce seek to avoid problem on solaris. + +2005-09-05 Frank Warmerdam + + * libtiff/tif_dir.c: When prefreeing tv->value in TIFFSetFieldV + also set it to NULL to avoid double free when re-setting custom + string fields as per: + + http://bugzilla.remotesensing.org/show_bug.cgi?id=922 + +2005-08-12 Frank Warmerdam + + * libtiff/tif_print.c: avoid signed/unsigned warning. + + * libtiff/tif_dirread.c: removed unused variable. + +2005-07-30 Frank Warmerdam + + * libtiff/tif_dir.c: Fixed up support for swapping "double complex" + values (128 bits as 2 64 bits doubles). GDAL gcore tests now + pass on bigendian (macosx) system. + +2005-07-28 Andrey Kiselev + + * libtiff/{tif_aux.c, tif_dirread.c, tif_fax3.c, tiffiop.h}: Rename + CheckMalloc() function to _TIFFCheckMalloc() and make it available + globally as an internal helper routine. + +2005-07-27 Andrey Kiselev + + * libtiff/tif_dir.c: More improvements in the "pass by value" part of + the custom tags handling code. + +2005-07-26 Andrey Kiselev + + * libtiff/{tif_dirread.c, tif_dirinfo.c}: Do not upcast BYTEs to + SHORTs in the TIFFFetchByteArray(). Remove TIFFFetchExtraSamples() + function, use TIFFFetchNormalTag() instead as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=831 + + Remove TIFFFetchExtraSamples() function, use TIFFFetchNormalTag() + instead. + + * libtiff/tiffconf.h.in: One more attempt to fix the AIX bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=39 + +2005-07-25 Andrey Kiselev + + * libtiff/tif_print.c: Fixed printing of the BYTE and SBYTE arrays. + + * tools/tiffdump.c: Added support for TIFF_IFD datatype. + +2005-07-21 Andrey Kiselev + + * libtiff/tif_write.c: Do not check the PlanarConfiguration field in + the TIFFWriteCheck() function in case of single band images (as per + TIFF spec). + +2005-07-12 Andrey Kiselev + + * SConstruct, libtiff/SConstruct: Added the first very preliminary + support for SCons software building tool (http://www.scons.org/). + This is experimental infrastructure and it will exist along with the + autotools mechanics. + +2005-07-07 Andrey Kiselev + + * port/{getopt.c, strcasecmp.c, strtoul.c}: Update modules from + the NetBSD source tree (the old 4-clause BSD license changed to + the new 3-clause one). + + * configure.ac, port/lfind.c, libtiff/tiffiop.h: Added lfind() + replacement module. + + * port/dummy.c: Make the dummy function static. + +2005-07-06 Andrey Kiselev + + * tools/tiffcp.c: Fixed WhitePoint tag copying. + + * libtiff/{tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_print.c}: + Make FieldOfViewCotangent, MatrixWorldToScreen, MatrixWorldToCamera, + ImageFullWidth, ImageFullLength and PrimaryChromaticities tags custom. + +2005-07-04 Andrey Kiselev + + * libtiff 3.7.3 released. + + * configure, configure.ac: Do not use empty -R option when linking + with --enable-rpath. + +2005-07-01 Andrey Kiselev + + * libtiff/{tiffiop.h, tif_open.c}: Added open option 'h' to avoid + reading the first IFD when needed. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=875 + + * libtiff/tif_color.c: Better use of TIFFmin() macro to avoid side + effects. + +2005-06-23 Andrey Kiselev + + * tools/tiff2pdf.c: Print two characters per loop in the + t2p_write_pdf_trailer(). As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=594 + + * tools/tiffgt.c: Use MacOS X OpenGL framework when appropriate. As + per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=844 + + * acinclude.m4: Updated to latest OpenGL test macros versions. + + * libtiff/tiff.h: Use correct int size on Sparc 64bit/Sun compiler + platform. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=855 + +2005-06-14 Andrey Kiselev + + * libtiff/tif_dirinfo.c: Added support for ClipPath, XClipPathUnits + and YClipPathUnits tags. + +2005-06-07 Andrey Kiselev + + * contrib/addtiffo/tif_ovrcache.c: Properly extract tile/strip size; + use pixel sized shift in contigous case. + +2005-06-06 Andrey Kiselev + + * contrib/addtiffo/{tif_overview.c, tif_ovrcache.c, tif_ovrcache.h}: + Make overviews working for contiguos images. + +2005-06-03 Andrey Kiselev + + * libtiff/tif_open.c: Replace runtime endianness check with the compile + time one. + + * libtiff/tif_predict.c: Floating point predictor now works on + big-endian hosts. + +2005-06-01 Andrey Kiselev + + * libtiff/tif_dir.c: Use _TIFFsetString() function when read custom + ASCII values. + + * libtiff/{tif_dirinfo.c, tif_dir.h, tif_dir.c, tif_print.c}: Make + DocumentName, Artist, HostComputer, ImageDescription, Make, Model, + Copyright, DateTime, PageName, TextureFormat, TextureWrapModes and + TargetPrinter tags custom. + + * libtiff/tif_jpeg.c: Cleanup the codec state depending on + TIFF_CODERSETUP flag (to fix memry leaks). + + * libtiff/tif_jpeg.c: Initialize JPEGTables array with zero after + allocating. + +2005-05-26 Andrey Kiselev + + * configure.ac, libtiff/Makefile.am: Added workaround for + OpenBSD/MirOS soname problem as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=838 + + * libtiff/tif_dirwrite.c: Use tdir_count when calling + TIFFCvtNativeToIEEEDouble() in the TIFFWriteDoubleArray() function as + per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=845 + +2005-05-25 Andrey Kiselev + + * tools/ppm2tiff.c: Fixed format string when read PPM file header with + the fscanf() function. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=861 + + * libtiff/{tif_dirinfo.c, tif_print.c}: TIFFFetchByteArray() returns + uint16 array when fetching the BYTE and SBYTE filds, so we should + consider result as pointer to uint16 array and not as array of chars. + As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=831 + + * libtiff/tif_dir.c: More efficient custom tags retrieval as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=830 + + * libtiff/tif_win32.c: Use FILE_SHARE_READ | FILE_SHARE_WRITE share + mode in CreateFile() call as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=829 + + * libtiff/Makefile.am: Fixed parallel compilation of the libtiff and + libtiffxx libraries as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=826 + + * contrib/addtiffo/{tif_overview.c, tif_ovrcache.h}: Sinchronized with + GDAL. + +2005-05-23 Frank Warmerdam + + * libtiff/tif_jpeg.c: Substantial fix for addtiffo problems with + JPEG encoded TIFF files. Pre-allocate lots of space for jpegtables + in directory. + +2005-05-22 Frank Warmerdam + + * libtiff/tif_dirread.c: Changed the code that computes + stripbytecount[0] if it appears bogus to ignore if stripoffset[0] is + zero. This is a common case with GDAL indicating a "null" tile/strip. + +2005-05-17 Andrey Kiselev + + * tools/tiffsplit.c: Check for JPEGTables tag presence before copying. + +2005-05-06 Frank Warmerdam + + * libtiff/tif_dirread.c: Applied similar change to + TIFFFetchPerSampleLongs and TIFFFetchPerSampleAnys. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=843 + + * libtiff/tif_jpeg.c: added LIB_JPEG_MK1 support in JPEGDecodeRaw(). + +2005-05-06 Andrey Kiselev + * tools/tiff2pdfr.c, man/tiff2pdf.1: Calculate the tile width properly; + added new option '-b' to use interpolation in output PDF files (Bruno + Ledoux). + +2005-05-05 Frank Warmerdam + + * libtiff/tif_dirread.c: Ensure that broken files with too many + values in PerSampleShorts work ok instead of crashing. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=843 + +2005-04-27 Andrey Kiselev + + * tools/tiffdither.c: Copy the PhotometricInterpretation tag from the + input file. + +2005-04-15 Andrey Kiselev + + * libtiff/tif_predict.c: Added ability to encode floating point + predictor, as per TIFF Technical Note 3. + +2005-04-14 Andrey Kiselev + + * libtiff/{tif_predict.h, tif_predict.c}: Added ability to decode + floating point predictor, as per TIFF Technical Note 3. + +2005-04-13 Andrey Kiselev + + * libtiff/{tiffio.h, tiffiop.h, tif_dir.c, tif_read.c, tif_swab.c}: + Added _TIFFSwab24BitData() and TIFFSwabArrayOfLong() functions used to + swap 24-bit floating point values. + + * libtiff/tiff.h: Added predictor constants. + +2005-04-08 Andrey Kiselev + + * libtiff/{tiffiop.h, tif_dir.c}: Use uint32 type for appropriate + values in _TIFFVSetField() function. Inspired by the bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=816 + + * man/TIFFSetField.3tiff: Fixed definition of the TIFFTAG_INKNAMES tag + as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=816 + +2005-03-30 Andrey Kiselev + + * libtiff/tif_open.c: Do not read header in case the output file + should be truncated (Ron). + + * libtiff/{tif_dirinfo.c, tif_config.h.vc}: Use lfind() instead + of bsearch() in _TIFFFindFieldInfoByName() function (Ron). + + * libtiff/{tiff.h, tif_dirinfo.c}: Fixes in EXIF tag ordering (Ron). + +2005-03-22 Andrey Kiselev + + * configure.ac, libtiff/Makefile.am: Use libtool machinery to pass + rpath option. + +2005-03-21 Andrey Kiselev + + * libtiff/{tif_dir.c, tif_print.c}: Handle all data types in custom + tags. + +2005-03-18 Andrey Kiselev + + * libtiff/dirinfo.c: Added DNG tags. + + * libtiff/{tif_dir.c, tif_print.c}: More improvements in custom tag + handling code. + + * libtiff/tiff.h: More comments; added missed DNG tag (LensInfo); + added DNG 1.1.0.0 tags. + + * tools/tif2pdf.c: Fixed problem with alpha channel handling as per + bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=794 + + * man/TIFFGetField.3tiff: Add a note about autoregistered tags. + +2005-03-17 Andrey Kiselev + + * nmake.opt: Build with Win32 CRT library by default. + + * tools/tiff2ps.c: Fixed typo in page size handling code. + + * libtiff/{tif_dir.c, tif_print.c}: Support for custom tags, passed + by value. + + * libtiff/{tiff.h, tif_dirinfo.c, tiffiop.h}: Added EXIF related tags. + +2005-03-15 Andrey Kiselev + + * libtiff 3.7.2 released. + +2005-03-09 Andrey Kiselev + + * tools/tiffcmp.c: Added ability to compare the 32-bit integer and + floating point data; complain on unsupported bit depths. + +2005-03-05 Andrey Kiselev + + * tif_stream.cxx: Use ios namespace instead of ios_base to support + GCC 2.95. + + * libtiff/{tiff.h, tif_fax3.tif, tif_jpeg.c}: Applied correct patch from + Lee Howard for HylaFax DCS tag + (see http://bugzilla.remotesensing.org/show_bug.cgi?id=771) + +2005-03-04 Andrey Kiselev + + * configure, configure.ac: Use -rpath option instead of -R as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=732 + + * libtiff/{tiff.h, tif_fax3.tif, tif_jpeg.c}: Applied patch from Lee + Howard to support a new tag TIFFTAG_FAXDCS (34911) used in HylaFax + software. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=771 + + * nmake.opt, html/build.html: Add more comments, change the config + file organization a bit as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=764 + + * tools/tiffcmp.c: Use properly sized buffer in short arrays comparison + as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=785 + +2005-03-03 Andrey Kiselev + + * libtiff/tif_dirread.c: More logic to guess missed strip size as per + bug http://bugzilla.remotesensing.org/show_bug.cgi?id=705 + + * tools/fax2ps.c: Replace insecure mktemp() function with the + tmpfile() as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=786 + +2005-02-04 Andrey Kiselev + + * libtiff/tiff.h: Changed the int8 definition to be always signed char + as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=727 + + * libtiff/tiffio.h: Move TIFFOpenW() function into the extern "C"{} + block as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=763 + +2005-02-03 Bob Friesenhahn + + * tools/tiffgt.c: Fix problem on big-endian CPUs so that images + display more correctly. Images display brighter than they should + on a Sun workstation. + +2005-02-03 Andrey Kiselev + + * libtiff/tif_dirread.c: Estimate strip size in case of wrong or + suspicious values in the tags. As per bugs + + http://bugzilla.remotesensing.org/show_bug.cgi?id=705 + + and + + http://bugzilla.remotesensing.org/show_bug.cgi?id=320 + + * tools/tiff2ps.c: Fixed problem with page sizes as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=742 + +2005-01-31 Bob Friesenhahn + + * libtiff/tiff.h (TIFFTAG_TILEWIDTH): Corrected description. + (TIFFTAG_TILELENGTH): Corrected description. + +2005-01-30 Andrey Kiselev + + * configure.ac: Fixes for --with-docdir option as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=759 + + * libtiff/tif_open.c: Remove unnesessary TIFFSeekFile() call as per + bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=756 + + * libtiff/tif_stream.cxx: Fixes for C++ stream interface from + Michael Rinne and Edward Lam. + +2005-01-15 Andrey Kiselev + + * configure.ac: Make the documentation directory location configurable + via the --with-docdir option (as suggested by Jeremy C. Reed). + + * libtiff/tif_color.c: Use double as the second argument of pow() + function in TIFFCIELabToRGBInit(). As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=741 + + * libtiff/tif_pixarlog.c: Avoid warnings when converting float to + integer as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=740 + + * libtiff/tif_getimage.c: Always fill the error message buffer in + TIFFRGBAImageBegin() as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=739 + +2005-01-12 Andrey Kiselev + + * libtiff/tif_jpeg.c: Added ability to read/write the fax specific + TIFFTAG_FAXRECVPARAMS, TIFFTAG_FAXSUBADDRESS and TIFFTAG_FAXRECVTIME + tags as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=736 + + * libtiff/tif_win32.c: Fixed message formatting in functions + Win32WarningHandler() and Win32ErrorHandler() as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=735 + + * tools/tiff2ps.c: Interpret the -w and -h options independently. As + per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=689 + +2005-01-11 Andrey Kiselev + + * libtiff/tiffio.h: Move the color conversion routines in the 'extern + "C"' section as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=727 + + * libtiff/tiff.h: Restore back the workaround for AIX Visual Age C + compiler to avoid double definition of BSD types as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=39 + + * libtiff/Makefile.am: Place the C++ stream API in the separate + library called libtiffxx to avoid unneeded dependencies. Probably + there will be more C++ API in the future. As per bugs + + http://bugzilla.remotesensing.org/show_bug.cgi?id=733 + + and + + http://bugzilla.remotesensing.org/show_bug.cgi?id=730 + +2005-01-05 Andrey Kiselev + + * tools/tiffdump.c: Fixed problem when read broken TIFFs with the + wrong tag counts (Dmitry V. Levin, Martin Pitt). + + * configure.ac: Replace --disable-c++ with the --disable-cxx option as + per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=730 + +2004-12-25 Andrey Kiselev + + * libtiff/tif_getimage.c: More fixes for multiple-alpha-channelled + RGB-images as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=713 + + + * tools/tiffset.c: Convert character option to integer value as per + bug http://bugzilla.remotesensing.org/show_bug.cgi?id=725 + +2004-12-20 Andrey Kiselev + + * libtiff 3.7.1 released. + + * html/tiffset.1.html: Add missed manual page as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=678 + + * libtiff/tiff.h: Revert back libtiff data type definitions as per + bug http://bugzilla.remotesensing.org/show_bug.cgi?id=687 + +2004-12-19 Andrey Kiselev + + * libtiff/tif_dirread.c: Do not forget about TIFF_VARIABLE2 when + checking for tag count in TIFFReadDirectory() function. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=713 + + * libtiff/{tif_dirread.c, tif_fax3.c}: More argument checking in + CheckMallock() function. + + * libtiff/tif_getimage.c: Support for multiple-alpha-channelled + RGB-images as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=718 + +2004-12-15 Frank Warmerdam + + * libtiff/tif_getimage.c: #define A1 bracketing for clean build on + SunPro compiler. + +2004-12-11 Bob Friesenhahn + + * autogen.sh: aclocal and autoheader should be executed after + libtoolize. Also add '-I .' to aclocal invocation to check + current directory for macros. + +2004-12-10 Andrey Kiselev + + * libtiff/tif_dirwrite.c: Always write TIFFTAG_SUBIFD using LONG type + as per bugs + + http://bugzilla.remotesensing.org/show_bug.cgi?id=703 + + and + + http://bugzilla.remotesensing.org/show_bug.cgi?id=704 + +2004-12-04 Andrey Kiselev + + * nmake.opt: Link with the user32.lib in windowed mode. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=697 + + * libtiff/tif_win32.c: Use char* strings instead of TCHAR in windowed + mode as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=697 + + * libtiff/tif_config.in.vc: Removed unneded definitions for + read/open/close/lseek functions to fix the + + http://bugzilla.remotesensing.org/show_bug.cgi?id=680 + +2004-12-03 Andrey Kiselev + + * libtiff/{tif_dir.c, tif_dirread.c}: Remove TIFFReassignTagToIgnore() + call from the TIFFReadDirectory() function. TIFFReassignTagToIgnore + must be removed in the future, as it was never used properly. As per + bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=692 + +2004-11-30 Bob Friesenhahn + + * libtiff/tif_jpeg.c: Added a work-around in order to allow + compilation with the heavily modified version of libjpeg delivered + with Cygwin. + +2004-11-29 Andrey Kiselev + + * libtiff/tif_dir.c: Properly handle tags, which have the uint32 + counts. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=693 + + * tools/fax2ps.c: Be able to extract the first page (#0). As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=690 + +2004-11-28 Andrey Kiselev + + * libtiff/tif_unix.c: Make UNIX module compilable (and usable) + on Windows. + + * nmake.opt: Add missed DLLNAME variable. + +2004-11-26 Frank Warmerdam + + * libtiff/makefile.vc: make it easier to rename the libtiff DLL. + +2004-11-24 Andrey Kiselev + + * man/libtiff.3tiff: Improvements in the "LIST OF ROUTINES" table as + per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=545 + + * man/tiffset.1: Added manual page for tiffset tool written by Jay + Berkenbilt. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=678 + +2004-11-23 Frank Warmerdam + + * libtiff/tif_error.c: fixed TIFFerror call to be TIFFError. + +2004-11-21 Frank Warmerdam + + * html/document.html: Updated Adobe web links as per email from Joris. + +2004-11-21 Andrey Kiselev + + * libtiff/{tiffio.hxx, tiffio.h}: C++ stream interface moved to new + file tiffio.hxx. We don't have any C++ in tiffio.h, those who want to + use C++ streams should #include . + +2004-11-13 Andrey Kiselev + + * libtiff/tiff.h: Added Adobe DNG tags. + + * libtiff/tif_win32.c: Typo fixed. + + * libtiff/{tif_stream.cxx, tiffio.h}: C++ stream interface updated to + be compliant with the latest standard. Appropriate additions in + makefiles now completed. + +2004-11-11 Andrey Kiselev + + * tools/tiffset.c, libtiff/tif_dirinfo.c: Properly handle the + different tag types. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=600 + +2004-11-10 Andrey Kiselev + + * libtiff/tif_aux.c: Set the appropriate ReferenceBlackWhite array for + YCbCr image which lacks that tag (noted by Hans Petter Selasky). + +2004-11-09 Andrey Kiselev + + * libtiff/tif_color.c: Division by zero fixed (Hans Petter Selasky). + +2004-11-07 Andrey Kiselev + + * libtiff/{tif_stream.cxx, tiffio.h}: Added C++ stream interface + contributed by Edward Lam (see + http://bugzilla.remotesensing.org/show_bug.cgi?id=654 for details). + Though no changes in any makefiles yet. + +2004-11-05 Frank Warmerdam + + * libtiff/tif_open.c: Removed close() in TIFFClientOpen() if file + is bad. This is the callers responsibility. + http://bugzilla.remotesensing.org/show_bug.cgi?id=651 + +2004-11-05 Andrey Kiselev + + * libtiff/{tiffio.h, tif_win32.c, libtiff.def}: Added TIFFOpenW() + function to work with the double byte strings (used to represent + filenames in some locales). As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=625 + + * libtiff/tif_dirread.c: Fixed problem when fetching BitsPerSample and + Compression tags of type LONG from broken TIFFS as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=662 + + * libtiff/tif_dirinfo.c: Fixed definition for TIFFTAG_RICHTIFFIPTC, + the writecount should have uint32 type. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=662 + + * libtiff/tif_write.c: Fixed wrong if() statement in + TIFFAppendToStrip() function as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=660 + +2004-11-04 Andrey Kiselev + + * libtiff/tif_dirinfo.c: Change definition for TIFFTAG_EXTRASAMPLES + field. The caller should supply a count when setting this field. As + per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=648 + + * libtiff/{tif_jpeg.c, tif_ojpeg.c}: TIFFTAG_JPEGTABLES should have + uint32 count. Use this type everywhere. + +2004-11-03 Frank Warmerdam + + * libtiff/tif_next.c: avoid use of u_long and u_char types. Bug 653. + +2004-11-02 Frank Warmerdam + + * tools/tiff2rgba.c: removed extra newlines in usage message. + +2004-10-30 Andrey Kiselev + + * libtiff/tif_dirwrite.c: Improvements in tag writing code. + + * tools/tiff2ps.c: Fixed wrong variable data type when read Position + tags (Tristan Hill). + +2004-10-30 Frank Warmerdam + + * libtiff/tiffiop.h: added fallback definition of assert() if we + don't have assert.h. + +2004-10-29 Andrey Kiselev + + * libtiff/tif_fax3.c: Fixed case with the wrong decode routines + choosing when the incorrect Group4Options tag set. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=323 + + * libtiff/tif_dirwrite.c: Fixed problem with passing count variable of + wrong type when writing the TIFF_BYTE/TIFF_SBYTE tags in + TIFFWriteNormalTag(). + +2004-10-28 Andrey Kiselev + + * tools/tiff2ps.c: Fixed wrong variable data type when read Resolution + tags (Peter Fales). + + * tools/{bmp2tiff.c, raw2tiff.c}: Get rid of stream I/O functions. + +2004-10-28 Frank Warmerdam + + * tools/tiff2pdf.c: added casts to avoid warnings. + + * libtiff/libtiff.def: Added several more entry points required + to link fax2tiff.c against the DLL on windows. + +2004-10-27 Andrey Kiselev + + * configure, configure.ac: Added --enable-rpath option to embed linker + paths into library binary. + +2004-10-26 Andrey Kiselev + + * tools/tiffset.c: Check the malloc return value (Dmitry V. Levin). + + * libtiff/{tif_strip.c, tif_tile.c}: Zero division problem fixed + (Vladimir Nadvornik, Dmitry V. Levin). + +2004-10-16 Andrey Kiselev + + * libtiff 3.7.0 released. + +2004-10-15 Bob Friesenhahn + + * libtiff/tif_jpeg.c: There seems to be no need to include stdio.h + in this file so its inclusion is removed. Including stdio.h + sometimes incurs an INT32 typedef conflict between MinGW's + basetsd.h and libjpeg's jmorecfg.h. + +2004-10-15 Andrey Kiselev + + * man/bmp2tiff.1: Added manual page for bmp2tiff utility. + +2004-10-13 Bob Friesenhahn + + * tools/tiffcmp.c (leof): Renamed from 'eof' in order to avoid + conflict noticed under MinGW. + * ltmain.sh: Fix for MinGW compilation. + +2004-10-13 Frank Warmerdam + + * man/tiffsplit.1: Fixed to indicate using aaa-zzz, not aa-zz. + http://bugzilla.remotesensing.org/show_bug.cgi?id=635 + +2004-10-12 Andrey Kiselev + + * libtiff/{tif_dirread.c, tif_jpeg.c, tif_luv.c, tif_ojpeg.c, + tif_pixarlog.c, tif_write.c}: Handle the zero strip/tile sizes + properly (Dmitry V. Levin, Marcus Meissner). + +2004-10-11 Andrey Kiselev + + * libtiff/tif_dirinfo.c: Type of the TIFFTAG_SUBIFD field changed + to TIFF_IFD. + +2004-10-10 Andrey Kiselev + + * tools/bmp2tif.c: Check the space allocation results. + +2004-10-09 Andrey Kiselev + + * libtiff/tif_dir.c: Initialize td_tilewidth and td_tilelength fields + of the TIFFDirectory structure with the 0 instead of -1 to avoid + confusing integer overflows in TIFFTileRowSize() for striped images. + + * tools/tiff2pdf.c: Fixed TransferFunction tag handling reported + by Ross A. Finlayson. + + * libtiff/tif_dir.c: Fixed custom tags handling as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=629 + +2004-10-08 Frank Warmerdam + + * libtiff/tif_dirinfo.c: Fix bug with tif_foundfield and reallocation + of tif_fieldinfo. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=630 + +2004-10-04 Bob Friesenhahn + + * contrib/iptcutil/README: Added the missing README which goes + along with iptcutil. + +2004-10-03 Andrey Kiselev + + * libtiff/tif_compress.c: Improved error reporting in + TIFFGetConfiguredCODECs() (Dmitry V. Levin). + +2004-10-02 Andrey Kiselev + + * libtiff 3.7.0beta2 released. + + * libtiff/{tif_aux.c, tif_compress.c, tif_dirinfo.c, tif_dirwrite.c, + tif_extension.c, tif_fax3.c, tif_luv.c, tif_packbits.c, + tif_pixarlog.c, tif_write.c}: Added checks for failed memory + allocations and integer overflows (Dmitry V. Levin). + + * libtiff/tiff.h: Missed TIFF_BIGTIFF_VERSION constant added. + +2004-10-01 Frank Warmerdam + + * libtiff/tif_open.c: added a more informative message if a BigTIFF + file is opened. + +2004-09-30 Frank Warmerdam + + * libtiff/tif_dirinfo.c: changed type of XMLPacket (tag 700) to + TIFFTAG_BYTE instead of TIFFTAG_UNDEFINED to comply with the info + in the Adobe XMP Specification. + +2004-09-29 Andrey Kiselev + + * libtiff/{tif_jpeg.c, tif_pixarlog.c}: Use _TIFFmemset() instead of + memset(). + + * libtiff/{tif_dirread.c, tif_strip.c, tif_tile.c}: Applied patches + from Dmitry V. Levin to fix possible integer overflow problems. + +2004-09-28 Andrey Kiselev + + * libtiff/tif_getimage.c: Check for allocated buffers before clearing + (Dmitry V. Levin). + +2004-09-26 Andrey Kiselev + + * libtiff/{tif_dir.h, tif_dir.c, tif_dirread.c, tif_write.c}: + Optimize checking for the strip bounds. + + * libtiff/{tif_dirread.c, tif_strip.c}: TIFFScanlineSize() and + TIFFRasterScanlineSize() functions report zero in the case of integer + overflow now. Properly handle this case in TIFFReadDirectory() + (patches from Dmitry V. Levin). + +2004-09-25 Andrey Kiselev + + * libtiff/{tif_dirinfo.c, tif_strip.c, tif_tile.c}: Use TIFFhowmany8() + macro where appropriate. + + * tools/tiff2bw.c: Write ImageWidth/Height tags to output file, as + noted by Gennady Khokhorin. + + * libtiff/tif_dirread.c: Always check the return values, returned + by the _TIFFmalloc() (Dmitry V. Levin). + + * libtiff/tif_dir.c: Fixed possible integer overflow _TIFFset*Array() + functions (Dmitry V. Levin). + + * libtiff/{tif_dirread.c, tif_dir.c, tif_write.c}: + Potential memory leak fixed in TIFFReadDirectory(), _TIFFVSetField(), + TIFFGrowStrips() (found by Dmitry V. Levin). + +2004-09-24 Andrey Kiselev + + * libtiff/{tiffio.h, tif_compress.c}: Added TIFFGetConfiguredCODECs() + to get the list of configured codecs. + + * libtiff/{tiffiop.h, tif_dirread.c}: More overflow fixes from + Dmitry V. Levin. + +2004-09-23 Andrey Kiselev + + * libtiff/tif_dirread.c: Applied patch from Dmitry V. Levin to fix + possible integer overflow in CheckMalloc() function. + +2004-09-22 Andrey Kiselev + + * libtiff/{tiffiop.h, tif_strip.c}: Use TIFFhowmany8() macro instead + of plain TIFFhowmany() where appropriate. + +2004-09-21 Andrey Kiselev + + * libtiff/tif_getimage.c: Initialize arrays after space allocation. + +2004-09-19 Andrey Kiselev + + * libtiff 3.7.0beta released. + + * libtiff/{tif_luv.c, tif_next.c, tif_thunder.c}: Several buffer + overruns fixed, as noted by Chris Evans. + +2004-09-14 Bob Friesenhahn + + * commit: Added a script to make it more convenient to commit + updates. The CVS commit message is extracted from this ChangeLog + file. + +2004-09-14 Andrey Kiselev + + * configure.ac, configure, aclocal.m4, libtiff/{mkspans.c, tif_fax3.c, + tif_getimage.c, tif_luv.c, tif_lzw.c, tif_ojpeg.c, tif_packbits.c, + tif_predict.c, tif_read.c, tif_swab.c, tif_thunder.c, tif_write.c, + tif_dir.c, tif_dirread.c, tif_dirwrite.c, tif_jpeg.c, tif_dirinfo.c, + tif_vms.c, tif_print.c, tif_strip.c, tif_tile.c, tif_dir.h, + tif_config.h.in, tiffiop.h}: + Get rid of BSD data types (u_char, u_short, u_int, u_long). + +2004-09-13 Bob Friesenhahn + + * libtiff/tiff.h: Fix column tagging. Reference current Adobe XMP + specification. Reference libtiff bug tracking system to submit + private tag additions. + +2004-09-12 Bob Friesenhahn + + * tools/tiffgt.c: Include "tif_config.h". + + * configure.ac: Use AM_PROG_CC_C_O since it is now needed to build + tiffgt. This results in the 'compile' script being added to the + project. + + * tools/Makefile.am (tiffgt_CFLAGS): Add extra build options + required to find OpenGL headers necessary to build tiffgt. Also + ensure that the libtiff that we built is used rather than some other + libtiff installed on the system. + +2004-09-12 Andrey Kiselev + + * configure.ac, acinclude.m4, aclocal.m4: New macros to detect GLUT + libraries. + +2004-09-11 Bob Friesenhahn + + * configure.ac: Pass library configuration defines via + tif_config.h rather than extending CPPFLAGS. Configure a + libtiff/tiffconf.h in order to satisfy application requirements + (not used by library build). Do not define _POSIX_C_SOURCE=2 since + this causes failure to build on systems which properly respect + this request. + + * libtiff/tiffconf.h.in: New file to act as the template for the + configured tiffconf.h + + * libtiff/files.lst (HDRS): Install the configured tiffconf.h. + +2004-09-10 Frank Warmerdam + + * html/internals.html: Split off a discussion of adding new tags + into addingtags.html. + +2004-09-10 Andrey Kiselev + + * test/{ascii_tag.c, long_tag.c}: Preliminary test suite added. + + * tools/tiff2pdf.c: Fixed reading TransferFunction tag as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=590 + + * libtiff/tif_print.c: Fixes in InkNames and NumberOfInks reporting. + + * libtiff/tif_dirread.c: Don't reject to read tags of the + SamplesPerPixel size when the tag count is greater than number of + samples as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=576 + + * libtiff/tiff.h: Use _TIFF_DATA_TYPEDEFS_ guardian to switch off + defining int8/uint8/... etc. types. As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=607 + +2004-09-09 Frank Warmerdam + + * tools/tiff2ps.c, tools/tiffmedian.c: fiddle with include files + to avoid compile warnings about getopt() and a few other things. + +2004-09-02 Andrey Kiselev + + * libtiff/tif_dirread.c: Use memcpy() function instead of pointer + assigning magic in TIFFFetchFloat(). + +2004-09-01 Andrey Kiselev + + * libtiff/{tiffio.h, tif_open.c}: Applied patches from Joris Van Damme + to avoid requirement for tiffiop.h inclusion in some applications. See + here + + http://www.asmail.be/msg0054799560.html + + for details. + + * tools/fax2tiff.c: Use the new functions in the code. + +2004-08-25 Andrey Kiselev + + * tools/tiff2pdf.c: Initialize arrays properly. + + * tools/tiff2ps.c: Avoid zero division in setupPageState() function; + properly initialize array in PSDataBW(). + +2004-08-24 Andrey Kiselev + + * tools/tiff2pdf.c: More fixes for bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=590 + + from Ross Finlayson. + +2004-08-23 Andrey Kiselev + + * tools/tiff2ps.c: Fixed problem with uninitialized values. + + * libtiff/tif_dir.c: Initialize tif_foundfield data member in the + TIFFDefaultDirectory() (in addition to 2004-08-19 fix). + + * tools/tiff2pdf.c: Fixed a bunch of problems as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=590 + +2004-08-20 Andrey Kiselev + + * tools/tiff2pdf.c: Applied patch from Ross Finlayson that checks + that the input file has compression, photometric interpretation, + etcetra, tags or if not than a more descriptive error is returned. + + * libtiff/tif_dirread.c: Fixed problem in TIFFReadDirectory() in the + code, responsible for tag data type checking. + +2004-08-19 Andrey Kiselev + + * libtiff/{tiffiop.h, tif_dirinfo.c}: Fixed problem with the static + variable as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=593 + +2004-08-16 Andrey Kiselev + + * tools/ras2tiff.c: Fixed issue with missed big-endian checks as per + bug http://bugzilla.remotesensing.org/show_bug.cgi?id=586 + +2004-08-01 Andrey Kiselev + + * libtiff/{tif_config.h.in, tif_config.h.vc}: config.h.in and + config.h.vc files renamed in the tif_config.h.in and tif_config.h.vc. + +2004-07-24 Andrey Kiselev + + * libtiff/tif_lzw.c: LZW compression code is merged back from the + separate package. All libtiff tools are updated to not advertise an + abcence of LZW support. + +2004-07-12 Andrey Kiselev + + * libtiff/tiffio.h: Revert thandle_t back to void* type. + +2004-07-11 Andrey Kiselev + + * libtiff/{tif_read.c, tif_tile.c, tif_strip.c}: Fixes in error + messages, as suggested by Bernd Herd. + +2004-07-03 Andrey Kiselev + + * libtiff/tif_dir.c: Call TIFFError() instead of producing warnings + when setting custom tags by value. Reported by Eric Fieleke. + +2004-06-14 Andrey Kiselev + + * tools/bmp2tiff.c: Add missed RawsPerStrip setting. + +2004-06-08 Andrey Kiselev + + * tools/bmp2tiff.c: Added new utility to convert Windows BMP files + into TIFFs. + +2004-06-07 Andrey Kiselev + + * libtiff 3.7.0alpha released. + +2004-06-06 Andrey Kiselev + + * libtiff/{tiff.h, tif_dirwrite.c, tif_fax3.c, tif_packbits.c,}: Get rid + of ugly 64-bit hacks, replace them with the clever (autoconf based ) + ones :-). + + * libtiff/tiffio.h: Define thandle_t as int, not void* (may cause + problems in 64-bit environment). + +2004-06-05 Andrey Kiselev + + * tools/tiffset.c: tiffset now can set any libtiff supported tags. + Tags can be supplied by the mnemonic name or number. + + * libtiff/{tiffio.h, tif_dir.h, tif_dirinfo.c,}: Added two new + functions TIFFFindFieldInfoByName() and TIFFFieldWithName(). + +2004-05-27 Andrey Kiselev + + * libtiff/tif_ojpeg.c: Fixed problem with duplicated SOI and SOF + markers as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=581 + +2004-05-24 Andrey Kiselev + + * tools/tiffsplit.c: Don't forget to copy Photometric + Interpretation tag. + +2004-05-20 Andrey Kiselev + + * libtiff/{tif_open.c, tiffio.h}: New function added: + TIFFIsBigEndian(). Function returns nonzero if given was file written + in big-endian order. + + * tools/tiffsplit.c: Fixed problem with unproperly written multibyte + files. Now output files will be written using the same byte order + flag as in the input image. See + + http://bugzilla.remotesensing.org/show_bug.cgi?id=574 + + for details. + +2004-05-19 Frank Warmerdam + + * libtiff/tif_print.c: added (untested) support for printing + SSHORT, SLONG and SRATIONAL fields. + + * tools/tiffcp.c: close output file on normal exit. + +2004-05-17 Andrey Kiselev + + * libtiff/tif_fax3.c: Avoid reading CCITT compression options + if compression type mismatches. See + + http://bugzilla.remotesensing.org/show_bug.cgi?id=565 + +2004-04-30 Andrey Kiselev + + * libtiff/tif_strip.c: Never return 0 from the + TIFFNumberOfStrips(). + +2004-04-29 Andrey Kiselev + + * libtiff/tif_dirread.c: Workaround for broken TIFF writers which + store single SampleFormat value for multisampled images. See + + http://bugzilla.remotesensing.org/show_bug.cgi?id=562 + +2004-04-25 Andrey Kiselev + + * configure.ac, libtiff/{tiff.h, config.h.in}: Added tests for int8, + int16 and int32 types to avoid complains on some compilers. Details at + + http://bugzilla.remotesensing.org/show_bug.cgi?id=39 + +2004-04-20 Andrey Kiselev + + * tools/tiff2pdf.c: Fixed problem with unaligned access as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=555 + +2004-04-14 Andrey Kiselev + + * libtiff/tif_write.c: Allow in-place updating of the compressed + images (don't work properly with all codecs). For details see GDAL bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=534 + +2004-04-06 Andrey Kiselev + + * libtiff/tif_jpeg.c: Workaround for wrong sampling factors used + in the Intergarph JPEG compressed TIFF images as per bug: + + http://bugzilla.remotesensing.org/show_bug.cgi?id=532 + +2004-04-04 Frank Warmerdam + + * libtiff/tif_open.c: close clientdata if TIFFClientOpen() fails + via bad2. + +2004-03-26 Andrey Kiselev + + * tools/tiffcp.c: Properly set Photometric Interpretation in case of + JPEG compression of grayscale images. + + * tools/tiffcp.c: Don't emit warnings when Orientation tag does not + present in the input image. + +2004-03-19 Andrey Kiselev + + * {many}: The first attempt to switch to autotools. + +2004-03-03 Andrey Kiselev + + * libtiff/tif_open.c: Use dummy mmap/munmap functions in + TIFFClientOpen() when the appropriate client functions was not + supplied by user. + +2004-03-02 Frank Warmerdam + + * tools/ycbcr.c: fixed main() declaration as per: + http://bugzilla.remotesensing.org/show_bug.cgi?id=513 + +2004-02-26 Andrey Kiselev + + * tools/tiffsplit.c: Copy JPEGTables tag contents for JPEG compressed + images. Reported by Artem Mirolubov. + + * libtiff/tif_dirread.c: Fixed problem with handling TIFF_UNDEFINED + tag type in TIFFFetchNormalTag() as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=508 + +2004-02-17 Frank Warmerdam + + * libtiff/tif_codec.c: Fixed typo in TIFFInitPackBits name as per: + http://bugzilla.remotesensing.org/show_bug.cgi?id=494 + +2004-02-05 Andrey Kiselev + + * libtiff/tif_fax3.c: Fixed problem with CCITT encoding modes as per + bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=483 + + But we need more work on fax codec to support update mode. + +2004-01-30 Frank Warmerdam + + * libtiff/libtiff.def: Added TIFFCurrentDirOffset, TIFFWriteCheck, + TIFFRGBAImageOK, and TIFFNumberOfDirectories as suggested by + Scott Reynolds. + +2004-01-29 Andrey Kiselev + + * libtiff/tiff.h: Fixed tag definitions for TIFFTAG_YCLIPPATHUNITS + and TIFFTAG_INDEXED as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=475 + + * libtiff/{tif_win32.c, tif_unix.c}: Check whether the pointer is + NULL before proceeding further as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=474 + + Check results, returned by the TIFFFdOpen() before returning and close + file if TIFFFdOpen() failed as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=468 + + * libtiff/tif_open.c: More fixes for + + http://bugzilla.remotesensing.org/show_bug.cgi?id=468 + +2004-01-28 Andrey Kiselev + + * libtiff/{libtiff.def, tif_close.c, tiffio.h, tif_open.c}: Separate + TIFFCleanup() from the TIFFClose() in order to fix the bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=468 + + * tools/tiffcp.c: Fixed problem with wrong interpretation of the + InkNames tag as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=466 + + Memory leak fixed. + +2004-01-21 Frank Warmerdam + + * libtiff/tif_dirwrite.c: Fixed handling of writable ASCII tags that + are field_passcount=TRUE properly. Arguably anonymous custom tags + should be declared as passcount=FALSE, but I don't want to change + that without a careful review. + +2004-01-20 Andrey Kiselev + + * libtiff/tif_write.c: Fixed reporting size of the buffer in case of + stripped image in TIFFWriteBufferSetup(). As per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=460 + +2004-01-11 Andrey Kiselev + + * libtiff/tif_dir.c: Incomplete cleanup in TIFFFreeDirectory(), + patch from Gerben Koopmans. + + * libtiff/tif_dirread.c: Check field_passcount value before setting + the value of undefined type, patch from Gerben Koopmans. + +2004-01-02 Andrey Kiselev + + * tools/tiffcp.c: Fixed problem with wrong Photometric setting for + non-RGB images. + +2003-12-31 Andrey Kiselev + + * libtiff/tif_win32.c: Fixed problem with _TIFFrealloc() when the NULL + pointer passed. Patch supplied by Larry Grill. + + * libtiff/{tiff.h, tif_fax3.c}:Fixes for AMD 64 platform as + suggested by Jeremy C. Reed. + +2003-12-26 Andrey Kiselev + + * libtiff 3.6.1 released. + +2003-12-24 Andrey Kiselev + + * config.guess, config.sub: Updated from the recent upstream. + +2003-12-22 Andrey Kiselev + + * libtiff/{tif_color, tif_getimage.c, tiffio.h}, man/TIFFcolor.3t: + More cleanups in color conversion interface, added appropriate manual + page. + +2003-12-19 Andrey Kiselev + + * libtiff/{tif_extension.c, tif_dirinfo.c, tiff.h}: Warnings fixed as + per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=357 + + * tools/tiff2ps.c: Added support for alpha channel. Fixes + + http://bugzilla.remotesensing.org/show_bug.cgi?id=428 + + * libtiff/{libtiff.def, tif_color.c, tif_getimage.c, tiffio.h}: + Interface for Lab->RGB color conversion is finally cleaned up. + Added support for ReferenceBlackWhite tag handling when converted from + YCbCr color space. The latter closes + + http://bugzilla.remotesensing.org/show_bug.cgi?id=120 + +2003-12-07 Andrey Kiselev + + * libtiff/{tif_getimage.c, tiffio.h}: Avoid warnings. + + * libtiff/makefile.vc, tools/makefile.vc: Support for IJG JPEG + library. + +2003-12-06 Andrey Kiselev + + * libtiff/{tif_getimage.c, tif_aux.c}: Read WhitePoint tag from the + file and properly use it for CIE Lab->RGB transform. + +2003-12-04 Andrey Kiselev + + * libtiff/{tif_getimage.c, tif_color.c, tiffio.h}: YCbCr->RGB + conversion routines now in the tif_color.c module. New function + TIFFYCbCrtoRGB() available in TIFF API. + + * libtiff/tif_dirwrite.c: Handle TIFF_IFD tag type correctly. + +2003-12-03 Andrey Kiselev + + * libtiff/{tif_getimage.c, tif_color.c, tiffio.h}: Improvements in + CIE Lab conversion code. Start moving YCbCr stuff to the tif_color.c + module. + + * libtiff/{tif_getimage.c, tiffio.h}, man{TIFFReadRGBAImage.3t, + TIFFReadRGBAStrip.3t, TIFFReadRGBATile.3t, TIFFRGBAImage.3t}: + Finally resolved problems with orientation handling. TIFFRGBAImage + interface now properly supports all possible orientations, i.e. images + will be flipped both in horizontal and vertical directions if + required. 'Known bugs' section now removed from the appropriate manual + pages. Closed bug entry: + + http://bugzilla.remotesensing.org/show_bug.cgi?id=322 + +2003-12-02 Andrey Kiselev + + * libtiff/tif_dir.c: Fixed order of the parameters in TIFFError() + function calls as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=440 + +2003-11-28 Ross Finlayson + + * tools/tiff2pdf.c: Some bugs fixed. + +2003-11-27 Andrey Kiselev + + * libtiff/tif_luv.c: Fixed bug in 48-bit to 24-bit conversion routine, + reported by Antonio Scuri. + + * man/tiff2pdf.1: Few improvements in page layout. + + * Makefile.in, /man/Makefile.in, /html/man/tiff2pdf.1.html: + Added support fpr tiff2pdf manual page. + +2003-11-26 Ross Finlayson + + * /man/tiff2pdf.1: File added to repository. + +2003-11-26 Andrey Kiselev + + * Makefile.in, /tools/{Makefile.in, makefile.vc}: + Added support fpr tiff2pdf utility. + +2003-11-25 Ross Finlayson + + * /tools/tiff2pdf.c: File added to repository. + +2003-11-22 Andrey Kiselev + + * /tools/raw2tiff.c: sqrtf() replaced with sqrt(). + +2003-11-21 Andrey Kiselev + + * /tools/raw2tiff.c: #include removed. + + * tools/{Makefile.in, tiffgt.c}: Unmaintained and platform dependent + sgigt utility removed and replaced with the completely rewritten + portable tiffgt tool (depend on OpenGL and GLUT). Initial revision, + there is a lot of things to improve. + + * libtiff/tif_ojpeg.c: TIFFVGetField() function now can properly + extract the fields from the OJPEG files. Patch supplied by Ross + Finlayson. + + * libtiff/{tiffio.h, tif_codec.c}, man/{libtiff.3t, TIFFcodec.3t}: + Added new function TIFFIsCODECConfigured(), suggested by Ross + Finlayson. + +2003-11-18 Andrey Kiselev + + * libtiff/tif_dirinfo.c: Implemented binary search in + _TIFFMergeFieldInfo(). Patch supplied by Ross Finlayson. + + * libtiff/tif_dir.h: _TIFFFindOrRegisterdInfo declaration replaced + with _TIFFFindOrRegisterFieldInfo as reported by Ross Finlayson. + +2003-11-17 Frank Warmerdam + + * tif_dirread.c: do not mark all anonymously defined tags to be + IGNOREd. + +2003-11-17 Andrey Kiselev + + * contrib/pds/{tif_pdsdirread.c, tif_pdsdirwrite.c}: Use + TIFFDataWidth() function insted of tiffDataWidth array. + +2003-11-16 Andrey Kiselev + + * libtiff/{tiff.h, tif_dirinfo.c}: Added support for IFD (13) + datatype, introduced in "Adobe PageMaker TIFF Tech. Notes". + +2003-11-15 Frank Warmerdam + + * Makefile.in: fixed missing backslash for tif_color.c in list. + +2003-11-13 Andrey Kiselev + + * libtiff/{tif_color.c, tif_getimage.c, tiffio.h, Makefile.in}: + New color space conversion code: CIE L*a*b* 1976 images now supported + by the TIFFRGBAImage interface. All introduced routines go to new + module tif_color.c. Eventually all color conversion functions should + be moved there. + +2003-11-12 Andrey Kiselev + + * tools/{ras2tiff.c, rasterfile.h}: Properly determine SUN Rasterfiles + with the reverse byte order (it is reported by the magic header + field). Problem reported by Andreas Wiesmann. + + * tools/raw2tiff.c, man/raw2tiff.1: Few improvements in correlation + calculation function. Guessing mechanics now documented in manual page. + +2003-11-11 Andrey Kiselev + + * tools/raw2tiff.c: Implemented image size guessing using + correlation coefficient calculation between two neighbour lines. + +2003-11-09 Frank Warmerdam + + * libtiff/tif_tile.c: remove spurious use of "s" (sample) in the + planarconfig_contig case in TIFFComputeTile(). + + http://bugzilla.remotesensing.org/show_bug.cgi?id=387 + +2003-11-09 Andrey Kiselev + + * libtiff/tiffiop.h: New macros: TIFFmax, TIFFmin and TIFFrint. + +2003-11-07 Andrey Kiselev + + * libtiff/{tiffio.h, tif_strip.c}, man/{TIFFstrip.3t, libtiff.3t}: + Added TIFFRawStripSize() function as suggested by Chris Hanson. + +2003-11-03 Andrey Kiselev + + * libtiff/{tif_lzw.c, tif_fax3.c}: Proper support for update mode as + per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=424 + +2003-10-29 Andrey Kiselev + + * libtiff/libtiff.def: Added TIFFReadRGBAImageOriented. + + * html/build.html: Added note about GNU make requirement. + +2003-10-25 Andrey Kiselev + + * Makefile.in: Fixes in using MAKEFLAGS as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=418 + + * port/install.sh.in: Option -p added to the mkdir command to create + all directory tree structure before installing. + +2003-10-18 Andrey Kiselev + + * /tools/tiff2ps.c: #include replaced with the + #include . + +2003-10-16 Andrey Kiselev + + * Makefile.in: Add an absolute path to the test_pics.sh call. + +2003-10-12 Andrey Kiselev + + * libtiff/tiffcomp.h: #define _BSDTYPES_DEFINED when defining BSD + typedefs. + +2003-10-09 Andrey Kiselev + + * configure, libtiff/{Makefile.in, mkversion.c}: + Relative buildings fixed. + + * tools/Makefile.in: Added "-I../libtiff" to the tiffset building + rule. + +2003-10-07 Andrey Kiselev + + * Makefile.in: Added missed v3.6.0.html. + + * libtiff/tiffio.h: Typo fixed: ORIENTATION_BOTTOMLEFT replaced with + ORIENTATION_BOTLEFT. + +2003-10-04 Andrey Kiselev + + * 3.6.0 final release. + +2003-10-03 Andrey Kiselev + + * libtiff/{tif_getimage.c, tiffio.h}, man/TIFFReadRGBAImage.3t: New + function TIFFReadRGBAImageOriented() implemented to retrieve raster + array with user-specified origin position as suggested by Jason Frank. + See + + http://bugzilla.remotesensing.org/show_bug.cgi?id=322 + + for details. + + * tools/tiff2rgba.c: Switched to use TIFFReadRGBAImageOriented() + instead of TIFFReadRGBAImage(). + + * tools/tiff2ps.c: Fixed possible endless loop as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=404 + +2003-09-30 Andrey Kiselev + + * libtiff/tif_dirread.c: Check field counter against number of fields + in order to fix + + http://bugzilla.remotesensing.org/show_bug.cgi?id=366 + + * libtiff/tif_fax3.c: Fix wrong line numbering as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=342 + +2003-09-25 Andrey Kiselev + + * libtiff/{tiffiop.h, tif_dirread.c, tif_dir.c, tif_open.c, + tif_close.c}: Store a list of opened IFD to prevent looping as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=383 + +2003-09-23 Andrey Kiselev + + * libtiff/tif_dirread.c: More fixes for EstimateStripByteCounts(). See + + http://bugzilla.remotesensing.org/show_bug.cgi?id=358 + +2003-08-21 Andrey Kiselev + + * tools/tiffmedian.c: int declaration replaced with the uint32 to + support large images as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=382 + +2003-08-12 Andrey Kiselev + + * libtiff/Makefile.in: Fixed problem with building in different + directory. + + * tools/tiff2ps.c: Added missing #include . + + * libtiff/tif_dirwrite.c: More fixes for custom tags code + from Ashley Dreier. + +2003-08-07 Andrey Kiselev + + * tools/tiff2ps.c: Added page size setting when creating PS Level 2. + Patch submitted by Balatoni Denes (with corrections from Tom + Kacvinsky). + + * tools/tiff2ps.c: Fixed PS comment emitted when FlateDecode is + being used. Reported by Tom Kacvinsky. + + * libtiff/tif_dirwrite.c: Fixed problem with custom tags writing, + reported by Ashley Dreier. + + * libtiff/tif_print.c: Fixed problem with float tags reading, support + for printing RATIONAL and BYTE tags added. + +2003-08-05 Andrey Kiselev + + * libtiff/tif_lzw.c: Move LZW codec state block allocation back to + TIFFInitLZW(), because its initialization in LZWSetupDecode() cause + problems with predictor initialization. Remove O_RDONLY check during + state block allocation to be able open LZW compressed files in update + mode. + + Problem exist for libtiff version of the tif_lzw.c module. One from + lzw-compression-kit hasn't such troubles. + +2003-08-04 Frank Warmerdam + + * libtiff/tif_write.c: modified tif_write.c so that the various + encoded write functions use tif_postdecode() to apply byte order + swapping (swab) to the application passed data buffer if the same + would be done when reading. This allows us to write pixel data with + more than 8 bits per sample to existing files of a non-native byte + order. One side effect of this change is the applications buffer + itself is altered in this case by the act of writing. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=171 + +2003-07-25 Frank Warmerdam + + * libtiff/tif_open.c: avoid signed/unsigned casting warning + initializing typemask as per patch from J.A. Strother. + + * tools/tiffcp.c: fixed signed/unsigned casting warning. + + * libtiff/tif_print.c: dos2unix conversion. + + * tools/tiffsplit.c: increased the maximum number of pages that + can be split. Patch provided by Andrew J. Montalenti. + +2003-07-11 Andrey Kiselev + + * tools/raw2tiff.c: Added option `-p' to explicitly select color + space of input image data. Closes + + http://bugzilla.remotesensing.org/show_bug.cgi?id=364 + +2003-07-08 Frank Warmerdam + + * tif_aux.c, tif_codec.c, tif_dir.c, tif_dirread.c, tif_extension.c, + tif_fax3.c, tif_getimage.c, tif_luv.c, tif_lzw.c, tif_next.c, + tif_packbits.c, tif_predict.c, tif_print.c, tif_swab.c, tif_thunder.c: + avoid casting warning at /W4. + +2003-07-03 Andrey Kiselev + + * tools/thumbnail.c: Memory leak fixed as reported by Robert S. Kissel. + +2003-06-30 Andrey Kiselev + + * libtiff/tif_pixarlog.c: Unused variables removed. + + * libtiff/{tif_dirread.c, tif_dir.c}: Fixed problem with + EstimateStripByteCounts() as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=358 + + * libtiff/{tif_dirwrite.c, tif_packbits.c}: Fixed compilation on + 64-bit architectures as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=357 + + * libtiff/tif_dirinfo.c: TIFFDataWidth() returns 0 in case of + unknown data type. + +2003-06-19 Frank Warmerdam + + * libtiff/tif_print.c: fixed some serious bugs when printing + custom tags ... almost certain to crash. + + * libtiff/tif_dirread.c: Don't ignore custom fields that are + autodefined. Not sure how this got to be like this. + +2003-06-18 Andrey Kiselev + + * 3.6.0 Beta2 released. + + * tools/tiffcmp.c, man/tiffcmp.1: Fixed problem with unused data + comparing as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=349 + + `-z' option now can be used to set the number of reported different + bytes. + +2003-06-09 Andrey Kiselev + + * tools/tiffcp.c, man/tiffcp.1: Added possibility to specify value -1 + to -r option to get the entire image as one strip. See + + http://bugzilla.remotesensing.org/show_bug.cgi?id=343 + + for details. + +2003-06-04 Andrey Kiselev + + * tools/tiffcp.c: Set the correct RowsPerStrip and PageNumber + values as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=343 + +2003-05-27 Frank Warmerdam + + * libtiff/tif_jpeg.c: modified segment_height calculation to always + be a full height tile for tiled images. Also changed error to just + be a warning. + +2003-05-25 Andrey Kiselev + + * tools/fax2tiff.c: Page numbering fixed, as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=341 + +2003-05-20 Andrey Kiselev + + * contrib/ojpeg/{Makefile.in, jdhuff.h, jinclude.h, ojpeg.c, README}, + configure, Makefile.in: Switched back to the old behaviour. Likely + better solution should be found for OJPEG support. + +2003-05-11 Andrey Kiselev + + * libtiff/mkversion.c: Fixed problem with wrong string size when + reading RELEASE-DATE file. + +2003-05-07 Andrey Kiselev + + * tools/tiff2ps.c: Fixed bug in Ascii85EncodeBlock() function: array + index was out of range. + +2003-05-06 Andrey Kiselev + + * contrib/ojpeg/{Makefile.in, jdhuff.h, jinclude.h, ojpeg.c, README}, + configure, Makefile.in: Improved libtiff compilation with OJPEG + support. Now no need for patching IJG JPEG library, hack required by + libtiff will be compiled and used in-place. Implemented with + suggestion and help from Bill Allombert, Debian's libjpeg maintainer. + + * libtiff/tif_aux.c: Properly handle TIFFTAG_PREDICTOR in + TIFFVGetFieldDefaulted() function. + +2003-05-05 Andrey Kiselev + + * tools/ppm2tiff.c: PPM header parser improved: now able to skip + comments. + + * tools/tiffdither.c: Fixed problem with bit fill order tag setting: + was not copied from source image. + + * libtiff/getimage.c: Workaround for some images without correct + info about alpha channel as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=331 + +2003-04-29 Andrey Kiselev + + * tools/tiff2ps.c, man/tiff2ps.1: Add ability to generate PS Level 3. + It basically allows one to use the /flateDecode filter for ZIP + compressed TIFF images. Patch supplied by Tom Kacvinsky. Fixes + + http://bugzilla.remotesensing.org/show_bug.cgi?id=328 + + * tools/tiff2ps.c: Force deadzone printing when EPS output specified + as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=325 + +2003-04-17 Andrey Kiselev + + * libtiff/tif_dirread.c: Removed additional check for StripByteCounts + due to problems with multidirectory images. Quality of error messages + improved. + +2003-04-16 Andrey Kiselev + + * tools/tiffcp.c: Fixed problem with colorspace conversion for JPEG + encoded images. See bug entries + + http://bugzilla.remotesensing.org/show_bug.cgi?id=275 + + and + + http://bugzilla.remotesensing.org/show_bug.cgi?id=23 + + * libtiff/tif_dirread.c: Additional check for StripByteCounts + correctness. Fixes + + http://bugzilla.remotesensing.org/show_bug.cgi?id=320 + +2003-03-12 Andrey Kiselev + + * tools/{fax2ps.c, fax2tiff.c, gif2tiff.c, pal2rgb.c, ppm2tiff.c, + ras2tiff.c, raw2tiff.c, rgb2ycbcr.c, thumbnail.c, tiff2bw.c, + tiff2ps.c, tiff2rgba.c, tiffcp.c, tiffdither.c, tiffinfo.c, + tiffmedian.c}: Added library version reporting facility to all tools. + +2003-03-06 Frank Warmerdam + + * port/install.sh.in: Fixed problems with install producing paths + like ///usr/local/lib on cygwin. + +2003-02-27 Andrey Kiselev + + * tools/fax2tiff.c, man/fax2tiff.1: New switch (-X) to set width of + raw input page. Patch supplied by Julien Gaulmin. See + + http://bugzilla.remotesensing.org/show_bug.cgi?id=293 + + for details. + +2003-02-26 Frank Warmerdam + + * libtiff/tif_dir.c: fixed up the tif_postdecode settings + responsible for byte swapping complex image data. + + * libtiff/tif_lzw.c: fixed so that decoder state isn't allocated till + LZWSetupDecode(). Needed to read LZW files in "r+" mode. + +2003-02-07 Andrey Kiselev + + * tools/ppm2tiff.c: Fixed problem with too many arguments. + +2003-02-04 Andrey Kiselev + + * tools/raw2tiff.c: Memory leak fixed. + +2003-02-03 Andrey Kiselev + + * tools/fax2tiff.c, man/fax2tiff.1: Applied patch from Julien Gaulmin + (thanks, Julien!). More switches for fax2tiff tool for better control + of input and output. Details at + + http://bugzilla.remotesensing.org/show_bug.cgi?id=272 + +2003-02-03 Frank Warmerdam + + * libtiff/tif_jpeg.c: Modified to defer initialization of jpeg + library so that we can check if there is already any tile/strip data + before deciding between creating a compressor or a decompressor. + +2003-01-31 Frank Warmerdam + + * libtiff/tif_write.c: TIFFWriteCheck() now fails if the image is + a pre-existing compressed image. That is, image writing to + pre-existing compressed images is not allowed. + + * libtiff/tif_open.c: Removed error if opening a compressed file + in update mode. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=198 + +2003-01-31 Andrey Kiselev + + * config.guess, config.sub: Updated to recent upstream versions. + +2003-01-15 Frank Warmerdam + + * cut 3.6.0 Beta release. + +2002-12-20 Andrey Kiselev + + * tools/fax2ps.c, man/fax2ps.1: Page size was determined + in wrong way as per bug + + http://bugzilla.remotesensing.org/show_bug.cgi?id=239 + +2002-12-17 Frank Warmerdam + + * libtiff/tif_dirread.c: Allow wrong sized arrays in + TIFFFetchStripThing(). + + http://bugzilla.remotesensing.org/show_bug.cgi?id=49 + +2002-12-02 Frank Warmerdam + + * libtiff/tif_dir.c: fix problem with test on td_customValueCount. + Was using realloc even first time. Fix by Igor Venevtsev. + +2002-11-30 Frank Warmerdam + + * libtiff/tif_dir.c: fixed bug with resetting an existing custom + field value. + + * libtiff/tif_dir.c: Fixed potential problem with ascii "custom" + tags in TIFFVGetField() ... added missing break. + +2002-10-14 Frank Warmerdam + + * tools/tiff2ps.c: fixes a problem where "tiff2ps -1e" did not make + the scanline buffer long enough when writing rgb triplets. + The scanline needs to be 3 X the number of dots or else it will + contain an incomplete triplet and programs that try to separate + the eps by redefining the colorimage operator will get messed up. + Patch supplied by William Bader. + + * Makefile.in: added tif_extension.c to file list as per + http://bugzilla.remotesensing.org/show_bug.cgi?id=218. + +2002-10-11 Andrey Kiselev + + * configure, config.site, libtiff/{tif_unix.c, Makefile.in}: Fix for + large files (>2GiB) supporting. New option in the config.site: + LARGEFILE="yes". Should be enough for I/O of the large files. + +2002-10-10 Frank Warmerdam + + * libtiff/html/v3.6.0.html: new release notes. + + * libtiff/index.html: removed faq, cvs snapshot cruft. Added email + link for Andrey. Pointer to v3.6.0.html. + + * libtiff/Makefile.in: added direct rule for tiffvers.h for release. + +2002-10-07 Andrey Kiselev + * tools/tiff2ps.c, man/tiff2ps.1: Applied patch form Sebastian Eken + (thanks, Sebastian!). New switches: + -b # for a bottom margin of # inches + -c center image + -l # for a left margin of # inches + -r rotate the image by 180 degrees + New features merged with code for shrinking/overlapping. + Previously added -c and -n switches (for overriding PS units) renamed + in -x and -y respectively. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=200 + + * html/man/*.html: Updated from actual manual pages. + +2002-10-06 Frank Warmerdam + + * libtiff/tif_jpeg.c: fixed problem with boolean defined with wrong + size on windows. Use #define boolean hack. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=188 + + * libtiff/tiff.h: Don't do special type handling in tiff.h unless + USING_VISUALAGE is defined. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=39 + +2002-10-03 Frank Warmerdam + + * libtiff/tiff.h: added COMPRESSION_JP2000. + +2002-10-02 Andrey Kiselev + + * libtiff/tif_dirread.c: Another fix for the fetching SBYTE arrays + by the TIFFFetchByteArray() function. Should finally resolve + + http://bugzilla.remotesensing.org/show_bug.cgi?id=52 + + * configure: Set -DPIXARLOG_SUPPORT option along with -DZIP_SUPPORT + + * html/Makefile.in: New targets added: html and groffhtml for + producing HTML representations of the manual pages automatically. + html target uses man2html tool, groffhtml uses groff tool. + +2002-09-29 Frank Warmerdam + + * configure, libtiff/Makefile.in: Added SCO OpenServer 5.0.6 support + from John H. DuBois III. + +2002-09-15 Andrey Kiselev + + * Makefile.in, /man/{raw2tiff.1, Makefile.in, libtiff.3}: Added + manual page for raw2tiff(1) tool. + +2002-09-12 Andrey Kiselev + + * /libtiff/{tiffio.h, tif_dir.h}: TIFFDataWidth() declaration moved to + the tiffio.h header file. + + * Makefile.in, /man/{TIFFDataWidth.3t, Makefile.in, libtiff.3}: Added + manual page for TIFFDataWidth() function + +2002-09-08 Frank Warmerdam + + * libtiff/tif_dirread.c: Expand v[2] to v[4] in TIFFFetchShortPair() + as per http://bugzilla.remotesensing.org/show_bug.cgi?id=196. + + * tools/tiff2ps.c: Don't emit BeginData/EndData DSC comments + since we are unable to properly include the amount to skip. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=80 + +2002-09-02 Andrey Kiselev + + * /libtiff/tif_dirread.c: Fixed problem with SBYTE type data fetching + in TIFFFetchByteArray(). Problem described at + http://bugzilla.remotesensing.org/show_bug.cgi?id=52 + +2002-08-22 Andrey Kiselev + + * /libtiff/tif_dirinfo.c: Further additions to free custom fields + in _TIFFSetupFieldInfo() function. + See http://bugzilla.remotesensing.org/show_bug.cgi?id=169 for details. + + * /libtiff/tif_lzw.c: Additional consistency checking added in + LZWDecode() and LZWDecodeCompat(). + Fixes http://bugzilla.remotesensing.org/show_bug.cgi?id=190 + and http://bugzilla.remotesensing.org/show_bug.cgi?id=100 + + * /libtiff/tif_lzw.c: + Added check for valid code lengths in LZWDecode() and + LZWDecodeCompat(). Fixes + http://bugzilla.remotesensing.org/show_bug.cgi?id=115 + +2002-08-16 Andrey Kiselev + + * /libtiff/{Makefile.vc, libtiff.def}: + Missed declarations added. + +2002-08-15 Frank Warmerdam + + * tif_getimage.c: Ensure that TIFFRGBAImageBegin() returns the + return code from the underlying pick function. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=177 + + * tif_dir.h: changed FIELD_CODEC to 66 from 64 to avoid overlap + with FIELD_CUSTOM as mentioned in bug 169. + + * tif_close.c: added logic to free dynamically created anonymous + field definitions to correct a small memory leak. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=169 + +2002-08-10 Andrey Kiselev + + * /tools/{raw2tiff.c, Makefile.in, Makefile.lcc, Makefile.vc}: + New tool: raw2tiff --- raw images to TIFF converter. No manual page yet. + +2002-07-31 Frank Warmerdam + + * libtiff/tif_jpeg.c: Fixed problem with setting of nrows in + JPEGDecode() as per bugzilla bug (issue 1): + + http://bugzilla.remotesensing.org/show_bug.cgi?id=129 + + * libtiff/{tif_jpeg.c,tif_strip.c,tif_print.c}: Hacked tif_jpeg.c to + fetch TIFFTAG_YCBCRSUBSAMPLING from the jpeg data stream if it isn't + present in the tiff tags. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=168 + + * libtiff/tif_read.c, libtiff/tif_write.c: TIFFReadScanline() and + TIFFWriteScanline() now set tif_row explicitly in case the codec has + fooled with the value. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=129 + +2002-06-22 Andrey Kiselev + + * /tools/tiff2ps.c: Added workaround for some software that may crash + when last strip of image contains fewer number of scanlines than + specified by the `/Height' variable. See + http://bugzilla.remotesensing.org/show_bug.cgi?id=164 + for explanation. + +2002-06-21 Andrey Kiselev + + * tools/tiff2ps, man/tiff2ps.1: New functionality for tiff2ps utility: + splitting long images in several pages. See + http://bugzilla.remotesensing.org/show_bug.cgi?id=142 for explanation. + Patch granted by John Williams . + +2002-06-11 Frank Warmerdam + + * libtiff/contrib/win95: renamed to contrib/win_dib. Added new + Tiffile.cpp example of converting TIFF files into a DIB on Win32. + This one is described in: + + http://bugzilla.remotesensing.org/show_bug.cgi?id=143 + + * libtiff/tif_ojpeg.c: Major upgrade from Scott. See details at: + + http://bugzilla.remotesensing.org/show_bug.cgi?id=156 + +2002-05-10 Andrey Kiselev + + * tools/tiff2ps: New commandline switches to override resolution + units obtained from the input file. Closes + http://bugzilla.remotesensing.org/show_bug.cgi?id=131 + +2002-04-26 Andrey Kiselev + + * libtiff/libtiff.def: Added missed declaration. + +2002-04-22 Andrey Kiselev + + * tools/fax2tiff.c: Updated to reflect latest changes in libtiff. + Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=125 + +2002-04-20 Andrey Kiselev + + * libtiff/tif_open.c: Pointers to custom procedures + in TIFFClientOpen() are checked to be not NULL-pointers. + +2002-04-18 Andrey Kiselev + + * libtiff/libtiff.def: Added missed declarations. + + * libtiff/tif_pixarlog.c: Updated for using tif_tagmethods structure. + +2002-04-16 Andrey Kiselev + + * libtiff/tif_lzw.c: Additional checks for data integrity introduced. + Should finally close + http://bugzilla.remotesensing.org/show_bug.cgi?id=100 + +2002-04-10 Andrey Kiselev + + * tools/tiff2ps: Division by zero fixed. + Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=88 + +2002-04-09 Andrey Kiselev + + * libtiff/: tif_dirwrite.c, tif_write.c, tiffio.h: + TIFFCheckpointDirectory() routine added. + Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=124 + + * man/: TIFFWriteDirectory.3t, Makefile.in: Added description + for the new function. + +2002-04-08 Andrey Kiselev + + * libtiff/: tif_codec.c, tif_compress.c, tiffiop.h: Introduced + additional members tif->tif_decodestatus and tif->tif_encodestatus + for correct handling of unconfigured codecs (we should not try to read + data or to define data size without correct codecs). + + * libtiff/tif_getimage.c: The way of codecs checking in TIFFRGBAImageOK + changed. Now it has used tif->tif_decodestatus and + tif->tif_encodestatus. + Should fix http://bugzilla.remotesensing.org/show_bug.cgi?id=119 (in + case of __cvs_8.tif test image). + + * libtiff/: tif_dirinfo.c, tif_dirread.c: Somebody makes a bug in + tif_dirread.c when TIFFCreateAnonFieldInfo was introduced. + Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=119 in case + of _cvs_00000-00.tif, _cvs_00000-01.tif and _cvs_00000-02.tif. + +2002-04-04 Andrey Kiselev + + * libtiff/: tif_lzw.c: Assertions in LZWDecode and LZWDecodeCompat + replaced by warnings. Now libtiff should read corrupted LZW-compressed + files by skipping bad strips. + Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=100 + +2002-04-03 Frank Warmerdam + + * libtiff/tif_dirwrite.c: Removed some dead code. + + * libtiff/*: Cleanup some warnings. + + * libtiff/tif_dir.c: Fixed bug with count returned by TIFFGetField() + for variable length FIELD_CUSTOM values. Was int * but should be + u_short *. + +2002-04-01 Andrey Kiselev + + * tools/: tifcp.c: Added support for 'Orientation' tag in tiffcp + utility (at cpStripToTile routine). + +2002-03-27 Frank Warmerdam + + * tif_dirread.c: avoid div-by-zero if rowbytes is zero in chop func. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=111 + + * tif_print.c: Fixed so that ASCII FIELD_CUSTOM values with + passcount set FALSE can be printed (such as TIFFTAG_SOFTWARE). + + * libtiff/tif_dir.c,tif_dirinfo.c,tif_dir.h,tif_ojpeg.c: modified so + that TIFFTAG_SOFTWARE uses FIELD_CUSTOM as an example. + +2002-03-26 Dwight Kelly + + * libtiff/: tiff.h, tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_dirread.c, + tif_dirwrite.c: Added get/put code for new tag XMLPACKET as defined + in Adobe XMP Technote. Added missing INKSET tag value from TIFF 6.0 spec + INKSET_MULTIINK (=2). Added missing tags from Adobe TIFF technotes: + CLIPPATH, XCLIPPATHUNITS, YCLIPPATHUNITS, OPIIMAGEID, OPIPROXY and + INDEXED. Added PHOTOMETRIC tag value from TIFF technote 4 ICCLAB (=9). + +2002-03-26 Andrey Kiselev + + * libtiff/: tif_getimage.c: TIFFReadRGBAStrip and TIFFReadRGBATile + now also uses TIFFRGBAImageOK before reading. This is additional fix + for http://bugzilla.remotesensing.org/show_bug.cgi?id=110 + +2002-03-25 Andrey Kiselev + + * libtiff/: tif_getimage.c: Additional check for supported + codecs added in TIFFRGBAImageOK and TIFFReadRGBAImage now uses + TIFFRGBAImageOK before reading. + Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=110 + +2002-03-15 Andrey Kiselev + + * libtiff/: tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_dirread.c, + tif_dirwrite.c: Added routine TIFFDataWidth for detrmining + TIFFDataType sizes instead of working with tiffDataWidth array + directly. Should prevent out-of-borders bugs in case of unknown or + broken data types. EstimateStripByteCounts routine modified, so it + won't work when tags with uknown sizes founded. + Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=109 + +2002-03-13 Andrey Kiselev + + * libtiff/tif_getimage.c: Added support for correct handling + `Orientation' tag in gtTileContig. Should be added in other gt* + functions as well, but I have not images for testing yet. Partially + resolves http://bugzilla.remotesensing.org/show_bug.cgi?id=23 + +2002-03-10 Andrey Kiselev + + * libtiff/: tif_dirinfo.c, tif_dirwrite.c: Added possibility to + read broken TIFFs with LONG type used for TIFFTAG_COMPRESSION, + TIFFTAG_BITSPERSAMPLE, TIFFTAG_PHOTOMETRIC. Closes + http://bugzilla.remotesensing.org/show_bug.cgi?id=99 + +2002-03-08 Andrey Kiselev + + * libtiff/Makefile.in, tools/Makefile.in: Shared library will not + be stripped when installing, utility binaries will do. Closes + http://bugzilla.remotesensing.org/show_bug.cgi?id=93 + +2002-02-28 Frank Warmerdam + + * man/TIFFGetField: fixed type of TIFFTAG_COPYRIGHT. + + * man/libtiff.3t: added copyright tag info. + +2002-02-11 Frank Warmerdam + + * libtiff/{tiff.h,tif_fax3.c}: Add support for __arch64__. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=94 + + * man/Makefile.in: Patch DESTDIR handling + + http://bugzilla.remotesensing.org/show_bug.cgi?id=95 + + * configure: OpenBSD changes for Sparc64 and DSO version. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=96 + +2002-02-05 Frank Warmerdam + + * config.site/configure: added support for OJPEG=yes option to enable + OJPEG support from config.site. + +2002-01-27 Frank Warmerdam + + * html/document.html: fixed links for TIFf 6 docs. + +2002-01-18 Frank Warmerdam + + * config.guess, config.sub: Updated from ftp.gnu.org/pub/config. + + * libtiff/tif_read.c: Fixed TIFFReadEncodedStrip() to fail if the + decodestrip function returns anything not greater than zero as per + http://bugzilla.remotesensing.org/show_bug.cgi?id=97 + + * configure: Modify CheckForBigEndian so it can work in a cross + compiled situation. + +2002-01-16 Frank Warmerdam + + * tools/tiffdump.c: include TIFFTAG_JPEGTABLES in tag list. + + * tools/tiffset.c: fix bug in error reporting. + + * tools/tiffcp.c: fix several warnings that show up with -Wall. + +2002-01-04 Frank Warmerdam + + * libtiff/tif_jpeg.c: fixed computation of segment_width for + tiles files to avoid error about it not matching the + cinfo.d.image_width values ("JPEGPreDecode: Improper JPEG strip/tile + size.") for ITIFF files. Apparently the problem was incorporated since + 3.5.5, presumably during the OJPEG/JPEG work recently. + +2001-12-15 Frank Warmerdam + + * configure, libtiff/Makefile.in: Changes for building on MacOS 10.1. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=94 + + * libtiff/tif_getimage.c: If DEFAULT_EXTRASAMPLE_AS_ALPHA is 1 + (defined in tiffconf.h - 1 by default) then the RGBA interface + will assume that a fourth extra sample is ASSOCALPHA if the + EXTRASAMPLE value isn't set for it. This changes the behaviour of + the library, but makes it work better with RGBA files produced by + lots of applications that don't mark the alpha values properly. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=93 + http://bugzilla.remotesensing.org/show_bug.cgi?id=65 + +2001-12-12 Frank Warmerdam + + * libtiff/tif_jpeg.c: allow jpeg data stream sampling values to + override those from tiff directory. This makes this work with + ImageGear generated files. + +2001-12-07 Frank Warmerdam + + * html/Makefile.in: added missing images per bug 92. + + * port/Makefile.in: fixed clean target per bug 92. + +2001-11-28 Frank Warmerdam + + * Reissue 3.5.7 release. + + * libtiff/mkversion.c: Fix output of TIFF_VERSION to be + YYYYMMDD so that it is increasing over time. + + * Makefile.in: Ensure that tiffvers.h is regenerated in the + make release target. + + * Makefile.in: added libtiff/tiffvers.h to the release file list. + +2001-11-23 Frank Warmerdam + + * added html/v3.5.7.html, updated html/index.html. + + * Makefile.in: added contrib/addtiffo/tif_ovrcache.{c,h}. + +2001-11-15 Frank Warmerdam + + * configure: fixed test for -lm. + +2001-11-02 Frank Warmerdam + + * Added PHOTOMETRIC_ITULAB as per bug 90. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=90 + +2001-10-10 Frank Warmerdam + + * libtiff/tiff.h: I have created COMPRESSION_CCITT_T4, + COMPRESSION_CCITT_T6, TIFFTAG_T4OPTIONS and TIFFTAG_T6OPTIONS aliases + in keeping with TIFF 6.0 standard in tiff.h + + http://bugzilla.remotesensing.org/show_bug.cgi?id=83 + +2001-09-26 Frank Warmerdam + + * libtiff/tif_dirwrite.c: added TIFFRewriteDirectory() function. + Updated TIFFWriteDirectory man page to include TIFFRewriteDirectory. + +2001-09-24 Frank Warmerdam + + * libtiff/tif_lzw.c: Avoid MS VC++ 5.0 optimization bug. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=78 + + * libtiff/tif_lzw.c: added dummy LZWSetupEncode() to report an + error about LZW not being available. + + * libtiff/tif_dir.c: propagate failure to initialize compression + back from TIFFSetField() as an error status, so applications can + detect failure. + + * libtiff/tif_dir.c: removed the auto replacement of + COMPRESSION_LZW with COMPRESSION_NONE in _TIFFVSetField(). + + * Removed Makefile, tools/Makefile, port/install.sh, man/Makefile + from CVS as they are all supposed to be auto-generated by configure. + +2001-09-22 Frank Warmerdam + + * libtiff/tif_ojpeg.c: new update from Scott. + +2001-09-09 Frank Warmerdam + + * libtif/tif_fax3.c: Removed #ifdef PURIFY logic, and modified to + always use the "safe" version, even if there is a very slight + cost in performance. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=54 + + * libtiff/Makefile.in: Fixed @DSOSUB_VERSION to be @DSOSUF_VERSION@ + in two places. + + * libtiff/tif_getimage.c: Fixed problem with reading strips or + tiles that don't start on a tile boundary. Fix contributed by + Josep Vallverdu (from HP), and further described in bug 47. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=47 + + * tools/tiff2ps.c: added OJPEG YCbCr to RGB support. + + * libtiff/tif_ojpeg.c: Applied substantial patch from Scott. + +2001-09-06 Frank Warmerdam + + * libtiff/tif_packbits.c: fixed memory overrun error. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=77 + +2001-08-31 Frank Warmerdam + + * libtiff/tif_getimage.c: relax handling of contig case where + there are extra samples that are supposed to be ignored. This + should now work for 8bit greyscale or palletted images. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=75 + +2001-08-28 Frank Warmerdam + + * libtiff/tif_getimage.c: Don't complain for CMYK (separated) + images with more than four samples per pixel. See: + + http://bugzilla.remotesensing.org/show_bug.cgi?id=73 + +2001-08-10 Frank Warmerdam + + * libtiff/tif_getimage.c: Use memmove() instead of TIFFmemcpy() + in TIFFReadRGBATile() to avoid issues in cases of overlapping + buffers. See Bug 69 in Bugzilla. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=69 + + * tools/tiff2rgba.c: fixed getopt() call so that -b works again. + +2001-08-09 Frank Warmerdam + + * libtiff/tiff.h, libtiff/tif_fax3.c: added check for __LP64__ + when checking for 64 bit architectures as per bugzilla bug 67. + +2001-07-27 Frank Warmerdam + + * man/Makefile.in: add TIFFClientOpen link as per debian submitted + bug 66. + +2001-07-20 Frank Warmerdam + + * libtiff/tif_jpeg.c: Define HAVE_BOOLEAN on windows if RPCNDR.H + has been included. + +2001-07-19 Frank Warmerdam + + * libtiff/tif_open.c: Seek back to zero after failed read, + before writing header. + +2001-07-18 Frank Warmerdam + + * libtiff/tif_ojpeg.c: updates from Scott. Handles colors + much better. Now depends on having patched libjpeg as per + patch in contrib/ojpeg/*. + +2001-07-17 Frank Warmerdam + + * */Makefile.in: added DESTDIR support. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=60 + +2001-07-16 Frank Warmerdam + + * configure, libtiff/Makefile.in: applied OpenBSD patches + as per: + + http://bugzilla.remotesensing.org/show_bug.cgi?id=61 + +2001-06-28 Frank Warmerdam + + * libtiff/tif_getimage.c: Fixed so that failure is properly + reported by gtTileContig, gtStripContig, gtTileSeparate and + gtStripSeparate. + + See http://bugzilla.remotesensing.org/show_bug.cgi?id=51 + + * tiffcmp.c: Fixed multi samples per pixel support for ContigCompare. + Updated bug section of tiffcmp.1 to note tiled file issues. + + See http://bugzilla.remotesensing.org/show_bug.cgi?id=53 + +2001-06-22 Frank Warmerdam + + * configure: Changes for DSO generation on AIX provided by + John Marquart . + + * configure, libtiff/Makeifle.in: Modified to build DSOs properly + on Darwin thanks to Robert Krajewski (rpk@alum.mit.edu) and + Keisuke Fujii (fujiik@jlcuxf.kek.jp). + +2001-06-13 Frank Warmerdam + + * tools/tiff2rgba.c: added -n flag to avoid emitting alpha component. + + * man/tiff2rgba.1: new + +2001-05-22 Frank Warmerdam + + * Added tiffset and tif_ojpeg to the dist lists in Makefile.in. + +2001-05-13 Frank Warmerdam + + * libtiff/tools/thumbnail.c: changed default output compression + to packbits from LZW since LZW isn't generally available. + +2001-05-12 Frank Warmerdam + + * libtiff/tif_ojpeg.c: New. + libtiff/tif_jpeg.c, tiffconf.h, tif_getimage.c: changes related + to OJPEG support. + + Scott Marovich supplied OJPEG support. + +2001-05-11 Frank Warmerdam + + * tiff.h: removed, it duplicates libtiff/tiff.h. + +2001-05-08 Frank Warmerdam + + * libtiff/tif_dirinfo.c: moved pixar and copyright flags to + ensure everything is in order. + + * libtiff/libtiff.def: added TIFFCreateDirectory and + TIFFDefaultStripSize as per: + + http://bugzilla.remotesensing.org/show_bug.cgi?id=46 + +2001-05-02 Frank Warmerdam + + * libtiff/tif_dirinfo.c: Modified the TIFF_BYTE definition for + TIFFTAG_PHOTOSHOP to use a writecount of TIFF_VARIABLE2 (-3) to + force use of uint32 counts instead of short counts. + + * libtiff/tif_dirwrite.c: Added support for TIFF_VARIABLE2 in the + case of writing TIFF_BYTE/TIFF_SBYTE fields. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=43 + +2001-05-01 Frank Warmerdam + + * libtiff/tif_dirinfo.c: removed duplicate TIFFTAG_PHOTOSHOP as per + bug report http://bugzilla.remotesensing.org/show_bug.cgi?id=44 + +2001-04-05 Frank Warmerdam + + * tiffio.h: removed C++ style comment. + + * configure: fixed up SCRIPT_SH/SHELL handling. + + * Makefile.in: Fixed SCRIPT_SH/SHELL handling. + + * config.guess: documented more variables as per bug 40. + +2001-04-03 Frank Warmerdam + + * configure, *Makefile.in: Various changes to improve configuration + for HP/UX specifically, and also in general. They include: + - Try to handle /usr/bin/sh instead of /bin/sh where necessary. + - Upgrade to HP/UX 10.x+ compiler, linker and dso options. + - Fixed mmap() test to avoid MMAP_FIXED ... it isn't available on HP + - Use -${MAKEFLAGS} in sub makes from makefiles. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=40 + +2001-04-02 Frank Warmerdam + + * libtiff/tiff.h: Applied hac to try and resolve the problem + with the inttypes.h include file on AIX. + + See http://bugzilla.remotesensing.org/show_bug.cgi?id=39 + + * VERSION: update to 3.5.7 beta in preparation for release. + + * configure/config.site: modified to check if -lm is needed for + MACHDEPLIBS if not supplied by config.site. Needed for Darwin. + + * config.guess: updated wholesale to an FSF version apparently + from 1998 (as opposed to 1994). This is mainly inspired by + providing for MacOS X support. + +2001-03-29 Frank Warmerdam + + * configure, Makefile.in, etc: added support for OPTIMIZER being + set from config.site. + +2001-03-28 Frank Warmerdam + + * fax2ps.c: Helge (libtiff at oldach.net) submitted fix: + + Here's a fix for fax2ps that corrects behaviour for non-Letter paper + sizes. It fixes two problems: + + Without scaling (-S) the fax is now centered on the page size specified + with -H and/or -W. Before, fax2ps was using an obscure and practically + useless algorithm to allocate the image relative to Letter sized paper + which sometime sled to useless whitespace on the paper, while at the + same time cutting of the faxes printable area at the opposite border. + + Second, scaling now preserves aspect ratio, which makes unusual faxes + (in particular short ones) print properly. + + See http://bugzilla.remotesensing.org/show_bug.cgi?id=35 + + * tiff2ps.c/tiff2ps.1: Substantial changes to tiff2ps by + Bruce A. Mallett. See check message for detailed information + on all the changes, including a faster encoder, fixes for level + 2 PostScript, and support for the imagemask operator. + +2001-03-27 Frank Warmerdam + + * libtiff/tiffio.h: Changed "#if LOGLUV_PUBLIC" to + "#ifdef LOGLUV_PUBLIC" so it will work with VisualAge on AIX. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=39 + +2001-03-16 Frank Warmerdam + + * tif_dirinfo.c: moved definition of copyright tag in field list. + Apparently they have to be in sorted order by tag id. + +2001-03-13 Frank Warmerdam + + * tif_getimage.c: Added support for 16bit minisblack/miniswhite + images in RGBA interface. + +2001-03-02 Frank Warmerdam + + * Added TIFFTAG_COPYRIGHT support. + +2001-02-19 Frank Warmerdam + + * Brent Roman contributed updated tiffcp utility (and tiffcp.1) + with support for extracting subimages with the ,n syntax, and also + adding the -b bias removal flag. + +2001-02-16 Frank Warmerdam + + * libtiff/libtiff.def: Brent Roman submitted new version adding + serveral missing entry points. + + * libtiff/tif_dirinfo.c: don't declare tiffFieldInfo static on VMS. + Some sort of weird VMS thing. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=31 + + * tif_luv.c/tiff.h/tiffio.h: + New version of TIFF LogLuv (SGILOG) modules contributed by Greg Ward + (greg@shutterfly.com). He writes: + + 1) I improved the gamut-mapping function in tif_luv.c for imaginary + colors, because some images were being super-saturated on the input + side and this resulted in some strange color shifts in the output. + + 2) I added a psuedotag in tiff.h to control random dithering during + LogLuv encoding. This is turned off by default for 32-bit LogLuv and + on for 24-bit LogLuv output. Dithering improves the average color + accuracy over the image. + + 3) I added a #define for LOG_LUV_PUBLIC, which is enabled by default in + tiffio.h, to expose internal routines for converting between LogLuv and + XYZ coordinates. This is helpful for writing more efficient, + specialized conversion routines, especially for reading LogLuv files. + + Changes applied with minor edits. + +2001-01-23 Frank Warmerdam + + * tif_fax3.c: keep rw_mode flag internal to fax3 state to remember + whether we are encoding or decoding. This is to ensure graceful + recovery if TIFFClientOpen() discovers an attempt to open a compressed + file for "r+" access, and subsequently close it, as it resets the + tif_mode flag to O_RDONLY in this case to avoid writes, confusing the + compressor's concept of whether it is in encode or decode mode. + +2001-01-08 Mike Welles + + * Makefile.in: Now cleaning up after itself after creating the .tar.gz and .zip + +2001-01-07 Frank Warmerdam + + * html/libtiff.html: Fixed arguments in example for TIFFRGBAImageGet() + as per bug report by Patrick Connor. + +2000-12-28 Frank Warmerdam + + * Added RELEASE-DATE file to release file list. + + * Fixed libtiff/makefile.vc to make tiffvers.h not version.h. + +2000-12-22 Mike Welles + * added link to CVS mirror from index.html + + * updated html/internals.html to note that LZW compression is + not supported by default. + +2000-12-22 Frank Warmerdam + + * updated html/libtiff.html to not point at Niles' old JPL web site + for the man pages, point at www.libtiff.org. + +2000-12-21 Frank Warmerdam + + * libtiff/tif_apple.c: Applied "Carbon" support patches supplied by + Leonard Rosenthol . May interfere + with correct building on older systems. If so, please let me know. + +2000-12-19 Mike Welles + + * Took out LZW Encoding from tif_lzw.c + + * Created HOWTO-RELEASE + + * Created html/v3.5.6.html + + * updated index.html + +2000-12-01 Frank Warmerdam + + * Added patches for EOFB support in tif_fax3.c and tif_fax3.h. + Patches supplied by Frank Cringle + Example file at: ftp://ftp.remotesensing.org/pub/libtiff/eofb_396.tif + +2000-11-24 Frank Warmerdam + + * libtiff/Makefile.in: Added an installPrivateHdrs and install-private + target so that the private headers required by libgeotiff can be + installed with the others. They are not installed by default. + + * libtiff/Makefile.in: Added @MACHLIBDEPS@ to LINUXdso and GNULDdso + targets so libtiff.so will be built with an explicit dependency + on libm.so. + + * libtiff/Makefile.in: Use softlinks to link libtiff.so.3 to + libtiff.so.3.5.5. + + * libtiff/Makefile.in & configure: Remove all references to the ALPHA + file, or ALPHA version logic. Added stuff about DIST_POINT in + place of DIST_TYPE and the alpha release number stuff. + +2000-11-22 Frank Warmerdam + + * I have applied a patch from Steffen Moeller to + the configure script so that it now accepts the --prefix, and + --exec-prefix directives. + +2000-11-13 Frank Warmerdam + + * I have made a variety of modifications in an effort to ensure the + TIFFLIB_VERSION macro is automatically generated from the RELEASE-DATE + file which seems to be updated regularly. + + o mkversion.c now reads RELEASE-DATE and emits TIFFLIB_VERSION in + version include file. + o renamed version.h to tiffvers.h because we now have to install it + with the public libtiff include files. + o include tiffvers.h in tiffio.h. + o updated tif_version.c to use tiffvers.h. + o Updated Makefile.in accordingly. + + * As per http://bugzilla.remotesensing.org/show_bug.cgi?id=25 + I have updated the win32 detection rules in tiffcomp.h. + +2000-10-20 Frank Warmerdam + + * tif_getimage.c: Fixed RGBA translation for YCbCr images for which + the strip/tile width and height aren't multiples of the sampling size. + See http://bugzilla.remotesensing.org/show_bug.cgi?id=20 + Some patches from Rick LaMont of Dot C Software. + + * Modified tif_packbits.c encoder to avoid compressing more + data than provided if rowsize doesn't factor into provided data + (such as occurs for YCbCr). + +2000-10-19 Frank Warmerdam + + * tools/rgb2ycbcr.c: fixed output strip size to account for vertical + roundup if rows_per_strip not a multiple of vertical sample size. + +2000-10-16 Frank Warmerdam + + * tif_dir.c: Clear TIFF_ISTILED flag in TIFFDefaultDirectory + as per http://bugzilla.remotesensing.org/show_bug.cgi?id=18 + from vandrove@vc.cvut.cz. + + * Modified tif_packbits.c decoding to avoid overrunning the + output buffer, and to issue a warning if data needs to be + discarded. See http://bugzilla.remotesensing.org/show_bug.cgi?id=18 + +2000-10-12 Frank Warmerdam + + * Modified tiff2bw to ensure portions add to 100%, and that + white is properly recovered. + + See bug http://bugzilla.remotesensing.org/show_bug.cgi?id=15 + Patch c/o Stanislav Brabec + +2000-09-30 Frank Warmerdam + + * Modified TIFFClientOpen() to emit an error on an attempt to + open a comperessed file for update (O_RDWR/r+) access. This is + because the compressor/decompressor code gets very confused when + the mode is O_RDWR, assuming this means writing only. See + bug http://bugzilla.remotesensing.org/show_bug.cgi?id=13 + +2000-09-27 Frank Warmerdam + + * Added GNULDdso target an`d switched linux and freebsd to use it. + +2000-09-26 Frank Warmerdam + + * Applied patch for 0x0000 sequences in tif_fax3.h's definition + of EXPAND1D() as per bug 11 (from Roman). + +2000-09-25 Frank Warmerdam + * Fixed tiffcomp.h to avoid win32 stuff if unix #defined, to improve + cygwin compatibility. + + * Applied patch from Roman Shpount to tif_fax3.c. This seems to + be a proper fix to the buffer sizing problem. See + http://bugzilla.remotesensing.org/show_bug.cgi?id=11 + + * Fixed tif_getimage.c to fix overrun bug with YCbCr images without + downsampling. http://bugzilla.remotesensing.org/show_bug.cgi?id=10 + Thanks to Nick Lamb for reporting the + bug and proving the patch. + +2000-09-18 Frank Warmerdam + + * Fixed tif_jpeg.c so avoid destroying the decompressor before + we are done access data thanks to bug report from: + Michael Eckstein . + + * Reverted tif_flush change. + +2000-09-14 Frank Warmerdam + + * tif_flush.c: Changed so that TIFFFlushData() doesn't return an + error when TIFF_BEENWRITING is not set. This ensures that the + directory contents can still be flushed by TIFFFlush(). + +2000-08-14 Frank Warmerdam + + * tif_open.c: Don't set MMAP for O_RDWR files. + + * tif_open.c: Set STRIPCHOP_DEFAULT for O_RDWR as well as O_RDONLY + so that files opened for update can be strip chopped too. + + * tif_read.c: fixed up bug with files missing rowsperstrip and + the strips per separation fix done a few weeks ago. + +2000-07-17 Frank Warmerdam + + * Tentatively added support for SAMPLEFORMAT_COMPLEXIEEEFP, and + SAMPLEFORMAT_COMPLEXINT. + +2000-07-13 Mike Welles + + * index.html, bugs.html: added bugzilla info. + +2000-07-12 Frank Warmerdam + + * tif_read.c: fix subtle bug with determining the number of + rows for strips that are the last strip in a separation but + not the last strip of all in TIFFReadEncodedStrip(). + + * Applied 16/32 bit fix to tif_fax3.c. Fix supplied by + Peter Skarpetis + +2000-06-15 Frank Warmerdam + + * Modified tiffio.h logic with regard to including windows.h. It + won't include it when building with __CYGWIN__. + +2000-05-11 Frank Warmerdam + + * README: update to mention www.libtiff.org, don't list Sam's old + email address. + + * configure: Fixed DSO test for Linux as per patch from + Jan Van Buggenhout . + +2000-04-21 Frank Warmerdam + + * libtiff/tif_dirread.c: Don't use estimate strip byte count for + one tile/strip images with an offset, and byte count of zero. These + could be "unpopulated" images. + +2000-04-18 Frank Warmerdam + + * contrib/addtiffo: Added "averaging" resampling option. + + * tools/tiffsplit.c: Copy TIFFTAG_SAMPLEFORMAT. + +Tue Apr 18 16:18:08 2000 Frank Warmerdam + + * tools/Makefile.in: Modified to install properly on SGI. + +2000-04-12 Mike Welles + * configure: Fixed stupid mistake in libc6 test on Linux + +2000-04-04 Mike Welles + * tif_win32.c: Applied patch to fix overreads and ovverwrites + caught by BoundsChecker. From Arvan Pritchard + (untested). + + * tif_getimage.c: Applied patch to silence VC6 warnings. From + Arvan Pritchard + + * tif_lzw.c: Applied patch to silence VC6 warnings. From + Arvan Pritchard + +2000-03-28 Frank Warmerdam + + * Added contrib/stream (stream io) code submitted by Avi Bleiweiss. + +2000-03-28 Frank Warmerdam *** 3.5.5 release *** + + * fax2ps: Fixed mixup of width and height in bounding box statement + as per submission by Nalin Dahyabhai . + +2000-03-27 Mike Welles + + * fax2ps: Modified printruns to take uint32 instead of uint16. + Patch courtesy of Bernt Herd + +2000-03-20 Mike Welles + + * configure: added test for libc6 for linux targets. Bug reported by + Stanislav Brabec + + * Added 3.5 docs to html/Makefile.in. + Thanks to Stanislav Brabec + + * configure: fixed bugs in sed scripts + (applied sed script s:/@:s;@:;s:/s;;:;: to configure). + fix submitted to Stanislav Brabec + + * tools/iptcutil was not in files list, and wasn't being + added to tar archive. Updated Makefile.in. + +2000-03-17 Frank Warmerdam + + * tif_fax3.c: Fixed serious bug introduced during the uint16->uint32 + conversion for the run arrays. + +2000-03-03 Frank Warmerdam + + * Set td_sampleformat default to SAMPLEFORMAT_UINT instead of + SAMPLEFORMAT_VOID in TIFFDefaultDirectory() in tif_dir.c. + +2000-03-02 Frank Warmerdam + + * Added "GetDefaulted" support for TIFFTAG_SAMPLEFORMAT in tif_aux.c. + + * Patched tif_fax3.c so that dsp->runs is allocated a bit bigger + to avoid overruns encountered with frle_bug.tif. + +Tue Feb 15 22:01:05 2000 Frank Warmerdam + + * Fixed tools/tiffcmp so that stopondiff testing works. + Patch care of Joseph Orost . + +2000-01-28 + + * Modified tif_unix.c to support 2-4GB seeks if USE_64BIT_API is + set to 1, and added default (off) setting in tiffconf.h. This + should eventually be set by the configure script somehow. + + The original work on all these 2-4GB changes was done by + Peter Smith (psmith@creo.com). + + * Modified tif_win32.c to support 2-4GB seeks. + + * tentatively changed toff_t to be unsigned instead of signed to + facilitate support for 2-4GB files. + + * Updated a variety of files to use toff_t. Fixed some mixups + between toff_t and tsize_t. + +Fri Jan 28 10:13:49 2000 Frank Warmerdam + + * Largely reimplemented contrib/addtiffo to avoid temp files, + updating the TIFF file in place. Fixed a few other bugs to. + + * Set tif_rawdatasize to zero when freeing raw data buffer in + TIFFWriteDirectory(). + + * Enabled "REWRITE_HACK" in tif_write.c by default. + + * Fix bug in tif_write.c when switching between reading one directory + and writing to another. + + * Made TIFFWriteCheck() public, and added TIFFCreateDirectory() + +Wed Jan 5 12:37:48 2000 Frank Warmerdam + + * Added TIFFmemory(3t) functions to libtiff.def. + +Tue Jan 4 13:39:00 2000 Frank Warmerdam + + * Added libtiff/libtiff.def to TIFFILES distribution list. + +Mon Dec 27 12:13:39 EST 1999 Mike Welles + + * Created lzw compression kit, as a new module (libtiff-lzw-compression-kit). + + * Altered descriptions in tools to reflect "by default" lzw not supported + + * Updated index.html to note lzw compression kit. + +Tue Dec 21 14:01:51 1999 Frank Warmerdam + + * Added fax3sm_winnt.c to distribution list in Makefile.in. + +Tue Dec 21 11:04:45 EST 1999 Mike Welles *** 3.5.4 release *** + + * Aadded Pixar tag support. Contributed by Phil Beffery + + * Made one more change to tif_dir.c for removal of LZW compression. Also added notice + when LZW compression invoked. + + * Changed default compression in tools to TIFF_PACKBITS, and changed usage descriptions + in tools to reflect removal of LZW compression + +Mon Dec 20 18:39:02 EST 1999 Mike Welles + + * Fixed bug that caused LZW (non) compression to segfault. Added + warning about LZW compression removed being removed, and why. + + * Added nostrip to install in tools/Makefile.in so that debugging + symbols are kept. + +Tue Dec 7 12:04:47 EST 1999 Mike Welles + + * Added patch from Ivo Penzar , + supporting Adobe ZIP deflate. Untested. + +Sat Dec 4 15:47:11 1999 Frank Warmerdam + + * Made Packbits the default compression in tools/tiff2rgba.c instead + of LZW. + +Tue Nov 30 14:41:43 1999 Frank Warmerdam *** 3.5.3. release *** + + * Added tif_luv to contrib/djgpp/Makefile.lib. + +Tue Nov 30 14:15:32 EST 1999 Mike Welles + + * Added zip creation to relase makefile target + + * Added html for TIFFWriteTile.3t man page. + +Tue Nov 30 09:20:16 1999 Frank Warmerdam + + * Added some changes to tif_write.c to support rewriting existing + fixed sized tiles and strips. Code mods disabled by default, only + enabled if REWRITE_HACK is defined for now. + +Mon Nov 29 11:43:42 1999 Frank Warmerdam + + * Added TIFFWriteTile.3t man page. + +Sun Nov 28 20:36:18 1999 Frank Warmerdam + + * Added notes on use of makefile.vc in build.html, and fixed + email subscription address. + +199-11-28 Mike Welles + + * Fixed apocalypse-inducing y2k bug in contrib/ras/ras2tiff.c + + * Did some casts cleaning up to reduce compiler warnings in tif_fax3.c, + from Bruce Carmeron -- modifications of + changes made by Frank (sun cc still complained on cast). + + * Added tiffconf.h to install target per request from Bill + Radcliffe : "We need a way for ImageMagick to + know features have been compiled into the TIFF library in order to + handle things properly". + +Sat Nov 27 16:49:21 1999 Frank Warmerdam + + * fixed various VC++ warnings as suggested by Gilles Vollant + . + +Wed Nov 24 12:08:16 1999 Frank Warmerdam + + * Modified TIFFquery.3t man pages info on TIFFIsByteSwapped() to + not imply applications are responsible for image data swapping. + +1999-11-22 Mike Welles + * HTML-ized the man pages, added to html/man + + * Removed LZW Compression to comply with Unisys patent extortion. + +1999-09-29 Mike Welles + * Corrected one remaining 16 -> 32 bit value in tif_fax3.c, + From Ivo Penzar + +1999-09-26 Mike Welles *** 3.5.2 release *** + * Corrected alpha versioning. + + * Removed distinction between alpha and release targets in Makefile.in. + + * added release.stamp target, which tags cvs tree, and updates + "RELEASE-DATE" + + * added releasediff target, which diffs tree with source as of + date in "RELEASE-DATE" + + * Ticked up version to 3.5.2 (alpha 01 -- but I think we'll moving + away from alpha/non-alpha distinctions). + + * updated html to reflect release + +1999-09-23 + + * Set O_BINARY for tif_unix.c open() ... used on cygwin for instance. + + * Added CYGWIN case in configure. + +Fri Sep 17 00:13:51 CEST 1999 Mike Welles + + * Applied Francois Dagand's patch to handle fax decompression bug. + (sizes >= 65536 were failing) + +Tue Sep 14 21:31:43 1999 Frank Warmerdam + + * Applied "a" mode fix to tif_win32.c/TIFFOpen() as suggested + by Christopher Lawton + +Wed Sep 8 08:19:18 1999 Frank Warmerdam + + * Added IRIX/gcc, and OSF/1 4.x support on behalf of + Albert Chin-A-Young + + * Added TIFFReassignTagToIgnore() API on behalf of + Bruce Cameron . Man page still pending. + +Wed Aug 25 11:39:07 1999 Frank Warmerdam + + * Added test target in Makefile, test_pics.sh script and pics/*.rpt + files to provide for a rudimentary testsuite. + + * Added contrib/tags back from old distribution ... fixed up a bit. + +1999-08-16 + + * Added simple makefile.vc makefiles for building with MS VC++ + on Windows NT/98/95 in console mode. Stuff in contrib/win* make give + better solutions for some users. + +Mon Aug 16 21:52:11 1999 Frank Warmerdam + + * Added addtiffo (add overviews to a TIFF file) in contrib. Didn't + put it in tools since part of it is in C++. + +1999-08-16 Michael L. Welles + + * Updated html/index.html with anon CVS instructions. + +Mon Aug 16 13:18:41 1999 Frank Warmerdam + + * pre-remove so link before softlink in LINUXdso action in + libtiff/Makefile.in to avoid failure on LINUXdso builds other than + the first. + + * Fixed problem with cvtcmap() in tif_getimage.c modifying the + colormaps owned by the TIFF handle itself when trying to fixup wrong + (eight bit) colormaps. Corrected by maintaining a private copy of + the colormap. + + * Added TIFFReadRGBATile()/TIFFReadRGBAStrip() support in + tif_getimage.c. + + * CVS Repository placed at remotesensing.org. ChangeLog added. diff --git a/thirdparty/tiff-4.0.3/HOWTO-RELEASE b/thirdparty/tiff-4.2.0/HOWTO-RELEASE similarity index 56% rename from thirdparty/tiff-4.0.3/HOWTO-RELEASE rename to thirdparty/tiff-4.2.0/HOWTO-RELEASE index 701ca75f..abcdc9ba 100644 --- a/thirdparty/tiff-4.0.3/HOWTO-RELEASE +++ b/thirdparty/tiff-4.2.0/HOWTO-RELEASE @@ -1,4 +1,4 @@ -HOWTO-RELEASE: +HOWTO-RELEASE: Notes on releasing. @@ -10,24 +10,42 @@ Notes on releasing. 1.4.16 is needed in order to avoid bugs in m4. These packages may be downloaded from the following ftp locations: + m4 - ftp://ftp.gnu.org/pub/gnu/m4 autoconf - ftp://ftp.gnu.org/pub/gnu/autoconf automake - ftp://ftp.gnu.org/pub/gnu/automake libtool - ftp://ftp.gnu.org/pub/gnu/libtool - m4 - ftp://ftp.gnu.org/pub/gnu/m4 + + It is recommended to install m4 before autoconf, since the later + requires the former. Release builds should only be done on a system with a functioning and correctly set system clock and on a filesystem which accurately records file update times. Use of GNU make is recommended. -1. Commit any unsaved changes. +1. Commit any unsaved changes. -2. Create html/vX.X.html. Take ChangeLog entries and html-ify in there. +2. Use gnulib's gitlog-to-changelog script to add new (since the last + release) entries to the traditional ChangeLog file. Take note of + the most recent change note time stamp and use that as the starting + point. Concatenate the old logs to the new logs. The added logs + may be used to help produce the release notes (in next step). For + example: + + gitlog-to-changelog --since=`head -n 1 ChangeLog | sed -e 's/ .*//g'` --append-dot > ChangeLog.added + printf "\n" >> ChangeLog.added + cat ChangeLog.added ChangeLog > ChangeLog.new + mv ChangeLog.new ChangeLog + rm ChangeLog.added + +3. Create html/vX.X.html and add it to git with 'git add html/vX.X.html'. + Take ChangeLog entries and html-ify in there. Easist thing to do is take html/vX.(X-1).html and use it as a template. - Add that file to the list of EXTRA_DIST files in the html/Makefile.am. -3. Update html/index.html to refer to this new page as the current release. +4. Add vX.X.html file to the list of 'docfiles' files in the html/Makefile.am. -4. Increment the release version in configure.ac. Put 'alpha' or +5. Update html/index.html to refer to this new page as the current release. + +6. Increment the release version in configure.ac. Put 'alpha' or 'beta' after the version, if applicable. For example: 4.0.0 @@ -37,7 +55,7 @@ Notes on releasing. Version should be updated in two places: in the second argument of the AC_INIT macro and in LIBTIFF_xxx_VERSION variables. -5. Update library ELF versioning in configure.ac (LIBTIFF_CURRENT, +7. Update library ELF versioning in configure.ac (LIBTIFF_CURRENT, LIBTIFF_REVISION, and LIBTIFF_AGE). These numbers have nothing to do with the libtiff release version numbers. @@ -48,11 +66,11 @@ Notes on releasing. have been added, removed, or interface structures have changed, then more care is required. -6. Add an entry to Changelog similar to: +8. Add an entry to Changelog similar to: * libtiff 4.0.0 released. -7. In the source tree do +9. In the source tree do ./autogen.sh @@ -60,7 +78,7 @@ Notes on releasing. maintainer build with current autoconf, automake, and libtool packages. It is only needed when updating tool versions. -8. It is recommended (but not required) to build outside of the source +10. It is recommended (but not required) to build outside of the source tree so that the source tree is kept in a pristine state. This also allows sharing the source directory on several networked systems. For example: @@ -73,17 +91,17 @@ Notes on releasing. ./configure --enable-maintainer-mode -9. In the build tree do +11. In the build tree do make release This will update "RELEASE-DATE", "VERSION", and libtiff/tiffvers.h in the source tree. -10. In the source tree, verify that the version info in RELEASE-DATE, +12. In the source tree, verify that the version info in RELEASE-DATE, VERSION and libtiff/tiffvers.h is right. -11. In the build tree do +13. In the build tree do make make distcheck @@ -94,24 +112,35 @@ Notes on releasing. Two files with names tiff-version.tar.gz and tiff-version.zip will be created in the top level build directory. -12. In the source tree do +14. In the source tree do - 'cvs commit'. + 'git status', 'git add .', 'git commit' and 'git push' -13. In the source tree do +15. In the source tree, create a signed tag - cvs tag Release-v4-0-0 + git tag -s v4.0.0 -m "Create tag for v4.0.0" (or the appropriate name for the release) -14. Copy release packages from the build tree to the + and push it to "origin" (if "origin" points to the official repository) + + git push origin v4.0.0 + +16. Sign the release files in the build tree using your private key + + export GPG_TTY=$(tty) + for file in tiff-*.tar.gz tiff-*.zip ; do \ + gpg2 --output ${file}.sig --detach-sig $file ; \ + done + + for file in tiff-*.tar.gz tiff-*.zip ; do \ + gpg2 --verify ${file}.sig $file ; \ + done + +17. Copy release packages from the build tree to the ftp.remotesensing.org ftp site. scp tiff-*.tar.gz tiff-*.zip \ - warmerdam@upload.osgeo.org:/osgeo/download/libtiff - -15. Announce to list, tiff@lists.maptools.org - -16. Update libtiff page on freshmeat with new version announcement. - + bfriesen@upload.osgeo.org:/osgeo/download/libtiff +18. Announce to list, tiff@lists.maptools.org diff --git a/thirdparty/tiff-4.0.3/Makefile.am b/thirdparty/tiff-4.2.0/Makefile.am similarity index 64% rename from thirdparty/tiff-4.0.3/Makefile.am rename to thirdparty/tiff-4.2.0/Makefile.am index 996297e9..d19e58ee 100644 --- a/thirdparty/tiff-4.0.3/Makefile.am +++ b/thirdparty/tiff-4.2.0/Makefile.am @@ -31,23 +31,35 @@ ACLOCAL_AMFLAGS = -I m4 docfiles = \ COPYRIGHT \ ChangeLog \ - README \ - README.vms \ + README.md \ RELEASE-DATE \ TODO \ VERSION EXTRA_DIST = \ + CMakeLists.txt \ HOWTO-RELEASE \ Makefile.vc \ SConstruct \ autogen.sh \ configure.com \ - nmake.opt \ - libtiff-4.pc.in + libtiff-4.pc.in \ + nmake.opt dist_doc_DATA = $(docfiles) +distcheck-hook: + if [ -x "$(CMAKE)" ]; then \ + mkdir $(distdir)/_build/cmake \ + && cd $(distdir)/_build/cmake \ + && cmake ../.. \ + && $(MAKE) \ + && ctest -V \ + && $(MAKE) DESTDIR=../../_inst/cmake install ; \ + fi + rm -rf $(distdir)/_build/cmake + rm -rf $(distdir)/_inst/cmake + SUBDIRS = port libtiff tools build contrib test man html release: @@ -57,3 +69,22 @@ release: pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libtiff-4.pc + +# Special rules to assist with Coverity submissions. +PACKAGE_CHANGE_DATE=`awk '/^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]/ { print substr($$1,1,4) substr($$1,6,2) substr($$1,9,2); exit; }' $(top_srcdir)/ChangeLog` +COVERITY_EMAIL=bfriesen@simple.dallas.tx.us +COVERITY_TARBALL=libtiff.xz +COVERITY_VERSION=devel-${PACKAGE_CHANGE_DATE} +COVERITY_DESCRIPTION='libtiff development' +coverity: + $(MAKE) clean + cov-build --dir cov-int $(MAKE) + tar caf $(COVERITY_TARBALL) cov-int + curl --limit-rate 50K \ + --form token=`cat $$HOME/.coverity_key_tiff` \ + --form email=$(COVERITY_EMAIL) \ + --form file=@$(COVERITY_TARBALL) \ + --form version=$(COVERITY_VERSION) \ + --form description=$(COVERITY_DESCRIPTION) \ + https://scan.coverity.com/builds?project=tiff + $(RM) $(COVERITY_TARBALL) diff --git a/thirdparty/tiff-4.0.3/Makefile.in b/thirdparty/tiff-4.2.0/Makefile.in similarity index 76% rename from thirdparty/tiff-4.0.3/Makefile.in rename to thirdparty/tiff-4.2.0/Makefile.in index 6832eb80..a4a7b80c 100644 --- a/thirdparty/tiff-4.0.3/Makefile.in +++ b/thirdparty/tiff-4.2.0/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -40,23 +40,61 @@ # Process this file with automake to produce Makefile.in. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -76,17 +114,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . -DIST_COMMON = README $(am__configure_deps) $(dist_doc_DATA) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/libtiff-4.pc.in $(top_srcdir)/config/compile \ - $(top_srcdir)/config/config.guess \ - $(top_srcdir)/config/config.sub \ - $(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \ - $(top_srcdir)/config/missing \ - $(top_srcdir)/config/mkinstalldirs $(top_srcdir)/configure \ - ChangeLog TODO config/compile config/config.guess \ - config/config.sub config/depcomp config/install-sh \ - config/ltmain.sh config/missing config/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -94,9 +121,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(dist_doc_DATA) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = libtiff-4.pc @@ -115,13 +144,14 @@ am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -158,13 +188,40 @@ am__installdirs = "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)" DATA = $(dist_doc_DATA) $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - cscope distdir dist dist-all distcheck +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir distdir-am dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libtiff-4.pc.in \ + $(top_srcdir)/config/compile $(top_srcdir)/config/config.guess \ + $(top_srcdir)/config/config.sub \ + $(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \ + $(top_srcdir)/config/missing ChangeLog TODO config/compile \ + config/config.guess config/config.sub config/depcomp \ + config/install-sh config/ltmain.sh config/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -219,6 +276,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -266,6 +324,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -358,25 +417,32 @@ ACLOCAL_AMFLAGS = -I m4 docfiles = \ COPYRIGHT \ ChangeLog \ - README \ - README.vms \ + README.md \ RELEASE-DATE \ TODO \ VERSION EXTRA_DIST = \ + CMakeLists.txt \ HOWTO-RELEASE \ Makefile.vc \ SConstruct \ autogen.sh \ configure.com \ - nmake.opt \ - libtiff-4.pc.in + libtiff-4.pc.in \ + nmake.opt dist_doc_DATA = $(docfiles) SUBDIRS = port libtiff tools build contrib test man html pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libtiff-4.pc + +# Special rules to assist with Coverity submissions. +PACKAGE_CHANGE_DATE = `awk '/^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]/ { print substr($$1,1,4) substr($$1,6,2) substr($$1,9,2); exit; }' $(top_srcdir)/ChangeLog` +COVERITY_EMAIL = bfriesen@simple.dallas.tx.us +COVERITY_TARBALL = libtiff.xz +COVERITY_VERSION = devel-${PACKAGE_CHANGE_DATE} +COVERITY_DESCRIPTION = 'libtiff development' all: all-recursive .SUFFIXES: @@ -395,15 +461,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -474,14 +539,13 @@ uninstall-pkgconfigDATA: # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. -$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ @@ -502,31 +566,13 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done -cscopelist-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ - done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -542,12 +588,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -559,15 +600,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -576,18 +613,16 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" - cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) - clean-cscope: -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive -cscope.files: clean-cscope cscopelist-recursive cscopelist - -cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -604,7 +639,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -669,7 +707,7 @@ distdir: $(DISTFILES) ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -684,12 +722,22 @@ dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip @@ -706,7 +754,7 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -716,22 +764,26 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_inst + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -892,34 +944,57 @@ ps-am: uninstall-am: uninstall-dist_docDATA uninstall-pkgconfigDATA -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \ - cscopelist-recursive ctags-recursive install-am install-strip \ - tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-cscope \ - clean-generic clean-libtool cscope cscopelist \ - cscopelist-recursive ctags ctags-recursive dist dist-all \ - dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ dist-xz \ - dist-zip distcheck distclean distclean-generic \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-dist_docDATA install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-pkgconfigDATA install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am \ - uninstall-dist_docDATA uninstall-pkgconfigDATA +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip dist-zstd distcheck distclean \ + distclean-generic distclean-libtool distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dist_docDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgconfigDATA install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-dist_docDATA uninstall-pkgconfigDATA +.PRECIOUS: Makefile + + +distcheck-hook: + if [ -x "$(CMAKE)" ]; then \ + mkdir $(distdir)/_build/cmake \ + && cd $(distdir)/_build/cmake \ + && cmake ../.. \ + && $(MAKE) \ + && ctest -V \ + && $(MAKE) DESTDIR=../../_inst/cmake install ; \ + fi + rm -rf $(distdir)/_build/cmake + rm -rf $(distdir)/_inst/cmake release: (rm -f $(top_srcdir)/RELEASE-DATE && echo $(LIBTIFF_RELEASE_DATE) > $(top_srcdir)/RELEASE-DATE) (rm -f $(top_srcdir)/VERSION && echo $(LIBTIFF_VERSION) > $(top_srcdir)/VERSION) (rm -f $(top_srcdir)/libtiff/tiffvers.h && sed 's,LIBTIFF_VERSION,$(LIBTIFF_VERSION),;s,LIBTIFF_RELEASE_DATE,$(LIBTIFF_RELEASE_DATE),' $(top_srcdir)/libtiff/tiffvers.h.in > $(top_srcdir)/libtiff/tiffvers.h) +coverity: + $(MAKE) clean + cov-build --dir cov-int $(MAKE) + tar caf $(COVERITY_TARBALL) cov-int + curl --limit-rate 50K \ + --form token=`cat $$HOME/.coverity_key_tiff` \ + --form email=$(COVERITY_EMAIL) \ + --form file=@$(COVERITY_TARBALL) \ + --form version=$(COVERITY_VERSION) \ + --form description=$(COVERITY_DESCRIPTION) \ + https://scan.coverity.com/builds?project=tiff + $(RM) $(COVERITY_TARBALL) # 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. diff --git a/thirdparty/tiff-4.0.3/Makefile.vc b/thirdparty/tiff-4.2.0/Makefile.vc similarity index 96% rename from thirdparty/tiff-4.0.3/Makefile.vc rename to thirdparty/tiff-4.2.0/Makefile.vc index 2d894c2b..eeb5d04d 100644 --- a/thirdparty/tiff-4.0.3/Makefile.vc +++ b/thirdparty/tiff-4.2.0/Makefile.vc @@ -1,4 +1,3 @@ -# $Id: Makefile.vc,v 1.7 2008/01/01 15:53:10 fwarmerdam Exp $ # # Copyright (C) 2004, Andrey Kiselev # @@ -32,6 +31,9 @@ all: port lib tools port:: + cd libtiff + $(MAKE) /f Makefile.vc tif_config.h + cd.. cd port $(MAKE) /f Makefile.vc cd.. diff --git a/thirdparty/tiff-4.0.3/README b/thirdparty/tiff-4.2.0/README.md similarity index 82% rename from thirdparty/tiff-4.0.3/README rename to thirdparty/tiff-4.2.0/README.md index 5f30f4ee..2573dab1 100644 --- a/thirdparty/tiff-4.0.3/README +++ b/thirdparty/tiff-4.2.0/README.md @@ -1,6 +1,3 @@ -$Header: /cvs/maptools/cvsroot/libtiff/README,v 1.7 2012-02-18 21:53:27 bfriesen Exp $ - - TIFF Software Distribution -------------------------- This file is just a placeholder; all the documentation is now in @@ -14,7 +11,7 @@ e.g. If you don't have an HTML viewer then you can read the HTML source or fetch a PostScript version of this documentation from the directory - ftp://ftp.remotesensing.org/pub/libtiff/ + http://download.osgeo.org/libtiff/ If you can't hack either of these options then basically what you want to do is: @@ -25,8 +22,21 @@ want to do is: # make install More information, email contacts, and mailing list information can be -found online at http://www.remotesensing.org/libtiff/. +found online at http://www.simplesystems.org/libtiff/ +Source code repository +---------------------- + +[GitLab](https://gitlab.com/libtiff/libtiff) + +Bug database +------------ + +[GitLab issues](https://gitlab.com/libtiff/libtiff/issues) + +Previously, the project used +[Bugzilla](http://bugzilla.maptools.org/buglist.cgi?product=libtiff). This +is no longer in use, and all remaining issues have been migrated to GitLab. Use and Copyright ----------------- diff --git a/thirdparty/tiff-4.2.0/RELEASE-DATE b/thirdparty/tiff-4.2.0/RELEASE-DATE new file mode 100644 index 00000000..1137155e --- /dev/null +++ b/thirdparty/tiff-4.2.0/RELEASE-DATE @@ -0,0 +1 @@ +20201219 diff --git a/thirdparty/tiff-4.0.3/SConstruct b/thirdparty/tiff-4.2.0/SConstruct similarity index 99% rename from thirdparty/tiff-4.0.3/SConstruct rename to thirdparty/tiff-4.2.0/SConstruct index 682246ea..ee87fedf 100644 --- a/thirdparty/tiff-4.0.3/SConstruct +++ b/thirdparty/tiff-4.2.0/SConstruct @@ -1,5 +1,3 @@ -# $Id: SConstruct,v 1.4 2007/02/24 15:03:47 dron Exp $ - # Tag Image File Format (TIFF) Software # # Copyright (C) 2005, Andrey Kiselev diff --git a/thirdparty/tiff-4.0.3/TODO b/thirdparty/tiff-4.2.0/TODO similarity index 82% rename from thirdparty/tiff-4.0.3/TODO rename to thirdparty/tiff-4.2.0/TODO index 2ff86272..ea266aad 100644 --- a/thirdparty/tiff-4.0.3/TODO +++ b/thirdparty/tiff-4.2.0/TODO @@ -1,5 +1,3 @@ -# $Header: /cvs/libtiff/TODO,v 1.6 2002/10/10 05:28:43 warmerda Exp $ - o gif2tiff segaulting on selected images o tiffcmp read data by strip/tile instead of scanline o YCbCr sampling support diff --git a/thirdparty/tiff-4.2.0/VERSION b/thirdparty/tiff-4.2.0/VERSION new file mode 100644 index 00000000..6aba2b24 --- /dev/null +++ b/thirdparty/tiff-4.2.0/VERSION @@ -0,0 +1 @@ +4.2.0 diff --git a/thirdparty/tiff-4.0.3/aclocal.m4 b/thirdparty/tiff-4.2.0/aclocal.m4 similarity index 72% rename from thirdparty/tiff-4.0.3/aclocal.m4 rename to thirdparty/tiff-4.2.0/aclocal.m4 index d7d14c8e..3ba29cd2 100644 --- a/thirdparty/tiff-4.0.3/aclocal.m4 +++ b/thirdparty/tiff-4.2.0/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.12.4 -*- Autoconf -*- +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -11,6 +11,7 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, @@ -19,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2012 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -31,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.12' +[am__api_version='1.16' 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.12.4], [], +m4_if([$1], [1.16.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -50,14 +51,14 @@ 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.12.4])dnl +[AM_AUTOMAKE_VERSION([1.16.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -102,15 +103,14 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -141,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -332,63 +332,56 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 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. - # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + AS_CASE([$CONFIG_FILES], + [*\'*], [eval set x "$CONFIG_FILES"], + [*], [set x $CONFIG_FILES]) shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`AS_DIRNAME(["$am_mf"])` + am_filepart=`AS_BASENAME(["$am_mf"])` + AM_RUN_LOG([cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles]) || am_rc=$? done + if test $am_rc -ne 0; then + AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking).]) + fi + AS_UNSET([am_dirpart]) + AS_UNSET([am_filepart]) + AS_UNSET([am_mf]) + AS_UNSET([am_rc]) + rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -397,18 +390,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will -# need in order to bootstrap the dependency handling code. +# This code is only required when automatic dependency tracking is enabled. +# This creates each '.Po' and '.Plo' makefile fragment that we'll need in +# order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) + [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -417,6 +409,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -429,7 +427,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl +[AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -459,8 +457,7 @@ AC_SUBST([CYGPATH_W]) dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], -[$0: two- and three-arguments forms are deprecated. For more info, see: -http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation]) + [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], @@ -490,11 +487,11 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -514,21 +511,63 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl -dnl Support for Objective C++ was only introduced in Autoconf 2.65, -dnl but we still cater to Autoconf 2.62. -m4_ifdef([AC_PROG_OBJCXX], -[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], - m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the -dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not @@ -537,7 +576,6 @@ dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -559,7 +597,7 @@ 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-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -570,7 +608,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -580,7 +618,7 @@ if test x"${install_sh}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2012 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -602,7 +640,7 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -635,11 +673,9 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) ] ) -AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) - # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -647,81 +683,42 @@ AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # AM_MAKE_INCLUDE() # ----------------- -# Check to see how make treats includes. +# Check whether make has an 'include' directive that can support all +# the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' +[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Copyright (C) 1999-2012 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. - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) + AS_CASE([$?:`cat confinc.out 2>/dev/null`], + ['0:this is the am__doit target'], + [AS_CASE([$s], + [BSD], [am__include='.include' am__quote='"'], + [am__include='include' am__quote=''])]) + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +AC_MSG_RESULT([${_am_result}]) +AC_SUBST([am__include])]) +AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -736,8 +733,8 @@ AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl @@ -750,8 +747,8 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) @@ -760,7 +757,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -789,9 +786,73 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +# Copyright (C) 1999-2020 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. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2020 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. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -872,7 +933,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2012 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -932,7 +993,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -960,7 +1021,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2012 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -979,7 +1040,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2012 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -998,76 +1059,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar +# AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of '-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - # tar/untar a dummy directory, and stop if the command works + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR diff --git a/thirdparty/tiff-4.0.3/autogen.sh b/thirdparty/tiff-4.2.0/autogen.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/autogen.sh rename to thirdparty/tiff-4.2.0/autogen.sh diff --git a/thirdparty/tiff-4.2.0/build/CMakeLists.txt b/thirdparty/tiff-4.2.0/build/CMakeLists.txt new file mode 100644 index 00000000..d44c6eac --- /dev/null +++ b/thirdparty/tiff-4.2.0/build/CMakeLists.txt @@ -0,0 +1,25 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +extra_dist(README) diff --git a/thirdparty/tiff-4.0.3/build/Makefile.am b/thirdparty/tiff-4.2.0/build/Makefile.am similarity index 96% rename from thirdparty/tiff-4.0.3/build/Makefile.am rename to thirdparty/tiff-4.2.0/build/Makefile.am index 48fe8b4e..c912a422 100644 --- a/thirdparty/tiff-4.0.3/build/Makefile.am +++ b/thirdparty/tiff-4.2.0/build/Makefile.am @@ -24,7 +24,9 @@ # Process this file with automake to produce Makefile.in. -EXTRA_DIST = README +EXTRA_DIST = \ + CMakeLists.txt \ + README SUBDIRS = diff --git a/thirdparty/tiff-4.0.3/build/Makefile.in b/thirdparty/tiff-4.2.0/build/Makefile.in similarity index 78% rename from thirdparty/tiff-4.0.3/build/Makefile.in rename to thirdparty/tiff-4.2.0/build/Makefile.in index 2ed760a0..d0893046 100644 --- a/thirdparty/tiff-4.0.3/build/Makefile.in +++ b/thirdparty/tiff-4.2.0/build/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -40,23 +40,61 @@ # Process this file with automake to produce Makefile.in. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -76,8 +114,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = build -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -85,7 +121,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = @@ -104,13 +141,14 @@ am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -118,12 +156,33 @@ am__can_run_installinfo = \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -162,6 +221,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -209,6 +269,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -296,7 +357,10 @@ tiff_libs_private = @tiff_libs_private@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = README +EXTRA_DIST = \ + CMakeLists.txt \ + README + SUBDIRS = all: all-recursive @@ -313,14 +377,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign build/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign build/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -344,14 +407,13 @@ clean-libtool: # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. -$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ @@ -372,31 +434,13 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done -cscopelist-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ - done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -412,12 +456,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -429,15 +468,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -446,9 +481,10 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive -cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -464,7 +500,10 @@ cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -620,23 +659,22 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \ - cscopelist-recursive ctags-recursive install-am install-strip \ - tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - cscopelist cscopelist-recursive ctags ctags-recursive \ - distclean distclean-generic distclean-libtool distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am + ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/thirdparty/tiff-4.0.3/build/README b/thirdparty/tiff-4.2.0/build/README similarity index 100% rename from thirdparty/tiff-4.0.3/build/README rename to thirdparty/tiff-4.2.0/build/README diff --git a/thirdparty/tiff-4.2.0/config/compile b/thirdparty/tiff-4.2.0/config/compile new file mode 100644 index 00000000..99e50524 --- /dev/null +++ b/thirdparty/tiff-4.2.0/config/compile @@ -0,0 +1,348 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# 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 +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/thirdparty/tiff-4.0.3/config/config.guess b/thirdparty/tiff-4.2.0/config/config.guess old mode 100755 new mode 100644 similarity index 72% rename from thirdparty/tiff-4.0.3/config/config.guess rename to thirdparty/tiff-4.2.0/config/config.guess index ca2a03ca..6c32c864 --- a/thirdparty/tiff-4.0.3/config/config.guess +++ b/thirdparty/tiff-4.2.0/config/config.guess @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. +# Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2008-01-08' +timestamp='2014-11-04' # 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 -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -17,26 +15,22 @@ timestamp='2008-01-08' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches to . + me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,8 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright 1992-2014 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." @@ -139,12 +132,33 @@ 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|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -170,7 +184,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -180,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -201,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} @@ -223,7 +241,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -269,7 +287,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -295,12 +316,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -324,14 +345,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize @@ -375,23 +415,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; @@ -461,8 +501,8 @@ EOF echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -475,7 +515,7 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -532,15 +572,16 @@ EOF echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[456]) + *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi @@ -575,52 +616,52 @@ EOF 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c - #define _HPUX_SOURCE - #include - #include + #define _HPUX_SOURCE + #include + #include - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa @@ -640,7 +681,7 @@ EOF # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null + grep -q __LP64__ then HP_ARCH="hppa2.0w" else @@ -711,22 +752,22 @@ EOF exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; @@ -750,14 +791,14 @@ EOF exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -769,34 +810,39 @@ 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*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + *:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in + *:Interix*:*) + case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; - EM64T | authenticamd) + authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) @@ -806,6 +852,9 @@ EOF [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we @@ -826,100 +875,21 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`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/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix 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-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -930,106 +900,132 @@ EOF EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${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} + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-${LIBC} + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-${LIBC} 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-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-${LIBC} + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both @@ -1037,11 +1033,11 @@ EOF echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) @@ -1058,7 +1054,7 @@ EOF i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) @@ -1073,7 +1069,7 @@ EOF fi exit ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; @@ -1101,10 +1097,13 @@ EOF exit ;; pc:*:*:*) # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; @@ -1139,8 +1138,18 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; @@ -1153,7 +1162,7 @@ EOF rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) @@ -1173,10 +1182,10 @@ EOF echo ns32k-sni-sysv fi exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm @@ -1202,11 +1211,11 @@ EOF exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; @@ -1216,6 +1225,12 @@ EOF BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1242,9 +1257,31 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1258,7 +1295,10 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1303,13 +1343,13 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1324,159 +1364,14 @@ EOF i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - cat >&2 <. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -72,8 +68,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright 1992-2014 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." @@ -120,12 +115,18 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -148,10 +149,13 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -166,10 +170,10 @@ case $os in os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; @@ -214,6 +218,12 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -238,59 +248,90 @@ case $basic_machine in # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | 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 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | 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 \ + | k1om \ + | le32 | le64 \ + | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ - | mips64vr | mips64vrel \ + | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | moxie \ | mt \ | msp430 \ - | nios | nios2 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | or32 \ + | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ + | riscv32 | riscv64 \ + | rl78 | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | 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 | tic80 | tron \ - | v850 | v850e \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -300,6 +341,21 @@ case $basic_machine in basic_machine=mt-unknown ;; + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + 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. @@ -314,64 +370,83 @@ case $basic_machine in # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | 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-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ + | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ - | nios-* | nios2-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | 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*-* \ | tron-* \ - | v850-* | v850e-* | vax-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ - | z8k-*) + | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) @@ -393,7 +468,7 @@ case $basic_machine in basic_machine=a29k-amd os=-udi ;; - abacus) + abacus) basic_machine=abacus-unknown ;; adobe68k) @@ -439,6 +514,10 @@ case $basic_machine in basic_machine=m68k-apollo os=-bsd ;; + aros) + basic_machine=i386-pc + os=-aros + ;; aux) basic_machine=m68k-apple os=-aux @@ -455,10 +534,27 @@ case $basic_machine in basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; c90) basic_machine=c90-cray os=-unicos ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -487,7 +583,7 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16) + cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; @@ -526,6 +622,10 @@ case $basic_machine in basic_machine=m88k-motorola os=-sysv3 ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp @@ -641,7 +741,6 @@ case $basic_machine in i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -680,6 +779,9 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; m68knommu) basic_machine=m68k-unknown os=-linux @@ -699,8 +801,15 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -728,6 +837,10 @@ case $basic_machine in basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos @@ -735,10 +848,18 @@ case $basic_machine in ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; + msys) + basic_machine=i686-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -803,6 +924,12 @@ case $basic_machine in np1) basic_machine=np1-gould ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -885,9 +1012,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 @@ -912,7 +1040,11 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -981,6 +1113,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 ;; @@ -1037,20 +1172,8 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1120,6 +1243,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 @@ -1128,6 +1254,10 @@ case $basic_machine in basic_machine=z8k-unknown os=-sim ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -1166,7 +1296,7 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) @@ -1213,9 +1343,12 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1236,29 +1369,31 @@ case $os in # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ + | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1297,7 +1432,7 @@ case $os in -opened*) os=-openedition ;; - -os400*) + -os400*) os=-os400 ;; -wince*) @@ -1346,7 +1481,7 @@ case $os in -sinix*) os=-sysv4 ;; - -tpf*) + -tpf*) os=-tpf ;; -triton*) @@ -1382,12 +1517,14 @@ case $os in -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; -none) ;; *) @@ -1410,10 +1547,10 @@ else # system, and we'll never get to this point. case $basic_machine in - score-*) + score-*) os=-elf ;; - spu-*) + spu-*) os=-elf ;; *-acorn) @@ -1425,8 +1562,23 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff ;; # This must come before the *-dec entry. pdp10-*) @@ -1446,14 +1598,11 @@ case $basic_machine in ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout ;; - mep-*) + mep-*) os=-elf ;; mips*-cisco) @@ -1480,7 +1629,7 @@ case $basic_machine in *-ibm) os=-aix ;; - *-knuth) + *-knuth) os=-mmixware ;; *-wec) @@ -1585,7 +1734,7 @@ case $basic_machine in -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) diff --git a/thirdparty/tiff-4.2.0/config/depcomp b/thirdparty/tiff-4.2.0/config/depcomp new file mode 100644 index 00000000..65cbf709 --- /dev/null +++ b/thirdparty/tiff-4.2.0/config/depcomp @@ -0,0 +1,791 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 1999-2018 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 +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputting dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Avoid interferences from the environment. +gccflag= dashmflag= + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +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' + 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 + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The second -e expression handles DOS-style file names with drive + # letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the "deleted header file" problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. +## 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. 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. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # 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 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like '#:fec' to the end of the + # dependency line. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" + # The second pass generates a dummy entry for each header file. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" + ;; + +xlc) + # 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 + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts '$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\' : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; + +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 -ne 0; then + 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/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash + 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. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for ':' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. + "$@" $dashmflag | + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$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" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # 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 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/thirdparty/tiff-4.2.0/config/install-sh b/thirdparty/tiff-4.2.0/config/install-sh new file mode 100644 index 00000000..0b0fdcbb --- /dev/null +++ b/thirdparty/tiff-4.2.0/config/install-sh @@ -0,0 +1,501 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2013-12-25.23; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# 'make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +tab=' ' +nl=' +' +IFS=" $tab$nl" + +# Set DOITPROG to "echo" to test this script. + +doit=${DOITPROG-} +doit_exec=${doit:-exec} + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +is_target_a_directory=possibly + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) is_target_a_directory=never;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + 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 + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then + 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. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + dstdir=`dirname "$dst"` + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + oIFS=$IFS + IFS=/ + set -f + set fnord $dstdir + shift + set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + set +f && + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/thirdparty/tiff-4.0.3/config/ltmain.sh b/thirdparty/tiff-4.2.0/config/ltmain.sh similarity index 65% rename from thirdparty/tiff-4.0.3/config/ltmain.sh rename to thirdparty/tiff-4.2.0/config/ltmain.sh index e172628f..0f0a2da3 100644 --- a/thirdparty/tiff-4.0.3/config/ltmain.sh +++ b/thirdparty/tiff-4.2.0/config/ltmain.sh @@ -1,9 +1,12 @@ +#! /bin/sh +## DO NOT EDIT - This file generated from ./build-aux/ltmain.in +## by inline-source v2014-01-03.01 -# libtool (GNU libtool) 2.4.2 +# libtool (GNU libtool) 2.4.6 +# Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 1996-2015 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. @@ -23,166 +26,670 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --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 -# --version print version information -# -h, --help, --help-all print short, long, or detailed help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. When passed as first option, -# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . -# GNU libtool home page: . -# General help using GNU software: . PROGRAM=libtool PACKAGE=libtool -VERSION=2.4.2 -TIMESTAMP="" -package_revision=1.3337 +VERSION=2.4.6 +package_revision=2.4.6 -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + +## ------ ## +## Usage. ## +## ------ ## + +# Run './libtool --help' for help with using this script from the +# command line. + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# After configure completes, it has a better idea of some of the +# shell tools we need than the defaults used by the functions shared +# with bootstrap, so set those here where they can still be over- +# ridden by the user, but otherwise take precedence. + +: ${AUTOCONF="autoconf"} +: ${AUTOMAKE="automake"} + + +## -------------------------- ## +## Source external libraries. ## +## -------------------------- ## + +# Much of our low-level functionality needs to be sourced from external +# libraries, which are installed to $pkgauxdir. + +# Set a version string for this script. +scriptversion=2015-01-20.17; # UTC + +# General shell script boiler plate, and helper functions. +# Written by Gary V. Vaughan, 2004 + +# Copyright (C) 2004-2015 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. + +# 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 +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. + +# As a special exception to the GNU General Public License, if you distribute +# this file as part of a program or library that is built using GNU Libtool, +# you may include this file under the same distribution terms that you use +# for the rest of that program. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# Evaluate this file near the top of your script to gain access to +# the functions and variables defined here: +# +# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh +# +# If you need to override any of the default environment variable +# settings, do that before evaluating this file. + + +## -------------------- ## +## Shell normalisation. ## +## -------------------- ## + +# Some shells need a little help to be as Bourne compatible as possible. +# Before doing anything else, make sure all that help has been provided! + +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# NLS nuisances: We save the old values to restore during execute mode. -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +# NLS nuisances: We save the old values in case they are required later. +_G_user_locale= +_G_safe_locale= +for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + eval "if test set = \"\${$_G_var+set}\"; then + save_$_G_var=\$$_G_var + $_G_var=C + export $_G_var + _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" + _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done -LC_ALL=C -LANGUAGE=C -export LANGUAGE LC_ALL -$lt_unset CDPATH +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Make sure IFS has a sensible default +sp=' ' +nl=' +' +IFS="$sp $nl" + +# There are apparently some retarded systems that use ';' as a PATH separator! +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + + +## ------------------------- ## +## Locate command utilities. ## +## ------------------------- ## + + +# func_executable_p FILE +# ---------------------- +# Check that FILE is an executable regular file. +func_executable_p () +{ + test -f "$1" && test -x "$1" +} + + +# func_path_progs PROGS_LIST CHECK_FUNC [PATH] +# -------------------------------------------- +# Search for either a program that responds to --version with output +# containing "GNU", or else returned by CHECK_FUNC otherwise, by +# trying all the directories in PATH with each of the elements of +# PROGS_LIST. +# +# CHECK_FUNC should accept the path to a candidate program, and +# set $func_check_prog_result if it truncates its output less than +# $_G_path_prog_max characters. +func_path_progs () +{ + _G_progs_list=$1 + _G_check_func=$2 + _G_PATH=${3-"$PATH"} + + _G_path_prog_max=0 + _G_path_prog_found=false + _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} + for _G_dir in $_G_PATH; do + IFS=$_G_save_IFS + test -z "$_G_dir" && _G_dir=. + for _G_prog_name in $_G_progs_list; do + for _exeext in '' .EXE; do + _G_path_prog=$_G_dir/$_G_prog_name$_exeext + func_executable_p "$_G_path_prog" || continue + case `"$_G_path_prog" --version 2>&1` in + *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; + *) $_G_check_func $_G_path_prog + func_path_progs_result=$func_check_prog_result + ;; + esac + $_G_path_prog_found && break 3 + done + done + done + IFS=$_G_save_IFS + test -z "$func_path_progs_result" && { + echo "no acceptable sed could be found in \$PATH" >&2 + exit 1 + } +} + + +# We want to be able to use the functions in this file before configure +# has figured out where the best binaries are kept, which means we have +# to search for them ourselves - except when the results are already set +# where we skip the searches. + +# Unless the user overrides by setting SED, search the path for either GNU +# sed, or the sed that truncates its output the least. +test -z "$SED" && { + _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for _G_i in 1 2 3 4 5 6 7; do + _G_sed_script=$_G_sed_script$nl$_G_sed_script + done + echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed + _G_sed_script= + + func_check_prog_sed () + { + _G_path_prog=$1 + + _G_count=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo '' >> conftest.nl + "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + rm -f conftest.sed + SED=$func_path_progs_result +} + + +# Unless the user overrides by setting GREP, search the path for either GNU +# grep, or the grep that truncates its output the least. +test -z "$GREP" && { + func_check_prog_grep () + { + _G_path_prog=$1 + + _G_count=0 + _G_path_prog_max=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo 'GREP' >> conftest.nl + "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + GREP=$func_path_progs_result +} + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# All uppercase variable names are used for environment variables. These +# variables can be overridden by the user before calling a script that +# uses them if a suitable command of that name is not already available +# in the command search PATH. + +: ${CP="cp -f"} +: ${ECHO="printf %s\n"} +: ${EGREP="$GREP -E"} +: ${FGREP="$GREP -F"} +: ${LN_S="ln -s"} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} + + +## -------------------- ## +## Useful sed snippets. ## +## -------------------- ## + +sed_dirname='s|/[^/]*$||' +sed_basename='s|^.*/||' + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s|\([`"$\\]\)|\\\1|g' + +# Same as above, but do not quote variable references. +sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' + +# Sed substitution that converts a w32 file name or path +# that contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-'\' parameter expansions in output of sed_double_quote_subst that +# were '\'-ed in input to the same. If an odd number of '\' preceded a +# '$' in input to sed_double_quote_subst, that '$' was protected from +# expansion. Since each input '\' is now two '\'s, look for any number +# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. +_G_bs='\\' +_G_bs2='\\\\' +_G_bs4='\\\\\\\\' +_G_dollar='\$' +sed_double_backslash="\ + s/$_G_bs4/&\\ +/g + s/^$_G_bs2$_G_dollar/$_G_bs&/ + s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g + s/\n//g" + + +## ----------------- ## +## Global variables. ## +## ----------------- ## + +# Except for the global variables explicitly listed below, the following +# functions in the '^func_' namespace, and the '^require_' namespace +# variables initialised in the 'Resource management' section, sourcing +# this file will not pollute your global namespace with anything +# else. There's no portable way to scope variables in Bourne shell +# though, so actually running these functions will sometimes place +# results into a variable named after the function, and often use +# temporary variables in the '^_G_' namespace. If you are careful to +# avoid using those namespaces casually in your sourcing script, things +# should continue to work as you expect. And, of course, you can freely +# overwrite any of the functions or variables defined here before +# calling anything to customize them. + +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +# Allow overriding, eg assuming that you follow the convention of +# putting '$debug_cmd' at the start of all your functions, you can get +# bash to show function call trace with: +# +# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +debug_cmd=${debug_cmd-":"} +exit_cmd=: + +# By convention, finish your script with: +# +# exit $exit_status +# +# so that you can set exit_status to non-zero if you want to indicate +# something went wrong during execution without actually bailing out at +# the point of failure. +exit_status=$EXIT_SUCCESS # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. -progpath="$0" +progpath=$0 + +# The name of this program. +progname=`$ECHO "$progpath" |$SED "$sed_basename"` + +# Make sure we have an absolute progpath for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` + progdir=`cd "$progdir" && pwd` + progpath=$progdir/$progname + ;; + *) + _G_IFS=$IFS + IFS=${PATH_SEPARATOR-:} + for progdir in $PATH; do + IFS=$_G_IFS + test -x "$progdir/$progname" && break + done + IFS=$_G_IFS + test -n "$progdir" || progdir=`pwd` + progpath=$progdir/$progname + ;; +esac +## ----------------- ## +## Standard options. ## +## ----------------- ## -: ${CP="cp -f"} -test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} +# The following options affect the operation of the functions defined +# below, and should be set appropriately depending on run-time para- +# meters passed on the command line. -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. +opt_dry_run=false +opt_quiet=false +opt_verbose=false -exit_status=$EXIT_SUCCESS +# Categories 'all' and 'none' are always available. Append any others +# you will pass as the first argument to func_warning from your own +# code. +warning_categories= -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" +# By default, display warnings according to 'opt_warning_types'. Set +# 'warning_func' to ':' to elide all warnings, or func_fatal_error to +# treat the next displayed warning as a fatal error. +warning_func=func_warn_and_continue -dirname="s,/[^/]*$,," -basename="s,^.*/,," +# Set to 'all' to display all warnings, 'none' to suppress all +# warnings, or a space delimited list of some subset of +# 'warning_categories' to display only the listed warnings. +opt_warning_types=all -# func_dirname file append nondir_replacement + +## -------------------- ## +## Resource management. ## +## -------------------- ## + +# This section contains definitions for functions that each ensure a +# particular resource (a file, or a non-empty configuration variable for +# example) is available, and if appropriate to extract default values +# from pertinent package files. Call them using their associated +# 'require_*' variable to ensure that they are executed, at most, once. +# +# It's entirely deliberate that calling these functions can set +# variables that don't obey the namespace limitations obeyed by the rest +# of this file, in order that that they be as useful as possible to +# callers. + + +# require_term_colors +# ------------------- +# Allow display of bold text on terminals that support it. +require_term_colors=func_require_term_colors +func_require_term_colors () +{ + $debug_cmd + + test -t 1 && { + # COLORTERM and USE_ANSI_COLORS environment variables take + # precedence, because most terminfo databases neglect to describe + # whether color sequences are supported. + test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} + + if test 1 = "$USE_ANSI_COLORS"; then + # Standard ANSI escape sequences + tc_reset='' + tc_bold=''; tc_standout='' + tc_red=''; tc_green='' + tc_blue=''; tc_cyan='' + else + # Otherwise trust the terminfo database after all. + test -n "`tput sgr0 2>/dev/null`" && { + tc_reset=`tput sgr0` + test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` + tc_standout=$tc_bold + test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` + test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` + test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` + test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` + test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` + } + fi + } + + require_term_colors=: +} + + +## ----------------- ## +## Function library. ## +## ----------------- ## + +# This section contains a variety of useful functions to call in your +# scripts. Take note of the portable wrappers for features provided by +# some modern shells, which will fall back to slower equivalents on +# less featureful shells. + + +# func_append VAR VALUE +# --------------------- +# Append VALUE onto the existing contents of VAR. + + # We should try to minimise forks, especially on Windows where they are + # unreasonably slow, so skip the feature probes when bash or zsh are + # being used: + if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then + : ${_G_HAVE_ARITH_OP="yes"} + : ${_G_HAVE_XSI_OPS="yes"} + # The += operator was introduced in bash 3.1 + case $BASH_VERSION in + [12].* | 3.0 | 3.0*) ;; + *) + : ${_G_HAVE_PLUSEQ_OP="yes"} + ;; + esac + fi + + # _G_HAVE_PLUSEQ_OP + # Can be empty, in which case the shell is probed, "yes" if += is + # useable or anything else if it does not work. + test -z "$_G_HAVE_PLUSEQ_OP" \ + && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ + && _G_HAVE_PLUSEQ_OP=yes + +if test yes = "$_G_HAVE_PLUSEQ_OP" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_append () + { + $debug_cmd + + eval "$1+=\$2" + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_append () + { + $debug_cmd + + eval "$1=\$$1\$2" + } +fi + + +# func_append_quoted VAR VALUE +# ---------------------------- +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +if test yes = "$_G_HAVE_PLUSEQ_OP"; then + eval 'func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1+=\\ \$func_quote_for_eval_result" + }' +else + func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1=\$$1\\ \$func_quote_for_eval_result" + } +fi + + +# func_append_uniq VAR VALUE +# -------------------------- +# Append unique VALUE onto the existing contents of VAR, assuming +# entries are delimited by the first character of VALUE. For example: +# +# func_append_uniq options " --another-option option-argument" +# +# will only append to $options if " --another-option option-argument " +# is not already present somewhere in $options already (note spaces at +# each end implied by leading space in second argument). +func_append_uniq () +{ + $debug_cmd + + eval _G_current_value='`$ECHO $'$1'`' + _G_delim=`expr "$2" : '\(.\)'` + + case $_G_delim$_G_current_value$_G_delim in + *"$2$_G_delim"*) ;; + *) func_append "$@" ;; + esac +} + + +# func_arith TERM... +# ------------------ +# Set func_arith_result to the result of evaluating TERMs. + test -z "$_G_HAVE_ARITH_OP" \ + && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ + && _G_HAVE_ARITH_OP=yes + +if test yes = "$_G_HAVE_ARITH_OP"; then + eval 'func_arith () + { + $debug_cmd + + func_arith_result=$(( $* )) + }' +else + func_arith () + { + $debug_cmd + + func_arith_result=`expr "$@"` + } +fi + + +# func_basename FILE +# ------------------ +# Set func_basename_result to FILE with everything up to and including +# the last / stripped. +if test yes = "$_G_HAVE_XSI_OPS"; then + # If this shell supports suffix pattern removal, then use it to avoid + # forking. Hide the definitions single quotes in case the shell chokes + # on unsupported syntax... + _b='func_basename_result=${1##*/}' + _d='case $1 in + */*) func_dirname_result=${1%/*}$2 ;; + * ) func_dirname_result=$3 ;; + esac' + +else + # ...otherwise fall back to using sed. + _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' + _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` + if test "X$func_dirname_result" = "X$1"; then + func_dirname_result=$3 + else + func_append func_dirname_result "$2" + fi' +fi + +eval 'func_basename () +{ + $debug_cmd + + '"$_b"' +}' + + +# func_dirname FILE APPEND NONDIR_REPLACEMENT +# ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. -func_dirname () +eval 'func_dirname () { - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} # func_dirname may be replaced by extended shell implementation + $debug_cmd + + '"$_d"' +}' -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} # func_basename may be replaced by extended shell implementation - - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function +# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT +# -------------------------------------------------------- +# Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result @@ -190,263 +697,327 @@ func_basename () # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () +# For efficiency, we do not delegate to the functions above but instead +# duplicate the functionality here. +eval 'func_dirname_and_basename () { - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" + $debug_cmd + + '"$_b"' + '"$_d"' +}' + + +# func_echo ARG... +# ---------------- +# Echo program name prefixed message. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname: $_G_line" + done + IFS=$func_echo_IFS +} + + +# func_echo_all ARG... +# -------------------- +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + + +# func_echo_infix_1 INFIX ARG... +# ------------------------------ +# Echo program name, followed by INFIX on the first line, with any +# additional lines not showing INFIX. +func_echo_infix_1 () +{ + $debug_cmd + + $require_term_colors + + _G_infix=$1; shift + _G_indent=$_G_infix + _G_prefix="$progname: $_G_infix: " + _G_message=$* + + # Strip color escape sequences before counting printable length + for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" + do + test -n "$_G_tc" && { + _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` + _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` + } + done + _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes + + func_echo_infix_1_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_infix_1_IFS + $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 + _G_prefix=$_G_indent + done + IFS=$func_echo_infix_1_IFS +} + + +# func_error ARG... +# ----------------- +# Echo program name prefixed message to standard error. +func_error () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 +} + + +# func_fatal_error ARG... +# ----------------------- +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + $debug_cmd + + func_error "$*" + exit $EXIT_FAILURE +} + + +# func_grep EXPRESSION FILENAME +# ----------------------------- +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $debug_cmd + + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_len STRING +# --------------- +# Set func_len_result to the length of STRING. STRING may not +# start with a hyphen. + test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_len () + { + $debug_cmd + + func_len_result=${#1} + }' +else + func_len () + { + $debug_cmd + + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` + } +fi + + +# func_mkdir_p DIRECTORY-PATH +# --------------------------- +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + $debug_cmd + + _G_directory_path=$1 + _G_dir_list= + + if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then + + # Protect directory names starting with '-' + case $_G_directory_path in + -*) _G_directory_path=./$_G_directory_path ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$_G_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + _G_dir_list=$_G_directory_path:$_G_dir_list + + # If the last portion added has no slash in it, the list is done + case $_G_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` + done + _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` + + func_mkdir_p_IFS=$IFS; IFS=: + for _G_dir in $_G_dir_list; do + IFS=$func_mkdir_p_IFS + # mkdir can fail with a 'File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$_G_dir" 2>/dev/null || : + done + IFS=$func_mkdir_p_IFS + + # Bail out if we (or some other process) failed to create a directory. + test -d "$_G_directory_path" || \ + func_fatal_error "Failed to create '$1'" fi - func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -} # func_dirname_and_basename may be replaced by extended shell implementation +} -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () +# func_mktempdir [BASENAME] +# ------------------------- +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, BASENAME is the basename for that directory. +func_mktempdir () { - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname may be replaced by extended shell implementation + $debug_cmd + _G_template=${TMPDIR-/tmp}/${1-$progname} + + if test : = "$opt_dry_run"; then + # Return a directory name, but don't create it in dry-run mode + _G_tmpdir=$_G_template-$$ + else + + # If mktemp works, use that first and foremost + _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` + + if test ! -d "$_G_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + _G_tmpdir=$_G_template-${RANDOM-0}$$ + + func_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$_G_tmpdir" + umask $func_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$_G_tmpdir" || \ + func_fatal_error "cannot create temporary directory '$_G_tmpdir'" + fi + + $ECHO "$_G_tmpdir" +} -# These SED scripts presuppose an absolute path with a trailing slash. -pathcar='s,^/\([^/]*\).*$,\1,' -pathcdr='s,^/[^/]*,,' -removedotparts=':dotsl - s@/\./@/@g - t dotsl - s,/\.$,/,' -collapseslashes='s@/\{1,\}@/@g' -finalslash='s,/*$,/,' # func_normal_abspath PATH +# ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. -# value returned in "$func_normal_abspath_result" func_normal_abspath () { - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` - while :; do - # Processed it all yet? - if test "$func_normal_abspath_tpath" = / ; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result" ; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in + $debug_cmd + + # These SED scripts presuppose an absolute path with a trailing slash. + _G_pathcar='s|^/\([^/]*\).*$|\1|' + _G_pathcdr='s|^/[^/]*||' + _G_removedotparts=':dotsl + s|/\./|/|g + t dotsl + s|/\.$|/|' + _G_collapseslashes='s|/\{1,\}|/|g' + _G_finalslash='s|/*$|/|' + + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} - -# func_relative_path SRCDIR DSTDIR -# generates a relative path from SRCDIR to DSTDIR, with a trailing -# slash if non-empty, suitable for immediately appending a filename -# without needing to append a separator. -# value returned in "$func_relative_path_result" -func_relative_path () -{ - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. ;; *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=${func_dirname_result} - if test "x$func_relative_path_tlibdir" = x ; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac - done - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test "x$func_stripname_result" != x ; then - func_relative_path_result=${func_relative_path_result}/${func_stripname_result} - fi - - # Normalisation. If bindir is libdir, return empty string, - # else relative path ending with a slash; either way, target - # file name can be directly appended. - if test ! -z "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result/" - func_relative_path_result=$func_stripname_result - fi + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` + while :; do + # Processed it all yet? + if test / = "$func_normal_abspath_tpath"; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result"; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } -# The name of this program: -func_dirname_and_basename "$progpath" -progname=$func_basename_result -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=${PATH_SEPARATOR-:} - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution that turns a string into a regex matching for the -# string literally. -sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' - -# Sed substitution that converts a w32 file name or path -# which contains forward slashes, into one that contains -# (escaped) backslashes. A very naive implementation. -lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () +# func_notquiet ARG... +# -------------------- +# Echo program name prefixed message only when not in quiet mode. +func_notquiet () { - $ECHO "$progname: ${opt_mode+$opt_mode: }$*" -} + $debug_cmd -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} + $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to @@ -454,450 +1025,1113 @@ func_verbose () : } -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () +# func_relative_path SRCDIR DSTDIR +# -------------------------------- +# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. +func_relative_path () { - $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 -} + $debug_cmd -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=$func_dirname_result + if test -z "$func_relative_path_tlibdir"; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test -n "$func_stripname_result"; then + func_append func_relative_path_result "/$func_stripname_result" + fi + + # Normalisation. If bindir is libdir, return '.' else relative path. + if test -n "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + fi + + test -n "$func_relative_path_result" || func_relative_path_result=. - # bash bug again: : } -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` - done - my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "$my_tmpdir" -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. +# func_quote_for_eval ARG... +# -------------------------- +# Aesthetically quote ARGs to be evaled later. +# This function returns two values: +# i) func_quote_for_eval_result +# double-quoted, suitable for a subsequent eval +# ii) func_quote_for_eval_unquoted_result +# has all characters that are still active within double +# quotes backslashified. func_quote_for_eval () { - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac + $debug_cmd - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac + func_quote_for_eval_unquoted_result= + func_quote_for_eval_result= + while test 0 -lt $#; do + case $1 in + *[\\\`\"\$]*) + _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; + *) + _G_unquoted_arg=$1 ;; + esac + if test -n "$func_quote_for_eval_unquoted_result"; then + func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" + else + func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + fi + + case $_G_unquoted_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_quoted_arg=\"$_G_unquoted_arg\" + ;; + *) + _G_quoted_arg=$_G_unquoted_arg + ;; + esac + + if test -n "$func_quote_for_eval_result"; then + func_append func_quote_for_eval_result " $_G_quoted_arg" + else + func_append func_quote_for_eval_result "$_G_quoted_arg" + fi + shift + done } -# func_quote_for_expand arg +# func_quote_for_expand ARG +# ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { + $debug_cmd + case $1 in *[\\\`\"]*) - my_arg=`$ECHO "$1" | $SED \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + _G_arg=`$ECHO "$1" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) - my_arg="$1" ;; + _G_arg=$1 ;; esac - case $my_arg in + case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" + _G_arg=\"$_G_arg\" ;; esac - func_quote_for_expand_result="$my_arg" + func_quote_for_expand_result=$_G_arg } -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# func_stripname PREFIX SUFFIX NAME +# --------------------------------- +# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_stripname () + { + $debug_cmd + + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary variable first. + func_stripname_result=$3 + func_stripname_result=${func_stripname_result#"$1"} + func_stripname_result=${func_stripname_result%"$2"} + }' +else + func_stripname () + { + $debug_cmd + + case $2 in + .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; + *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; + esac + } +fi + + +# func_show_eval CMD [FAIL_EXP] +# ----------------------------- +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { - my_cmd="$1" - my_fail_exp="${2-:}" + $debug_cmd - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } + _G_cmd=$1 + _G_fail_exp=${2-':'} - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" + func_quote_for_expand "$_G_cmd" + eval "func_notquiet $func_quote_for_expand_result" + + $opt_dry_run || { + eval "$_G_cmd" + _G_status=$? + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" fi - fi + } } -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# func_show_eval_locale CMD [FAIL_EXP] +# ------------------------------------ +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { - my_cmd="$1" - my_fail_exp="${2-:}" + $debug_cmd - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" + _G_cmd=$1 + _G_fail_exp=${2-':'} + + $opt_quiet || { + func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" + $opt_dry_run || { + eval "$_G_user_locale + $_G_cmd" + _G_status=$? + eval "$_G_safe_locale" + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" fi - fi + } } + # func_tr_sh +# ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { - case $1 in - [0-9]* | *[!a-zA-Z0-9_]*) - func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` - ;; - * ) - func_tr_sh_result=$1 - ;; - esac + $debug_cmd + + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac } -# func_version -# Echo version message to standard output and exit. -func_version () +# func_verbose ARG... +# ------------------- +# Echo program name prefixed message in verbose mode only. +func_verbose () { - $opt_debug + $debug_cmd - $SED -n '/(C)/!b go - :more - /\./!{ - N - s/\n# / / - b more - } - :go - /^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? + $opt_verbose && func_echo "$*" + + : } -# func_usage -# Echo short help message to standard output and exit. -func_usage () + +# func_warn_and_continue ARG... +# ----------------------------- +# Echo program name prefixed warning message to standard error. +func_warn_and_continue () { - $opt_debug + $debug_cmd - $SED -n '/^# Usage:/,/^# *.*--help/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - echo - $ECHO "run \`$progname --help | more' for full usage" - exit $? + $require_term_colors + + func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } -# func_help [NOEXIT] -# Echo long help message to standard output and exit, -# unless 'noexit' is passed as argument. + +# func_warning CATEGORY ARG... +# ---------------------------- +# Echo program name prefixed warning message to standard error. Warning +# messages can be filtered according to CATEGORY, where this function +# elides messages where CATEGORY is not listed in the global variable +# 'opt_warning_types'. +func_warning () +{ + $debug_cmd + + # CATEGORY must be in the warning_categories list! + case " $warning_categories " in + *" $1 "*) ;; + *) func_internal_error "invalid warning category '$1'" ;; + esac + + _G_category=$1 + shift + + case " $opt_warning_types " in + *" $_G_category "*) $warning_func ${1+"$@"} ;; + esac +} + + +# func_sort_ver VER1 VER2 +# ----------------------- +# 'sort -V' is not generally available. +# Note this deviates from the version comparison in automake +# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a +# but this should suffice as we won't be specifying old +# version formats or redundant trailing .0 in bootstrap.conf. +# If we did want full compatibility then we should probably +# use m4_version_compare from autoconf. +func_sort_ver () +{ + $debug_cmd + + printf '%s\n%s\n' "$1" "$2" \ + | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n +} + +# func_lt_ver PREV CURR +# --------------------- +# Return true if PREV and CURR are in the correct order according to +# func_sort_ver, otherwise false. Use it like this: +# +# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." +func_lt_ver () +{ + $debug_cmd + + test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: +#! /bin/sh + +# Set a version string for this script. +scriptversion=2014-01-07.03; # UTC + +# A portable, pluggable option parser for Bourne shell. +# Written by Gary V. Vaughan, 2010 + +# Copyright (C) 2010-2015 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. + +# 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 +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# This file is a library for parsing options in your shell scripts along +# with assorted other useful supporting features that you can make use +# of too. +# +# For the simplest scripts you might need only: +# +# #!/bin/sh +# . relative/path/to/funclib.sh +# . relative/path/to/options-parser +# scriptversion=1.0 +# func_options ${1+"$@"} +# eval set dummy "$func_options_result"; shift +# ...rest of your script... +# +# In order for the '--version' option to work, you will need to have a +# suitably formatted comment like the one at the top of this file +# starting with '# Written by ' and ending with '# warranty; '. +# +# For '-h' and '--help' to work, you will also need a one line +# description of your script's purpose in a comment directly above the +# '# Written by ' line, like the one at the top of this file. +# +# The default options also support '--debug', which will turn on shell +# execution tracing (see the comment above debug_cmd below for another +# use), and '--verbose' and the func_verbose function to allow your script +# to display verbose messages only when your user has specified +# '--verbose'. +# +# After sourcing this file, you can plug processing for additional +# options by amending the variables from the 'Configuration' section +# below, and following the instructions in the 'Option parsing' +# section further down. + +## -------------- ## +## Configuration. ## +## -------------- ## + +# You should override these variables in your script after sourcing this +# file so that they reflect the customisations you have added to the +# option parser. + +# The usage line for option parsing errors and the start of '-h' and +# '--help' output messages. You can embed shell variables for delayed +# expansion at the time the message is displayed, but you will need to +# quote other shell meta-characters carefully to prevent them being +# expanded when the contents are evaled. +usage='$progpath [OPTION]...' + +# Short help message in response to '-h' and '--help'. Add to this or +# override it after sourcing this library to reflect the full set of +# options your script accepts. +usage_message="\ + --debug enable verbose shell tracing + -W, --warnings=CATEGORY + report the warnings falling in CATEGORY [all] + -v, --verbose verbosely report processing + --version print version information and exit + -h, --help print short or long help message and exit +" + +# Additional text appended to 'usage_message' in response to '--help'. +long_help_message=" +Warning categories include: + 'all' show all warnings + 'none' turn off all the warnings + 'error' warnings are treated as fatal errors" + +# Help message printed before fatal option parsing errors. +fatal_help="Try '\$progname --help' for more information." + + + +## ------------------------- ## +## Hook function management. ## +## ------------------------- ## + +# This section contains functions for adding, removing, and running hooks +# to the main code. A hook is just a named list of of function, that can +# be run in order later on. + +# func_hookable FUNC_NAME +# ----------------------- +# Declare that FUNC_NAME will run hooks added with +# 'func_add_hook FUNC_NAME ...'. +func_hookable () +{ + $debug_cmd + + func_append hookable_fns " $1" +} + + +# func_add_hook FUNC_NAME HOOK_FUNC +# --------------------------------- +# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must +# first have been declared "hookable" by a call to 'func_hookable'. +func_add_hook () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not accept hook functions." ;; + esac + + eval func_append ${1}_hooks '" $2"' +} + + +# func_remove_hook FUNC_NAME HOOK_FUNC +# ------------------------------------ +# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +func_remove_hook () +{ + $debug_cmd + + eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' +} + + +# func_run_hooks FUNC_NAME [ARG]... +# --------------------------------- +# Run all hook functions registered to FUNC_NAME. +# It is assumed that the list of hook functions contains nothing more +# than a whitespace-delimited list of legal shell function names, and +# no effort is wasted trying to catch shell meta-characters or preserve +# whitespace. +func_run_hooks () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not support hook funcions.n" ;; + esac + + eval _G_hook_fns=\$$1_hooks; shift + + for _G_hook in $_G_hook_fns; do + eval $_G_hook '"$@"' + + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + done + + func_quote_for_eval ${1+"$@"} + func_run_hooks_result=$func_quote_for_eval_result +} + + + +## --------------- ## +## Option parsing. ## +## --------------- ## + +# In order to add your own option parsing hooks, you must accept the +# full positional parameter list in your hook function, remove any +# options that you action, and then pass back the remaining unprocessed +# options in '_result', escaped suitably for +# 'eval'. Like this: +# +# my_options_prep () +# { +# $debug_cmd +# +# # Extend the existing usage message. +# usage_message=$usage_message' +# -s, --silent don'\''t print informational messages +# ' +# +# func_quote_for_eval ${1+"$@"} +# my_options_prep_result=$func_quote_for_eval_result +# } +# func_add_hook func_options_prep my_options_prep +# +# +# my_silent_option () +# { +# $debug_cmd +# +# # Note that for efficiency, we parse as many options as we can +# # recognise in a loop before passing the remainder back to the +# # caller on the first unrecognised argument we encounter. +# while test $# -gt 0; do +# opt=$1; shift +# case $opt in +# --silent|-s) opt_silent=: ;; +# # Separate non-argument short options: +# -s*) func_split_short_opt "$_G_opt" +# set dummy "$func_split_short_opt_name" \ +# "-$func_split_short_opt_arg" ${1+"$@"} +# shift +# ;; +# *) set dummy "$_G_opt" "$*"; shift; break ;; +# esac +# done +# +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# } +# func_add_hook func_parse_options my_silent_option +# +# +# my_option_validation () +# { +# $debug_cmd +# +# $opt_silent && $opt_verbose && func_fatal_help "\ +# '--silent' and '--verbose' options are mutually exclusive." +# +# func_quote_for_eval ${1+"$@"} +# my_option_validation_result=$func_quote_for_eval_result +# } +# func_add_hook func_validate_options my_option_validation +# +# You'll alse need to manually amend $usage_message to reflect the extra +# options you parse. It's preferable to append if you can, so that +# multiple option parsing hooks can be added safely. + + +# func_options [ARG]... +# --------------------- +# All the functions called inside func_options are hookable. See the +# individual implementations for details. +func_hookable func_options +func_options () +{ + $debug_cmd + + func_options_prep ${1+"$@"} + eval func_parse_options \ + ${func_options_prep_result+"$func_options_prep_result"} + eval func_validate_options \ + ${func_parse_options_result+"$func_parse_options_result"} + + eval func_run_hooks func_options \ + ${func_validate_options_result+"$func_validate_options_result"} + + # save modified positional parameters for caller + func_options_result=$func_run_hooks_result +} + + +# func_options_prep [ARG]... +# -------------------------- +# All initialisations required before starting the option parse loop. +# Note that when calling hook functions, we pass through the list of +# positional parameters. If a hook function modifies that list, and +# needs to propogate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before +# returning. +func_hookable func_options_prep +func_options_prep () +{ + $debug_cmd + + # Option defaults: + opt_verbose=false + opt_warning_types= + + func_run_hooks func_options_prep ${1+"$@"} + + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result +} + + +# func_parse_options [ARG]... +# --------------------------- +# The main option parsing loop. +func_hookable func_parse_options +func_parse_options () +{ + $debug_cmd + + func_parse_options_result= + + # this just eases exit handling + while test $# -gt 0; do + # Defer to hook functions for initial option parsing, so they + # get priority in the event of reusing an option name. + func_run_hooks func_parse_options ${1+"$@"} + + # Adjust func_parse_options positional parameters to match + eval set dummy "$func_run_hooks_result"; shift + + # Break out of the loop if we already parsed every option. + test $# -gt 0 || break + + _G_opt=$1 + shift + case $_G_opt in + --debug|-x) debug_cmd='set -x' + func_echo "enabling shell trace mode" + $debug_cmd + ;; + + --no-warnings|--no-warning|--no-warn) + set dummy --warnings none ${1+"$@"} + shift + ;; + + --warnings|--warning|-W) + test $# = 0 && func_missing_arg $_G_opt && break + case " $warning_categories $1" in + *" $1 "*) + # trailing space prevents matching last $1 above + func_append_uniq opt_warning_types " $1" + ;; + *all) + opt_warning_types=$warning_categories + ;; + *none) + opt_warning_types=none + warning_func=: + ;; + *error) + opt_warning_types=$warning_categories + warning_func=func_fatal_error + ;; + *) + func_fatal_error \ + "unsupported warning category: '$1'" + ;; + esac + shift + ;; + + --verbose|-v) opt_verbose=: ;; + --version) func_version ;; + -\?|-h) func_usage ;; + --help) func_help ;; + + # Separate optargs to long options (plugins may need this): + --*=*) func_split_equals "$_G_opt" + set dummy "$func_split_equals_lhs" \ + "$func_split_equals_rhs" ${1+"$@"} + shift + ;; + + # Separate optargs to short options: + -W*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-v*|-x*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result +} + + +# func_validate_options [ARG]... +# ------------------------------ +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +func_hookable func_validate_options +func_validate_options () +{ + $debug_cmd + + # Display all warnings if -W was not given. + test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" + + func_run_hooks func_validate_options ${1+"$@"} + + # Bail if the options were screwed! + $exit_cmd $EXIT_FAILURE + + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result +} + + + +## ----------------- ## +## Helper functions. ## +## ----------------- ## + +# This section contains the helper functions used by the rest of the +# hookable option parser framework in ascii-betical order. + + +# func_fatal_help ARG... +# ---------------------- +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + $debug_cmd + + eval \$ECHO \""Usage: $usage"\" + eval \$ECHO \""$fatal_help"\" + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + + +# func_help +# --------- +# Echo long help message to standard output and exit. func_help () { - $opt_debug + $debug_cmd - $SED -n '/^# Usage:/,/# Report bugs to/ { - :print - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ - p - d - } - /^# .* home page:/b print - /^# General help using/b print - ' < "$progpath" - ret=$? - if test -z "$1"; then - exit $ret - fi + func_usage_message + $ECHO "$long_help_message" + exit 0 } -# func_missing_arg argname + +# func_missing_arg ARGNAME +# ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { - $opt_debug + $debug_cmd - func_error "missing argument for $1." + func_error "Missing argument for '$1'." exit_cmd=exit } -# func_split_short_opt shortopt +# func_split_equals STRING +# ------------------------ +# Set func_split_equals_lhs and func_split_equals_rhs shell variables after +# splitting STRING at the '=' sign. +test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=${1%%=*} + func_split_equals_rhs=${1#*=} + test "x$func_split_equals_lhs" = "x$1" \ + && func_split_equals_rhs= + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` + func_split_equals_rhs= + test "x$func_split_equals_lhs" = "x$1" \ + || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` + } +fi #func_split_equals + + +# func_split_short_opt SHORTOPT +# ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. -func_split_short_opt () +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"} + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` + } +fi #func_split_short_opt + + +# func_usage +# ---------- +# Echo short help message to standard output and exit. +func_usage () { - my_sed_short_opt='1s/^\(..\).*$/\1/;q' - my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + $debug_cmd - func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` - func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` -} # func_split_short_opt may be replaced by extended shell implementation + func_usage_message + $ECHO "Run '$progname --help |${PAGER-more}' for full usage" + exit 0 +} -# func_split_long_opt longopt -# Set func_split_long_opt_name and func_split_long_opt_arg shell -# variables after splitting LONGOPT at the `=' sign. -func_split_long_opt () +# func_usage_message +# ------------------ +# Echo short help message to standard output. +func_usage_message () { - my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' - my_sed_long_arg='1s/^--[^=]*=//' + $debug_cmd - func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` - func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` -} # func_split_long_opt may be replaced by extended shell implementation - -exit_cmd=: + eval \$ECHO \""Usage: $usage"\" + echo + $SED -n 's|^# || + /^Written by/{ + x;p;x + } + h + /^Written by/q' < "$progpath" + echo + eval \$ECHO \""$usage_message"\" +} - - - -magic="%%%MAGIC variable%%%" -magic_exe="%%%MAGIC EXE variable%%%" - -# Global variables. -nonopt= -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () +# func_version +# ------------ +# Echo version message to standard output and exit. +func_version () { - eval "${1}=\$${1}\${2}" -} # func_append may be replaced by extended shell implementation + $debug_cmd -# func_append_quoted var value -# Quote VALUE and append to the end of shell variable VAR, separated -# by a space. -func_append_quoted () + printf '%s\n' "$progname $scriptversion" + $SED -n ' + /(C)/!b go + :more + /\./!{ + N + s|\n# | | + b more + } + :go + /^# Written by /,/# warranty; / { + s|^# || + s|^# *$|| + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + p + } + /^# Written by / { + s|^# || + p + } + /^warranty; /q' < "$progpath" + + exit $? +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: + +# Set a version string. +scriptversion='(GNU libtool) 2.4.6' + + +# func_echo ARG... +# ---------------- +# Libtool also displays the current mode in messages, so override +# funclib.sh func_echo with this custom definition. +func_echo () { - func_quote_for_eval "${2}" - eval "${1}=\$${1}\\ \$func_quote_for_eval_result" -} # func_append_quoted may be replaced by extended shell implementation + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" + done + IFS=$func_echo_IFS +} -# func_arith arithmetic-term... -func_arith () +# func_warning ARG... +# ------------------- +# Libtool warnings are not categorized, so override funclib.sh +# func_warning with this simpler definition. +func_warning () { - func_arith_result=`expr "${@}"` -} # func_arith may be replaced by extended shell implementation + $debug_cmd + + $warning_func ${1+"$@"} +} -# func_len string -# STRING may not start with a hyphen. -func_len () +## ---------------- ## +## Options parsing. ## +## ---------------- ## + +# Hook in the functions to make sure our own options are parsed during +# the option parsing loop. + +usage='$progpath [OPTION]... [MODE-ARG]...' + +# Short help message in response to '-h'. +usage_message="Options: + --config show all configuration variables + --debug enable verbose shell tracing + -n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --mode=MODE use operation mode MODE + --no-warnings equivalent to '-Wnone' + --preserve-dup-deps don't remove duplicate dependency libraries + --quiet, --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + -v, --verbose print more informational messages than default + --version print version information + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] + -h, --help, --help-all print short, long, or detailed help message +" + +# Additional text appended to 'usage_message' in response to '--help'. +func_help () { - func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` -} # func_len may be replaced by extended shell implementation + $debug_cmd + + func_usage_message + $ECHO "$long_help_message + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. When passed as first option, +'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. +Try '$progname --help --mode=MODE' for a more detailed description of MODE. + +When reporting a bug, please describe a test case to reproduce it and +include the following information: + + host-triplet: $host + shell: $SHELL + compiler: $LTCC + compiler flags: $LTCFLAGS + linker: $LD (gnu? $with_gnu_ld) + version: $progname (GNU libtool) 2.4.6 + automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` + autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` + +Report bugs to . +GNU libtool home page: . +General help using GNU software: ." + exit 0 +} -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} # func_lo2o may be replaced by extended shell implementation +# func_lo2o OBJECT-NAME +# --------------------- +# Transform OBJECT-NAME from a '.lo' suffix to the platform specific +# object suffix. + +lo2o=s/\\.lo\$/.$objext/ +o2lo=s/\\.$objext\$/.lo/ + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_lo2o () + { + case $1 in + *.lo) func_lo2o_result=${1%.lo}.$objext ;; + * ) func_lo2o_result=$1 ;; + esac + }' + + # func_xform LIBOBJ-OR-SOURCE + # --------------------------- + # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) + # suffix to a '.lo' libtool-object suffix. + eval 'func_xform () + { + func_xform_result=${1%.*}.lo + }' +else + # ...otherwise fall back to using sed. + func_lo2o () + { + func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` + } + + func_xform () + { + func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` + } +fi -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} # func_xform may be replaced by extended shell implementation - - -# func_fatal_configuration arg... +# func_fatal_configuration ARG... +# ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { - func_error ${1+"$@"} - func_error "See the $PACKAGE documentation for more information." - func_fatal_error "Fatal configuration error." + func__fatal_error ${1+"$@"} \ + "See the $PACKAGE documentation for more information." \ + "Fatal configuration error." } # func_config +# ----------- # Display the configuration for all the tags in this script. func_config () { @@ -915,17 +2149,19 @@ func_config () exit $? } + # func_features +# ------------- # Display the features supported by this script. func_features () { echo "host: $host" - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" @@ -934,314 +2170,350 @@ func_features () exit $? } -# func_enable_tag tagname + +# func_enable_tag TAGNAME +# ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { - # Global variable: - tagname="$1" + # Global variable: + tagname=$1 - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf="/$re_begincf/,/$re_endcf/p" + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf=/$re_begincf/,/$re_endcf/p - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac } + # func_check_version_match +# ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF - else - cat >&2 <<_LT_EOF + else + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF - fi - else - cat >&2 <<_LT_EOF + fi + else + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF - fi + fi - exit $EXIT_MISMATCH - fi + exit $EXIT_MISMATCH + fi } -# Shorthand for --mode=foo, only valid as the first argument -case $1 in -clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; -compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; -execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; -finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; -install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; -link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; -uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; -esac - - - -# Option defaults: -opt_debug=: -opt_dry_run=false -opt_config=false -opt_preserve_dup_deps=false -opt_features=false -opt_finish=false -opt_help=false -opt_help_all=false -opt_silent=: -opt_warning=: -opt_verbose=: -opt_silent=false -opt_verbose=false - - -# Parse options once, thoroughly. This comes as soon as possible in the -# script to make things like `--version' happen as quickly as we can. +# libtool_options_prep [ARG]... +# ----------------------------- +# Preparation for options parsed by libtool. +libtool_options_prep () { - # this just eases exit handling - while test $# -gt 0; do - opt="$1" - shift - case $opt in - --debug|-x) opt_debug='set -x' - func_echo "enabling shell trace mode" - $opt_debug - ;; - --dry-run|--dryrun|-n) - opt_dry_run=: - ;; - --config) - opt_config=: -func_config - ;; - --dlopen|-dlopen) - optarg="$1" - opt_dlopen="${opt_dlopen+$opt_dlopen -}$optarg" - shift - ;; - --preserve-dup-deps) - opt_preserve_dup_deps=: - ;; - --features) - opt_features=: -func_features - ;; - --finish) - opt_finish=: -set dummy --mode finish ${1+"$@"}; shift - ;; - --help) - opt_help=: - ;; - --help-all) - opt_help_all=: -opt_help=': help-all' - ;; - --mode) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_mode="$optarg" -case $optarg in - # Valid mode arguments: - clean|compile|execute|finish|install|link|relink|uninstall) ;; + $debug_mode - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; -esac - shift - ;; - --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) - opt_verbose=false -func_append preserve_args " $opt" - ;; - --silent|--quiet) - opt_silent=: -func_append preserve_args " $opt" - opt_verbose=false - ;; - --verbose|-v) - opt_verbose=: -func_append preserve_args " $opt" -opt_silent=false - ;; - --tag) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_tag="$optarg" -func_append preserve_args " $opt $optarg" -func_enable_tag "$optarg" - shift - ;; + # Option defaults: + opt_config=false + opt_dlopen= + opt_dry_run=false + opt_help=false + opt_mode= + opt_preserve_dup_deps=false + opt_quiet=false - -\?|-h) func_usage ;; - --help) func_help ;; - --version) func_version ;; + nonopt= + preserve_args= - # Separate optargs to long options: - --*=*) - func_split_long_opt "$opt" - set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} - shift - ;; - - # Separate non-argument short options: - -\?*|-h*|-n*|-v*) - func_split_short_opt "$opt" - set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - --) break ;; - -*) func_fatal_help "unrecognized option \`$opt'" ;; - *) set dummy "$opt" ${1+"$@"}; shift; break ;; + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; esac - done - # Validate options: - - # save first non-option argument - if test "$#" -gt 0; then - nonopt="$opt" - shift - fi - - # preserve --debug - test "$opt_debug" = : || func_append preserve_args " --debug" - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac - - $opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$opt_dlopen" && test "$opt_mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$opt_mode' for more information." - } - - - # Bail if the options were screwed - $exit_cmd $EXIT_FAILURE + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result } +func_add_hook func_options_prep libtool_options_prep +# libtool_parse_options [ARG]... +# --------------------------------- +# Provide handling for libtool specific options. +libtool_parse_options () +{ + $debug_cmd + + # Perform our own loop to consume as many options as possible in + # each iteration. + while test $# -gt 0; do + _G_opt=$1 + shift + case $_G_opt in + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + + --config) func_config ;; + + --dlopen|-dlopen) + opt_dlopen="${opt_dlopen+$opt_dlopen +}$1" + shift + ;; + + --preserve-dup-deps) + opt_preserve_dup_deps=: ;; + + --features) func_features ;; + + --finish) set dummy --mode finish ${1+"$@"}; shift ;; + + --help) opt_help=: ;; + + --help-all) opt_help=': help-all' ;; + + --mode) test $# = 0 && func_missing_arg $_G_opt && break + opt_mode=$1 + case $1 in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $_G_opt" + exit_cmd=exit + break + ;; + esac + shift + ;; + + --no-silent|--no-quiet) + opt_quiet=false + func_append preserve_args " $_G_opt" + ;; + + --no-warnings|--no-warning|--no-warn) + opt_warning=false + func_append preserve_args " $_G_opt" + ;; + + --no-verbose) + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --silent|--quiet) + opt_quiet=: + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --tag) test $# = 0 && func_missing_arg $_G_opt && break + opt_tag=$1 + func_append preserve_args " $_G_opt $1" + func_enable_tag "$1" + shift + ;; + + --verbose|-v) opt_quiet=false + opt_verbose=: + func_append preserve_args " $_G_opt" + ;; + + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done + + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result +} +func_add_hook func_parse_options libtool_parse_options + + + +# libtool_validate_options [ARG]... +# --------------------------------- +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +libtool_validate_options () +{ + # save first non-option argument + if test 0 -lt $#; then + nonopt=$1 + shift + fi + + # preserve --debug + test : = "$debug_cmd" || func_append preserve_args " --debug" + + case $host in + # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 + # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 + *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + + $opt_help || { + # Sanity checks first: + func_check_version_match + + test yes != "$build_libtool_libs" \ + && test yes != "$build_old_libs" \ + && func_fatal_configuration "not configured to build any kind of library" + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test execute != "$opt_mode"; then + func_error "unrecognized option '-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help=$help + help="Try '$progname --help --mode=$opt_mode' for more information." + } + + # Pass back the unparsed argument list + func_quote_for_eval ${1+"$@"} + libtool_validate_options_result=$func_quote_for_eval_result +} +func_add_hook func_validate_options libtool_validate_options + + +# Process options as early as possible so that --help and --version +# can return quickly. +func_options ${1+"$@"} +eval set dummy "$func_options_result"; shift + ## ----------- ## ## Main. ## ## ----------- ## +magic='%%%MAGIC variable%%%' +magic_exe='%%%MAGIC EXE variable%%%' + +# Global variables. +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# func_generated_by_libtool +# True iff stdin has been generated by Libtool. This function is only +# a basic sanity check; it will hardly flush out determined imposters. +func_generated_by_libtool_p () +{ + $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + # func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. +# True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 + $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. +# True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. +# fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no @@ -1249,13 +2521,13 @@ func_lalib_unsafe_p () for lalib_p_l in 1 2 3 4 do read lalib_p_line - case "$lalib_p_line" in + case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi - test "$lalib_p" = yes + test yes = "$lalib_p" } # func_ltwrapper_script_p file @@ -1264,7 +2536,8 @@ func_lalib_unsafe_p () # determined imposters. func_ltwrapper_script_p () { - func_lalib_p "$1" + test -f "$1" && + $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file @@ -1289,7 +2562,7 @@ func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" + func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file @@ -1308,11 +2581,13 @@ func_ltwrapper_p () # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { - $opt_debug + $debug_cmd + save_ifs=$IFS; IFS='~' for cmd in $1; do - IFS=$save_ifs + IFS=$sp$nl eval cmd=\"$cmd\" + IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs @@ -1324,10 +2599,11 @@ func_execute_cmds () # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. +# 'FILE.' does not work on cygwin managed mounts. func_source () { - $opt_debug + $debug_cmd + case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; @@ -1354,10 +2630,10 @@ func_resolve_sysroot () # store the result into func_replace_sysroot_result. func_replace_sysroot () { - case "$lt_sysroot:$1" in + case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" - func_replace_sysroot_result="=$func_stripname_result" + func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. @@ -1374,7 +2650,8 @@ func_replace_sysroot () # arg is usually of the form 'gcc ...' func_infer_tag () { - $opt_debug + $debug_cmd + if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do @@ -1393,7 +2670,7 @@ func_infer_tag () for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. @@ -1418,7 +2695,7 @@ func_infer_tag () # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" + func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi @@ -1434,15 +2711,15 @@ func_infer_tag () # but don't create it if we're doing a dry run. func_write_libtool_object () { - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' + write_libobj=$1 + if test yes = "$build_libtool_libs"; then + write_lobj=\'$2\' else write_lobj=none fi - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' + if test yes = "$build_old_libs"; then + write_oldobj=\'$3\' else write_oldobj=none fi @@ -1450,7 +2727,7 @@ func_write_libtool_object () $opt_dry_run || { cat >${write_libobj}T </dev/null` - if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | - $SED -e "$lt_sed_naive_backslashify"` + $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi @@ -1514,18 +2792,19 @@ func_convert_core_file_wine_to_w32 () # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { - $opt_debug + $debug_cmd + # unfortunately, winepath doesn't convert paths, only file names - func_convert_core_path_wine_to_w32_result="" + func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" - if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then - func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi @@ -1554,7 +2833,8 @@ func_convert_core_path_wine_to_w32 () # environment variable; do not put it in $PATH. func_cygpath () { - $opt_debug + $debug_cmd + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then @@ -1563,7 +2843,7 @@ func_cygpath () fi else func_cygpath_result= - func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath @@ -1574,10 +2854,11 @@ func_cygpath () # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { - $opt_debug + $debug_cmd + # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` + $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 @@ -1588,13 +2869,14 @@ func_convert_core_msys_to_w32 () # func_to_host_file_result to ARG1). func_convert_file_check () { - $opt_debug - if test -z "$2" && test -n "$1" ; then + $debug_cmd + + if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" - func_error " \`$1'" + func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: - func_to_host_file_result="$1" + func_to_host_file_result=$1 fi } # end func_convert_file_check @@ -1606,10 +2888,11 @@ func_convert_file_check () # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { - $opt_debug + $debug_cmd + if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" - func_error " \`$3'" + func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. @@ -1618,7 +2901,7 @@ func_convert_path_check () func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else - func_to_host_path_result="$3" + func_to_host_path_result=$3 fi fi } @@ -1630,9 +2913,10 @@ func_convert_path_check () # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { - $opt_debug + $debug_cmd + case $4 in - $1 ) func_to_host_path_result="$3$func_to_host_path_result" + $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in @@ -1646,7 +2930,7 @@ func_convert_path_front_back_pathsep () ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## -# invoked via `$to_host_file_cmd ARG' +# invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. @@ -1657,7 +2941,8 @@ func_convert_path_front_back_pathsep () # in func_to_host_file_result. func_to_host_file () { - $opt_debug + $debug_cmd + $to_host_file_cmd "$1" } # end func_to_host_file @@ -1669,7 +2954,8 @@ func_to_host_file () # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { - $opt_debug + $debug_cmd + case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 @@ -1687,7 +2973,7 @@ func_to_tool_file () # Copy ARG to func_to_host_file_result. func_convert_file_noop () { - func_to_host_file_result="$1" + func_to_host_file_result=$1 } # end func_convert_file_noop @@ -1698,11 +2984,12 @@ func_convert_file_noop () # func_to_host_file_result. func_convert_file_msys_to_w32 () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" - func_to_host_file_result="$func_convert_core_msys_to_w32_result" + func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1714,8 +3001,9 @@ func_convert_file_msys_to_w32 () # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. @@ -1731,11 +3019,12 @@ func_convert_file_cygwin_to_w32 () # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" - func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1747,12 +3036,13 @@ func_convert_file_nix_to_w32 () # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" - func_to_host_file_result="$func_cygpath_result" + func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1765,13 +3055,14 @@ func_convert_file_msys_to_cygwin () # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" - func_to_host_file_result="$func_cygpath_result" + func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1781,7 +3072,7 @@ func_convert_file_nix_to_cygwin () ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# -# invoked via `$to_host_path_cmd ARG' +# invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. @@ -1805,10 +3096,11 @@ func_convert_file_nix_to_cygwin () to_host_path_cmd= func_init_to_host_path_cmd () { - $opt_debug + $debug_cmd + if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" - to_host_path_cmd="func_convert_path_${func_stripname_result}" + to_host_path_cmd=func_convert_path_$func_stripname_result fi } @@ -1818,7 +3110,8 @@ func_init_to_host_path_cmd () # in func_to_host_path_result. func_to_host_path () { - $opt_debug + $debug_cmd + func_init_to_host_path_cmd $to_host_path_cmd "$1" } @@ -1829,7 +3122,7 @@ func_to_host_path () # Copy ARG to func_to_host_path_result. func_convert_path_noop () { - func_to_host_path_result="$1" + func_to_host_path_result=$1 } # end func_convert_path_noop @@ -1840,8 +3133,9 @@ func_convert_path_noop () # func_to_host_path_result. func_convert_path_msys_to_w32 () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; @@ -1849,7 +3143,7 @@ func_convert_path_msys_to_w32 () func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" @@ -1863,8 +3157,9 @@ func_convert_path_msys_to_w32 () # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" @@ -1883,14 +3178,15 @@ func_convert_path_cygwin_to_w32 () # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" @@ -1904,15 +3200,16 @@ func_convert_path_nix_to_w32 () # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" - func_to_host_path_result="$func_cygpath_result" + func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" @@ -1927,8 +3224,9 @@ func_convert_path_msys_to_cygwin () # func_to_host_file_result. func_convert_path_nix_to_cygwin () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them @@ -1937,7 +3235,7 @@ func_convert_path_nix_to_cygwin () func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" - func_to_host_path_result="$func_cygpath_result" + func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" @@ -1946,13 +3244,31 @@ func_convert_path_nix_to_cygwin () # end func_convert_path_nix_to_cygwin +# func_dll_def_p FILE +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with _LT_DLL_DEF_P in libtool.m4 +func_dll_def_p () +{ + $debug_cmd + + func_dll_def_p_tmp=`$SED -n \ + -e 's/^[ ]*//' \ + -e '/^\(;.*\)*$/d' \ + -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ + -e q \ + "$1"` + test DEF = "$func_dll_def_p_tmp" +} + + # func_mode_compile arg... func_mode_compile () { - $opt_debug + $debug_cmd + # Get the compilation command and the source file. base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" + srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal @@ -1965,12 +3281,12 @@ func_mode_compile () case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile - lastarg="$arg" + lastarg=$arg arg_mode=normal ;; target ) - libobj="$arg" + libobj=$arg arg_mode=normal continue ;; @@ -1980,7 +3296,7 @@ func_mode_compile () case $arg in -o) test -n "$libobj" && \ - func_fatal_error "you cannot specify \`-o' more than once" + func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; @@ -2009,12 +3325,12 @@ func_mode_compile () func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for arg in $args; do - IFS="$save_ifs" + IFS=$save_ifs func_append_quoted lastarg "$arg" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result @@ -2027,8 +3343,8 @@ func_mode_compile () # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # - lastarg="$srcfile" - srcfile="$arg" + lastarg=$srcfile + srcfile=$arg ;; esac # case $arg ;; @@ -2043,13 +3359,13 @@ func_mode_compile () func_fatal_error "you must specify an argument for -Xcompile" ;; target) - func_fatal_error "you must specify a target with \`-o'" + func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" - libobj="$func_basename_result" + libobj=$func_basename_result } ;; esac @@ -2069,7 +3385,7 @@ func_mode_compile () case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) - func_fatal_error "cannot determine name of library object from \`$libobj'" + func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac @@ -2078,8 +3394,8 @@ func_mode_compile () for arg in $later; do case $arg in -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" + test yes = "$build_libtool_libs" \ + || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; @@ -2105,17 +3421,17 @@ func_mode_compile () func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." + && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname + objname=$func_basename_result + xdir=$func_dirname_result + lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" @@ -2127,16 +3443,16 @@ func_mode_compile () pic_mode=default ;; esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" + if test no = "$compiler_c_o"; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext + lockfile=$output_obj.lock else output_obj= need_locks=no @@ -2145,12 +3461,12 @@ func_mode_compile () # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then + if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done - elif test "$need_locks" = warn; then + elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: @@ -2158,7 +3474,7 @@ func_mode_compile () This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -2180,11 +3496,11 @@ compiler." qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile - if test "$pic_mode" != no; then + if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code @@ -2201,7 +3517,7 @@ compiler." func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - if test "$need_locks" = warn && + if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: @@ -2212,7 +3528,7 @@ $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -2228,20 +3544,20 @@ compiler." fi # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then + if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then + if test yes = "$build_old_libs"; then + if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi - if test "$compiler_c_o" = yes; then + if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi @@ -2250,7 +3566,7 @@ compiler." func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - if test "$need_locks" = warn && + if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: @@ -2261,7 +3577,7 @@ $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -2281,7 +3597,7 @@ compiler." func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked - if test "$need_locks" != no; then + if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi @@ -2291,7 +3607,7 @@ compiler." } $opt_help || { - test "$opt_mode" = compile && func_mode_compile ${1+"$@"} + test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () @@ -2311,7 +3627,7 @@ func_mode_help () Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated @@ -2330,16 +3646,16 @@ This mode accepts the following additional options: -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking + -shared do not build a '.o' file suitable for static linking + -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler -COMPILE-COMMAND is a command to be used in creating a \`standard' object file +COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." +SOURCEFILE, then substituting the C source code suffix '.c' with the +library object suffix, '.lo'." ;; execute) @@ -2352,7 +3668,7 @@ This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path -This mode sets the library path environment variable according to \`-dlopen' +This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated @@ -2371,7 +3687,7 @@ Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." +the '--dry-run' option if you just want to see what would be executed." ;; install) @@ -2381,7 +3697,7 @@ the \`--dry-run' option if you just want to see what would be executed." Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. +either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: @@ -2407,7 +3723,7 @@ The following components of LINK-COMMAND are treated specially: -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE @@ -2421,7 +3737,8 @@ The following components of LINK-COMMAND are treated specially: -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects + -objectlist FILE use a list of object files found in FILE to specify objects + -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information @@ -2441,20 +3758,20 @@ The following components of LINK-COMMAND are treated specially: -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) -All other options (arguments beginning with \`-') are ignored. +All other options (arguments beginning with '-') are ignored. -Every other argument is treated as a filename. Files ending in \`.la' are +Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is +If the OUTPUT-FILE ends in '.la', then a libtool library is created, +only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. +If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created +using 'ar' and 'ranlib', or on Windows using 'lib'. -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; @@ -2465,7 +3782,7 @@ is created, otherwise an executable program is created." Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. @@ -2473,17 +3790,17 @@ Otherwise, only FILE itself is deleted using RM." ;; *) - func_fatal_help "invalid operation mode \`$opt_mode'" + func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo - $ECHO "Try \`$progname --help' for more information about other modes." + $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then - if test "$opt_help" = :; then + if test : = "$opt_help"; then func_mode_help else { @@ -2491,7 +3808,7 @@ if $opt_help; then for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done - } | sed -n '1p; 2,$s/^Usage:/ or: /p' + } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do @@ -2499,7 +3816,7 @@ if $opt_help; then func_mode_help done } | - sed '1d + $SED '1d /^When reporting/,/^Report/{ H d @@ -2516,16 +3833,17 @@ fi # func_mode_execute arg... func_mode_execute () { - $opt_debug + $debug_cmd + # The first argument is the command name. - cmd="$nonopt" + cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ - || func_fatal_help "\`$file' is not a file" + || func_fatal_help "'$file' is not a file" dir= case $file in @@ -2535,7 +3853,7 @@ func_mode_execute () # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" + || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= @@ -2546,18 +3864,18 @@ func_mode_execute () if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" + func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; @@ -2565,18 +3883,18 @@ func_mode_execute () *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result ;; *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" + test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then @@ -2588,7 +3906,7 @@ func_mode_execute () # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. - libtool_execute_magic="$magic" + libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= @@ -2601,12 +3919,12 @@ func_mode_execute () if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. - file="$progdir/$program" + file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. - file="$progdir/$program" + file=$progdir/$program fi ;; esac @@ -2614,7 +3932,15 @@ func_mode_execute () func_append_quoted args "$file" done - if test "X$opt_dry_run" = Xfalse; then + if $opt_dry_run; then + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" @@ -2631,25 +3957,18 @@ func_mode_execute () done # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS + exec_cmd=\$cmd$args fi } -test "$opt_mode" = execute && func_mode_execute ${1+"$@"} +test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { - $opt_debug + $debug_cmd + libs= libdirs= admincmds= @@ -2663,11 +3982,11 @@ func_mode_finish () if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else - func_warning "\`$opt' is not a valid libtool archive" + func_warning "'$opt' is not a valid libtool archive" fi else - func_fatal_error "invalid argument \`$opt'" + func_fatal_error "invalid argument '$opt'" fi done @@ -2682,12 +4001,12 @@ func_mode_finish () # Remove sysroot references if $opt_dry_run; then for lib in $libs; do - echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do - sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done @@ -2712,7 +4031,7 @@ func_mode_finish () fi # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS + $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" @@ -2723,27 +4042,27 @@ func_mode_finish () echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" - $ECHO " - use the \`$flag' linker flag" + $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo @@ -2762,18 +4081,20 @@ func_mode_finish () exit $EXIT_SUCCESS } -test "$opt_mode" = finish && func_mode_finish ${1+"$@"} +test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { - $opt_debug + $debug_cmd + # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac; then + case $nonopt in *shtool*) :;; *) false;; esac + then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " @@ -2800,7 +4121,7 @@ func_mode_install () opts= prev= install_type= - isdir=no + isdir=false stripme= no_mode=: for arg @@ -2813,7 +4134,7 @@ func_mode_install () fi case $arg in - -d) isdir=yes ;; + -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg @@ -2831,7 +4152,7 @@ func_mode_install () *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then - if test "x$prev" = x-m && test -n "$install_override_mode"; then + if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi @@ -2856,7 +4177,7 @@ func_mode_install () func_fatal_help "you must specify an install program" test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" + func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else @@ -2878,19 +4199,19 @@ func_mode_install () dest=$func_stripname_result # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" + test -d "$dest" && isdir=: + if $isdir; then + destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" + destdir=$func_dirname_result + destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" + func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; @@ -2899,7 +4220,7 @@ func_mode_install () case $file in *.lo) ;; *) - func_fatal_help "\`$destdir' must be an absolute directory name" + func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done @@ -2908,7 +4229,7 @@ func_mode_install () # This variable tells wrapper scripts just to set variables rather # than running their programs. - libtool_install_magic="$magic" + libtool_install_magic=$magic staticlibs= future_libdirs= @@ -2928,7 +4249,7 @@ func_mode_install () # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" + || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= @@ -2950,7 +4271,7 @@ func_mode_install () fi func_dirname "$file" "/" "" - dir="$func_dirname_result" + dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then @@ -2964,7 +4285,7 @@ func_mode_install () # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. @@ -2973,29 +4294,36 @@ func_mode_install () relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi - func_warning "relinking \`$file'" + func_warning "relinking '$file'" func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then - realname="$1" + realname=$1 shift - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T + srcname=$realname + test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' - tstripme="$stripme" + tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) - tstripme="" + tstripme= + ;; + esac + ;; + os2*) + case $realname in + *_dll.a) + tstripme= ;; esac ;; @@ -3006,7 +4334,7 @@ func_mode_install () if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on + # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname @@ -3017,14 +4345,14 @@ func_mode_install () fi # Do each command in the postinstall commands. - lib="$destdir/$realname" + lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i + name=$func_basename_result + instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. @@ -3036,11 +4364,11 @@ func_mode_install () # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then - destfile="$destdir/$destname" + destfile=$destdir/$destname else func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" + destfile=$func_basename_result + destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. @@ -3050,11 +4378,11 @@ func_mode_install () staticdest=$func_lo2o_result ;; *.$objext) - staticdest="$destfile" + staticdest=$destfile destfile= ;; *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" + func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac @@ -3063,7 +4391,7 @@ func_mode_install () func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result @@ -3075,23 +4403,23 @@ func_mode_install () *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then - destfile="$destdir/$destname" + destfile=$destdir/$destname else func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" + destfile=$func_basename_result + destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install - stripped_ext="" + stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result - stripped_ext=".exe" + stripped_ext=.exe fi ;; esac @@ -3119,19 +4447,19 @@ func_mode_install () # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" + func_fatal_error "invalid libtool wrapper script '$wrapper'" - finalize=yes + finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi - libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test + libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no + func_warning "'$lib' has not been installed in '$libdir'" + finalize=false fi done @@ -3139,29 +4467,29 @@ func_mode_install () func_source "$wrapper" outputname= - if test "$fast_install" = no && test -n "$relink_command"; then + if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { - if test "$finalize" = yes; then + if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" + file=$func_basename_result + outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - $opt_silent || { + $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else - func_error "error: relink \`$file' with the above command before installing it" + func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi - file="$outputname" + file=$outputname else - func_warning "cannot relink \`$file'" + func_warning "cannot relink '$file'" fi } else @@ -3198,10 +4526,10 @@ func_mode_install () for file in $staticlibs; do func_basename "$file" - name="$func_basename_result" + name=$func_basename_result # Set up the ranlib parameters. - oldlib="$destdir/$name" + oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result @@ -3216,18 +4544,18 @@ func_mode_install () done test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" + func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } -test "$opt_mode" = install && func_mode_install ${1+"$@"} +test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p @@ -3235,16 +4563,17 @@ test "$opt_mode" = install && func_mode_install ${1+"$@"} # a dlpreopen symbol table. func_generate_dlsyms () { - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + $debug_cmd + + my_outputname=$1 + my_originator=$2 + my_pic_p=${3-false} + my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" + my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi @@ -3255,7 +4584,7 @@ func_generate_dlsyms () "") ;; *.c) # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" + nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" @@ -3263,34 +4592,36 @@ func_generate_dlsyms () func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ +/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif -#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST -#elif defined(__osf__) +#elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + /* External symbol declarations for the compiler. */\ " - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" + if test yes = "$dlself"; then + func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" @@ -3298,7 +4629,7 @@ extern \"C\" { progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 - func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done @@ -3318,10 +4649,10 @@ extern \"C\" { # Prepare the list of exported symbols if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" + export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' @@ -3331,7 +4662,7 @@ extern \"C\" { } else $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in @@ -3345,22 +4676,22 @@ extern \"C\" { fi for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" + func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" - name="$func_basename_result" + name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" - dlprefile_dlbasename="" + dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` - if test -n "$dlprefile_dlname" ; then + if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" - dlprefile_dlbasename="$func_basename_result" + dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" @@ -3368,7 +4699,7 @@ extern \"C\" { fi fi $opt_dry_run || { - if test -n "$dlprefile_dlbasename" ; then + if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" @@ -3424,6 +4755,11 @@ extern \"C\" { echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi + func_show_eval '$RM "${nlist}I"' + if test -n "$global_symbol_to_import"; then + eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' + fi + echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ @@ -3432,11 +4768,30 @@ typedef struct { void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; +lt_${my_prefix}_LTX_preloaded_symbols[];\ +" + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ +static void lt_syminit(void) +{ + LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; + for (; symbol->name; ++symbol) + {" + $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" + echo >> "$output_objdir/$my_dlsyms" "\ + } +}" + fi + echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," +{ {\"$my_originator\", (void *) 0}," + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ + {\"@INIT@\", (void *) <_syminit}," + fi case $need_lib_prefix in no) @@ -3478,9 +4833,7 @@ static const void *lt_preloaded_setup() { *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi + $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; @@ -3497,10 +4850,10 @@ static const void *lt_preloaded_setup() { func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" + symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then @@ -3518,7 +4871,7 @@ static const void *lt_preloaded_setup() { esac ;; *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" + func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else @@ -3532,6 +4885,32 @@ static const void *lt_preloaded_setup() { fi } +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + # func_win32_libid arg # return the library type of file 'arg' # @@ -3541,8 +4920,9 @@ static const void *lt_preloaded_setup() { # Despite the name, also deal with 64 bit binaries. func_win32_libid () { - $opt_debug - win32_libid_type="unknown" + $debug_cmd + + win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import @@ -3552,16 +4932,29 @@ func_win32_libid () # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - func_to_tool_file "$1" func_convert_file_msys_to_w32 - win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' + case $nm_interface in + "MS dumpbin") + if func_cygming_ms_implib_p "$1" || + func_cygming_gnu_implib_p "$1" + then + win32_nmres=import + else + win32_nmres= + fi + ;; + *) + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' 1,100{ / I /{ - s,.*,import, + s|.*|import| p q } }'` + ;; + esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; @@ -3593,7 +4986,8 @@ func_win32_libid () # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { - $opt_debug + $debug_cmd + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } @@ -3610,7 +5004,8 @@ func_cygming_dll_for_implib () # specified import library. func_cygming_dll_for_implib_fallback_core () { - $opt_debug + $debug_cmd + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ @@ -3646,8 +5041,8 @@ func_cygming_dll_for_implib_fallback_core () /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the - # archive which possess that section. Heuristic: eliminate - # all those which have a first or second character that is + # archive that possess that section. Heuristic: eliminate + # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually @@ -3658,30 +5053,6 @@ func_cygming_dll_for_implib_fallback_core () $SED -e '/^\./d;/^.\./d;q' } -# func_cygming_gnu_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is a GNU/binutils-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_gnu_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` - test -n "$func_cygming_gnu_implib_tmp" -} - -# func_cygming_ms_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is an MS-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_ms_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` - test -n "$func_cygming_ms_implib_tmp" -} - # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified @@ -3695,16 +5066,17 @@ func_cygming_ms_implib_p () # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { - $opt_debug - if func_cygming_gnu_implib_p "$1" ; then + $debug_cmd + + if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` - elif func_cygming_ms_implib_p "$1" ; then + elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown - sharedlib_from_linklib_result="" + sharedlib_from_linklib_result= fi } @@ -3712,10 +5084,11 @@ func_cygming_dll_for_implib_fallback () # func_extract_an_archive dir oldlib func_extract_an_archive () { - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - if test "$lock_old_archive_extraction" = yes; then + $debug_cmd + + f_ex_an_ar_dir=$1; shift + f_ex_an_ar_oldlib=$1 + if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" @@ -3724,7 +5097,7 @@ func_extract_an_archive () fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' - if test "$lock_old_archive_extraction" = yes; then + if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then @@ -3738,22 +5111,23 @@ func_extract_an_archive () # func_extract_archives gentop oldlib ... func_extract_archives () { - $opt_debug - my_gentop="$1"; shift + $debug_cmd + + my_gentop=$1; shift my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" + my_oldobjs= + my_xlib= + my_xabs= + my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" - my_xlib="$func_basename_result" + my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in @@ -3765,7 +5139,7 @@ func_extract_archives () esac done extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" + my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" @@ -3778,22 +5152,23 @@ func_extract_archives () cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` + func_basename "$darwin_archive" + darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" + for darwin_arch in $darwin_arches; do + func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" + $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" + cd "unfat-$$/$darwin_base_archive-$darwin_arch" + func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do @@ -3815,7 +5190,7 @@ func_extract_archives () my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done - func_extract_archives_result="$my_oldobjs" + func_extract_archives_result=$my_oldobjs } @@ -3830,7 +5205,7 @@ func_extract_archives () # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is +# will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () @@ -3841,7 +5216,7 @@ func_emit_wrapper () #! $SHELL # $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. @@ -3898,9 +5273,9 @@ _LTECHO_EOF' # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on +# /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options which match +# (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and @@ -3933,7 +5308,7 @@ func_parse_lt_options () # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then - echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } @@ -3944,7 +5319,7 @@ func_lt_dump_args () lt_dump_args_N=1; for lt_arg do - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } @@ -3958,7 +5333,7 @@ func_exec_program_core () *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} @@ -3968,7 +5343,7 @@ func_exec_program_core () *) $ECHO "\ if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} @@ -4043,13 +5418,13 @@ func_exec_program () test -n \"\$absdir\" && thisdir=\"\$absdir\" " - if test "$fast_install" = yes; then + if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" @@ -4066,7 +5441,7 @@ func_exec_program () if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else - $ECHO \"\$relink_command_output\" >&2 + \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi @@ -4101,7 +5476,7 @@ func_exec_program () fi # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" @@ -4121,7 +5496,7 @@ func_exec_program () fi else # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 @@ -4140,7 +5515,7 @@ func_emit_cwrapperexe_src () cat < #include +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + /* declarations of non-ANSI functions */ -#if defined(__MINGW32__) +#if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif -#elif defined(__CYGWIN__) +#elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif -/* #elif defined (other platforms) ... */ +/* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ -#if defined(_MSC_VER) +#if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC -# ifndef _INTPTR_T_DEFINED -# define _INTPTR_T_DEFINED -# define intptr_t int -# endif -#elif defined(__MINGW32__) +#elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv -#elif defined(__CYGWIN__) +#elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" -/* #elif defined (other platforms) ... */ +/* #elif defined other platforms ... */ #endif -#if defined(PATH_MAX) +#if defined PATH_MAX # define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) +#elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 @@ -4234,8 +5607,8 @@ int setenv (const char *, const char *, int); # define PATH_SEPARATOR ':' #endif -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) +#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ + defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 @@ -4268,10 +5641,10 @@ int setenv (const char *, const char *, int); #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ + if (stale) { free (stale); stale = 0; } \ } while (0) -#if defined(LT_DEBUGWRAPPER) +#if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; @@ -4300,11 +5673,16 @@ void lt_dump_script (FILE *f); EOF cat < 0) && IS_PATH_SEPARATOR (new_value[len-1])) + size_t len = strlen (new_value); + while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { - new_value[len-1] = '\0'; + new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); @@ -5082,27 +6460,47 @@ EOF # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { - $opt_debug + $debug_cmd + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } +# func_suncc_cstd_abi +# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! +# Several compiler flags select an ABI that is incompatible with the +# Cstd library. Avoid specifying it if any are in CXXFLAGS. +func_suncc_cstd_abi () +{ + $debug_cmd + + case " $compile_command " in + *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) + suncc_use_cstd_abi=no + ;; + *) + suncc_use_cstd_abi=yes + ;; + esac +} + # func_mode_link arg... func_mode_link () { - $opt_debug + $debug_cmd + case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra + # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not + # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. @@ -5146,10 +6544,11 @@ func_mode_link () module=no no_install=no objs= + os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no - preload=no + preload=false prev= prevarg= release= @@ -5161,7 +6560,7 @@ func_mode_link () vinfo= vinfo_number=no weak_libs= - single_module="${wl}-single_module" + single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. @@ -5169,15 +6568,15 @@ func_mode_link () do case $arg in -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" + test yes != "$build_libtool_libs" \ + && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then @@ -5210,7 +6609,7 @@ func_mode_link () # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do - arg="$1" + arg=$1 shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result @@ -5227,21 +6626,21 @@ func_mode_link () case $prev in bindir) - bindir="$arg" + bindir=$arg prev= continue ;; dlfiles|dlprefiles) - if test "$preload" = no; then + $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" - preload=yes - fi + preload=: + } case $arg in *.la | *.lo) ;; # We handle these cases below. force) - if test "$dlself" = no; then + if test no = "$dlself"; then dlself=needless export_dynamic=yes fi @@ -5249,9 +6648,9 @@ func_mode_link () continue ;; self) - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless @@ -5261,7 +6660,7 @@ func_mode_link () continue ;; *) - if test "$prev" = dlfiles; then + if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" @@ -5272,14 +6671,14 @@ func_mode_link () esac ;; expsyms) - export_symbols="$arg" + export_symbols=$arg test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" + || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) - export_symbols_regex="$arg" + export_symbols_regex=$arg prev= continue ;; @@ -5297,7 +6696,13 @@ func_mode_link () continue ;; inst_prefix) - inst_prefix_dir="$arg" + inst_prefix_dir=$arg + prev= + continue + ;; + mllvm) + # Clang does not use LLVM to link, so we can simply discard any + # '-mllvm $arg' options when doing the link step. prev= continue ;; @@ -5321,21 +6726,21 @@ func_mode_link () if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result - if test "$pic_object" != none; then + if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + pic_object=$xdir$pic_object - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue @@ -5346,7 +6751,7 @@ func_mode_link () fi # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= @@ -5354,23 +6759,23 @@ func_mode_link () # A PIC object. func_append libobjs " $pic_object" - arg="$pic_object" + arg=$pic_object fi # Non-PIC object. - if test "$non_pic_object" != none; then + if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" + non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" + non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else @@ -5378,7 +6783,7 @@ func_mode_link () if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result @@ -5386,24 +6791,29 @@ func_mode_link () func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else - func_fatal_error "\`$arg' is not a valid libtool object" + func_fatal_error "'$arg' is not a valid libtool object" fi fi done else - func_fatal_error "link input file \`$arg' does not exist" + func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; + os2dllname) + os2dllname=$arg + prev= + continue + ;; precious_regex) - precious_files_regex="$arg" + precious_files_regex=$arg prev= continue ;; release) - release="-$arg" + release=-$arg prev= continue ;; @@ -5415,7 +6825,7 @@ func_mode_link () func_fatal_error "only absolute run-paths are allowed" ;; esac - if test "$prev" = rpath; then + if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; @@ -5430,7 +6840,7 @@ func_mode_link () continue ;; shrext) - shrext_cmds="$arg" + shrext_cmds=$arg prev= continue ;; @@ -5470,7 +6880,7 @@ func_mode_link () esac fi # test -n "$prev" - prevarg="$arg" + prevarg=$arg case $arg in -all-static) @@ -5484,7 +6894,7 @@ func_mode_link () -allow-undefined) # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" + func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) @@ -5516,7 +6926,7 @@ func_mode_link () if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi - if test "X$arg" = "X-export-symbols"; then + if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex @@ -5550,9 +6960,9 @@ func_mode_link () func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" + func_fatal_error "require no space between '-L' and '$1'" else - func_fatal_error "need path for \`-L' option" + func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" @@ -5563,8 +6973,8 @@ func_mode_link () *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" + func_fatal_error "cannot determine absolute directory name of '$dir'" + dir=$absdir ;; esac case "$deplibs " in @@ -5599,7 +7009,7 @@ func_mode_link () ;; -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) @@ -5607,11 +7017,11 @@ func_mode_link () ;; *-*-os2*) # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework @@ -5620,16 +7030,16 @@ func_mode_link () ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; esac - elif test "X$arg" = "X-lc_r"; then + elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -5639,6 +7049,11 @@ func_mode_link () continue ;; + -mllvm) + prev=mllvm + continue + ;; + -module) module=yes continue @@ -5668,7 +7083,7 @@ func_mode_link () ;; -multi_module) - single_module="${wl}-multi_module" + single_module=$wl-multi_module continue ;; @@ -5682,8 +7097,8 @@ func_mode_link () *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" + func_warning "'-no-install' is ignored for $host" + func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; @@ -5701,6 +7116,11 @@ func_mode_link () continue ;; + -os2dllname) + prev=os2dllname + continue + ;; + -o) prev=output ;; -precious-files-regex) @@ -5788,14 +7208,14 @@ func_mode_link () func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for flag in $args; do - IFS="$save_ifs" + IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; @@ -5804,15 +7224,15 @@ func_mode_link () func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for flag in $args; do - IFS="$save_ifs" + IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; @@ -5835,7 +7255,7 @@ func_mode_link () # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: @@ -5847,25 +7267,46 @@ func_mode_link () # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support - # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -stdlib=* select c++ std lib with clang -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-flto*|-fwhopr*|-fuse-linker-plugin) + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; + -Z*) + if test os2 = "`expr $host : '.*\(os2\)'`"; then + # OS/2 uses -Zxxx to specify OS/2-specific options + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case $arg in + -Zlinker | -Zstack) + prev=xcompiler + ;; + esac + continue + else + # Otherwise treat like 'Some other compiler flag' below + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + fi + ;; + # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result ;; *.$objext) @@ -5886,21 +7327,21 @@ func_mode_link () if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result - if test "$pic_object" != none; then + test none = "$pic_object" || { # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + pic_object=$xdir$pic_object - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue @@ -5911,7 +7352,7 @@ func_mode_link () fi # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= @@ -5919,23 +7360,23 @@ func_mode_link () # A PIC object. func_append libobjs " $pic_object" - arg="$pic_object" - fi + arg=$pic_object + } # Non-PIC object. - if test "$non_pic_object" != none; then + if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" + non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" + non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else @@ -5943,7 +7384,7 @@ func_mode_link () if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result @@ -5951,7 +7392,7 @@ func_mode_link () func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else - func_fatal_error "\`$arg' is not a valid libtool object" + func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; @@ -5967,11 +7408,11 @@ func_mode_link () # A libtool-controlled library. func_resolve_sysroot "$arg" - if test "$prev" = dlfiles; then + if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= - elif test "$prev" = dlprefiles; then + elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= @@ -5986,7 +7427,7 @@ func_mode_link () # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result ;; esac # arg @@ -5998,9 +7439,9 @@ func_mode_link () done # argument parsing loop test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" + func_fatal_help "the '$prevarg' option requires an argument" - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -6009,20 +7450,23 @@ func_mode_link () oldlibs= # calculate the name of the file, without its directory func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" + outputname=$func_basename_result + libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` + eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + # Definition is injected by LT_CONFIG during libtool generation. + func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" + func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" + output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. @@ -6045,7 +7489,7 @@ func_mode_link () # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac @@ -6053,7 +7497,7 @@ func_mode_link () func_append libs " $deplib" done - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps @@ -6085,7 +7529,7 @@ func_mode_link () case $file in *.la) ;; *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done @@ -6093,7 +7537,7 @@ func_mode_link () prog) compile_deplibs= finalize_deplibs= - alldeplibs=no + alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" @@ -6105,29 +7549,29 @@ func_mode_link () for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then + if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done - deplibs="$tmp_deplibs" + deplibs=$tmp_deplibs fi - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass"; then + libs=$deplibs deplibs= fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; + dlopen) libs=$dlfiles ;; + dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then + if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs @@ -6148,26 +7592,26 @@ func_mode_link () esac done done - libs="$dlprefiles" + libs=$dlprefiles fi - if test "$pass" = dlopen; then + if test dlopen = "$pass"; then # Collect dlpreopened libraries - save_deplibs="$deplibs" + save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= - found=no + found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" - if test "$linkmode" = lib ; then + if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; @@ -6177,13 +7621,13 @@ func_mode_link () continue ;; -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" + if test lib != "$linkmode" && test prog != "$linkmode"; then + func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" @@ -6191,31 +7635,22 @@ func_mode_link () for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" + lib=$searchdir/lib$name$search_ext if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes + if test .la = "$search_ext"; then + found=: else - found=no + found=false fi break 2 fi done done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library + if $found; then + # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then @@ -6223,19 +7658,19 @@ func_mode_link () old_library= func_source "$lib" for l in $old_library $library_names; do - ll="$l" + ll=$l done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no + if test "X$ll" = "X$old_library"; then # only static version available + found=false func_dirname "$lib" "" "." - ladir="$func_dirname_result" + ladir=$func_dirname_result lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi @@ -6244,15 +7679,25 @@ func_mode_link () *) ;; esac fi + else + # deplib doesn't seem to be a libtool library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue fi ;; # -l *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then + if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; @@ -6265,18 +7710,18 @@ func_mode_link () case $linkmode in lib) deplibs="$deplib $deplibs" - test "$pass" = conv && continue + test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi - if test "$pass" = scan; then + if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" @@ -6287,13 +7732,13 @@ func_mode_link () func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) - func_warning "\`-L' is ignored for archives/objects" + func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) - if test "$pass" = link; then + if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result @@ -6311,7 +7756,7 @@ func_mode_link () lib=$func_resolve_sysroot_result ;; *.$libext) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi @@ -6322,21 +7767,26 @@ func_mode_link () case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) - valid_a_lib=no + valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes + valid_a_lib=: fi ;; pass_all) - valid_a_lib=yes + valid_a_lib=: ;; esac - if test "$valid_a_lib" != yes; then + if $valid_a_lib; then + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" @@ -6344,18 +7794,13 @@ func_mode_link () echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." - else - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) - if test "$pass" != link; then + if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" @@ -6366,10 +7811,10 @@ func_mode_link () esac # linkmode ;; # *.$libext *.lo | *.$objext) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + elif test prog = "$linkmode"; then + if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" @@ -6382,22 +7827,20 @@ func_mode_link () continue ;; %DEPLIBS%) - alldeplibs=yes + alldeplibs=: continue ;; esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi + $found || test -f "$lib" \ + || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" + || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." - ladir="$func_dirname_result" + ladir=$func_dirname_result dlname= dlopen= @@ -6427,30 +7870,30 @@ func_mode_link () done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass" || + { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi - if test "$pass" = conv; then + if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" + func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" + elif test prog != "$linkmode" && test lib != "$linkmode"; then + func_fatal_error "'$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac @@ -6464,26 +7907,26 @@ func_mode_link () # Get the name of the library we link against. linklib= if test -n "$old_library" && - { test "$prefer_static_libs" = yes || - test "$prefer_static_libs,$installed" = "built,no"; }; then + { test yes = "$prefer_static_libs" || + test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do - linklib="$l" + linklib=$l done fi if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" + func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi + if test dlopen = "$pass"; then + test -z "$libdir" \ + && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then + test yes != "$dlopen_support" || + test no = "$build_libtool_libs" + then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't @@ -6497,40 +7940,40 @@ func_mode_link () # We need an absolute path. case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" + abs_ladir=$ladir fi ;; esac func_basename "$lib" - laname="$func_basename_result" + laname=$func_basename_result # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then + if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" + func_warning "library '$lib' was moved." + dir=$ladir + absdir=$abs_ladir + libdir=$abs_ladir else - dir="$lt_sysroot$libdir" - absdir="$lt_sysroot$libdir" + dir=$lt_sysroot$libdir + absdir=$lt_sysroot$libdir fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" + dir=$ladir + absdir=$abs_ladir # Remove this search path later func_append notinst_path " $abs_ladir" else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" + dir=$ladir/$objdir + absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi @@ -6539,11 +7982,11 @@ func_mode_link () name=$func_stripname_result # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + if test dlpreopen = "$pass"; then + if test -z "$libdir" && test prog = "$linkmode"; then + func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi - case "$host" in + case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both @@ -6587,9 +8030,9 @@ func_mode_link () if test -z "$libdir"; then # Link the convenience library - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then + elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else @@ -6599,14 +8042,14 @@ func_mode_link () fi - if test "$linkmode" = prog && test "$pass" != link; then + if test prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes + linkalldeplibs=false + if test no != "$link_all_deplibs" || test -z "$library_names" || + test no = "$build_libtool_libs"; then + linkalldeplibs=: fi tmp_libs= @@ -6618,14 +8061,14 @@ func_mode_link () ;; esac # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then + if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac @@ -6635,15 +8078,15 @@ func_mode_link () continue fi # $linkmode = prog... - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || + { { test no = "$prefer_static_libs" || + test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in + case $temp_rpath: in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac @@ -6672,9 +8115,9 @@ func_mode_link () esac fi # $linkmode,$pass = prog,link... - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && + if $alldeplibs && + { test pass_all = "$deplibs_check_method" || + { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue @@ -6683,19 +8126,19 @@ func_mode_link () link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then + if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then + { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in - *cygwin* | *mingw* | *cegcc*) + *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) - if test "$installed" = no; then + if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi @@ -6705,24 +8148,24 @@ func_mode_link () # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" + dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" + dlopenmodule=$dlpremoduletest break fi done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then + if test lib = "$linkmode" && + test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. @@ -6750,43 +8193,43 @@ func_mode_link () # figure out the soname set dummy $library_names shift - realname="$1" + realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then - soname="$dlname" + soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in - *cygwin* | mingw* | *cegcc*) + *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result - versuffix="-$major" + versuffix=-$major ;; esac eval soname=\"$soname_spec\" else - soname="$realname" + soname=$realname fi # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" + soroot=$soname func_basename "$soroot" - soname="$func_basename_result" + soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else - func_verbose "extracting exported symbol list from \`$soname'" + func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" + func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library @@ -6794,58 +8237,58 @@ func_mode_link () linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" - if test "$linkmode" = prog || test "$opt_mode" != relink; then + if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" + if test no = "$hardcode_direct"; then + add=$dir/$linklib case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; + *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; + *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not + # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then + $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then + if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else - add="$dir/$old_library" + add=$dir/$old_library fi elif test -n "$old_library"; then - add="$dir/$old_library" + add=$dir/$old_library fi fi esac - elif test "$hardcode_minus_L" = no; then + elif test no = "$hardcode_minus_L"; then case $host in - *-*-sunos*) add_shlibpath="$dir" ;; + *-*-sunos*) add_shlibpath=$dir ;; esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" + add_dir=-L$dir + add=-l$name + elif test no = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name else lib_linked=no fi ;; relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$absdir" + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$dir/$linklib + elif test yes = "$hardcode_minus_L"; then + 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 @@ -6854,10 +8297,10 @@ func_mode_link () ;; esac fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name else lib_linked=no fi @@ -6865,7 +8308,7 @@ func_mode_link () *) lib_linked=no ;; esac - if test "$lib_linked" != yes; then + if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi @@ -6875,15 +8318,15 @@ func_mode_link () *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then + if test yes != "$hardcode_direct" && + test yes != "$hardcode_minus_L" && + test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; @@ -6892,33 +8335,33 @@ func_mode_link () fi fi - if test "$linkmode" = prog || test "$opt_mode" = relink; then + if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$libdir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$libdir + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then + add=-l$name + elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" + test -f "$inst_prefix_dir$libdir/$linklib"; then + add=$inst_prefix_dir$libdir/$linklib else - add="$libdir/$linklib" + add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" + add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -6927,10 +8370,10 @@ func_mode_link () ;; esac fi - add="-l$name" + add=-l$name fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else @@ -6938,43 +8381,43 @@ func_mode_link () test -n "$add" && deplibs="$add $deplibs" fi fi - elif test "$linkmode" = prog; then + elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" + if test unsupported != "$hardcode_direct"; then + test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi - elif test "$build_libtool_libs" = yes; then + elif test yes = "$build_libtool_libs"; then # Not a shared library - if test "$deplibs_check_method" != pass_all; then + if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo - $ECHO "*** Warning: This system can not link to static lib archive $lib." + $ECHO "*** Warning: This system cannot link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then + if test yes = "$module"; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." + echo "*** 'nm' from GNU binutils and a full rebuild may help." fi - if test "$build_old_libs" = no; then + if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else @@ -6987,11 +8430,11 @@ func_mode_link () fi fi # link shared/static library? - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then + { test yes != "$hardcode_into_libs" || + test yes = "$build_old_libs" || + test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do @@ -7005,12 +8448,12 @@ func_mode_link () *) func_append temp_deplibs " $libdir";; esac done - dependency_libs="$temp_deplibs" + dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do @@ -7020,7 +8463,7 @@ func_mode_link () func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; @@ -7029,12 +8472,12 @@ func_mode_link () func_append tmp_libs " $func_resolve_sysroot_result" done - if test "$link_all_deplibs" != no; then + if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in - -L*) path="$deplib" ;; + -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result @@ -7042,12 +8485,12 @@ func_mode_link () dir=$func_dirname_result # We need an absolute path. case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" + func_warning "cannot determine absolute directory name of '$dir'" + absdir=$dir fi ;; esac @@ -7055,35 +8498,35 @@ func_mode_link () case $host in *-*-darwin*) depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do + eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names"; then + for tmp in $deplibrary_names; do depdepl=$tmp done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -f "$absdir/$objdir/$depdepl"; then + depdepl=$absdir/$objdir/$depdepl + darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi - func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" + func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" + func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) - path="-L$absdir/$objdir" + path=-L$absdir/$objdir ;; esac else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" + func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" + func_warning "'$deplib' seems to be moved" - path="-L$absdir" + path=-L$absdir fi ;; esac @@ -7095,23 +8538,23 @@ func_mode_link () fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then + if test link = "$pass"; then + if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then + dependency_libs=$newdependency_libs + if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then + if test dlopen != "$pass"; then + test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do @@ -7121,12 +8564,12 @@ func_mode_link () esac done newlib_search_path= - fi + } - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else + if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" + else + vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order @@ -7184,62 +8627,93 @@ func_mode_link () eval $var=\"$tmp_libs\" done # for var fi + + # Add Sun CC postdeps if required: + test CXX = "$tagname" && { + case $host_os in + linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C++ 5.9 + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + + solaris*) + func_cc_basename "$CC" + case $func_cc_basename_result in + CC* | sunCC*) + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + esac + } + # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= - for i in $dependency_libs ; do + for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) - i="" + i= ;; esac - if test -n "$i" ; then + if test -n "$i"; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" + if test prog = "$linkmode"; then + dlfiles=$newdlfiles fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" + if test prog = "$linkmode" || test lib = "$linkmode"; then + dlprefiles=$newdlprefiles fi case $linkmode in oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; + func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" + func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" + func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" + func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ - func_warning "\`-release' is ignored for archives" + func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" + func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no - oldlibs="$output" + oldlibs=$output func_append objs "$old_deplibs" ;; lib) - # Make sure we only generate libraries of the form `libNAME.la'. + # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" @@ -7248,10 +8722,10 @@ func_mode_link () eval libname=\"$libname_spec\" ;; *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" + test no = "$module" \ + && func_fatal_help "libtool library '$output' must begin with 'lib'" - if test "$need_lib_prefix" != no; then + if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result @@ -7265,8 +8739,8 @@ func_mode_link () esac if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + if test pass_all != "$deplibs_check_method"; then + func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" @@ -7275,21 +8749,21 @@ func_mode_link () fi fi - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" + test no = "$dlself" \ + || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" + test 1 -lt "$#" \ + && func_warning "ignoring multiple '-rpath's for a libtool library" - install_libdir="$1" + install_libdir=$1 oldlibs= if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so + # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" @@ -7298,20 +8772,20 @@ func_mode_link () fi test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" + func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. - save_ifs="$IFS"; IFS=':' + save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift - IFS="$save_ifs" + IFS=$save_ifs test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" + func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts @@ -7319,42 +8793,42 @@ func_mode_link () case $vinfo_number in yes) - number_major="$1" - number_minor="$2" - number_revision="$3" + number_major=$1 + number_minor=$2 + number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix - # which has an extra 1 added just for fun + # that 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) + darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result - age="$number_minor" - revision="$number_revision" + age=$number_minor + revision=$number_revision ;; - freebsd-aout|freebsd-elf|qnx|sunos) - current="$number_major" - revision="$number_minor" - age="0" + freebsd-aout|qnx|sunos) + current=$number_major + revision=$number_minor + age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result - age="$number_minor" - revision="$number_minor" + age=$number_minor + revision=$number_minor lt_irix_increment=no ;; esac ;; no) - current="$1" - revision="$2" - age="$3" + current=$1 + revision=$2 + age=$3 ;; esac @@ -7362,30 +8836,30 @@ func_mode_link () case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "CURRENT '$current' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "REVISION '$revision' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "AGE '$age' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "AGE '$age' is greater than the current interface number '$current'" + func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. @@ -7400,26 +8874,36 @@ func_mode_link () # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result - versuffix="$major.$age.$revision" + versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + # On Darwin other compilers + case $CC in + nagfor*) + verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + ;; + *) + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + esac ;; freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; + major=.$current + versuffix=.$current.$revision ;; freebsd-elf) - major=".$current" - versuffix=".$current" + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision ;; irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then + if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 @@ -7430,69 +8914,74 @@ func_mode_link () nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac - verstring="$verstring_prefix$major.$revision" + verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision - while test "$loop" -ne 0; do + while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" + verstring=$verstring_prefix$major.$iface:$verstring done - # Before this point, $major must not contain `.'. + # Before this point, $major must not contain '.'. major=.$major - versuffix="$major.$revision" + versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result - versuffix="$major.$age.$revision" + versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" + versuffix=.$current.$age.$revision + verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age - while test "$loop" -ne 0; do + while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result - verstring="$verstring:${iface}.0" + verstring=$verstring:$iface.0 done # Make executables depend on our current version. - func_append verstring ":${current}.0" + func_append verstring ":$current.0" ;; qnx) - major=".$current" - versuffix=".$current" + major=.$current + versuffix=.$current + ;; + + sco) + major=.$current + versuffix=.$current ;; sunos) - major=".$current" - versuffix=".$current.$revision" + major=.$current + versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. + # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result - versuffix="-$major" + versuffix=-$major ;; *) - func_fatal_configuration "unknown library version type \`$version_type'" + func_fatal_configuration "unknown library version type '$version_type'" ;; esac @@ -7506,42 +8995,45 @@ func_mode_link () verstring= ;; *) - verstring="0.0" + verstring=0.0 ;; esac - if test "$need_version" = no; then + if test no = "$need_version"; then versuffix= else - versuffix=".0.0" + versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then + if test yes,no = "$avoid_version,$need_version"; then major= versuffix= - verstring="" + verstring= fi # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes + if test yes = "$allow_undefined"; then + if test unsupported = "$allow_undefined_flag"; then + if test yes = "$build_old_libs"; then + func_warning "undefined symbols not allowed in $host shared libraries; building static only" + build_libtool_libs=no + else + func_fatal_error "can't build $host shared library unless -no-undefined is specified" + fi fi else # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" + allow_undefined_flag=$no_undefined_flag fi fi - func_generate_dlsyms "$libname" "$libname" "yes" + func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" - test "X$libobjs" = "X " && libobjs= + test " " = "$libobjs" && libobjs= - if test "$opt_mode" != relink; then + if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= @@ -7550,8 +9042,8 @@ func_mode_link () case $p in *.$objext | *.gcno) ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) + if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue @@ -7567,11 +9059,11 @@ func_mode_link () fi # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. @@ -7592,13 +9084,13 @@ func_mode_link () *) func_append finalize_rpath " $libdir" ;; esac done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" + old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in @@ -7608,7 +9100,7 @@ func_mode_link () done # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" + old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in @@ -7617,7 +9109,7 @@ func_mode_link () esac done - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) @@ -7641,7 +9133,7 @@ func_mode_link () ;; *) # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then + if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; @@ -7657,9 +9149,9 @@ func_mode_link () # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? - release="" - versuffix="" - major="" + release= + versuffix= + major= newdeplibs= droppeddeps=no case $deplibs_check_method in @@ -7688,20 +9180,20 @@ EOF -l*) func_stripname -l '' "$i" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $i "*) func_append newdeplibs " $i" - i="" + i= ;; esac fi - if test -n "$i" ; then + if test -n "$i"; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then func_append newdeplibs " $i" else droppeddeps=yes @@ -7731,20 +9223,20 @@ EOF $opt_dry_run || $RM conftest if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $i "*) func_append newdeplibs " $i" - i="" + i= ;; esac fi - if test -n "$i" ; then + if test -n "$i"; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then func_append newdeplibs " $i" else droppeddeps=yes @@ -7781,24 +9273,24 @@ EOF -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= ;; esac fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` if test -n "$file_magic_glob"; then libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` else libnameglob=$libname fi - test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` + test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - if test "$want_nocaseglob" = yes; then + if test yes = "$want_nocaseglob"; then shopt -s nocaseglob potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` $nocaseglob @@ -7816,25 +9308,25 @@ EOF # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? - potlib="$potent_lib" + potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; + *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= break 2 fi done done fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." @@ -7842,7 +9334,7 @@ EOF echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then + if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" @@ -7865,30 +9357,30 @@ EOF -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= ;; esac fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test + potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= break 2 fi done done fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." @@ -7896,7 +9388,7 @@ EOF echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then + if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" @@ -7912,18 +9404,18 @@ EOF done # Gone through all deplibs. ;; none | unknown | *) - newdeplibs="" + newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo - if test "X$deplibs_check_method" = "Xnone"; then + if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." @@ -7947,8 +9439,8 @@ EOF ;; esac - if test "$droppeddeps" = yes; then - if test "$module" = yes; then + if test yes = "$droppeddeps"; then + if test yes = "$module"; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" @@ -7957,12 +9449,12 @@ EOF if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." + echo "*** 'nm' from GNU binutils and a full rebuild may help." fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else @@ -7973,14 +9465,14 @@ EOF echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." - if test "$allow_undefined" = no; then + if test no = "$allow_undefined"; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else @@ -8026,7 +9518,7 @@ EOF *) func_append new_libs " $deplib" ;; esac done - deplibs="$new_libs" + deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= @@ -8034,25 +9526,25 @@ EOF dlname= # 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. + if test yes = "$build_libtool_libs"; 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 + if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= - rpath="$finalize_rpath" - test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + rpath=$finalize_rpath + test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -8077,7 +9569,7 @@ EOF # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then @@ -8091,8 +9583,8 @@ EOF test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi - shlibpath="$finalize_shlibpath" - test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + shlibpath=$finalize_shlibpath + test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi @@ -8102,19 +9594,19 @@ EOF eval library_names=\"$library_names_spec\" set dummy $library_names shift - realname="$1" + realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else - soname="$realname" + soname=$realname fi if test -z "$dlname"; then dlname=$soname fi - lib="$output_objdir/$realname" + lib=$output_objdir/$realname linknames= for link do @@ -8128,7 +9620,7 @@ EOF delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" + export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi @@ -8137,31 +9629,31 @@ EOF cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. - orig_export_symbols="$export_symbols" + orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes - fi + } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" + if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do - IFS="$save_ifs" + IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in @@ -8175,7 +9667,7 @@ EOF try_normal_branch=no ;; esac - if test "$try_normal_branch" = yes \ + if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then @@ -8186,7 +9678,7 @@ EOF output_la=$func_basename_result save_libobjs=$libobjs save_output=$output - output=${output_objdir}/${output_la}.nm + output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" @@ -8209,8 +9701,8 @@ EOF break fi done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + IFS=$save_ifs + if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi @@ -8218,16 +9710,16 @@ EOF fi if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine + # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. @@ -8246,11 +9738,11 @@ EOF ;; esac done - deplibs="$tmp_deplibs" + deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && + test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. @@ -8261,7 +9753,7 @@ EOF eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience @@ -8270,18 +9762,18 @@ EOF fi fi - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then + if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds @@ -8299,7 +9791,7 @@ EOF fi fi - if test "X$skipped_export" != "X:" && + if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then @@ -8332,8 +9824,8 @@ EOF last_robj= k=1 - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript + if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then + output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs @@ -8345,14 +9837,14 @@ EOF func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk + elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then + output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= - if test "$compiler_needs_object" = yes; then + if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi @@ -8367,7 +9859,7 @@ EOF else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext + output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result @@ -8379,13 +9871,13 @@ EOF func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result - if test "X$objlist" = X || + if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. - if test "$k" -eq 1 ; then + if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" @@ -8395,10 +9887,10 @@ EOF reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi - last_robj=$output_objdir/$output_la-${k}.$objext + last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext + output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result @@ -8410,9 +9902,9 @@ EOF # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" - eval concat_cmds=\"\${concat_cmds}$reload_cmds\" + eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" @@ -8420,9 +9912,9 @@ EOF output= fi - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" + ${skipped_export-false} && { + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. @@ -8431,16 +9923,16 @@ EOF if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi - fi + } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { + IFS=$save_ifs + $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } @@ -8448,7 +9940,7 @@ EOF lt_exit=$? # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -8457,7 +9949,7 @@ EOF exit $lt_exit } done - IFS="$save_ifs" + IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' @@ -8465,18 +9957,18 @@ EOF fi fi - if ${skipped_export-false}; then + ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine + # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. @@ -8485,7 +9977,7 @@ EOF export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi - fi + } libobjs=$output # Restore the value of output. @@ -8499,7 +9991,7 @@ EOF # value of $libobjs for piecewise linking. # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then + if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else @@ -8521,7 +10013,7 @@ EOF # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles @@ -8529,11 +10021,12 @@ EOF test "X$libobjs" = "X " && libobjs= fi - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd in $cmds; do - IFS="$save_ifs" + IFS=$sp$nl eval cmd=\"$cmd\" - $opt_silent || { + IFS=$save_ifs + $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } @@ -8541,7 +10034,7 @@ EOF lt_exit=$? # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -8550,10 +10043,10 @@ EOF exit $lt_exit } done - IFS="$save_ifs" + IFS=$save_ifs # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then @@ -8573,39 +10066,39 @@ EOF done # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then + if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. - dlname="$soname" + dlname=$soname fi fi ;; obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; + func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" + func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" + func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" + func_warning "'-version-info' is ignored for objects" test -n "$release" && \ - func_warning "\`-release' is ignored for objects" + func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" + func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" @@ -8613,7 +10106,7 @@ EOF ;; *) libobj= - obj="$output" + obj=$output ;; esac @@ -8626,17 +10119,19 @@ EOF # the extraction. reload_conv_objs= gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - + # if reload_cmds runs $LD directly, get rid of -Wl from + # whole_archive_flag_spec and hope we can get by with turning comma + # into space. + case $reload_cmds in + *\$LD[\ \$]*) wl= ;; + esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else - gentop="$output_objdir/${obj}x" + gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience @@ -8645,12 +10140,12 @@ EOF fi # If we're not building shared, we need to use non_pic_objs - test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs - output="$obj" + output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. @@ -8662,7 +10157,7 @@ EOF exit $EXIT_SUCCESS fi - if test "$build_libtool_libs" != yes; then + test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi @@ -8672,12 +10167,12 @@ EOF # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS - fi + } - if test -n "$pic_flag" || test "$pic_mode" != default; then + if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" - output="$libobj" + output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi @@ -8694,16 +10189,14 @@ EOF output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" + func_warning "'-version-info' is ignored for programs" test -n "$release" && \ - func_warning "\`-release' is ignored for programs" + func_warning "'-release' is ignored for programs" - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + $preload \ + && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ + && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) @@ -8717,11 +10210,11 @@ EOF *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then + if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) - func_append compile_command " ${wl}-bind_at_load" - func_append finalize_command " ${wl}-bind_at_load" + func_append compile_command " $wl-bind_at_load" + func_append finalize_command " $wl-bind_at_load" ;; esac fi @@ -8757,7 +10250,7 @@ EOF *) func_append new_libs " $deplib" ;; esac done - compile_deplibs="$new_libs" + compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" @@ -8781,7 +10274,7 @@ EOF if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -8804,7 +10297,7 @@ EOF fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; @@ -8821,10 +10314,10 @@ EOF # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi - compile_rpath="$rpath" + compile_rpath=$rpath rpath= hardcode_libdirs= @@ -8832,7 +10325,7 @@ EOF if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -8857,45 +10350,43 @@ EOF # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi - finalize_rpath="$rpath" + finalize_rpath=$rpath - if test -n "$libobjs" && test "$build_old_libs" = yes; then + if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi - wrappers_required=yes + wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=no + wrappers_required=false ;; *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi + test yes = "$build_libtool_libs" || wrappers_required=false ;; *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no + if test no = "$need_relink" || test yes != "$build_libtool_libs"; then + wrappers_required=false fi ;; esac - if test "$wrappers_required" = no; then + $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" + link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 @@ -8908,12 +10399,12 @@ EOF fi # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + if test -f "$output_objdir/${outputname}S.$objext"; then + func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status - fi + } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" @@ -8943,9 +10434,9 @@ EOF fi fi - if test "$no_install" = yes; then + if test yes = "$no_install"; then # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" + link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. @@ -8962,27 +10453,28 @@ EOF exit $EXIT_SUCCESS fi - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" + case $hardcode_action,$fast_install in + relink,*) + # Fast installation is not supported + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi + func_warning "this platform does not like uninstalled shared libraries" + func_warning "'$output' will be relinked during installation" + ;; + *,yes) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + ;; + *,no) + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + ;; + *,needless) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command= + ;; + esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` @@ -9039,8 +10531,8 @@ EOF func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" + cwrappersource=$output_path/$objdir/lt-$output_name.c + cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 @@ -9061,7 +10553,7 @@ EOF trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then + if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result @@ -9084,25 +10576,27 @@ EOF # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" + case $build_libtool_libs in + convenience) + oldobjs="$libobjs_save $symfileobj" + addlibs=$convenience build_libtool_libs=no - else + ;; + module) + oldobjs=$libobjs_save + addlibs=$old_convenience + build_libtool_libs=no + ;; + *) oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - func_append oldobjs " $symfileobj" - fi - fi - addlibs="$old_convenience" - fi + $preload && test -f "$symfileobj" \ + && func_append oldobjs " $symfileobj" + addlibs=$old_convenience + ;; + esac if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs @@ -9110,13 +10604,13 @@ EOF fi # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles @@ -9137,7 +10631,7 @@ EOF : else echo "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs @@ -9146,7 +10640,7 @@ EOF for obj in $save_oldobjs do func_basename "$obj" - objbase="$func_basename_result" + objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) @@ -9215,18 +10709,18 @@ EOF else # the above command should be used before it gets too long oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then + if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist - if test "X$oldobjs" = "X" ; then + if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" @@ -9243,7 +10737,7 @@ EOF case $output in *.la) old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" + test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior @@ -9258,31 +10752,31 @@ EOF fi done # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then + if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do - if test "$installed" = yes; then + if test yes = "$installed"; then if test -z "$install_libdir"; then break fi - output="$output_objdir/$outputname"i + output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" - name="$func_basename_result" + name=$func_basename_result func_resolve_sysroot "$deplib" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + 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_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) @@ -9298,23 +10792,23 @@ EOF *) func_append newdependency_libs " $deplib" ;; esac done - dependency_libs="$newdependency_libs" + dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" + func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done - dlfiles="$newdlfiles" + dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in @@ -9324,34 +10818,34 @@ EOF # didn't already link the preopened objects directly into # the library: func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" + func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done - dlprefiles="$newdlprefiles" + dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done - dlfiles="$newdlfiles" + dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done - dlprefiles="$newdlprefiles" + dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin @@ -9367,10 +10861,9 @@ EOF case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. - if test "x$bindir" != x ; - then + if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result$dlname + tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname @@ -9379,7 +10872,7 @@ EOF esac $ECHO > $output "\ # $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. @@ -9393,7 +10886,7 @@ library_names='$library_names' # The name of the static archive. old_library='$old_library' -# Linker flags that can not go in dependency_libs. +# Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. @@ -9419,7 +10912,7 @@ dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then + if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi @@ -9434,27 +10927,29 @@ relink_command=\"$relink_command\"" exit $EXIT_SUCCESS } -{ test "$opt_mode" = link || test "$opt_mode" = relink; } && - func_mode_link ${1+"$@"} +if test link = "$opt_mode" || test relink = "$opt_mode"; then + func_mode_link ${1+"$@"} +fi # func_mode_uninstall arg... func_mode_uninstall () { - $opt_debug - RM="$nonopt" + $debug_cmd + + RM=$nonopt files= - rmforce= + rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. - libtool_install_magic="$magic" + libtool_install_magic=$magic for arg do case $arg in - -f) func_append RM " $arg"; rmforce=yes ;; + -f) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac @@ -9467,18 +10962,18 @@ func_mode_uninstall () for file in $files; do func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - odir="$objdir" + dir=$func_dirname_result + if test . = "$dir"; then + odir=$objdir else - odir="$dir/$objdir" + odir=$dir/$objdir fi func_basename "$file" - name="$func_basename_result" - test "$opt_mode" = uninstall && odir="$dir" + name=$func_basename_result + test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates - if test "$opt_mode" = clean; then + if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; @@ -9493,11 +10988,11 @@ func_mode_uninstall () elif test -d "$file"; then exit_status=1 continue - elif test "$rmforce" = yes; then + elif $rmforce; then continue fi - rmfiles="$file" + rmfiles=$file case $name in *.la) @@ -9511,7 +11006,7 @@ func_mode_uninstall () done test -n "$old_library" && func_append rmfiles " $odir/$old_library" - case "$opt_mode" in + case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; @@ -9522,12 +11017,12 @@ func_mode_uninstall () uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; @@ -9543,21 +11038,19 @@ func_mode_uninstall () func_source $dir/$name # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then + if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then + if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) - if test "$opt_mode" = clean ; then + if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) @@ -9584,12 +11077,12 @@ func_mode_uninstall () # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles - func_append rmfiles " $odir/$name $odir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then + func_append rmfiles " $odir/$name $odir/${name}S.$objext" + if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi - if test "X$noexename" != "X$name" ; then - func_append rmfiles " $odir/lt-${noexename}.c" + if test "X$noexename" != "X$name"; then + func_append rmfiles " $odir/lt-$noexename.c" fi fi fi @@ -9598,7 +11091,7 @@ func_mode_uninstall () func_show_eval "$RM $rmfiles" 'exit_status=1' done - # Try to remove the ${objdir}s in the directories where we deleted files + # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" @@ -9608,16 +11101,17 @@ func_mode_uninstall () exit $exit_status } -{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && - func_mode_uninstall ${1+"$@"} +if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then + func_mode_uninstall ${1+"$@"} +fi test -z "$opt_mode" && { - help="$generic_help" + help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$opt_mode'" + func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" @@ -9628,7 +11122,7 @@ exit $exit_status # The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting +# where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support @@ -9651,5 +11145,3 @@ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # mode:shell-script # sh-indentation:2 # End: -# vi:sw=2 - diff --git a/thirdparty/tiff-4.2.0/config/missing b/thirdparty/tiff-4.2.0/config/missing new file mode 100644 index 00000000..625aeb11 --- /dev/null +++ b/thirdparty/tiff-4.2.0/config/missing @@ -0,0 +1,215 @@ +#! /bin/sh +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. + +# 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 +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +case $1 in + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/thirdparty/tiff-4.0.3/config/test-driver b/thirdparty/tiff-4.2.0/config/test-driver old mode 100755 new mode 100644 similarity index 77% rename from thirdparty/tiff-4.0.3/config/test-driver rename to thirdparty/tiff-4.2.0/config/test-driver index aba4d1d2..8e575b01 --- a/thirdparty/tiff-4.0.3/config/test-driver +++ b/thirdparty/tiff-4.2.0/config/test-driver @@ -1,9 +1,9 @@ #! /bin/sh -# test-driver - basic driver script for the 'parallel-tests' mode. +# test-driver - basic testsuite driver script. -scriptversion=2012-06-27.10; # UTC +scriptversion=2013-07-13.22; # UTC -# Copyright (C) 2011-2012 Free Software Foundation, Inc. +# Copyright (C) 2011-2014 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,13 +44,12 @@ print_usage () Usage: test-driver --test-name=NAME --log-file=PATH --trs-file=PATH [--expect-failure={yes|no}] [--color-tests={yes|no}] - [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT + [--enable-hard-errors={yes|no}] [--] + TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] The '--test-name', '--log-file' and '--trs-file' options are mandatory. END } -# TODO: better error handling in option parsing (in particular, ensure -# TODO: $log_file, $trs_file and $test_name are defined). test_name= # Used for reporting. log_file= # Where to save the output of the test script. trs_file= # Where to save the metadata of the test run. @@ -69,10 +68,23 @@ while test $# -gt 0; do --enable-hard-errors) enable_hard_errors=$2; shift;; --) shift; break;; -*) usage_error "invalid option: '$1'";; + *) break;; esac shift done +missing_opts= +test x"$test_name" = x && missing_opts="$missing_opts --test-name" +test x"$log_file" = x && missing_opts="$missing_opts --log-file" +test x"$trs_file" = x && missing_opts="$missing_opts --trs-file" +if test x"$missing_opts" != x; then + usage_error "the following mandatory options are missing:$missing_opts" +fi + +if test $# -eq 0; then + usage_error "missing argument" +fi + if test $color_tests = yes; then # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'. red='' # Red. @@ -94,11 +106,14 @@ trap "st=143; $do_exit" 15 # Test script is run here. "$@" >$log_file 2>&1 estatus=$? + if test $enable_hard_errors = no && test $estatus -eq 99; then - estatus=1 + tweaked_estatus=1 +else + tweaked_estatus=$estatus fi -case $estatus:$expect_failure in +case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; @@ -107,6 +122,12 @@ case $estatus:$expect_failure in *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac +# Report the test outcome and exit status in the logs, so that one can +# know whether the test passed or failed simply by looking at the '.log' +# file, without the need of also peaking into the corresponding '.trs' +# file (automake bug#11814). +echo "$res $test_name (exit status: $estatus)" >>$log_file + # Report outcome to console. echo "${col}${res}${std}: $test_name" diff --git a/thirdparty/tiff-4.0.3/configure b/thirdparty/tiff-4.2.0/configure old mode 100755 new mode 100644 similarity index 81% rename from thirdparty/tiff-4.0.3/configure rename to thirdparty/tiff-4.2.0/configure index 8f27f01a..96362dad --- a/thirdparty/tiff-4.0.3/configure +++ b/thirdparty/tiff-4.2.0/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for LibTIFF Software 4.0.3. +# Generated by GNU Autoconf 2.69 for LibTIFF Software 4.2.0. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='LibTIFF Software' PACKAGE_TARNAME='tiff' -PACKAGE_VERSION='4.0.3' -PACKAGE_STRING='LibTIFF Software 4.0.3' +PACKAGE_VERSION='4.2.0' +PACKAGE_STRING='LibTIFF Software 4.2.0' PACKAGE_BUGREPORT='tiff@lists.maptools.org' PACKAGE_URL='' @@ -656,15 +656,21 @@ X_CFLAGS XMKMF HAVE_CXX_FALSE HAVE_CXX_TRUE +HAVE_WEBP_FALSE +HAVE_WEBP_TRUE +HAVE_ZSTD_FALSE +HAVE_ZSTD_TRUE +HAVE_LZMA_FALSE +HAVE_LZMA_TRUE +HAVE_JBIG_FALSE +HAVE_JBIG_TRUE +HAVE_JPEG_FALSE +HAVE_JPEG_TRUE LIBTIFF_DOCDIR HAVE_RPATH_FALSE HAVE_RPATH_TRUE LIBOBJS tiff_libs_private -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -AM_DEFAULT_V -AM_V CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE @@ -673,6 +679,7 @@ ac_ct_CXX CXXFLAGS CXX CPP +LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO @@ -696,6 +703,7 @@ DLLTOOL AS HAVE_LD_VERSION_SCRIPT_FALSE HAVE_LD_VERSION_SCRIPT_TRUE +CMAKE LN_S am__fastdepCC_FALSE am__fastdepCC_TRUE @@ -704,7 +712,6 @@ am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE -am__quote am__include DEPDIR OBJEXT @@ -724,6 +731,10 @@ LIBTIFF_MAJOR_VERSION MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -792,10 +803,12 @@ PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR -SHELL' +SHELL +am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking +enable_silent_rules enable_maintainer_mode enable_dependency_tracking enable_ld_version_script @@ -803,10 +816,10 @@ enable_shared enable_static with_pic enable_fast_install +with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock -enable_silent_rules enable_rpath enable_largefile with_docdir @@ -820,6 +833,9 @@ enable_mdi enable_zlib with_zlib_include_dir with_zlib_lib_dir +enable_libdeflate +with_libdeflate_include_dir +with_libdeflate_lib_dir enable_pixarlog enable_jpeg with_jpeg_include_dir @@ -831,11 +847,18 @@ with_jbig_lib_dir enable_lzma with_lzma_include_dir with_lzma_lib_dir +enable_zstd +with_zstd_include_dir +with_zstd_lib_dir +enable_webp +with_webp_include_dir +with_webp_lib_dir enable_jpeg12 with_jpeg12_include_dir with_jpeg12_lib enable_cxx with_x +enable_win32_io enable_strip_chopping with_default_strip_size enable_defer_strile_load @@ -851,6 +874,7 @@ CFLAGS LDFLAGS LIBS CPPFLAGS +LT_SYS_LIBRARY_PATH CPP CXX CXXFLAGS @@ -1397,7 +1421,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 LibTIFF Software 4.0.3 to adapt to many kinds of systems. +\`configure' configures LibTIFF Software 4.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1471,7 +1495,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of LibTIFF Software 4.0.3:";; + short | recursive ) echo "Configuration of LibTIFF Software 4.2.0:";; esac cat <<\_ACEOF @@ -1479,6 +1503,8 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer @@ -1493,8 +1519,6 @@ Optional Features: --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") --enable-rpath Enable runtime linker paths (-R libtool option) --disable-largefile omit support for large files --disable-ccitt disable support for CCITT Group 3 & 4 algorithms @@ -1507,6 +1531,9 @@ Optional Features: --disable-mdi disable support for Microsoft Document Imaging --disable-zlib disable Zlib usage (required for Deflate compression, enabled by default) + --disable-libdeflate disable libdeflate usage (optional for faster + Deflate support (still requires zlib), enabled by + default) --disable-pixarlog disable support for Pixar log-format algorithm (requires Zlib) --disable-jpeg disable IJG JPEG library usage (required for JPEG @@ -1517,17 +1544,23 @@ Optional Features: compression, enabled by default) --disable-lzma disable liblzma usage (required for LZMA2 compression, enabled by default) + --disable-zstd disable libzstd usage (required for zstd + compression, enabled by default) + --disable-webp disable libwebp usage (required for webp + compression, enabled by default) --enable-jpeg12 enable libjpeg 8/12bit dual mode --enable-cxx enable C++ stream API building (requires C++ compiler) + --disable-win32-io disable Win32 I/O (Windows only, enabled by default + except for Cygwin) --disable-strip-chopping disable support for strip chopping (whether or not to convert single-strip uncompressed images to mutiple strips of specified size to reduce memory usage) --enable-defer-strile-load - enable deferred strip/tile offset/size loading - (experimental) + enable deferred strip/tile offset/size loading (also + available at runtime with the 'D' flag of TIFFOpen() --enable-chunky-strip-read enable reading large strips in chunks for TIFFReadScanline() (experimental) @@ -1545,13 +1578,20 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] + --with-aix-soname=aix|svr4|both + shared library versioning (aka "SONAME") variant to + provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot=DIR Search for dependent libraries within DIR - (or the compiler's sysroot if not specified). + --with-sysroot[=DIR] Search for dependent libraries within DIR (or the + compiler's sysroot if not specified). --with-docdir=DIR directory where documentation should be installed --with-zlib-include-dir=DIR location of Zlib headers --with-zlib-lib-dir=DIR location of Zlib library binary + --with-libdeflate-include-dir=DIR + location of libdeflate headers + --with-libdeflate-lib-dir=DIR + location of libdeflate library binary --with-jpeg-include-dir=DIR location of IJG JPEG library headers --with-jpeg-lib-dir=DIR location of IJG JPEG library binary @@ -1561,6 +1601,12 @@ Optional Packages: --with-lzma-include-dir=DIR location of liblzma headers --with-lzma-lib-dir=DIR location of liblzma library binary + --with-zstd-include-dir=DIR + location of libzstd headers + --with-zstd-lib-dir=DIR location of libzstd library binary + --with-webp-include-dir=DIR + location of libwebp headers + --with-webp-lib-dir=DIR location of libwebp library binary --with-jpeg12-include-dir=DIR location of libjpeg 12bit headers --with-jpeg12-lib=LIBRARY @@ -1578,6 +1624,8 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory + LT_SYS_LIBRARY_PATH + User-defined run-time library search path. CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags @@ -1650,7 +1698,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -LibTIFF Software configure 4.0.3 +LibTIFF Software configure 4.2.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2191,6 +2239,52 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_type +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_decl + # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes @@ -2377,7 +2471,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 LibTIFF Software $as_me 4.0.3, which was +It was created by LibTIFF Software $as_me 4.2.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2834,7 +2928,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -am__api_version='1.12' +am__api_version='1.16' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3006,8 +3100,8 @@ test "$program_suffix" != NONE && ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -3018,15 +3112,15 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -3259,6 +3353,45 @@ else fi rmdir .tst 2>/dev/null +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." @@ -3281,7 +3414,7 @@ fi # Define the identity of the package. PACKAGE='tiff' - VERSION='4.0.3' + VERSION='4.2.0' cat >>confdefs.h <<_ACEOF @@ -3311,23 +3444,186 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# mkdir_p='$(MKDIR_P)' -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' -am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar plaintar pax cpio none' + +# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 +$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; } + if test $am_uid -le $am_max_uid; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + _am_tools=none + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 +$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; } + if test $am_gid -le $am_max_gid; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + _am_tools=none + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 +$as_echo_n "checking how to create a ustar tar archive... " >&6; } + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_ustar-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + { echo "$as_me:$LINENO: $_am_tar --version" >&5 + ($_am_tar --version) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && break + done + am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x ustar -w "$$tardir"' + am__tar_='pax -L -x ustar -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H ustar -L' + am__tar_='find "$tardir" -print | cpio -o -H ustar -L' + am__untar='cpio -i -H ustar -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_ustar}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 + (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + rm -rf conftest.dir + if test -s conftest.tar; then + { echo "$as_me:$LINENO: $am__untar &5 + ($am__untar &5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 + (cat conftest.dir/file) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + if ${am_cv_prog_tar_ustar+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_prog_tar_ustar=$_am_tool +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 +$as_echo "$am_cv_prog_tar_ustar" >&6; } +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. @@ -3352,15 +3648,15 @@ fi LIBTIFF_MAJOR_VERSION=4 -LIBTIFF_MINOR_VERSION=0 -LIBTIFF_MICRO_VERSION=3 +LIBTIFF_MINOR_VERSION=2 +LIBTIFF_MICRO_VERSION=0 LIBTIFF_ALPHA_VERSION= LIBTIFF_VERSION=$LIBTIFF_MAJOR_VERSION.$LIBTIFF_MINOR_VERSION.$LIBTIFF_MICRO_VERSION$LIBTIFF_ALPHA_VERSION LIBTIFF_RELEASE_DATE=`date +"%Y%m%d"` -LIBTIFF_CURRENT=7 +LIBTIFF_CURRENT=11 LIBTIFF_REVISION=0 -LIBTIFF_AGE=2 +LIBTIFF_AGE=6 LIBTIFF_VERSION_INFO=$LIBTIFF_CURRENT:$LIBTIFF_REVISION:$LIBTIFF_AGE # This is a special hack for OpenBSD and MirOS systems. The dynamic linker @@ -4172,49 +4468,108 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" - -am_make=${MAKE-make} -cat > confinc << 'END' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 + (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + case $?:`cat confinc.out 2>/dev/null` in #( + '0:this is the am__doit target') : + case $s in #( + BSD) : + am__include='.include' am__quote='"' ;; #( + *) : + am__include='include' am__quote='' ;; +esac ;; #( + *) : ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf +esac + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +$as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : @@ -4364,131 +4719,6 @@ else fi -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - @@ -4606,6 +4836,47 @@ else $as_echo "no, using $LN_S" >&6; } fi +# Used only for validating the source distribution during distcheck +# Extract the first word of "cmake", so it can be a program name with args. +set dummy cmake; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_CMAKE+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $CMAKE in + [\\/]* | ?:[\\/]*) + ac_cv_path_CMAKE="$CMAKE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_CMAKE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +CMAKE=$ac_cv_path_CMAKE +if test -n "$CMAKE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMAKE" >&5 +$as_echo "$CMAKE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + # Check if LD supports linker scripts, and define automake conditional @@ -4678,8 +4949,8 @@ esac -macro_version='2.4.2' -macro_revision='1.3337' +macro_version='2.4.6' +macro_revision='2.4.6' @@ -4693,7 +4964,7 @@ macro_revision='1.3337' -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within # double-quoted strings. @@ -4742,7 +5013,7 @@ func_echo_all () $ECHO "" } -case "$ECHO" in +case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 @@ -5065,19 +5336,19 @@ test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes + withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld -if test "$GCC" = yes; then +if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw + # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; @@ -5091,7 +5362,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; } while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - test -z "$LD" && LD="$ac_prog" + test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. @@ -5102,7 +5373,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; } with_gnu_ld=unknown ;; esac -elif test "$with_gnu_ld" = yes; then +elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else @@ -5113,32 +5384,32 @@ if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" + lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } @@ -5181,33 +5452,38 @@ if ${lt_cv_path_NM+:} false; then : else if test -n "$NM"; then # Let the user override the test. - lt_cv_path_NM="$NM" + lt_cv_path_NM=$NM else - lt_nm_to_check="${ac_tool_prefix}nm" + lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" - break + break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" - break + break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but @@ -5218,15 +5494,15 @@ else esac fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : @@ -5332,9 +5608,9 @@ esac fi fi - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) - DUMPBIN="$DUMPBIN -symbols" + DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: @@ -5342,8 +5618,8 @@ fi esac fi - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" + if test : != "$DUMPBIN"; then + NM=$DUMPBIN fi fi test -z "$NM" && NM=nm @@ -5383,7 +5659,7 @@ if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 - teststring="ABCD" + teststring=ABCD case $build_os in msdosdjgpp*) @@ -5423,7 +5699,7 @@ else lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -5473,22 +5749,23 @@ else ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do + for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # 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"`env 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 + test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring @@ -5506,7 +5783,7 @@ else fi -if test -n $lt_cv_sys_max_cmd_len ; then +if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else @@ -5524,30 +5801,6 @@ max_cmd_len=$lt_cv_sys_max_cmd_len : ${MV="mv -f"} : ${RM="rm -f"} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else @@ -5670,13 +5923,13 @@ esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) - if test "$GCC" != yes; then + if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + if test yes = "$GCC"; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi @@ -5801,13 +6054,13 @@ lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. +# 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) @@ -5834,8 +6087,7 @@ mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else @@ -5871,10 +6123,6 @@ freebsd* | dragonfly*) fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -5913,7 +6161,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; @@ -5935,8 +6183,8 @@ newos6*) lt_cv_deplibs_check_method=pass_all ;; -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' @@ -5989,6 +6237,9 @@ sysv4 | sysv4.3*) tpf*) lt_cv_deplibs_check_method=pass_all ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; esac fi @@ -6143,8 +6394,8 @@ else case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib @@ -6156,7 +6407,7 @@ cygwin* | mingw* | pw32* | cegcc*) ;; *) # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" + lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac @@ -6310,7 +6561,7 @@ if ac_fn_c_try_compile "$LINENO"; then : ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test "$ac_status" -eq 0; then + if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 @@ -6318,7 +6569,7 @@ if ac_fn_c_try_compile "$LINENO"; then : ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test "$ac_status" -ne 0; then + if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi @@ -6331,7 +6582,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } -if test "x$lt_cv_ar_at_file" = xno; then +if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file @@ -6548,7 +6799,7 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in - openbsd*) + bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) @@ -6638,7 +6889,7 @@ cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; @@ -6671,14 +6922,44 @@ case `$NM -V 2>&1` in symcode='[ABCDGIRSTW]' ;; esac +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -6696,21 +6977,24 @@ for ac_symprfx in "" "_"; do # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # 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};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" @@ -6758,11 +7042,11 @@ _LT_EOF if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST -#elif defined(__osf__) +#elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else @@ -6788,7 +7072,7 @@ lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; @@ -6808,13 +7092,13 @@ _LT_EOF mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" + LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then + test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS @@ -6835,7 +7119,7 @@ _LT_EOF rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then + if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= @@ -6877,6 +7161,16 @@ fi + + + + + + + + + + @@ -6900,9 +7194,9 @@ fi lt_sysroot= -case ${with_sysroot} in #( +case $with_sysroot in #( yes) - if test "$GCC" = yes; then + if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( @@ -6912,8 +7206,8 @@ case ${with_sysroot} in #( no|'') ;; #( *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 -$as_echo "${with_sysroot}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +$as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac @@ -6925,18 +7219,99 @@ $as_echo "${lt_sysroot:-no}" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +$as_echo_n "checking for a working dd... " >&6; } +if ${ac_cv_path_lt_DD+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +if test -z "$lt_DD"; then + ac_path_lt_DD_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in dd; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_lt_DD" || continue +if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi + $ac_path_lt_DD_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_lt_DD"; then + : + fi +else + ac_cv_path_lt_DD=$lt_DD +fi + +rm -f conftest.i conftest2.i conftest.out +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +$as_echo "$ac_cv_path_lt_DD" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +$as_echo_n "checking how to truncate binary pipes... " >&6; } +if ${lt_cv_truncate_bin+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +$as_echo "$lt_cv_truncate_bin" >&6; } + + + + + + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -6945,24 +7320,25 @@ ia64-*-hpux*) test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) - HPUX_IA64_MODE="32" + HPUX_IA64_MODE=32 ;; *ELF-64*) - HPUX_IA64_MODE="64" + HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" @@ -6991,9 +7367,50 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -7007,9 +7424,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -7028,7 +7455,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -7046,7 +7476,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" + SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } @@ -7086,13 +7516,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then + if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -7113,7 +7544,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } 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" + LD=${LD-ld}_sol2 fi ;; *) @@ -7129,7 +7560,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } ;; esac -need_locks="$enable_libtool_lock" +need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. @@ -7240,7 +7671,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test "x$lt_cv_path_mainfest_tool" != xyes; then +if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi @@ -7743,7 +8174,7 @@ if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then + if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the @@ -7761,7 +8192,7 @@ else 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 + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -7800,7 +8231,7 @@ else fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 @@ -7829,7 +8260,7 @@ _LT_EOF _lt_result=$? 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 + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -7842,32 +8273,32 @@ fi $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then + if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -7875,6 +8306,41 @@ $as_echo "$lt_cv_ld_force_load" >&6; } ;; esac +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -8476,14 +8942,14 @@ if test "${enable_shared+set}" = set; then : *) enable_shared=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -8507,14 +8973,14 @@ if test "${enable_static+set}" = set; then : *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -8538,14 +9004,14 @@ if test "${with_pic+set}" = set; then : *) pic_mode=default # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -8553,8 +9019,6 @@ else fi -test -z "$pic_mode" && pic_mode=default - @@ -8570,14 +9034,14 @@ if test "${enable_fast_install+set}" = set; then : *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -8591,11 +9055,63 @@ fi + shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[5-9]*,yes) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } + +# Check whether --with-aix-soname was given. +if test "${with_aix_soname+set}" = set; then : + withval=$with_aix_soname; case $withval in + aix|svr4|both) + ;; + *) + as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname +else + if ${lt_cv_with_aix_soname+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_with_aix_soname=aix +fi + + with_aix_soname=$lt_cv_with_aix_soname +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +$as_echo "$with_aix_soname" >&6; } + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + + + + + + + # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" +LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -8644,7 +9160,7 @@ test -z "$LN_S" && LN_S="ln -s" -if test -n "${ZSH_VERSION+set}" ; then +if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi @@ -8683,7 +9199,7 @@ aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then + if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -8694,14 +9210,14 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except MSVC, +# All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a -with_gnu_ld="$lt_cv_prog_gnu_ld" +with_gnu_ld=$lt_cv_prog_gnu_ld -old_CC="$CC" -old_CFLAGS="$CFLAGS" +old_CC=$CC +old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc @@ -8710,15 +9226,8 @@ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +func_cc_basename $compiler +cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it @@ -8733,22 +9242,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then : else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -f "$ac_dir/${ac_tool_prefix}file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -8771,13 +9280,13 @@ _LT_EOF break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } @@ -8799,22 +9308,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then : else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -f "$ac_dir/file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -8837,13 +9346,13 @@ _LT_EOF break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } @@ -8864,7 +9373,7 @@ esac # Use C for the default configuration in the libtool script -lt_save_CC="$CC" +lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -8926,7 +9435,7 @@ if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; @@ -8942,7 +9451,7 @@ else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" + lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -8972,7 +9481,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then +if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : @@ -8990,17 +9499,18 @@ lt_prog_compiler_pic= lt_prog_compiler_static= - if test "$GCC" = yes; then + if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi + lt_prog_compiler_pic='-fPIC' ;; amigaos*) @@ -9011,8 +9521,8 @@ lt_prog_compiler_static= ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -9028,6 +9538,11 @@ lt_prog_compiler_static= # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac ;; darwin* | rhapsody*) @@ -9098,7 +9613,7 @@ lt_prog_compiler_static= case $host_os in aix*) lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else @@ -9106,10 +9621,29 @@ lt_prog_compiler_static= fi ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac ;; hpux9* | hpux10* | hpux11*) @@ -9125,7 +9659,7 @@ lt_prog_compiler_static= ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' + lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) @@ -9134,9 +9668,9 @@ lt_prog_compiler_static= lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. + # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' @@ -9161,6 +9695,12 @@ lt_prog_compiler_static= lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -9258,7 +9798,7 @@ lt_prog_compiler_static= ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi @@ -9287,7 +9827,7 @@ lt_prog_compiler_static= fi case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: + # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; @@ -9319,7 +9859,7 @@ else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -9349,7 +9889,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then +if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; @@ -9381,7 +9921,7 @@ if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -9400,13 +9940,13 @@ else fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } -if test x"$lt_cv_prog_compiler_static_works" = xyes; then +if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= @@ -9526,8 +10066,8 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } @@ -9539,9 +10079,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; } ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + if test no = "$hard_links"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -9584,9 +10124,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if @@ -9601,7 +10141,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. - if test "$GCC" != yes; then + if test yes != "$GCC"; then with_gnu_ld=no fi ;; @@ -9609,7 +10149,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; - openbsd*) + openbsd* | bitrig*) with_gnu_ld=no ;; esac @@ -9619,7 +10159,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility @@ -9641,24 +10181,24 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie esac fi - if test "$lt_use_gnu_ld_interface" = yes; then + if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no - case `$LD -v 2>&1` in + case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -9671,7 +10211,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then + if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 @@ -9690,7 +10230,7 @@ _LT_EOF case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) @@ -9706,7 +10246,7 @@ _LT_EOF allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi @@ -9716,7 +10256,7 @@ _LT_EOF # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='${wl}--export-all-symbols' + export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes @@ -9724,61 +10264,89 @@ _LT_EOF exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes + ;; + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no - if test "$host_os" = linux-dietlibc; then + if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no + && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -9789,42 +10357,47 @@ _LT_EOF lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in + tcc*) + export_dynamic_flag_spec='-rdynamic' + ;; 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='${wl}-rpath ${wl}$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 + if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -9838,8 +10411,8 @@ _LT_EOF archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -9857,8 +10430,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -9870,7 +10443,7 @@ _LT_EOF ld_shlibs=no cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify @@ -9885,9 +10458,9 @@ _LT_EOF # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -9904,15 +10477,15 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac - if test "$ld_shlibs" = no; then + if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= @@ -9928,7 +10501,7 @@ _LT_EOF # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported @@ -9936,34 +10509,57 @@ _LT_EOF ;; aix[4-9]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -9982,13 +10578,21 @@ _LT_EOF hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes - file_list_spec='${wl}-f,' + file_list_spec='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + hardcode_direct=no + hardcode_direct_absolute=no + ;; + esac - if test "$GCC" = yes; then + if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -10007,35 +10611,42 @@ _LT_EOF ;; esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - export_dynamic_flag_spec='${wl}-bexpall' + export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then + if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : @@ -10070,7 +10681,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" + lt_cv_aix_libpath_=/usr/lib:/lib fi fi @@ -10078,17 +10689,17 @@ fi aix_libpath=$lt_cv_aix_libpath_ fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then + if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : @@ -10123,7 +10734,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" + lt_cv_aix_libpath_=/usr/lib:/lib fi fi @@ -10131,21 +10742,33 @@ fi aix_libpath=$lt_cv_aix_libpath_ fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then + no_undefined_flag=' $wl-bernotok' + allow_undefined_flag=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -10154,7 +10777,7 @@ fi case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) @@ -10184,16 +10807,17 @@ fi # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # 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 @@ -10202,18 +10826,18 @@ fi # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # Assume MSVC wrapper @@ -10222,7 +10846,7 @@ fi # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. @@ -10241,24 +10865,24 @@ fi hardcode_direct=no hardcode_automatic=yes 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\"`' + if test yes = "$lt_cv_ld_force_load"; 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 link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" + allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; + ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test "$_lt_dar_can_shared" = "yes"; then + if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no @@ -10300,33 +10924,33 @@ fi ;; hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + if test yes = "$GCC"; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' + export_dynamic_flag_spec='$wl-E' ;; hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test yes,no = "$GCC,$with_gnu_ld"; then + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' + export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes @@ -10334,25 +10958,25 @@ fi ;; hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then + if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) @@ -10364,7 +10988,7 @@ if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -10383,14 +11007,14 @@ else fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } -if test x"$lt_cv_prog_compiler__b" = xyes; then - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +if test yes = "$lt_cv_prog_compiler__b"; then + archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -10398,8 +11022,8 @@ fi ;; esac fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in @@ -10410,7 +11034,7 @@ fi *) hardcode_direct=yes hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' + export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. @@ -10421,8 +11045,8 @@ fi ;; irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. @@ -10432,8 +11056,8 @@ $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " > if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } @@ -10445,24 +11069,34 @@ else fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test "$lt_cv_irix_exported_symbol" = yes; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + if test yes = "$lt_cv_irix_exported_symbol"; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + ld_shlibs=yes + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out @@ -10477,7 +11111,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; @@ -10485,27 +11119,19 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } *nto* | *qnx*) ;; - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no @@ -10516,33 +11142,53 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes ;; osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -10553,24 +11199,24 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } solaris*) no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + wlarc='$wl' + archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + wlarc='$wl' + archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi @@ -10580,11 +11226,11 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', + # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + if test yes = "$GCC"; then + whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi @@ -10594,10 +11240,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } ;; sunos4*) - if test "x$host_vendor" = xsequent; then + if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi @@ -10646,43 +11292,43 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' + no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' + no_undefined_flag='$wl-z,text' + allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' + export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; @@ -10697,10 +11343,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } ;; esac - if test x$host_vendor = xsni; then + if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' + export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi @@ -10708,7 +11354,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no +test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -10734,7 +11380,7 @@ x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then + if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -10949,14 +11595,14 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; + mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in @@ -10972,28 +11618,35 @@ if test "$GCC" = yes; then ;; esac # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. + # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; + lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } @@ -11007,7 +11660,7 @@ BEGIN {RS=" "; FS="/|\n";} { # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([A-Za-z]:\),\1,g'` ;; + $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else @@ -11016,7 +11669,7 @@ fi library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=".so" +shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -11033,14 +11686,16 @@ hardcode_into_libs=no # flags to be left without arguments need_version=unknown + + case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' + soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) @@ -11048,41 +11703,91 @@ aix[4-9]*) need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac shlibpath_var=LIBPATH fi ;; @@ -11092,18 +11797,18 @@ amigaos*) powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) - library_names_spec='${libname}${shared_ext}' + library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; @@ -11111,8 +11816,8 @@ beos*) bsdi[45]*) 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' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" @@ -11124,7 +11829,7 @@ bsdi[45]*) cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=".dll" + shrext_cmds=.dll need_version=no need_lib_prefix=no @@ -11133,8 +11838,8 @@ cygwin* | mingw* | pw32* | cegcc*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ @@ -11150,17 +11855,17 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' @@ -11169,8 +11874,8 @@ cygwin* | mingw* | pw32* | cegcc*) *,cl*) # Native MSVC libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' case $build_os in mingw*) @@ -11197,7 +11902,7 @@ cygwin* | mingw* | pw32* | cegcc*) sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - sys_lib_search_path_spec="$LIB" + sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` @@ -11210,8 +11915,8 @@ cygwin* | mingw* | pw32* | cegcc*) esac # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' @@ -11224,7 +11929,7 @@ cygwin* | mingw* | pw32* | cegcc*) *) # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac @@ -11237,8 +11942,8 @@ darwin* | rhapsody*) version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' @@ -11251,8 +11956,8 @@ dgux*) 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' + 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 ;; @@ -11270,12 +11975,13 @@ freebsd* | dragonfly*) 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}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac @@ -11300,26 +12006,15 @@ freebsd* | dragonfly*) esac ;; -gnu*) - 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 # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + 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=LIBRARY_PATH - shlibpath_overrides_runpath=yes + shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -11337,14 +12032,15 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -11352,8 +12048,8 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; @@ -11362,8 +12058,8 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... @@ -11376,8 +12072,8 @@ interix[3-9]*) 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' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -11388,7 +12084,7 @@ irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix @@ -11396,8 +12092,8 @@ irix5* | irix6* | nonstopux*) esac need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= @@ -11416,8 +12112,8 @@ irix5* | irix6* | nonstopux*) esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; @@ -11426,13 +12122,33 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + hardcode_libdir_flag_spec='-L$libdir' + ;; + # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 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' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -11476,7 +12192,12 @@ fi # before this can be enabled. hardcode_into_libs=yes - # Append ld.so.conf contents to the search path + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" @@ -11496,12 +12217,12 @@ netbsd*) need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH @@ -11511,7 +12232,7 @@ netbsd*) newsos6) 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}' + 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 ;; @@ -11520,58 +12241,68 @@ newsos6) version_type=qnx 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' + 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 dynamic_linker='ldqnx.so' ;; -openbsd*) +openbsd* | bitrig*) version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" + sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no + else + need_version=yes + fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi + shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' - shrext_cmds=".dll" + version_type=windows + shrext_cmds=.dll + need_version=no need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) @@ -11582,8 +12313,8 @@ solaris*) 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' + 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=yes hardcode_into_libs=yes @@ -11593,11 +12324,11 @@ solaris*) sunos4*) version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes @@ -11605,8 +12336,8 @@ sunos4*) sysv4 | sysv4.3*) 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' + 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 case $host_vendor in sni) @@ -11627,24 +12358,24 @@ sysv4 | sysv4.3*) ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then 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' + 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 fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf + version_type=sco need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' @@ -11662,7 +12393,7 @@ tpf*) 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}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes @@ -11670,8 +12401,8 @@ tpf*) uts4*) 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' + 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 ;; @@ -11681,20 +12412,35 @@ uts4*) esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no +test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then +if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + + + + + + @@ -11791,15 +12537,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then + test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && + if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && + test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else @@ -11814,12 +12560,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then +if test relink = "$hardcode_action" || + test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi @@ -11829,7 +12575,7 @@ fi - if test "x$enable_dlopen" != xyes; then + if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown @@ -11839,23 +12585,23 @@ else case $host_os in beos*) - lt_cv_dlopen="load_add_on" + lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) - # if libdl is installed we need to link against it + # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : @@ -11893,10 +12639,10 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else - lt_cv_dlopen="dyld" + lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes @@ -11904,10 +12650,18 @@ fi ;; + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" + lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } @@ -11946,11 +12700,11 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" + lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } @@ -11989,7 +12743,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } @@ -12028,7 +12782,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } @@ -12067,7 +12821,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" + lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi @@ -12088,21 +12842,21 @@ fi ;; esac - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else + if test no = "$lt_cv_dlopen"; then enable_dlopen=no + else + enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - save_LIBS="$LIBS" + save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 @@ -12110,7 +12864,7 @@ $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -12157,9 +12911,9 @@ else # endif #endif -/* When -fvisbility=hidden is used, assume the code has been annotated +/* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -12189,7 +12943,7 @@ _LT_EOF (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -12209,14 +12963,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } - if test "x$lt_cv_dlopen_self" = xyes; then + if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -12263,9 +13017,9 @@ else # endif #endif -/* When -fvisbility=hidden is used, assume the code has been annotated +/* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -12295,7 +13049,7 @@ _LT_EOF (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -12316,9 +13070,9 @@ fi $as_echo "$lt_cv_dlopen_self_static" >&6; } fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS ;; esac @@ -12362,7 +13116,7 @@ else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) - if test -n "$STRIP" ; then + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -12390,7 +13144,7 @@ fi - # Report which library types will actually be built + # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 @@ -12398,13 +13152,13 @@ $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' @@ -12412,8 +13166,12 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } ;; aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -12423,7 +13181,7 @@ $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } @@ -12437,7 +13195,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -CC="$lt_save_CC" +CC=$lt_save_CC @@ -12851,15 +13609,15 @@ fi func_stripname_cnf () { - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + case $2 in + .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;; + *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;; esac } # func_stripname_cnf - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then + if test -n "$CXX" && ( test no != "$CXX" && + ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || + (test g++ != "$CXX"))); then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -13038,7 +13796,7 @@ objext_CXX=$objext # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then +if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" @@ -13099,46 +13857,39 @@ $RM -r conftest* CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + func_cc_basename $compiler +cc_basename=$func_cc_basename_result if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately - if test "$GXX" = yes; then + if test yes = "$GXX"; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi - if test "$GXX" = yes; then + if test yes = "$GXX"; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes + withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld -if test "$GCC" = yes; then +if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw + # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; @@ -13152,7 +13903,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; } while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - test -z "$LD" && LD="$ac_prog" + test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. @@ -13163,7 +13914,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; } with_gnu_ld=unknown ;; esac -elif test "$with_gnu_ld" = yes; then +elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else @@ -13174,32 +13925,32 @@ if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" + lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } @@ -13235,22 +13986,22 @@ with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + if test yes = "$with_gnu_ld"; then + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) - wlarc='${wl}' + wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec_CXX= fi @@ -13287,18 +14038,30 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie ld_shlibs_CXX=no ;; aix[4-9]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in @@ -13308,6 +14071,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie ;; esac done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -13326,13 +14096,21 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes - file_list_spec_CXX='${wl}-f,' + file_list_spec_CXX='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + hardcode_direct_CXX=no + hardcode_direct_absolute_CXX=no + ;; + esac - if test "$GXX" = yes; then + if test yes = "$GXX"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -13350,36 +14128,44 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie fi esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag=$shared_flag' $wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - export_dynamic_flag_spec_CXX='${wl}-bexpall' + export_dynamic_flag_spec_CXX='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' + # The "-G" linker flag allows undefined symbols. + no_undefined_flag_CXX='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. - if test "${lt_cv_aix_libpath+set}" = set; then + if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : @@ -13414,7 +14200,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX="/usr/lib:/lib" + lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi @@ -13422,18 +14208,18 @@ fi aix_libpath=$lt_cv_aix_libpath__CXX fi - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then + if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : @@ -13468,7 +14254,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX="/usr/lib:/lib" + lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi @@ -13476,22 +14262,34 @@ fi aix_libpath=$lt_cv_aix_libpath__CXX fi - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then + no_undefined_flag_CXX=' $wl-bernotok' + allow_undefined_flag_CXX=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared + # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -13501,7 +14299,7 @@ fi allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi @@ -13529,57 +14327,58 @@ fi # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' + export_dynamic_flag_spec_CXX='$wl--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi @@ -13593,27 +14392,27 @@ fi hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec_CXX='`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_CXX='' fi link_all_deplibs_CXX=yes - allow_undefined_flag_CXX="$_lt_dar_allow_undefined" + allow_undefined_flag_CXX=$_lt_dar_allow_undefined case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; + ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test "$_lt_dar_can_shared" = "yes"; then + if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - if test "$lt_cv_apple_cc_single_mod" != "yes"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + if test yes != "$lt_cv_apple_cc_single_mod"; then + archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" + archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi else @@ -13622,6 +14421,34 @@ fi ;; + os2*) + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_minus_L_CXX=yes + allow_undefined_flag_CXX=unsupported + shrext_cmds=.dll + archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes_CXX=yes + ;; + dgux*) case $cc_basename in ec++*) @@ -13656,18 +14483,15 @@ fi ld_shlibs_CXX=yes ;; - gnu*) - ;; - haiku*) - archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' + export_dynamic_flag_spec_CXX='$wl-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default @@ -13679,7 +14503,7 @@ fi ld_shlibs_CXX=no ;; aCC*) - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -13688,11 +14512,11 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + if test yes = "$GXX"; then + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -13702,15 +14526,15 @@ fi ;; hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) - export_dynamic_flag_spec_CXX='${wl}-E' + export_dynamic_flag_spec_CXX='$wl-E' ;; esac fi @@ -13736,13 +14560,13 @@ fi aCC*) case $host_cpu in hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists @@ -13753,20 +14577,20 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -13781,22 +14605,22 @@ fi interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + export_dynamic_flag_spec_CXX='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -13805,22 +14629,22 @@ fi old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -13828,8 +14652,8 @@ fi # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -13838,10 +14662,10 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. @@ -13855,59 +14679,59 @@ fi # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' + whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' + whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' @@ -13921,18 +14745,18 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' + archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + if test yes = "$supports_anon_versioning"; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) @@ -13940,10 +14764,10 @@ fi *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on @@ -14001,22 +14825,17 @@ fi ld_shlibs_CXX=yes ;; - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='$wl-E' + whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else @@ -14032,9 +14851,9 @@ fi # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using @@ -14052,17 +14871,17 @@ fi cxx*) case $host in osf3*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' + archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ + $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac @@ -14077,21 +14896,21 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + if test yes,no = "$GXX,$with_gnu_ld"; then + allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' case $host in osf3*) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists @@ -14137,9 +14956,9 @@ fi # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no @@ -14147,7 +14966,7 @@ fi solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. + # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; @@ -14164,30 +14983,30 @@ fi ;; gcx*) # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if test yes,no = "$GXX,$with_gnu_ld"; then + no_undefined_flag_CXX=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else - # g++ 2.7 appears to require `-G' NOT `-shared' on this + # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when @@ -14195,11 +15014,11 @@ fi output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi @@ -14208,52 +15027,52 @@ fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' + no_undefined_flag_CXX='$wl-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' + no_undefined_flag_CXX='$wl-z,text' + allow_undefined_flag_CXX='$wl-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' + hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' + export_dynamic_flag_spec_CXX='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ - '"$old_archive_cmds_CXX" + '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ - '"$reload_cmds_CXX" + '"$reload_cmds_CXX" ;; *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; @@ -14285,10 +15104,10 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } - test "$ld_shlibs_CXX" = no && can_build_shared=no + test no = "$ld_shlibs_CXX" && can_build_shared=no - GCC_CXX="$GXX" - LD_CXX="$LD" + GCC_CXX=$GXX + LD_CXX=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -14332,13 +15151,13 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in + case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. - if test $p = "-L" || - test $p = "-R"; then + if test x-L = "$p" || + test x-R = "$p"; then prev=$p continue fi @@ -14354,16 +15173,16 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in + if test no = "$pre_test_object_deps_done"; then + case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" + compiler_lib_search_path_CXX=$prev$p else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p" fi ;; # The "-l" case would never come before the object being @@ -14371,9 +15190,9 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 esac else if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" + postdeps_CXX=$prev$p else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" + postdeps_CXX="${postdeps_CXX} $prev$p" fi fi prev= @@ -14388,15 +15207,15 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 continue fi - if test "$pre_test_object_deps_done" = no; then + if test no = "$pre_test_object_deps_done"; then if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" + predep_objects_CXX=$p else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" + postdep_objects_CXX=$p else postdep_objects_CXX="$postdep_objects_CXX $p" fi @@ -14426,51 +15245,6 @@ interix[3-9]*) postdep_objects_CXX= postdeps_CXX= ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; esac @@ -14479,7 +15253,7 @@ case " $postdeps_CXX " in esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` + compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi @@ -14518,17 +15292,18 @@ lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then + if test yes = "$GXX"; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi + lt_prog_compiler_pic_CXX='-fPIC' ;; amigaos*) @@ -14539,8 +15314,8 @@ lt_prog_compiler_static_CXX= ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -14555,6 +15330,11 @@ lt_prog_compiler_static_CXX= # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static_CXX='$wl-static' + ;; + esac ;; darwin* | rhapsody*) # PIC is the default on this platform @@ -14604,7 +15384,7 @@ lt_prog_compiler_static_CXX= case $host_os in aix[4-9]*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else @@ -14644,14 +15424,14 @@ lt_prog_compiler_static_CXX= case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then + lt_prog_compiler_static_CXX='$wl-a ${wl}archive' + if test ia64 != "$host_cpu"; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + lt_prog_compiler_static_CXX='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default @@ -14680,7 +15460,7 @@ lt_prog_compiler_static_CXX= ;; esac ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -14688,7 +15468,7 @@ lt_prog_compiler_static_CXX= lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. + # old Intel C++ for x86_64, which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' @@ -14833,7 +15613,7 @@ lt_prog_compiler_static_CXX= fi case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: + # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; @@ -14865,7 +15645,7 @@ else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -14895,7 +15675,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } -if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then +if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; @@ -14921,7 +15701,7 @@ if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -14940,13 +15720,13 @@ else fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } -if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then +if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then : else lt_prog_compiler_static_CXX= @@ -15060,8 +15840,8 @@ $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } @@ -15073,9 +15853,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; } ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + if test no = "$hard_links"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -15092,17 +15872,21 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" + export_symbols_cmds_CXX=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in @@ -15122,7 +15906,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no +test no = "$ld_shlibs_CXX" && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld @@ -15139,7 +15923,7 @@ x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then + if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -15267,7 +16051,7 @@ $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=".so" +shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -15284,14 +16068,16 @@ hardcode_into_libs=no # flags to be left without arguments need_version=unknown + + case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' + soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) @@ -15299,41 +16085,91 @@ aix[4-9]*) need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac shlibpath_var=LIBPATH fi ;; @@ -15343,18 +16179,18 @@ amigaos*) powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) - library_names_spec='${libname}${shared_ext}' + library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; @@ -15362,8 +16198,8 @@ beos*) bsdi[45]*) 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' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" @@ -15375,7 +16211,7 @@ bsdi[45]*) cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=".dll" + shrext_cmds=.dll need_version=no need_lib_prefix=no @@ -15384,8 +16220,8 @@ cygwin* | mingw* | pw32* | cegcc*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ @@ -15401,16 +16237,16 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' @@ -15419,8 +16255,8 @@ cygwin* | mingw* | pw32* | cegcc*) *,cl*) # Native MSVC libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' case $build_os in mingw*) @@ -15447,7 +16283,7 @@ cygwin* | mingw* | pw32* | cegcc*) sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - sys_lib_search_path_spec="$LIB" + sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` @@ -15460,8 +16296,8 @@ cygwin* | mingw* | pw32* | cegcc*) esac # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' @@ -15474,7 +16310,7 @@ cygwin* | mingw* | pw32* | cegcc*) *) # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac @@ -15487,8 +16323,8 @@ darwin* | rhapsody*) version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' @@ -15500,8 +16336,8 @@ dgux*) 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' + 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 ;; @@ -15519,12 +16355,13 @@ freebsd* | dragonfly*) 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}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac @@ -15549,26 +16386,15 @@ freebsd* | dragonfly*) esac ;; -gnu*) - 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 # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + 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=LIBRARY_PATH - shlibpath_overrides_runpath=yes + shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -15586,14 +16412,15 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -15601,8 +16428,8 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; @@ -15611,8 +16438,8 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... @@ -15625,8 +16452,8 @@ interix[3-9]*) 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' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -15637,7 +16464,7 @@ irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix @@ -15645,8 +16472,8 @@ irix5* | irix6* | nonstopux*) esac need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= @@ -15665,8 +16492,8 @@ irix5* | irix6* | nonstopux*) esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; @@ -15675,13 +16502,33 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + hardcode_libdir_flag_spec_CXX='-L$libdir' + ;; + # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 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' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -15725,7 +16572,12 @@ fi # before this can be enabled. hardcode_into_libs=yes - # Append ld.so.conf contents to the search path + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" @@ -15745,12 +16597,12 @@ netbsd*) need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH @@ -15760,7 +16612,7 @@ netbsd*) newsos6) 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}' + 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 ;; @@ -15769,58 +16621,68 @@ newsos6) version_type=qnx 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' + 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 dynamic_linker='ldqnx.so' ;; -openbsd*) +openbsd* | bitrig*) version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" + sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no + else + need_version=yes + fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi + shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' - shrext_cmds=".dll" + version_type=windows + shrext_cmds=.dll + need_version=no need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) @@ -15831,8 +16693,8 @@ solaris*) 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' + 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=yes hardcode_into_libs=yes @@ -15842,11 +16704,11 @@ solaris*) sunos4*) version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes @@ -15854,8 +16716,8 @@ sunos4*) sysv4 | sysv4.3*) 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' + 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 case $host_vendor in sni) @@ -15876,24 +16738,24 @@ sysv4 | sysv4.3*) ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then 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' + 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 fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf + version_type=sco need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' @@ -15911,7 +16773,7 @@ tpf*) 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}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes @@ -15919,8 +16781,8 @@ tpf*) uts4*) 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' + 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 ;; @@ -15930,20 +16792,32 @@ uts4*) esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no +test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then +if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + + + @@ -15986,15 +16860,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || - test "X$hardcode_automatic_CXX" = "Xyes" ; then + test yes = "$hardcode_automatic_CXX"; then # We can hardcode non-existent directories. - if test "$hardcode_direct_CXX" != no && + if test no != "$hardcode_direct_CXX" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && + test no != "$hardcode_minus_L_CXX"; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else @@ -16009,12 +16883,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } -if test "$hardcode_action_CXX" = relink || - test "$inherit_rpath_CXX" = yes; then +if test relink = "$hardcode_action_CXX" || + test yes = "$inherit_rpath_CXX"; then # Fast installation is not supported enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi @@ -16037,7 +16911,7 @@ fi lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes +fi # test yes != "$_lt_caught_CXX_error" ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -16088,6 +16962,9 @@ fi AM_BACKSLASH='\' +tiff_libs_private= + + case "${host_os}" in cygwin* | mingw32* | beos* | darwin*) ;; @@ -16129,21 +17006,19 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5 $as_echo "$ac_cv_lib_m_sin" >&6; } if test "x$ac_cv_lib_m_sin" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF - - LIBS="-lm $LIBS" - + libm_lib=yes +else + libm_lib=no fi + if test "x$libm_lib" = "xyes" ; then + LIBS="-lm $LIBS" + tiff_libs_private="-lm ${tiff_libs_private}" + fi ;; esac -tiff_libs_private= - - -for ac_header in assert.h fcntl.h io.h limits.h malloc.h search.h sys/time.h unistd.h +for ac_header in assert.h fcntl.h io.h search.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -16597,73 +17472,84 @@ $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi - -# Obtain size of an 'signed short' and define as SIZEOF_SIGNED_SHORT -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of signed short" >&5 -$as_echo_n "checking size of signed short... " >&6; } -if ${ac_cv_sizeof_signed_short+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 +$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } +if ${ac_cv_sys_largefile_source+:} false; then : $as_echo_n "(cached) " >&6 else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed short))" "ac_cv_sizeof_signed_short" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_signed_short" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (signed short) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_signed_short=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_short" >&5 -$as_echo "$ac_cv_sizeof_signed_short" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SIGNED_SHORT $ac_cv_sizeof_signed_short + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include /* for off_t */ + #include +int +main () +{ +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_sys_largefile_source=no; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGEFILE_SOURCE 1 +#include /* for off_t */ + #include +int +main () +{ +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_sys_largefile_source=1; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_cv_sys_largefile_source=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 +$as_echo "$ac_cv_sys_largefile_source" >&6; } +case $ac_cv_sys_largefile_source in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source +_ACEOF +;; +esac +rm -rf conftest* +# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug +# in glibc 2.1.3, but that breaks too many other things. +# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. +if test $ac_cv_sys_largefile_source != unknown; then +$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h -# Obtain size of an 'unsigned short' and define as SIZEOF_UNSIGNED_SHORT -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned short" >&5 -$as_echo_n "checking size of unsigned short... " >&6; } -if ${ac_cv_sizeof_unsigned_short+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned short))" "ac_cv_sizeof_unsigned_short" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_unsigned_short" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (unsigned short) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_unsigned_short=0 - fi fi + +ac_fn_c_check_decl "$LINENO" "optarg" "ac_cv_have_decl_optarg" "$ac_includes_default" +if test "x$ac_cv_have_decl_optarg" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_short" >&5 -$as_echo "$ac_cv_sizeof_unsigned_short" >&6; } - - cat >>confdefs.h <<_ACEOF -#define SIZEOF_UNSIGNED_SHORT $ac_cv_sizeof_unsigned_short +#define HAVE_DECL_OPTARG $ac_have_decl _ACEOF @@ -16918,6 +17804,42 @@ _ACEOF +# Obtain the size of 'size_t' and define as SIZEOF_SIZE_T. Result is +# available in ac_cv_sizeof_size_t +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 +$as_echo_n "checking size of size_t... " >&6; } +if ${ac_cv_sizeof_size_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_size_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (size_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_size_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 +$as_echo "$ac_cv_sizeof_size_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t +_ACEOF + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed 8-bit type" >&5 $as_echo_n "checking for signed 8-bit type... " >&6; } INT8_T='signed char' @@ -17085,19 +18007,73 @@ cat >>confdefs.h <<_ACEOF _ACEOF +# Determine formatting specifier for 'size_t'. While the size should +# be precise, the type determined may not match the system definition. +# A named type is provided to allow casting to the type we determined +# without changing the actual size. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 'size_t' format specifier" >&5 +$as_echo_n "checking for 'size_t' format specifier... " >&6; } +SIZE_T='unknown' +SIZE_FORMAT='unknown' +if test $ac_cv_sizeof_unsigned_int -eq $ac_cv_sizeof_size_t +then + SIZE_T='unsigned int' + SIZE_FORMAT='"%u"' +elif test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_size_t +then + SIZE_T='unsigned long' + SIZE_FORMAT='"%lu"' +elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_size_t +then + SIZE_T='unsigned long long' + case "${host_os}" in + mingw32*) + # MinGW32 understands 'unsigned long long', but uses printf from WIN32 CRT + SIZE_FORMAT='"%I64u"' + ;; + *) + SIZE_FORMAT='"%llu"' + ;; + esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SIZE_FORMAT" >&5 +$as_echo "$SIZE_FORMAT" >&6; } + +cat >>confdefs.h <<_ACEOF +#define TIFF_SIZE_T $SIZE_T +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define TIFF_SIZE_FORMAT $SIZE_FORMAT +_ACEOF + + # Determine TIFF equivalent of ssize_t { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed size type" >&5 $as_echo_n "checking for signed size type... " >&6; } SSIZE_T='unknown' SSIZE_FORMAT='unknown' -if test $ac_cv_sizeof_signed_long -eq $ac_cv_sizeof_unsigned_char_p +if test $ac_cv_sizeof_signed_int -eq $ac_cv_sizeof_size_t +then + SSIZE_T='signed int' + SSIZE_FORMAT='"%d"' +elif test $ac_cv_sizeof_signed_long -eq $ac_cv_sizeof_size_t then SSIZE_T='signed long' SSIZE_FORMAT='"%ld"' -elif test $ac_cv_sizeof_signed_long_long -eq $ac_cv_sizeof_unsigned_char_p +elif test $ac_cv_sizeof_signed_long_long -eq $ac_cv_sizeof_size_t then SSIZE_T='signed long long' - SSIZE_FORMAT='"%lld"' + case "${host_os}" in + mingw32*) + # MinGW32 understands 'long long', but uses printf from WIN32 CRT + SSIZE_FORMAT='"%I64d"' + ;; + *) + SSIZE_FORMAT='"%lld"' + ;; + esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SSIZE_T" >&5 $as_echo "$SSIZE_T" >&6; } @@ -17142,51 +18118,7 @@ cat >>confdefs.h <<_ACEOF _ACEOF -ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" " -#if HAVE_INTTYPES_H -# include -#endif - -" -if test "x$ac_cv_type_int8" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_INT8 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "int16" "ac_cv_type_int16" " -#if HAVE_INTTYPES_H -# include -#endif - -" -if test "x$ac_cv_type_int16" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_INT16 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "int32" "ac_cv_type_int32" " -#if HAVE_INTTYPES_H -# include -#endif - -" -if test "x$ac_cv_type_int32" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_INT32 1 -_ACEOF - - -fi - - -for ac_func in floor isascii memmove memset mmap pow setmode sqrt strchr strrchr strstr strtol strtoull +for ac_func in mmap setmode snprintf do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -17213,6 +18145,20 @@ esac fi +ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" +if test "x$ac_cv_func_snprintf" = xyes; then : + $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" snprintf.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" + ;; +esac + +fi + + ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" if test "x$ac_cv_func_strcasecmp" = xyes; then : $as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h @@ -17227,6 +18173,34 @@ esac fi +ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" +if test "x$ac_cv_func_strtol" = xyes; then : + $as_echo "#define HAVE_STRTOL 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strtol.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtol.$ac_objext" + ;; +esac + +fi + + +ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll" +if test "x$ac_cv_func_strtoll" = xyes; then : + $as_echo "#define HAVE_STRTOLL 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" strtoll.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoll.$ac_objext" + ;; +esac + +fi + + ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" if test "x$ac_cv_func_strtoul" = xyes; then : $as_echo "#define HAVE_STRTOUL 1" >>confdefs.h @@ -17755,6 +18729,119 @@ $as_echo "#define ZIP_SUPPORT 1" >>confdefs.h fi +HAVE_LIBDEFLATE=no + +# Check whether --enable-libdeflate was given. +if test "${enable_libdeflate+set}" = set; then : + enableval=$enable_libdeflate; +fi + + +# Check whether --with-libdeflate-include-dir was given. +if test "${with_libdeflate_include_dir+set}" = set; then : + withval=$with_libdeflate_include_dir; +fi + + +# Check whether --with-libdeflate-lib-dir was given. +if test "${with_libdeflate_lib_dir+set}" = set; then : + withval=$with_libdeflate_lib_dir; +fi + + +if test "x$enable_libdeflate" != "xno" ; then + + if test "x$with_libdeflate_lib_dir" != "x" ; then + LDFLAGS="-L$with_libdeflate_lib_dir $LDFLAGS" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdeflate_zlib_decompress in -ldeflate" >&5 +$as_echo_n "checking for libdeflate_zlib_decompress in -ldeflate... " >&6; } +if ${ac_cv_lib_deflate_libdeflate_zlib_decompress+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldeflate $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char libdeflate_zlib_decompress (); +int +main () +{ +return libdeflate_zlib_decompress (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_deflate_libdeflate_zlib_decompress=yes +else + ac_cv_lib_deflate_libdeflate_zlib_decompress=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_deflate_libdeflate_zlib_decompress" >&5 +$as_echo "$ac_cv_lib_deflate_libdeflate_zlib_decompress" >&6; } +if test "x$ac_cv_lib_deflate_libdeflate_zlib_decompress" = xyes; then : + libdeflate_lib=yes +else + libdeflate_lib=no +fi + + if test "$libdeflate_lib" = "no" -a "x$with_libdeflate_lib_dir" != "x"; then + as_fn_error $? "libdeflate library not found at $with_libdeflate_lib_dir" "$LINENO" 5 + fi + + if test "x$with_libdeflate_include_dir" != "x" ; then + CPPFLAGS="-I$with_libdeflate_include_dir $CPPFLAGS" + fi + ac_fn_c_check_header_mongrel "$LINENO" "libdeflate.h" "ac_cv_header_libdeflate_h" "$ac_includes_default" +if test "x$ac_cv_header_libdeflate_h" = xyes; then : + libdeflate_h=yes +else + libdeflate_h=no +fi + + + if test "$libdeflate_h" = "no" -a "x$with_libdeflate_include_dir" != "x" ; then + as_fn_error $? "libdeflate headers not found at $with_libdeflate_include_dir" "$LINENO" 5 + fi + + if test "$libdeflate_lib" = "yes" -a "$libdeflate_h" = "yes" ; then + HAVE_LIBDEFLATE=yes + fi + +fi + +if test "$HAVE_LIBDEFLATE" = "yes" -a "$HAVE_ZLIB" = "no" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdeflate available but zlib is not. libdeflate cannot be used" >&5 +$as_echo "$as_me: WARNING: libdeflate available but zlib is not. libdeflate cannot be used" >&2;} + HAVE_LIBDEFLATE=no +fi + +if test "$HAVE_LIBDEFLATE" = "yes" ; then + +$as_echo "#define LIBDEFLATE_SUPPORT 1" >>confdefs.h + + LIBS="-ldeflate $LIBS" + tiff_libs_private="-ldeflate ${tiff_libs_private}" + + if test "$HAVE_RPATH" = "yes" -a "x$with_libdeflate_lib_dir" != "x" ; then + LIBDIR="-R $with_libdeflate_lib_dir $LIBDIR" + fi + +fi + + # Check whether --enable-pixarlog was given. if test "${enable_pixarlog+set}" = set; then : enableval=$enable_pixarlog; HAVE_PIXARLOG=$enableval @@ -17879,6 +18966,15 @@ $as_echo "#define JPEG_SUPPORT 1" >>confdefs.h fi + if test "$HAVE_JPEG" = 'yes'; then + HAVE_JPEG_TRUE= + HAVE_JPEG_FALSE='#' +else + HAVE_JPEG_TRUE='#' + HAVE_JPEG_FALSE= +fi + + # Check whether --enable-old-jpeg was given. if test "${enable_old_jpeg+set}" = set; then : @@ -18017,6 +19113,15 @@ done fi + if test "$HAVE_JBIG" = 'yes'; then + HAVE_JBIG_TRUE= + HAVE_JBIG_FALSE='#' +else + HAVE_JBIG_TRUE='#' + HAVE_JBIG_FALSE= +fi + + HAVE_LZMA=no @@ -18124,6 +19229,247 @@ $as_echo "#define LZMA_SUPPORT 1" >>confdefs.h fi + if test "$HAVE_LZMA" = 'yes'; then + HAVE_LZMA_TRUE= + HAVE_LZMA_FALSE='#' +else + HAVE_LZMA_TRUE='#' + HAVE_LZMA_FALSE= +fi + + + +HAVE_ZSTD=no + +# Check whether --enable-zstd was given. +if test "${enable_zstd+set}" = set; then : + enableval=$enable_zstd; +fi + + +# Check whether --with-zstd-include-dir was given. +if test "${with_zstd_include_dir+set}" = set; then : + withval=$with_zstd_include_dir; +fi + + +# Check whether --with-zstd-lib-dir was given. +if test "${with_zstd_lib_dir+set}" = set; then : + withval=$with_zstd_lib_dir; +fi + + +if test "x$enable_zstd" != "xno" ; then + + if test "x$with_zstd_lib_dir" != "x" ; then + LDFLAGS="-L$with_zstd_lib_dir $LDFLAGS" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_decompressStream in -lzstd" >&5 +$as_echo_n "checking for ZSTD_decompressStream in -lzstd... " >&6; } +if ${ac_cv_lib_zstd_ZSTD_decompressStream+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lzstd $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ZSTD_decompressStream (); +int +main () +{ +return ZSTD_decompressStream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_zstd_ZSTD_decompressStream=yes +else + ac_cv_lib_zstd_ZSTD_decompressStream=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_decompressStream" >&5 +$as_echo "$ac_cv_lib_zstd_ZSTD_decompressStream" >&6; } +if test "x$ac_cv_lib_zstd_ZSTD_decompressStream" = xyes; then : + zstd_lib=yes +else + zstd_lib=no +fi + + if test "$zstd_lib" = "no" -a "x$with_zstd_lib_dir" != "x"; then + as_fn_error $? "zstd library not found at $with_zstd_lib_dir" "$LINENO" 5 + fi + + if test "x$with_zstd_include_dir" != "x" ; then + CPPFLAGS="-I$with_zstd_include_dir $CPPFLAGS" + fi + ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default" +if test "x$ac_cv_header_zstd_h" = xyes; then : + zstd_h=yes +else + zstd_h=no +fi + + + if test "$zstd_h" = "no" -a "x$with_zstd_include_dir" != "x" ; then + as_fn_error $? "Libzstd headers not found at $with_zstd_include_dir" "$LINENO" 5 + fi + + if test "$zstd_lib" = "yes" -a "$zstd_h" = "yes" ; then + HAVE_ZSTD=yes + fi + +fi + +if test "$HAVE_ZSTD" = "yes" ; then + +$as_echo "#define ZSTD_SUPPORT 1" >>confdefs.h + + LIBS="-lzstd $LIBS" + tiff_libs_private="-lzstd ${tiff_libs_private}" + + if test "$HAVE_RPATH" = "yes" -a "x$with_zstd_lib_dir" != "x" ; then + LIBDIR="-R $with_zstd_lib_dir $LIBDIR" + fi + +fi + + if test "$HAVE_ZSTD" = 'yes'; then + HAVE_ZSTD_TRUE= + HAVE_ZSTD_FALSE='#' +else + HAVE_ZSTD_TRUE='#' + HAVE_ZSTD_FALSE= +fi + + + +HAVE_WEBP=no + +# Check whether --enable-webp was given. +if test "${enable_webp+set}" = set; then : + enableval=$enable_webp; +fi + + +# Check whether --with-webp-include-dir was given. +if test "${with_webp_include_dir+set}" = set; then : + withval=$with_webp_include_dir; +fi + + +# Check whether --with-webp-lib-dir was given. +if test "${with_webp_lib_dir+set}" = set; then : + withval=$with_webp_lib_dir; +fi + + +if test "x$enable_webp" != "xno" ; then + + if test "x$with_webp_lib_dir" != "x" ; then + LDFLAGS="-L$with_webp_lib_dir $LDFLAGS" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WebPDecode in -lwebp" >&5 +$as_echo_n "checking for WebPDecode in -lwebp... " >&6; } +if ${ac_cv_lib_webp_WebPDecode+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lwebp $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char WebPDecode (); +int +main () +{ +return WebPDecode (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_webp_WebPDecode=yes +else + ac_cv_lib_webp_WebPDecode=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_webp_WebPDecode" >&5 +$as_echo "$ac_cv_lib_webp_WebPDecode" >&6; } +if test "x$ac_cv_lib_webp_WebPDecode" = xyes; then : + webp_lib=yes +else + webp_lib=no +fi + + if test "$webp_lib" = "no" -a "x$with_webp_lib_dir" != "x"; then + as_fn_error $? "webp library not found at $with_webp_lib_dir" "$LINENO" 5 + fi + + if test "x$with_webp_include_dir" != "x" ; then + CPPFLAGS="-I$with_webp_include_dir $CPPFLAGS" + fi + ac_fn_c_check_header_mongrel "$LINENO" "webp/decode.h" "ac_cv_header_webp_decode_h" "$ac_includes_default" +if test "x$ac_cv_header_webp_decode_h" = xyes; then : + webp_h=yes +else + webp_h=no +fi + + + if test "$webp_h" = "no" -a "x$with_webp_include_dir" != "x" ; then + as_fn_error $? "Libwebp headers not found at $with_webp_include_dir" "$LINENO" 5 + fi + + if test "$webp_lib" = "yes" -a "$webp_h" = "yes" ; then + HAVE_WEBP=yes + fi + +fi + +if test "$HAVE_WEBP" = "yes" ; then + +$as_echo "#define WEBP_SUPPORT 1" >>confdefs.h + + LIBS="-lwebp $LIBS" + tiff_libs_private="-lwebp ${tiff_libs_private}" + + if test "$HAVE_RPATH" = "yes" -a "x$with_webp_lib_dir" != "x" ; then + LIBDIR="-R $with_webp_lib_dir $LIBDIR" + fi + +fi + + if test "$HAVE_WEBP" = 'yes'; then + HAVE_WEBP_TRUE= + HAVE_WEBP_FALSE='#' +else + HAVE_WEBP_TRUE='#' + HAVE_WEBP_FALSE= +fi + + HAVE_JPEG12=no @@ -18145,7 +19491,7 @@ if test "${with_jpeg12_lib+set}" = set; then : fi -if test "x$enable_jpeg12" == "xyes" ; then +if test "x$enable_jpeg12" = "xyes" ; then if test "x$with_jpeg12_lib" != "x" ; then LIBS="$with_jpeg12_lib $LIBS" @@ -19753,19 +21099,32 @@ fi +# Check whether --enable-win32-io was given. +if test "${enable_win32_io+set}" = set; then : + enableval=$enable_win32_io; +fi + + win32_io_ok=no case "${host_os}" in cygwin*) + if test x"$ac_cv_header_windows_h" = xyes -a "x$enable_win32_io" = xyes ; then + win32_io_ok=yes + fi ;; *) - if test x"$ac_cv_header_windows_h" = xyes; then + if test x"$ac_cv_header_windows_h" = xyes -a ! "x$enable_win32_io" = xno ; then win32_io_ok=yes - -$as_echo "#define USE_WIN32_FILEIO 1" >>confdefs.h - fi ;; esac + +if test "$win32_io_ok" = "yes" ; then + +$as_echo "#define USE_WIN32_FILEIO 1" >>confdefs.h + +fi + if test "$win32_io_ok" = yes; then WIN32_IO_TRUE= WIN32_IO_FALSE='#' @@ -20039,6 +21398,26 @@ if test -z "${HAVE_RPATH_TRUE}" && test -z "${HAVE_RPATH_FALSE}"; then as_fn_error $? "conditional \"HAVE_RPATH\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_JPEG_TRUE}" && test -z "${HAVE_JPEG_FALSE}"; then + as_fn_error $? "conditional \"HAVE_JPEG\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_JBIG_TRUE}" && test -z "${HAVE_JBIG_FALSE}"; then + as_fn_error $? "conditional \"HAVE_JBIG\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_LZMA_TRUE}" && test -z "${HAVE_LZMA_FALSE}"; then + as_fn_error $? "conditional \"HAVE_LZMA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_ZSTD_TRUE}" && test -z "${HAVE_ZSTD_FALSE}"; then + as_fn_error $? "conditional \"HAVE_ZSTD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_WEBP_TRUE}" && test -z "${HAVE_WEBP_FALSE}"; then + as_fn_error $? "conditional \"HAVE_WEBP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HAVE_CXX_TRUE}" && test -z "${HAVE_CXX_FALSE}"; then as_fn_error $? "conditional \"HAVE_CXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -20448,7 +21827,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 LibTIFF Software $as_me 4.0.3, which was +This file was extended by LibTIFF Software $as_me 4.2.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20514,7 +21893,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="\\ -LibTIFF Software config.status 4.0.3 +LibTIFF Software config.status 4.2.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -20633,7 +22012,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # The HP-UX ksh and POSIX shell print the target directory to stdout @@ -20652,6 +22031,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"`' +shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' @@ -20699,10 +22079,13 @@ compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' @@ -20767,7 +22150,8 @@ finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' +configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' @@ -20873,9 +22257,12 @@ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +lt_cv_nm_interface \ nm_file_list_spec \ +lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ @@ -20941,7 +22328,7 @@ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -20968,7 +22355,8 @@ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec \ +configure_time_dlsearch_path \ +configure_time_lt_sys_library_path \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ @@ -20982,7 +22370,7 @@ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -20991,19 +22379,16 @@ postlink_cmds_CXX; do done ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' -# See if we are running on zsh, and set the options which allow our +# See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then +if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' @@ -21642,32 +23027,38 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + case $CONFIG_FILES in #( + *\'*) : + eval set x "$CONFIG_FILES" ;; #( + *) : + set x $CONFIG_FILES ;; #( + *) : + ;; +esac shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`$as_dirname -- "$am_mf" || +$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$am_mf" : 'X\(//\)[^/]' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -21685,106 +23076,101 @@ $as_echo X"$mf" | q } s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + am_filepart=`$as_basename -- "$am_mf" || +$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$am_mf" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } - /^X\(\/\/\)[^/].*/{ + /^X\/\(\/\/\)$/{ s//\1/ q } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ + /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + { echo "$as_me:$LINENO: cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles" >&5 + (cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } || am_rc=$? done + if test $am_rc -ne 0; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking). +See \`config.log' for more details" "$LINENO" 5; } + fi + { am_dirpart=; unset am_dirpart;} + { am_filepart=; unset am_filepart;} + { am_mf=; unset am_mf;} + { am_rc=; unset am_rc;} + rm -f conftest-deps.mk } ;; "libtool":C) - # See if we are running on zsh, and set the options which allow our + # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then + if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi - cfgfile="${ofile}T" + cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + +# Copyright (C) 2014 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. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of of the License, or +# (at your option) any later version. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. # -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . # The names of the tagged configurations supported by this script. -available_tags="CXX " +available_tags='CXX ' + +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG @@ -21813,6 +23199,9 @@ pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install +# Shared archive member basename,for filename based shared library versioning on AIX. +shared_archive_member_spec=$shared_archive_member_spec + # Shell to use when invoking shell scripts. SHELL=$lt_SHELL @@ -21924,18 +23313,27 @@ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl +# Transform the output of nm into a list of symbols to manually relocate. +global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import + # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix +# The name lister interface. +nm_interface=$lt_lt_cv_nm_interface + # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec -# The root where to search for dependent libraries,and in which our libraries should be installed. +# The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot +# Command to truncate a binary pipe. +lt_truncate_bin=$lt_lt_cv_truncate_bin + # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -22026,8 +23424,11 @@ hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec +# Detected run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path + +# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. +configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen @@ -22120,13 +23521,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute @@ -22190,6 +23591,65 @@ compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + + +# ### END FUNCTIONS SHARED WITH CONFIGURE + _LT_EOF case $host_os in @@ -22198,7 +23658,7 @@ _LT_EOF # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then +if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -22207,7 +23667,7 @@ _LT_EOF esac -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if @@ -22217,165 +23677,6 @@ ltmain="$ac_aux_dir/ltmain.sh" sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) - if test x"$xsi_shell" = xyes; then - sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -func_dirname ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_basename ()$/,/^} # func_basename /c\ -func_basename ()\ -{\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -func_dirname_and_basename ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -func_stripname ()\ -{\ -\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -\ # positional parameters, so assign one to ordinary parameter first.\ -\ func_stripname_result=${3}\ -\ func_stripname_result=${func_stripname_result#"${1}"}\ -\ func_stripname_result=${func_stripname_result%"${2}"}\ -} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -func_split_long_opt ()\ -{\ -\ func_split_long_opt_name=${1%%=*}\ -\ func_split_long_opt_arg=${1#*=}\ -} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -func_split_short_opt ()\ -{\ -\ func_split_short_opt_arg=${1#??}\ -\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -func_lo2o ()\ -{\ -\ case ${1} in\ -\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -\ *) func_lo2o_result=${1} ;;\ -\ esac\ -} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_xform ()$/,/^} # func_xform /c\ -func_xform ()\ -{\ - func_xform_result=${1%.*}.lo\ -} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_arith ()$/,/^} # func_arith /c\ -func_arith ()\ -{\ - func_arith_result=$(( $* ))\ -} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_len ()$/,/^} # func_len /c\ -func_len ()\ -{\ - func_len_result=${#1}\ -} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - -fi - -if test x"$lt_shell_append" = xyes; then - sed -e '/^func_append ()$/,/^} # func_append /c\ -func_append ()\ -{\ - eval "${1}+=\\${2}"\ -} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -func_append_quoted ()\ -{\ -\ func_quote_for_eval "${2}"\ -\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -fi - - mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -22462,13 +23763,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX @@ -22596,12 +23897,15 @@ echo " LogLuv high dynamic range encoding: ${HAVE_LOGLUV}" echo "" echo " Support for external codecs:" echo " ZLIB support: ${HAVE_ZLIB}" +echo " libdeflate support: ${HAVE_LIBDEFLATE}" echo " Pixar log-format algorithm: ${HAVE_PIXARLOG}" echo " JPEG support: ${HAVE_JPEG}" echo " Old JPEG support: ${HAVE_OJPEG}" echo " JPEG 8/12 bit dual mode: ${HAVE_JPEG12}" echo " ISO JBIG support: ${HAVE_JBIG}" echo " LZMA2 support: ${HAVE_LZMA}" +echo " ZSTD support: ${HAVE_ZSTD}" +echo " WEBP support: ${HAVE_WEBP}" echo "" echo " C++ support: ${HAVE_CXX}" echo "" diff --git a/thirdparty/tiff-4.0.3/configure.ac b/thirdparty/tiff-4.2.0/configure.ac similarity index 79% rename from thirdparty/tiff-4.0.3/configure.ac rename to thirdparty/tiff-4.2.0/configure.ac index e1b8d407..a2242330 100644 --- a/thirdparty/tiff-4.0.3/configure.ac +++ b/thirdparty/tiff-4.2.0/configure.ac @@ -25,7 +25,7 @@ dnl OF THIS SOFTWARE. dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64) -AC_INIT([LibTIFF Software],[4.0.3],[tiff@lists.maptools.org],[tiff]) +AC_INIT([LibTIFF Software],[4.2.0],[tiff@lists.maptools.org],[tiff]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_MACRO_DIR(m4) AC_LANG(C) @@ -33,15 +33,15 @@ AC_LANG(C) dnl Compute the canonical host (run-time) system type variable AC_CANONICAL_HOST -AM_INIT_AUTOMAKE +AM_INIT_AUTOMAKE(tar-ustar) dnl Do not rebuild generated files every time AM_MAINTAINER_MODE dnl Versioning. dnl Don't fill the ALPHA_VERSION field, if not applicable. LIBTIFF_MAJOR_VERSION=4 -LIBTIFF_MINOR_VERSION=0 -LIBTIFF_MICRO_VERSION=3 +LIBTIFF_MINOR_VERSION=2 +LIBTIFF_MICRO_VERSION=0 LIBTIFF_ALPHA_VERSION= LIBTIFF_VERSION=$LIBTIFF_MAJOR_VERSION.$LIBTIFF_MINOR_VERSION.$LIBTIFF_MICRO_VERSION$LIBTIFF_ALPHA_VERSION dnl This will be used with the 'make release' target @@ -76,9 +76,9 @@ dnl 5. If any interfaces have been added since the last public release, then dnl increment age. dnl 6. If any interfaces have been removed since the last public release, dnl then set age to 0. -LIBTIFF_CURRENT=7 +LIBTIFF_CURRENT=11 LIBTIFF_REVISION=0 -LIBTIFF_AGE=2 +LIBTIFF_AGE=6 LIBTIFF_VERSION_INFO=$LIBTIFF_CURRENT:$LIBTIFF_REVISION:$LIBTIFF_AGE # This is a special hack for OpenBSD and MirOS systems. The dynamic linker @@ -109,8 +109,11 @@ AM_PROG_CC_C_O dnl We want warnings. As many warnings as possible. VL_PROG_CC_WARNINGS() +dnl Checks for programs AC_PROG_INSTALL AC_PROG_LN_S +# Used only for validating the source distribution during distcheck +AC_PATH_PROG(CMAKE, cmake) # Check if LD supports linker scripts, and define automake conditional @@ -154,20 +157,24 @@ LT_LANG([C++]) # Enable support for silent build rules AM_SILENT_RULES +tiff_libs_private= +AC_SUBST(tiff_libs_private) + dnl We don't need to add math library to all targets case "${host_os}" in cygwin* | mingw32* | beos* | darwin*) ;; *) - AC_CHECK_LIB(m,sin,,,) + AC_CHECK_LIB(m,sin,[libm_lib=yes], [libm_lib=no],) + if test "x$libm_lib" = "xyes" ; then + LIBS="-lm $LIBS" + tiff_libs_private="-lm ${tiff_libs_private}" + fi ;; esac -tiff_libs_private= -AC_SUBST(tiff_libs_private) - dnl Checks for header files. -AC_CHECK_HEADERS([assert.h fcntl.h io.h limits.h malloc.h search.h sys/time.h unistd.h]) +AC_CHECK_HEADERS([assert.h fcntl.h io.h search.h unistd.h]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -178,16 +185,17 @@ AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM +dnl If the `fseeko' function is available, define `HAVE_FSEEKO'. Define +dnl `_LARGEFILE_SOURCE' if necessary. +AC_FUNC_FSEEKO + +dnl Check if optarg (and presumably related externs) already declared in headers +AC_CHECK_DECLS([optarg]) + dnl --------------------------------------------------------------------------- dnl Compute sized types for current CPU and compiler options dnl --------------------------------------------------------------------------- -# Obtain size of an 'signed short' and define as SIZEOF_SIGNED_SHORT -AC_CHECK_SIZEOF(signed short) - -# Obtain size of an 'unsigned short' and define as SIZEOF_UNSIGNED_SHORT -AC_CHECK_SIZEOF(unsigned short) - # Obtain size of an 'signed int' and define as SIZEOF_SIGNED_INT AC_CHECK_SIZEOF(signed int) @@ -214,6 +222,10 @@ AC_CHECK_SIZEOF(unsigned long long) # ac_cv_sizeof_unsigned_char_p. AC_CHECK_SIZEOF(unsigned char *) +# Obtain the size of 'size_t' and define as SIZEOF_SIZE_T. Result is +# available in ac_cv_sizeof_size_t +AC_CHECK_SIZEOF([size_t]) + AC_MSG_CHECKING(for signed 8-bit type) INT8_T='signed char' AC_MSG_RESULT($INT8_T) @@ -317,18 +329,62 @@ AC_MSG_RESULT($UINT64_T) AC_DEFINE_UNQUOTED(TIFF_UINT64_T,$UINT64_T,[Unsigned 64-bit type]) AC_DEFINE_UNQUOTED(TIFF_UINT64_FORMAT,$UINT64_FORMAT,[Unsigned 64-bit type formatter]) +# Determine formatting specifier for 'size_t'. While the size should +# be precise, the type determined may not match the system definition. +# A named type is provided to allow casting to the type we determined +# without changing the actual size. +AC_MSG_CHECKING([for 'size_t' format specifier]) +SIZE_T='unknown' +SIZE_FORMAT='unknown' +if test $ac_cv_sizeof_unsigned_int -eq $ac_cv_sizeof_size_t +then + SIZE_T='unsigned int' + SIZE_FORMAT='"%u"' +elif test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_size_t +then + SIZE_T='unsigned long' + SIZE_FORMAT='"%lu"' +elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_size_t +then + SIZE_T='unsigned long long' + case "${host_os}" in + mingw32*) + # MinGW32 understands 'unsigned long long', but uses printf from WIN32 CRT + SIZE_FORMAT='"%I64u"' + ;; + *) + SIZE_FORMAT='"%llu"' + ;; + esac +fi +AC_MSG_RESULT([$SIZE_FORMAT]) +AC_DEFINE_UNQUOTED([TIFF_SIZE_T],[$SIZE_T],[Unsigned size type]) +AC_DEFINE_UNQUOTED([TIFF_SIZE_FORMAT],[$SIZE_FORMAT],[Size type formatter]) + # Determine TIFF equivalent of ssize_t AC_MSG_CHECKING(for signed size type) SSIZE_T='unknown' SSIZE_FORMAT='unknown' -if test $ac_cv_sizeof_signed_long -eq $ac_cv_sizeof_unsigned_char_p +if test $ac_cv_sizeof_signed_int -eq $ac_cv_sizeof_size_t +then + SSIZE_T='signed int' + SSIZE_FORMAT='"%d"' +elif test $ac_cv_sizeof_signed_long -eq $ac_cv_sizeof_size_t then SSIZE_T='signed long' SSIZE_FORMAT='"%ld"' -elif test $ac_cv_sizeof_signed_long_long -eq $ac_cv_sizeof_unsigned_char_p +elif test $ac_cv_sizeof_signed_long_long -eq $ac_cv_sizeof_size_t then SSIZE_T='signed long long' - SSIZE_FORMAT='"%lld"' + case "${host_os}" in + mingw32*) + # MinGW32 understands 'long long', but uses printf from WIN32 CRT + SSIZE_FORMAT='"%I64d"' + ;; + *) + SSIZE_FORMAT='"%lld"' + ;; + esac fi AC_MSG_RESULT($SSIZE_T) AC_DEFINE_UNQUOTED(TIFF_SSIZE_T,$SSIZE_T,[Signed size type]) @@ -350,20 +406,15 @@ AC_MSG_RESULT($PTRDIFF_T) AC_DEFINE_UNQUOTED(TIFF_PTRDIFF_T,$PTRDIFF_T,[Pointer difference type]) AC_DEFINE_UNQUOTED(TIFF_PTRDIFF_FORMAT,$PTRDIFF_FORMAT,[Pointer difference type formatter]) -dnl Some compilers (IBM VisualAge) has these types defined, so check it here: -AC_CHECK_TYPES([int8, int16, int32],,, -[ -#if HAVE_INTTYPES_H -# include -#endif -]) - dnl Checks for library functions. -AC_CHECK_FUNCS([floor isascii memmove memset mmap pow setmode sqrt strchr strrchr strstr strtol strtoull]) +AC_CHECK_FUNCS([mmap setmode snprintf]) dnl Will use local replacements for unavailable functions AC_REPLACE_FUNCS(getopt) +AC_REPLACE_FUNCS(snprintf) AC_REPLACE_FUNCS(strcasecmp) +AC_REPLACE_FUNCS(strtol) +AC_REPLACE_FUNCS(strtoll) AC_REPLACE_FUNCS(strtoul) AC_REPLACE_FUNCS(strtoull) AC_REPLACE_FUNCS(lfind) @@ -563,6 +614,63 @@ if test "$HAVE_ZLIB" = "yes" ; then fi +dnl --------------------------------------------------------------------------- +dnl Check for libdeflate. +dnl --------------------------------------------------------------------------- + +HAVE_LIBDEFLATE=no + +AC_ARG_ENABLE(libdeflate, + AS_HELP_STRING([--disable-libdeflate], + [disable libdeflate usage (optional for faster Deflate support (still requires zlib), enabled by default)]),,) +AC_ARG_WITH(libdeflate-include-dir, + AS_HELP_STRING([--with-libdeflate-include-dir=DIR], + [location of libdeflate headers]),,) +AC_ARG_WITH(libdeflate-lib-dir, + AS_HELP_STRING([--with-libdeflate-lib-dir=DIR], + [location of libdeflate library binary]),,) + +if test "x$enable_libdeflate" != "xno" ; then + + if test "x$with_libdeflate_lib_dir" != "x" ; then + LDFLAGS="-L$with_libdeflate_lib_dir $LDFLAGS" + fi + + AC_CHECK_LIB(deflate, libdeflate_zlib_decompress, [libdeflate_lib=yes], [libdeflate_lib=no],) + if test "$libdeflate_lib" = "no" -a "x$with_libdeflate_lib_dir" != "x"; then + AC_MSG_ERROR([libdeflate library not found at $with_libdeflate_lib_dir]) + fi + + if test "x$with_libdeflate_include_dir" != "x" ; then + CPPFLAGS="-I$with_libdeflate_include_dir $CPPFLAGS" + fi + AC_CHECK_HEADER(libdeflate.h, [libdeflate_h=yes], [libdeflate_h=no]) + if test "$libdeflate_h" = "no" -a "x$with_libdeflate_include_dir" != "x" ; then + AC_MSG_ERROR([libdeflate headers not found at $with_libdeflate_include_dir]) + fi + + if test "$libdeflate_lib" = "yes" -a "$libdeflate_h" = "yes" ; then + HAVE_LIBDEFLATE=yes + fi + +fi + +if test "$HAVE_LIBDEFLATE" = "yes" -a "$HAVE_ZLIB" = "no" ; then + AC_MSG_WARN([libdeflate available but zlib is not. libdeflate cannot be used]) + HAVE_LIBDEFLATE=no +fi + +if test "$HAVE_LIBDEFLATE" = "yes" ; then + AC_DEFINE(LIBDEFLATE_SUPPORT,1,[Support libdeflate enhanced compression]) + LIBS="-ldeflate $LIBS" + tiff_libs_private="-ldeflate ${tiff_libs_private}" + + if test "$HAVE_RPATH" = "yes" -a "x$with_libdeflate_lib_dir" != "x" ; then + LIBDIR="-R $with_libdeflate_lib_dir $LIBDIR" + fi + +fi + dnl --------------------------------------------------------------------------- dnl Check for Pixar log-format algorithm. dnl --------------------------------------------------------------------------- @@ -632,6 +740,8 @@ if test "$HAVE_JPEG" = "yes" ; then fi +AM_CONDITIONAL(HAVE_JPEG, test "$HAVE_JPEG" = 'yes') + dnl --------------------------------------------------------------------------- dnl Check for Old JPEG. dnl --------------------------------------------------------------------------- @@ -704,6 +814,8 @@ if test "$HAVE_JBIG" = "yes" ; then fi +AM_CONDITIONAL(HAVE_JBIG, test "$HAVE_JBIG" = 'yes') + dnl --------------------------------------------------------------------------- dnl Check for liblzma2. dnl --------------------------------------------------------------------------- @@ -756,6 +868,116 @@ if test "$HAVE_LZMA" = "yes" ; then fi +AM_CONDITIONAL(HAVE_LZMA, test "$HAVE_LZMA" = 'yes') + +dnl --------------------------------------------------------------------------- +dnl Check for libzstd. +dnl --------------------------------------------------------------------------- + +HAVE_ZSTD=no + +AC_ARG_ENABLE(zstd, + AS_HELP_STRING([--disable-zstd], + [disable libzstd usage (required for zstd compression, enabled by default)]),,) +AC_ARG_WITH(zstd-include-dir, + AS_HELP_STRING([--with-zstd-include-dir=DIR], + [location of libzstd headers]),,) +AC_ARG_WITH(zstd-lib-dir, + AS_HELP_STRING([--with-zstd-lib-dir=DIR], + [location of libzstd library binary]),,) + +if test "x$enable_zstd" != "xno" ; then + + if test "x$with_zstd_lib_dir" != "x" ; then + LDFLAGS="-L$with_zstd_lib_dir $LDFLAGS" + fi + + AC_CHECK_LIB(zstd, ZSTD_decompressStream, [zstd_lib=yes], [zstd_lib=no],) + if test "$zstd_lib" = "no" -a "x$with_zstd_lib_dir" != "x"; then + AC_MSG_ERROR([zstd library not found at $with_zstd_lib_dir]) + fi + + if test "x$with_zstd_include_dir" != "x" ; then + CPPFLAGS="-I$with_zstd_include_dir $CPPFLAGS" + fi + AC_CHECK_HEADER(zstd.h, [zstd_h=yes], [zstd_h=no]) + if test "$zstd_h" = "no" -a "x$with_zstd_include_dir" != "x" ; then + AC_MSG_ERROR([Libzstd headers not found at $with_zstd_include_dir]) + fi + + if test "$zstd_lib" = "yes" -a "$zstd_h" = "yes" ; then + HAVE_ZSTD=yes + fi + +fi + +if test "$HAVE_ZSTD" = "yes" ; then + AC_DEFINE(ZSTD_SUPPORT,1,[Support zstd compression]) + LIBS="-lzstd $LIBS" + tiff_libs_private="-lzstd ${tiff_libs_private}" + + if test "$HAVE_RPATH" = "yes" -a "x$with_zstd_lib_dir" != "x" ; then + LIBDIR="-R $with_zstd_lib_dir $LIBDIR" + fi + +fi + +AM_CONDITIONAL(HAVE_ZSTD, test "$HAVE_ZSTD" = 'yes') + +dnl --------------------------------------------------------------------------- +dnl Check for libwebp. +dnl --------------------------------------------------------------------------- + +HAVE_WEBP=no + +AC_ARG_ENABLE(webp, + AS_HELP_STRING([--disable-webp], + [disable libwebp usage (required for webp compression, enabled by default)]),,) +AC_ARG_WITH(webp-include-dir, + AS_HELP_STRING([--with-webp-include-dir=DIR], + [location of libwebp headers]),,) +AC_ARG_WITH(webp-lib-dir, + AS_HELP_STRING([--with-webp-lib-dir=DIR], + [location of libwebp library binary]),,) + +if test "x$enable_webp" != "xno" ; then + + if test "x$with_webp_lib_dir" != "x" ; then + LDFLAGS="-L$with_webp_lib_dir $LDFLAGS" + fi + + AC_CHECK_LIB(webp, WebPDecode, [webp_lib=yes], [webp_lib=no],) + if test "$webp_lib" = "no" -a "x$with_webp_lib_dir" != "x"; then + AC_MSG_ERROR([webp library not found at $with_webp_lib_dir]) + fi + + if test "x$with_webp_include_dir" != "x" ; then + CPPFLAGS="-I$with_webp_include_dir $CPPFLAGS" + fi + AC_CHECK_HEADER(webp/decode.h, [webp_h=yes], [webp_h=no]) + if test "$webp_h" = "no" -a "x$with_webp_include_dir" != "x" ; then + AC_MSG_ERROR([Libwebp headers not found at $with_webp_include_dir]) + fi + + if test "$webp_lib" = "yes" -a "$webp_h" = "yes" ; then + HAVE_WEBP=yes + fi + +fi + +if test "$HAVE_WEBP" = "yes" ; then + AC_DEFINE(WEBP_SUPPORT,1,[Support webp compression]) + LIBS="-lwebp $LIBS" + tiff_libs_private="-lwebp ${tiff_libs_private}" + + if test "$HAVE_RPATH" = "yes" -a "x$with_webp_lib_dir" != "x" ; then + LIBDIR="-R $with_webp_lib_dir $LIBDIR" + fi + +fi + +AM_CONDITIONAL(HAVE_WEBP, test "$HAVE_WEBP" = 'yes') + dnl --------------------------------------------------------------------------- dnl Should 8/12 bit jpeg mode be enabled? dnl --------------------------------------------------------------------------- @@ -772,7 +994,7 @@ AC_ARG_WITH(jpeg12-lib, AS_HELP_STRING([--with-jpeg12-lib=LIBRARY], [path to libjpeg 12bit library]),,) -if test "x$enable_jpeg12" == "xyes" ; then +if test "x$enable_jpeg12" = "xyes" ; then if test "x$with_jpeg12_lib" != "x" ; then LIBS="$with_jpeg12_lib $LIBS" @@ -836,17 +1058,28 @@ dnl this must be after the ogl test, since that looks for windows.h and we dnl test it dnl --------------------------------------------------------------------------- +AC_ARG_ENABLE(win32-io, + AS_HELP_STRING([--disable-win32-io], + [disable Win32 I/O (Windows only, enabled by default except for Cygwin)]),,) + win32_io_ok=no case "${host_os}" in cygwin*) + if test x"$ac_cv_header_windows_h" = xyes -a "x$enable_win32_io" = xyes ; then + win32_io_ok=yes + fi ;; *) - if test x"$ac_cv_header_windows_h" = xyes; then + if test x"$ac_cv_header_windows_h" = xyes -a ! "x$enable_win32_io" = xno ; then win32_io_ok=yes - AC_DEFINE(USE_WIN32_FILEIO,1,[define to use win32 IO system]) fi ;; esac + +if test "$win32_io_ok" = "yes" ; then + AC_DEFINE(USE_WIN32_FILEIO,1,[define to use win32 IO system]) +fi + AM_CONDITIONAL([WIN32_IO], [test "$win32_io_ok" = yes]) dnl --------------------------------------------------------------------------- @@ -894,17 +1127,16 @@ fi dnl --------------------------------------------------------------------------- dnl Should we try to defer loading of strip/tile offsets and sizes to -dnl optimize directory scanning? These is an experimental feature for -dnl libtiff 4.0. +dnl optimize directory scanning? dnl --------------------------------------------------------------------------- AC_ARG_ENABLE(defer-strile-load, AS_HELP_STRING([--enable-defer-strile-load], - [enable deferred strip/tile offset/size loading (experimental)]), + [enable deferred strip/tile offset/size loading (also available at runtime with the 'D' flag of TIFFOpen()]), [HAVE_DEFER_STRILE_LOAD=$enableval], [HAVE_DEFER_STRILE_LOAD=no]) if test "$HAVE_DEFER_STRILE_LOAD" = "yes" ; then - AC_DEFINE(DEFER_STRILE_LOAD,1,[enable deferred strip/tile offset/size loading (experimental)]) + AC_DEFINE(DEFER_STRILE_LOAD,1,[enable deferred strip/tile offset/size loading]) fi @@ -1016,12 +1248,15 @@ LOC_MSG([ LogLuv high dynamic range encoding: ${HAVE_LOGLUV}]) LOC_MSG() LOC_MSG([ Support for external codecs:]) LOC_MSG([ ZLIB support: ${HAVE_ZLIB}]) +LOC_MSG([ libdeflate support: ${HAVE_LIBDEFLATE}]) LOC_MSG([ Pixar log-format algorithm: ${HAVE_PIXARLOG}]) LOC_MSG([ JPEG support: ${HAVE_JPEG}]) LOC_MSG([ Old JPEG support: ${HAVE_OJPEG}]) LOC_MSG([ JPEG 8/12 bit dual mode: ${HAVE_JPEG12}]) LOC_MSG([ ISO JBIG support: ${HAVE_JBIG}]) LOC_MSG([ LZMA2 support: ${HAVE_LZMA}]) +LOC_MSG([ ZSTD support: ${HAVE_ZSTD}]) +LOC_MSG([ WEBP support: ${HAVE_WEBP}]) LOC_MSG() LOC_MSG([ C++ support: ${HAVE_CXX}]) LOC_MSG() diff --git a/thirdparty/tiff-4.0.3/configure.com b/thirdparty/tiff-4.2.0/configure.com similarity index 99% rename from thirdparty/tiff-4.0.3/configure.com rename to thirdparty/tiff-4.2.0/configure.com index 22675172..a3064425 100644 --- a/thirdparty/tiff-4.0.3/configure.com +++ b/thirdparty/tiff-4.2.0/configure.com @@ -1,4 +1,3 @@ -$! $Id: configure.com,v 1.3 2012-07-29 15:45:29 tgl Exp $ $! $! OpenVMS configure procedure for libtiff $! (c) Alexey Chupahin 22-NOV-2007 diff --git a/thirdparty/tiff-4.2.0/contrib/CMakeLists.txt b/thirdparty/tiff-4.2.0/contrib/CMakeLists.txt new file mode 100644 index 00000000..6bb124f4 --- /dev/null +++ b/thirdparty/tiff-4.2.0/contrib/CMakeLists.txt @@ -0,0 +1,35 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +add_subdirectory(addtiffo) +add_subdirectory(dbs) +add_subdirectory(iptcutil) +add_subdirectory(mfs) +add_subdirectory(pds) +add_subdirectory(ras) +add_subdirectory(stream) +add_subdirectory(tags) +add_subdirectory(win_dib) + +extra_dist(README) diff --git a/thirdparty/tiff-4.0.3/contrib/Makefile.am b/thirdparty/tiff-4.2.0/contrib/Makefile.am similarity index 97% rename from thirdparty/tiff-4.0.3/contrib/Makefile.am rename to thirdparty/tiff-4.2.0/contrib/Makefile.am index b231ef91..99d0f336 100644 --- a/thirdparty/tiff-4.0.3/contrib/Makefile.am +++ b/thirdparty/tiff-4.2.0/contrib/Makefile.am @@ -23,7 +23,9 @@ # Process this file with automake to produce Makefile.in. -EXTRA_DIST = README +EXTRA_DIST = \ + CMakeLists.txt \ + README SUBDIRS = addtiffo dbs iptcutil mfs pds ras stream tags win_dib diff --git a/thirdparty/tiff-4.0.3/contrib/Makefile.in b/thirdparty/tiff-4.2.0/contrib/Makefile.in similarity index 78% rename from thirdparty/tiff-4.0.3/contrib/Makefile.in rename to thirdparty/tiff-4.2.0/contrib/Makefile.in index e5b0741a..c0f998b3 100644 --- a/thirdparty/tiff-4.0.3/contrib/Makefile.in +++ b/thirdparty/tiff-4.2.0/contrib/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -39,23 +39,61 @@ # Process this file with automake to produce Makefile.in. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -75,8 +113,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = contrib -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -84,7 +120,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = @@ -103,13 +140,14 @@ am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -117,12 +155,33 @@ am__can_run_installinfo = \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -161,6 +220,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -208,6 +268,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -295,7 +356,10 @@ tiff_libs_private = @tiff_libs_private@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = README +EXTRA_DIST = \ + CMakeLists.txt \ + README + SUBDIRS = addtiffo dbs iptcutil mfs pds ras stream tags win_dib all: all-recursive @@ -312,14 +376,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign contrib/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -343,14 +406,13 @@ clean-libtool: # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. -$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ @@ -371,31 +433,13 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done -cscopelist-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ - done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -411,12 +455,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -428,15 +467,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -445,9 +480,10 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive -cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -463,7 +499,10 @@ cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -619,23 +658,22 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \ - cscopelist-recursive ctags-recursive install-am install-strip \ - tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - cscopelist cscopelist-recursive ctags ctags-recursive \ - distclean distclean-generic distclean-libtool distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am + ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/thirdparty/tiff-4.0.3/contrib/README b/thirdparty/tiff-4.2.0/contrib/README similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/README rename to thirdparty/tiff-4.2.0/contrib/README diff --git a/thirdparty/tiff-4.2.0/contrib/addtiffo/CMakeLists.txt b/thirdparty/tiff-4.2.0/contrib/addtiffo/CMakeLists.txt new file mode 100644 index 00000000..45e733cd --- /dev/null +++ b/thirdparty/tiff-4.2.0/contrib/addtiffo/CMakeLists.txt @@ -0,0 +1,40 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +extra_dist( + README + Makefile.vc) + +include_directories(${PROJECT_SOURCE_DIR}/libtiff + ${PROJECT_BINARY_DIR}/libtiff + ${CMAKE_CURRENT_BINARY_DIR}) + +add_executable(addtiffo addtiffo.c tif_overview.c tif_ovrcache.c tif_ovrcache.h) +target_link_libraries(addtiffo tiff port) + +if(WEBP_SUPPORT AND EMSCRIPTEN) + # Emscripten is pretty finnicky about linker flags. + # It needs --shared-memory if and only if atomics or bulk-memory is used. + target_link_options(addtiffo PUBLIC "-Wl,--shared-memory") +endif() diff --git a/thirdparty/tiff-4.0.3/contrib/addtiffo/Makefile.am b/thirdparty/tiff-4.2.0/contrib/addtiffo/Makefile.am similarity index 96% rename from thirdparty/tiff-4.0.3/contrib/addtiffo/Makefile.am rename to thirdparty/tiff-4.2.0/contrib/addtiffo/Makefile.am index d634a152..87342bde 100644 --- a/thirdparty/tiff-4.0.3/contrib/addtiffo/Makefile.am +++ b/thirdparty/tiff-4.2.0/contrib/addtiffo/Makefile.am @@ -25,7 +25,10 @@ LIBTIFF = $(top_builddir)/libtiff/libtiff.la -EXTRA_DIST = README Makefile.vc +EXTRA_DIST = \ + CMakeLists.txt \ + Makefile.vc \ + README noinst_PROGRAMS = addtiffo diff --git a/thirdparty/tiff-4.0.3/contrib/addtiffo/Makefile.in b/thirdparty/tiff-4.2.0/contrib/addtiffo/Makefile.in similarity index 77% rename from thirdparty/tiff-4.0.3/contrib/addtiffo/Makefile.in rename to thirdparty/tiff-4.2.0/contrib/addtiffo/Makefile.in index e442b40e..31dc815c 100644 --- a/thirdparty/tiff-4.0.3/contrib/addtiffo/Makefile.in +++ b/thirdparty/tiff-4.2.0/contrib/addtiffo/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -40,23 +40,61 @@ # Process this file with automake to produce Makefile.in. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -77,9 +115,6 @@ build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = addtiffo$(EXEEXT) subdir = contrib/addtiffo -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/depcomp \ - $(top_srcdir)/config/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -87,7 +122,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = @@ -115,7 +151,9 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/libtiff depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/addtiffo.Po \ + ./$(DEPDIR)/tif_overview.Po ./$(DEPDIR)/tif_ovrcache.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -142,8 +180,27 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -157,6 +214,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -204,6 +262,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -292,7 +351,11 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ LIBTIFF = $(top_builddir)/libtiff/libtiff.la -EXTRA_DIST = README Makefile.vc +EXTRA_DIST = \ + CMakeLists.txt \ + Makefile.vc \ + README + addtiffo_SOURCES = addtiffo.c tif_overview.c tif_ovrcache.c tif_ovrcache.h addtiffo_LDADD = $(LIBTIFF) AM_CPPFLAGS = -I$(top_srcdir)/libtiff @@ -312,14 +375,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/addtiffo/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign contrib/addtiffo/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -339,6 +401,7 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + addtiffo$(EXEEXT): $(addtiffo_OBJECTS) $(addtiffo_DEPENDENCIES) $(EXTRA_addtiffo_DEPENDENCIES) @rm -f addtiffo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(addtiffo_OBJECTS) $(addtiffo_LDADD) $(LIBS) @@ -349,23 +412,29 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addtiffo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_overview.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_ovrcache.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addtiffo.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_overview.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_ovrcache.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -380,26 +449,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -411,15 +469,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -428,9 +482,10 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am -cscopelist: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -446,7 +501,10 @@ cscopelist: $(HEADERS) $(SOURCES) $(LISP) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -516,7 +574,9 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/addtiffo.Po + -rm -f ./$(DEPDIR)/tif_overview.Po + -rm -f ./$(DEPDIR)/tif_ovrcache.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -562,7 +622,9 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/addtiffo.Po + -rm -f ./$(DEPDIR)/tif_overview.Po + -rm -f ./$(DEPDIR)/tif_ovrcache.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -583,18 +645,21 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstPROGRAMS cscopelist ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-libtool clean-noinstPROGRAMS cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/thirdparty/tiff-4.0.3/contrib/addtiffo/Makefile.vc b/thirdparty/tiff-4.2.0/contrib/addtiffo/Makefile.vc old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/addtiffo/Makefile.vc rename to thirdparty/tiff-4.2.0/contrib/addtiffo/Makefile.vc diff --git a/thirdparty/tiff-4.0.3/contrib/addtiffo/README b/thirdparty/tiff-4.2.0/contrib/addtiffo/README similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/addtiffo/README rename to thirdparty/tiff-4.2.0/contrib/addtiffo/README diff --git a/thirdparty/tiff-4.0.3/contrib/addtiffo/addtiffo.c b/thirdparty/tiff-4.2.0/contrib/addtiffo/addtiffo.c similarity index 95% rename from thirdparty/tiff-4.0.3/contrib/addtiffo/addtiffo.c rename to thirdparty/tiff-4.2.0/contrib/addtiffo/addtiffo.c index d3920e26..e1d70623 100644 --- a/thirdparty/tiff-4.0.3/contrib/addtiffo/addtiffo.c +++ b/thirdparty/tiff-4.2.0/contrib/addtiffo/addtiffo.c @@ -1,6 +1,4 @@ /****************************************************************************** - * $Id: addtiffo.c,v 1.7 2010-06-08 18:55:15 bfriesen Exp $ - * * Project: GeoTIFF Overview Builder * Purpose: Mainline for building overviews in a TIFF file. * Author: Frank Warmerdam, warmerdam@pobox.com @@ -28,6 +26,10 @@ ****************************************************************************** * * $Log: addtiffo.c,v $ + * Revision 1.8 2015-05-30 20:30:27 bfriesen + * * contrib/addtiffo/addtiffo.c (main): Possibly address Coverity + * 1024226 "Untrusted value as argument". + * * Revision 1.7 2010-06-08 18:55:15 bfriesen * * contrib: Add an emacs formatting mode footer to all source files * so that emacs can be effectively used. @@ -120,7 +122,8 @@ int main( int argc, char ** argv ) while( nOverviewCount < argc - 2 && nOverviewCount < 100 ) { anOverviews[nOverviewCount] = atoi(argv[nOverviewCount+2]); - if( anOverviews[nOverviewCount] <= 0) + if( (anOverviews[nOverviewCount] <= 0) || + ((anOverviews[nOverviewCount] > 1024))) { fprintf( stderr, "Incorrect parameters\n" ); return(1); @@ -170,7 +173,7 @@ int main( int argc, char ** argv ) /* * Local Variables: * mode: c - * c-basic-offset: 8 + * c-basic-offset: 4 * fill-column: 78 * End: */ diff --git a/thirdparty/tiff-4.0.3/contrib/addtiffo/tif_overview.c b/thirdparty/tiff-4.2.0/contrib/addtiffo/tif_overview.c similarity index 97% rename from thirdparty/tiff-4.0.3/contrib/addtiffo/tif_overview.c rename to thirdparty/tiff-4.2.0/contrib/addtiffo/tif_overview.c index 156c0812..03b35733 100644 --- a/thirdparty/tiff-4.0.3/contrib/addtiffo/tif_overview.c +++ b/thirdparty/tiff-4.2.0/contrib/addtiffo/tif_overview.c @@ -65,6 +65,8 @@ # define MAX(a,b) ((a>b) ? a : b) #endif +#define TIFF_DIR_MAX 65534 + void TIFFBuildOverviews( TIFF *, int, int *, int, const char *, int (*)(double,void*), void * ); @@ -91,6 +93,7 @@ uint32 TIFF_WriteOverview( TIFF *hTIFF, uint32 nXSize, uint32 nYSize, { toff_t nBaseDirOffset; toff_t nOffset; + tdir_t iNumDir; (void) bUseSubIFDs; @@ -147,7 +150,16 @@ uint32 TIFF_WriteOverview( TIFF *hTIFF, uint32 nXSize, uint32 nYSize, return 0; TIFFWriteDirectory( hTIFF ); - TIFFSetDirectory( hTIFF, (tdir_t) (TIFFNumberOfDirectories(hTIFF)-1) ); + iNumDir = TIFFNumberOfDirectories(hTIFF); + if( iNumDir > TIFF_DIR_MAX ) + { + TIFFErrorExt( TIFFClientdata(hTIFF), + "TIFF_WriteOverview", + "File `%s' has too many directories.\n", + TIFFFileName(hTIFF) ); + exit(-1); + } + TIFFSetDirectory( hTIFF, (tdir_t) (iNumDir - 1) ); nOffset = TIFFCurrentDirOffset( hTIFF ); @@ -272,10 +284,27 @@ void TIFF_DownSample( unsigned char *pabySrcTile, int nPixelGroupBytes = (nBitsPerPixel+nPixelSkewBits)/8; unsigned char *pabySrc, *pabyDst; double *padfSamples; + size_t tpadfSamples_size, padfSamples_size; assert( nBitsPerPixel >= 8 ); - padfSamples = (double *) malloc(sizeof(double) * nOMult * nOMult); + /* sizeof(double) * nOMult * nOMult */ + tpadfSamples_size=nOMult*nOMult; + if ((nOMult != 0) && (tpadfSamples_size/nOMult == (size_t) nOMult)) { + padfSamples_size=tpadfSamples_size; + tpadfSamples_size=padfSamples_size*sizeof(double); + if ((tpadfSamples_size / padfSamples_size) == sizeof(double)) + padfSamples_size=tpadfSamples_size; + else + padfSamples_size=0; + } else { + padfSamples_size=0; + } + if (padfSamples_size == 0) { + /* TODO: This is an error condition */ + return; + } + padfSamples = (double *) malloc(padfSamples_size); /* ==================================================================== */ /* Loop over scanline chunks to process, establishing where the */ @@ -893,7 +922,7 @@ void TIFFBuildOverviews( TIFF *hTIFF, int nOverviews, int * panOvList, /* * Local Variables: * mode: c - * c-basic-offset: 8 + * c-basic-offset: 4 * fill-column: 78 * End: */ diff --git a/thirdparty/tiff-4.0.3/contrib/addtiffo/tif_ovrcache.c b/thirdparty/tiff-4.2.0/contrib/addtiffo/tif_ovrcache.c similarity index 95% rename from thirdparty/tiff-4.0.3/contrib/addtiffo/tif_ovrcache.c rename to thirdparty/tiff-4.2.0/contrib/addtiffo/tif_ovrcache.c index e19483bc..ac500ab4 100644 --- a/thirdparty/tiff-4.0.3/contrib/addtiffo/tif_ovrcache.c +++ b/thirdparty/tiff-4.2.0/contrib/addtiffo/tif_ovrcache.c @@ -1,6 +1,4 @@ /****************************************************************************** - * $Id: tif_ovrcache.c,v 1.9 2010-06-08 18:55:15 bfriesen Exp $ - * * Project: TIFF Overview Builder * Purpose: Library functions to maintain two rows of tiles or two strips * of data for output overviews as an output cache. @@ -104,12 +102,15 @@ TIFFOvrCache *TIFFCreateOvrCache( TIFF *hTIFF, toff_t nDirOffset ) psCache->pabyRow2Blocks = (unsigned char *) _TIFFmalloc(psCache->nBytesPerRow); - if( psCache->pabyRow1Blocks == NULL - || psCache->pabyRow2Blocks == NULL ) + if ( psCache->pabyRow1Blocks == NULL + || psCache->pabyRow2Blocks == NULL ) { TIFFErrorExt( hTIFF->tif_clientdata, hTIFF->tif_name, "Can't allocate memory for overview cache." ); - /* TODO: use of TIFFError is inconsistent with use of fprintf in addtiffo.c, sort out */ + /* TODO: use of TIFFError is inconsistent with use of fprintf in addtiffo.c, sort out */ + if (psCache->pabyRow1Blocks) _TIFFfree(psCache->pabyRow1Blocks); + if (psCache->pabyRow2Blocks) _TIFFfree(psCache->pabyRow2Blocks); + _TIFFfree( psCache ); return NULL; } @@ -165,6 +166,7 @@ static void TIFFWriteOvrRow( TIFFOvrCache * psCache ) /* -------------------------------------------------------------------- */ nBaseDirOffset = TIFFCurrentDirOffset( psCache->hTIFF ); nRet = TIFFSetSubDirectory( psCache->hTIFF, psCache->nDirOffset ); + (void) nRet; assert( nRet == 1 ); /* -------------------------------------------------------------------- */ @@ -267,9 +269,9 @@ unsigned char *TIFFGetOvrBlock( TIFFOvrCache *psCache, int iTileX, int iTileY, int iSample ) { - int nRowOffset; + long nRowOffset; - if( iTileY > psCache->nBlockOffset + 1 ) + if ( iTileY > psCache->nBlockOffset + 1 ) TIFFWriteOvrRow( psCache ); assert( iTileX >= 0 && iTileX < psCache->nBlocksPerRow ); @@ -279,13 +281,13 @@ unsigned char *TIFFGetOvrBlock( TIFFOvrCache *psCache, int iTileX, int iTileY, assert( iSample >= 0 && iSample < psCache->nSamples ); if (psCache->nPlanarConfig == PLANARCONFIG_SEPARATE) - nRowOffset = ((iTileX * psCache->nSamples) + iSample) - * psCache->nBytesPerBlock; + nRowOffset = ((((toff_t) iTileX * psCache->nSamples) + iSample) + * psCache->nBytesPerBlock); else nRowOffset = iTileX * psCache->nBytesPerBlock + (psCache->nBitsPerPixel + 7) / 8 * iSample; - if( iTileY == psCache->nBlockOffset ) + if ( iTileY == psCache->nBlockOffset ) return psCache->pabyRow1Blocks + nRowOffset; else return psCache->pabyRow2Blocks + nRowOffset; @@ -335,7 +337,7 @@ void TIFFDestroyOvrCache( TIFFOvrCache * psCache ) /* * Local Variables: * mode: c - * c-basic-offset: 8 + * c-basic-offset: 4 * fill-column: 78 * End: */ diff --git a/thirdparty/tiff-4.0.3/contrib/addtiffo/tif_ovrcache.h b/thirdparty/tiff-4.2.0/contrib/addtiffo/tif_ovrcache.h similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/addtiffo/tif_ovrcache.h rename to thirdparty/tiff-4.2.0/contrib/addtiffo/tif_ovrcache.h diff --git a/thirdparty/tiff-4.2.0/contrib/dbs/CMakeLists.txt b/thirdparty/tiff-4.2.0/contrib/dbs/CMakeLists.txt new file mode 100644 index 00000000..ff3ce20c --- /dev/null +++ b/thirdparty/tiff-4.2.0/contrib/dbs/CMakeLists.txt @@ -0,0 +1,54 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +include_directories(${PROJECT_SOURCE_DIR}/libtiff + ${PROJECT_BINARY_DIR}/libtiff + ${CMAKE_CURRENT_BINARY_DIR}) + +add_executable(tiff-bi tiff-bi.c) +target_link_libraries(tiff-bi tiff port) + +add_executable(tiff-grayscale tiff-grayscale.c) +target_link_libraries(tiff-grayscale tiff port) + +add_executable(tiff-palette tiff-palette.c) +target_link_libraries(tiff-palette tiff port) + +add_executable(tiff-rgb tiff-rgb.c) +target_link_libraries(tiff-rgb tiff port) + +add_subdirectory(xtiff) + +extra_dist(README) + +if(WEBP_SUPPORT AND EMSCRIPTEN) + # Emscripten is pretty finnicky about linker flags. + # It needs --shared-memory if and only if atomics or bulk-memory is used. + foreach(target tiff-bi + tiff-grayscale + tiff-palette + tiff-rgb) + target_link_options(${target} PUBLIC "-Wl,--shared-memory") + endforeach() +endif() diff --git a/thirdparty/tiff-4.0.3/contrib/dbs/Makefile.am b/thirdparty/tiff-4.2.0/contrib/dbs/Makefile.am similarity index 97% rename from thirdparty/tiff-4.0.3/contrib/dbs/Makefile.am rename to thirdparty/tiff-4.2.0/contrib/dbs/Makefile.am index 07873779..90697eed 100644 --- a/thirdparty/tiff-4.0.3/contrib/dbs/Makefile.am +++ b/thirdparty/tiff-4.2.0/contrib/dbs/Makefile.am @@ -27,7 +27,9 @@ SUBDIRS = xtiff LIBTIFF = $(top_builddir)/libtiff/libtiff.la -EXTRA_DIST = README +EXTRA_DIST = \ + CMakeLists.txt \ + README noinst_PROGRAMS = tiff-bi tiff-grayscale tiff-palette tiff-rgb diff --git a/thirdparty/tiff-4.0.3/contrib/dbs/Makefile.in b/thirdparty/tiff-4.2.0/contrib/dbs/Makefile.in similarity index 78% rename from thirdparty/tiff-4.0.3/contrib/dbs/Makefile.in rename to thirdparty/tiff-4.2.0/contrib/dbs/Makefile.in index 734ef1a4..0f44fdd1 100644 --- a/thirdparty/tiff-4.0.3/contrib/dbs/Makefile.in +++ b/thirdparty/tiff-4.2.0/contrib/dbs/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -40,23 +40,61 @@ # Process this file with automake to produce Makefile.in. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -78,9 +116,6 @@ host_triplet = @host@ noinst_PROGRAMS = tiff-bi$(EXEEXT) tiff-grayscale$(EXEEXT) \ tiff-palette$(EXEEXT) tiff-rgb$(EXEEXT) subdir = contrib/dbs -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/depcomp \ - $(top_srcdir)/config/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -88,7 +123,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = @@ -124,7 +160,10 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/libtiff depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/tiff-bi.Po \ + ./$(DEPDIR)/tiff-grayscale.Po ./$(DEPDIR)/tiff-palette.Po \ + ./$(DEPDIR)/tiff-rgb.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -148,13 +187,14 @@ SOURCES = $(tiff_bi_SOURCES) $(tiff_grayscale_SOURCES) \ $(tiff_palette_SOURCES) $(tiff_rgb_SOURCES) DIST_SOURCES = $(tiff_bi_SOURCES) $(tiff_grayscale_SOURCES) \ $(tiff_palette_SOURCES) $(tiff_rgb_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -162,12 +202,34 @@ am__can_run_installinfo = \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -206,6 +268,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -253,6 +316,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -342,7 +406,10 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = xtiff LIBTIFF = $(top_builddir)/libtiff/libtiff.la -EXTRA_DIST = README +EXTRA_DIST = \ + CMakeLists.txt \ + README + tiff_bi_SOURCES = tiff-bi.c tiff_bi_LDADD = $(LIBTIFF) tiff_grayscale_SOURCES = tiff-grayscale.c @@ -368,14 +435,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/dbs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign contrib/dbs/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -395,15 +461,19 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + tiff-bi$(EXEEXT): $(tiff_bi_OBJECTS) $(tiff_bi_DEPENDENCIES) $(EXTRA_tiff_bi_DEPENDENCIES) @rm -f tiff-bi$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tiff_bi_OBJECTS) $(tiff_bi_LDADD) $(LIBS) + tiff-grayscale$(EXEEXT): $(tiff_grayscale_OBJECTS) $(tiff_grayscale_DEPENDENCIES) $(EXTRA_tiff_grayscale_DEPENDENCIES) @rm -f tiff-grayscale$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tiff_grayscale_OBJECTS) $(tiff_grayscale_LDADD) $(LIBS) + tiff-palette$(EXEEXT): $(tiff_palette_OBJECTS) $(tiff_palette_DEPENDENCIES) $(EXTRA_tiff_palette_DEPENDENCIES) @rm -f tiff-palette$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tiff_palette_OBJECTS) $(tiff_palette_LDADD) $(LIBS) + tiff-rgb$(EXEEXT): $(tiff_rgb_OBJECTS) $(tiff_rgb_DEPENDENCIES) $(EXTRA_tiff_rgb_DEPENDENCIES) @rm -f tiff-rgb$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tiff_rgb_OBJECTS) $(tiff_rgb_LDADD) $(LIBS) @@ -414,24 +484,30 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff-bi.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff-grayscale.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff-palette.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff-rgb.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff-bi.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff-grayscale.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff-palette.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff-rgb.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -452,14 +528,13 @@ clean-libtool: # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. -$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ @@ -480,31 +555,13 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done -cscopelist-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ - done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -520,12 +577,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -537,15 +589,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -554,9 +602,10 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive -cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -572,7 +621,10 @@ cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -668,7 +720,10 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-recursive - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/tiff-bi.Po + -rm -f ./$(DEPDIR)/tiff-grayscale.Po + -rm -f ./$(DEPDIR)/tiff-palette.Po + -rm -f ./$(DEPDIR)/tiff-rgb.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -714,7 +769,10 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/tiff-bi.Po + -rm -f ./$(DEPDIR)/tiff-grayscale.Po + -rm -f ./$(DEPDIR)/tiff-palette.Po + -rm -f ./$(DEPDIR)/tiff-rgb.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -733,24 +791,24 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \ - cscopelist-recursive ctags-recursive install-am install-strip \ - tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - clean-noinstPROGRAMS cscopelist cscopelist-recursive ctags \ - ctags-recursive distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--depfiles check check-am clean clean-generic clean-libtool \ + clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/thirdparty/tiff-4.0.3/contrib/dbs/README b/thirdparty/tiff-4.2.0/contrib/dbs/README similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/dbs/README rename to thirdparty/tiff-4.2.0/contrib/dbs/README diff --git a/thirdparty/tiff-4.0.3/contrib/dbs/tiff-bi.c b/thirdparty/tiff-4.2.0/contrib/dbs/tiff-bi.c similarity index 97% rename from thirdparty/tiff-4.0.3/contrib/dbs/tiff-bi.c rename to thirdparty/tiff-4.2.0/contrib/dbs/tiff-bi.c index 33f05c7d..db0e8c89 100644 --- a/thirdparty/tiff-4.0.3/contrib/dbs/tiff-bi.c +++ b/thirdparty/tiff-4.2.0/contrib/dbs/tiff-bi.c @@ -1,5 +1,3 @@ -/* $Id: tiff-bi.c,v 1.3 2010-06-08 18:55:15 bfriesen Exp $ */ - /* * tiff-bi.c -- create a Class B (bilevel) TIFF file * diff --git a/thirdparty/tiff-4.0.3/contrib/dbs/tiff-grayscale.c b/thirdparty/tiff-4.2.0/contrib/dbs/tiff-grayscale.c similarity index 98% rename from thirdparty/tiff-4.0.3/contrib/dbs/tiff-grayscale.c rename to thirdparty/tiff-4.2.0/contrib/dbs/tiff-grayscale.c index 00b229f3..92c7b904 100644 --- a/thirdparty/tiff-4.0.3/contrib/dbs/tiff-grayscale.c +++ b/thirdparty/tiff-4.2.0/contrib/dbs/tiff-grayscale.c @@ -1,5 +1,3 @@ -/* $Id: tiff-grayscale.c,v 1.6 2010-06-08 18:55:15 bfriesen Exp $ */ - /* * tiff-grayscale.c -- create a Class G (grayscale) TIFF file * with a gray response curve in linear optical density diff --git a/thirdparty/tiff-4.0.3/contrib/dbs/tiff-palette.c b/thirdparty/tiff-4.2.0/contrib/dbs/tiff-palette.c similarity index 99% rename from thirdparty/tiff-4.0.3/contrib/dbs/tiff-palette.c rename to thirdparty/tiff-4.2.0/contrib/dbs/tiff-palette.c index 3d9e862b..7b3d433f 100644 --- a/thirdparty/tiff-4.0.3/contrib/dbs/tiff-palette.c +++ b/thirdparty/tiff-4.2.0/contrib/dbs/tiff-palette.c @@ -1,5 +1,3 @@ -/* $Id: tiff-palette.c,v 1.5 2010-06-08 18:55:15 bfriesen Exp $ */ - /* * tiff-palette.c -- create a Class P (palette) TIFF file * diff --git a/thirdparty/tiff-4.0.3/contrib/dbs/tiff-rgb.c b/thirdparty/tiff-4.2.0/contrib/dbs/tiff-rgb.c similarity index 99% rename from thirdparty/tiff-4.0.3/contrib/dbs/tiff-rgb.c rename to thirdparty/tiff-4.2.0/contrib/dbs/tiff-rgb.c index bf904990..d14ed005 100644 --- a/thirdparty/tiff-4.0.3/contrib/dbs/tiff-rgb.c +++ b/thirdparty/tiff-4.2.0/contrib/dbs/tiff-rgb.c @@ -1,5 +1,3 @@ -/* $Id: tiff-rgb.c,v 1.4 2010-06-08 18:55:15 bfriesen Exp $ */ - /* * tiff-rgb.c -- create a 24-bit Class R (rgb) TIFF file * diff --git a/thirdparty/tiff-4.2.0/contrib/dbs/xtiff/CMakeLists.txt b/thirdparty/tiff-4.2.0/contrib/dbs/xtiff/CMakeLists.txt new file mode 100644 index 00000000..fec4d0d8 --- /dev/null +++ b/thirdparty/tiff-4.2.0/contrib/dbs/xtiff/CMakeLists.txt @@ -0,0 +1,29 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +extra_dist( + README + patchlevel.h + xtiff.c + xtifficon.h) diff --git a/thirdparty/tiff-4.0.3/contrib/dbs/xtiff/Makefile.am b/thirdparty/tiff-4.2.0/contrib/dbs/xtiff/Makefile.am similarity index 94% rename from thirdparty/tiff-4.0.3/contrib/dbs/xtiff/Makefile.am rename to thirdparty/tiff-4.2.0/contrib/dbs/xtiff/Makefile.am index 749f5ceb..a138c90a 100644 --- a/thirdparty/tiff-4.0.3/contrib/dbs/xtiff/Makefile.am +++ b/thirdparty/tiff-4.2.0/contrib/dbs/xtiff/Makefile.am @@ -26,7 +26,12 @@ #LIBTIFF = $(top_builddir)/libtiff/libtiff.la -EXTRA_DIST = README patchlevel.h xtiff.c xtifficon.h +EXTRA_DIST = \ + CMakeLists.txt \ + README \ + patchlevel.h \ + xtiff.c \ + xtifficon.h #noinst_PROGRAMS = diff --git a/thirdparty/tiff-4.0.3/contrib/dbs/xtiff/Makefile.in b/thirdparty/tiff-4.2.0/contrib/dbs/xtiff/Makefile.in similarity index 81% rename from thirdparty/tiff-4.0.3/contrib/dbs/xtiff/Makefile.in rename to thirdparty/tiff-4.2.0/contrib/dbs/xtiff/Makefile.in index 4ecfb0c2..4be51fd8 100644 --- a/thirdparty/tiff-4.0.3/contrib/dbs/xtiff/Makefile.in +++ b/thirdparty/tiff-4.2.0/contrib/dbs/xtiff/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -42,23 +42,61 @@ #LIBTIFF = $(top_builddir)/libtiff/libtiff.la VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -78,8 +116,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = contrib/dbs/xtiff -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -87,7 +123,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = @@ -111,6 +148,8 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -124,6 +163,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -171,6 +211,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -258,7 +299,13 @@ tiff_libs_private = @tiff_libs_private@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = README patchlevel.h xtiff.c xtifficon.h +EXTRA_DIST = \ + CMakeLists.txt \ + README \ + patchlevel.h \ + xtiff.c \ + xtifficon.h + all: all-am .SUFFIXES: @@ -274,14 +321,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/dbs/xtiff/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign contrib/dbs/xtiff/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -298,16 +344,17 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -440,15 +487,18 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile #noinst_PROGRAMS = diff --git a/thirdparty/tiff-4.0.3/contrib/dbs/xtiff/README b/thirdparty/tiff-4.2.0/contrib/dbs/xtiff/README similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/dbs/xtiff/README rename to thirdparty/tiff-4.2.0/contrib/dbs/xtiff/README diff --git a/thirdparty/tiff-4.0.3/contrib/dbs/xtiff/patchlevel.h b/thirdparty/tiff-4.2.0/contrib/dbs/xtiff/patchlevel.h similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/dbs/xtiff/patchlevel.h rename to thirdparty/tiff-4.2.0/contrib/dbs/xtiff/patchlevel.h diff --git a/thirdparty/tiff-4.0.3/contrib/dbs/xtiff/xtiff.c b/thirdparty/tiff-4.2.0/contrib/dbs/xtiff/xtiff.c similarity index 99% rename from thirdparty/tiff-4.0.3/contrib/dbs/xtiff/xtiff.c rename to thirdparty/tiff-4.2.0/contrib/dbs/xtiff/xtiff.c index 26340300..bc10b670 100644 --- a/thirdparty/tiff-4.0.3/contrib/dbs/xtiff/xtiff.c +++ b/thirdparty/tiff-4.2.0/contrib/dbs/xtiff/xtiff.c @@ -1,6 +1,4 @@ /* - * $Id: xtiff.c,v 1.3 2010-06-08 18:55:15 bfriesen Exp $ - * * xtiff - view a TIFF file in an X window * * Dan Sears @@ -512,9 +510,9 @@ SetNameLabel() Arg args[1]; if (tfMultiPage) - sprintf(buffer, "%s - page %d", fileName, tfDirectory); + snprintf(buffer, sizeof(buffer), "%s - page %d", fileName, tfDirectory); else - strcpy(buffer, fileName); + snprintf(buffer, sizeof(buffer), "%s", fileName); XtSetArg(args[0], XtNlabel, buffer); XtSetValues(labelWidget, args, 1); } diff --git a/thirdparty/tiff-4.0.3/contrib/dbs/xtiff/xtifficon.h b/thirdparty/tiff-4.2.0/contrib/dbs/xtiff/xtifficon.h similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/dbs/xtiff/xtifficon.h rename to thirdparty/tiff-4.2.0/contrib/dbs/xtiff/xtifficon.h diff --git a/thirdparty/tiff-4.2.0/contrib/iptcutil/CMakeLists.txt b/thirdparty/tiff-4.2.0/contrib/iptcutil/CMakeLists.txt new file mode 100644 index 00000000..35cc2612 --- /dev/null +++ b/thirdparty/tiff-4.2.0/contrib/iptcutil/CMakeLists.txt @@ -0,0 +1,35 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +extra_dist( + README + test.iptc + test.txt) + +include_directories(${PROJECT_SOURCE_DIR}/libtiff + ${PROJECT_BINARY_DIR}/libtiff + ${CMAKE_CURRENT_BINARY_DIR}) + +add_executable(iptcutil iptcutil.c) +target_link_libraries(iptcutil tiff port) diff --git a/thirdparty/tiff-4.0.3/contrib/iptcutil/Makefile.am b/thirdparty/tiff-4.2.0/contrib/iptcutil/Makefile.am similarity index 95% rename from thirdparty/tiff-4.0.3/contrib/iptcutil/Makefile.am rename to thirdparty/tiff-4.2.0/contrib/iptcutil/Makefile.am index 9caedf14..4aabe2e9 100644 --- a/thirdparty/tiff-4.0.3/contrib/iptcutil/Makefile.am +++ b/thirdparty/tiff-4.2.0/contrib/iptcutil/Makefile.am @@ -25,7 +25,11 @@ LIBTIFF = $(top_builddir)/libtiff/libtiff.la -EXTRA_DIST = README test.iptc test.txt +EXTRA_DIST = \ + CMakeLists.txt \ + README \ + test.iptc \ + test.txt noinst_PROGRAMS = iptcutil diff --git a/thirdparty/tiff-4.0.3/contrib/iptcutil/Makefile.in b/thirdparty/tiff-4.2.0/contrib/iptcutil/Makefile.in similarity index 77% rename from thirdparty/tiff-4.0.3/contrib/iptcutil/Makefile.in rename to thirdparty/tiff-4.2.0/contrib/iptcutil/Makefile.in index eb4b82cb..c0cc3959 100644 --- a/thirdparty/tiff-4.0.3/contrib/iptcutil/Makefile.in +++ b/thirdparty/tiff-4.2.0/contrib/iptcutil/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -40,23 +40,61 @@ # Process this file with automake to produce Makefile.in. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -77,9 +115,6 @@ build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = iptcutil$(EXEEXT) subdir = contrib/iptcutil -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/depcomp \ - $(top_srcdir)/config/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -87,7 +122,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = @@ -114,7 +150,8 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/libtiff depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/iptcutil.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -141,8 +178,27 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -156,6 +212,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -203,6 +260,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -291,7 +349,12 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ LIBTIFF = $(top_builddir)/libtiff/libtiff.la -EXTRA_DIST = README test.iptc test.txt +EXTRA_DIST = \ + CMakeLists.txt \ + README \ + test.iptc \ + test.txt + iptcutil_SOURCES = iptcutil.c iptcutil_LDADD = $(LIBTIFF) AM_CPPFLAGS = -I$(top_srcdir)/libtiff @@ -311,14 +374,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/iptcutil/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign contrib/iptcutil/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -338,6 +400,7 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + iptcutil$(EXEEXT): $(iptcutil_OBJECTS) $(iptcutil_DEPENDENCIES) $(EXTRA_iptcutil_DEPENDENCIES) @rm -f iptcutil$(EXEEXT) $(AM_V_CCLD)$(LINK) $(iptcutil_OBJECTS) $(iptcutil_LDADD) $(LIBS) @@ -348,21 +411,27 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iptcutil.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iptcutil.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -377,26 +446,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -408,15 +466,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -425,9 +479,10 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am -cscopelist: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -443,7 +498,10 @@ cscopelist: $(HEADERS) $(SOURCES) $(LISP) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -513,7 +571,7 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/iptcutil.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -559,7 +617,7 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/iptcutil.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -580,18 +638,21 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstPROGRAMS cscopelist ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-libtool clean-noinstPROGRAMS cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/thirdparty/tiff-4.0.3/contrib/iptcutil/README b/thirdparty/tiff-4.2.0/contrib/iptcutil/README similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/iptcutil/README rename to thirdparty/tiff-4.2.0/contrib/iptcutil/README diff --git a/thirdparty/tiff-4.0.3/contrib/iptcutil/iptcutil.c b/thirdparty/tiff-4.2.0/contrib/iptcutil/iptcutil.c similarity index 54% rename from thirdparty/tiff-4.0.3/contrib/iptcutil/iptcutil.c rename to thirdparty/tiff-4.2.0/contrib/iptcutil/iptcutil.c index eaee188f..621716df 100644 --- a/thirdparty/tiff-4.0.3/contrib/iptcutil/iptcutil.c +++ b/thirdparty/tiff-4.2.0/contrib/iptcutil/iptcutil.c @@ -1,5 +1,3 @@ -/* $Id: iptcutil.c,v 1.8 2011-05-08 00:44:18 fwarmerdam Exp $ */ - #include "tif_config.h" #include @@ -35,58 +33,58 @@ typedef struct _tag_spec } tag_spec; static tag_spec tags[] = { - { 5,"Image Name" }, - { 7,"Edit Status" }, - { 10,"Priority" }, - { 15,"Category" }, - { 20,"Supplemental Category" }, - { 22,"Fixture Identifier" }, - { 25,"Keyword" }, - { 30,"Release Date" }, - { 35,"Release Time" }, - { 40,"Special Instructions" }, - { 45,"Reference Service" }, - { 47,"Reference Date" }, - { 50,"Reference Number" }, - { 55,"Created Date" }, - { 60,"Created Time" }, - { 65,"Originating Program" }, - { 70,"Program Version" }, - { 75,"Object Cycle" }, - { 80,"Byline" }, - { 85,"Byline Title" }, - { 90,"City" }, - { 95,"Province State" }, - { 100,"Country Code" }, - { 101,"Country" }, - { 103,"Original Transmission Reference" }, - { 105,"Headline" }, - { 110,"Credit" }, - { 115,"Source" }, - { 116,"Copyright String" }, - { 120,"Caption" }, - { 121,"Local Caption" }, - { 122,"Caption Writer" }, - { 200,"Custom Field 1" }, - { 201,"Custom Field 2" }, - { 202,"Custom Field 3" }, - { 203,"Custom Field 4" }, - { 204,"Custom Field 5" }, - { 205,"Custom Field 6" }, - { 206,"Custom Field 7" }, - { 207,"Custom Field 8" }, - { 208,"Custom Field 9" }, - { 209,"Custom Field 10" }, - { 210,"Custom Field 11" }, - { 211,"Custom Field 12" }, - { 212,"Custom Field 13" }, - { 213,"Custom Field 14" }, - { 214,"Custom Field 15" }, - { 215,"Custom Field 16" }, - { 216,"Custom Field 17" }, - { 217,"Custom Field 18" }, - { 218,"Custom Field 19" }, - { 219,"Custom Field 20" } + { 5,"Image Name" }, + { 7,"Edit Status" }, + { 10,"Priority" }, + { 15,"Category" }, + { 20,"Supplemental Category" }, + { 22,"Fixture Identifier" }, + { 25,"Keyword" }, + { 30,"Release Date" }, + { 35,"Release Time" }, + { 40,"Special Instructions" }, + { 45,"Reference Service" }, + { 47,"Reference Date" }, + { 50,"Reference Number" }, + { 55,"Created Date" }, + { 60,"Created Time" }, + { 65,"Originating Program" }, + { 70,"Program Version" }, + { 75,"Object Cycle" }, + { 80,"Byline" }, + { 85,"Byline Title" }, + { 90,"City" }, + { 95,"Province State" }, + { 100,"Country Code" }, + { 101,"Country" }, + { 103,"Original Transmission Reference" }, + { 105,"Headline" }, + { 110,"Credit" }, + { 115,"Source" }, + { 116,"Copyright String" }, + { 120,"Caption" }, + { 121,"Local Caption" }, + { 122,"Caption Writer" }, + { 200,"Custom Field 1" }, + { 201,"Custom Field 2" }, + { 202,"Custom Field 3" }, + { 203,"Custom Field 4" }, + { 204,"Custom Field 5" }, + { 205,"Custom Field 6" }, + { 206,"Custom Field 7" }, + { 207,"Custom Field 8" }, + { 208,"Custom Field 9" }, + { 209,"Custom Field 10" }, + { 210,"Custom Field 11" }, + { 211,"Custom Field 12" }, + { 212,"Custom Field 13" }, + { 213,"Custom Field 14" }, + { 214,"Custom Field 15" }, + { 215,"Custom Field 16" }, + { 216,"Custom Field 17" }, + { 217,"Custom Field 18" }, + { 218,"Custom Field 19" }, + { 219,"Custom Field 20" } }; /* @@ -129,7 +127,7 @@ typedef struct _html_code short len; const char - *code, + *code, val; } html_code; @@ -157,19 +155,19 @@ int convertHTMLcodes(char *s, int len) int val, o; if (sscanf(s,"&#%d;",&val) == 1) - { - o = 3; - while (s[o] != ';') { - o++; - if (o > 5) - break; + o = 3; + while (s[o] != ';') + { + o++; + if (o > 5) + break; + } + if (o < 5) + strcpy(s+1, s+1+o); + *s = val; + return o; } - if (o < 5) - strcpy(s+1, s+1+o); - *s = val; - return o; - } } else { @@ -178,15 +176,15 @@ int convertHTMLcodes(char *s, int len) codes = sizeof(html_codes) / sizeof(html_code); for (i=0; i < codes; i++) - { - if (html_codes[i].len <= len) - if (STRNICMP(s, html_codes[i].code, html_codes[i].len) == 0) - { - strcpy(s+1, s+html_codes[i].len); - *s = html_codes[i].val; - return html_codes[i].len-1; - } - } + { + if (html_codes[i].len <= len) + if (STRNICMP(s, html_codes[i].code, html_codes[i].len) == 0) + { + strcpy(s+1, s+html_codes[i].len); + *s = html_codes[i].val; + return html_codes[i].len-1; + } + } } return 0; @@ -198,10 +196,6 @@ int formatIPTC(FILE *ifile, FILE *ofile) foundiptc, tagsfound; - unsigned char - recnum, - dataset; - char *readable, *str; @@ -214,104 +208,119 @@ int formatIPTC(FILE *ifile, FILE *ofile) i, tagcount = sizeof(tags) / sizeof(tag_spec); - char - c; + int + c, + dataset, + recnum; foundiptc = 0; /* found the IPTC-Header */ tagsfound = 0; /* number of tags found */ c = getc(ifile); while (c != EOF) - { - if (c == 0x1c) - foundiptc = 1; - else - { - if (foundiptc) - return -1; - else - continue; - } - - /* we found the 0x1c tag and now grab the dataset and record number tags */ - dataset = getc(ifile); - if ((char) dataset == EOF) - return -1; - recnum = getc(ifile); - if ((char) recnum == EOF) - return -1; - /* try to match this record to one of the ones in our named table */ - for (i=0; i< tagcount; i++) { - if (tags[i].id == recnum) - break; - } - if (i < tagcount) - readable = tags[i].name; - else - readable = ""; - - /* then we decode the length of the block that follows - long or short fmt */ - c = getc(ifile); - if (c == EOF) - return 0; - if (c & (unsigned char) 0x80) - { - unsigned char - buffer[4]; - - for (i=0; i<4; i++) + if (c == 0x1c) + foundiptc = 1; + else { - c = buffer[i] = getc(ifile); - if (c == EOF) - return -1; + if (foundiptc) + { + return -1; + } + else + { + c = getc(ifile); + continue; + } } - taglen = (((long) buffer[ 0 ]) << 24) | - (((long) buffer[ 1 ]) << 16) | - (((long) buffer[ 2 ]) << 8) | - (((long) buffer[ 3 ])); - } - else - { - unsigned char - x = c; - taglen = ((long) x) << 8; - x = getc(ifile); - if ((char)x == EOF) - return -1; - taglen |= (long) x; - } - /* make a buffer to hold the tag data and snag it from the input stream */ - str = (char *) malloc((unsigned int) (taglen+1)); - if (str == (char *) NULL) - { - printf("Memory allocation failed"); - return 0; - } - for (tagindx=0; tagindx 1048576)) + { + printf("Inappropriate IPTC tag length %ld\n",taglen); return -1; - } + } + /* make a buffer to hold the tag data and snag it from the input stream */ + str = (char *) malloc((unsigned int) (taglen+1)); + if (str == (char *) NULL) + { + printf("Memory allocation failed"); + return 0; + } + for (tagindx=0; tagindx 0) + fprintf(ofile, "%d#%d#%s=",(unsigned int)dataset, (unsigned int) recnum, readable); + else + fprintf(ofile, "%d#%d=",(unsigned int)dataset, (unsigned int) recnum); + formatString( ofile, str, taglen ); + free(str); + + tagsfound++; + + c = getc(ifile); } - str[ taglen ] = 0; - - /* now finish up by formatting this binary data into ASCII equivalent */ - if (strlen(readable) > 0) - fprintf(ofile, "%d#%d#%s=",(unsigned int)dataset, (unsigned int) recnum, readable); - else - fprintf(ofile, "%d#%d=",(unsigned int)dataset, (unsigned int) recnum); - formatString( ofile, str, taglen ); - free(str); - - tagsfound++; - - c = getc(ifile); - } return tagsfound; } @@ -330,24 +339,24 @@ char *super_fgets(char *b, int *blen, FILE *file) len=*blen; for (q=b; ; q++) - { - c=fgetc(file); - if (c == EOF || c == '\n') - break; - if (((long)q - (long)b + 1 ) >= (long) len) - { - long - tlen; + { + c=fgetc(file); + if (c == EOF || c == '\n') + break; + if (((long)q - (long)b + 1 ) >= (long) len) + { + long + tlen; - tlen=(long)q-(long)b; - len<<=1; - b=(char *) realloc((char *) b,(len+2)); - if ((char *) b == (char *) NULL) - break; - q=b+tlen; - } - *q=(unsigned char) c; - } + tlen=(long)q-(long)b; + len<<=1; + b=(char *) realloc((char *) b,(len+2)); + if ((char *) b == (char *) NULL) + break; + q=b+tlen; + } + *q=(unsigned char) c; + } *blen=0; if ((unsigned char *)b != (unsigned char *) NULL) { @@ -367,11 +376,11 @@ char *super_fgets(char *b, int *blen, FILE *file) int main(int argc, char *argv[]) { - unsigned int - length; + /* unsigned int */ + /* length; */ - unsigned char - *buffer; + /*unsigned char + *buffer;*/ int i, @@ -388,68 +397,68 @@ int main(int argc, char *argv[]) if( argc < 2 ) { puts(usage); - return 1; + return 1; } mode = 0; - length = -1; - buffer = (unsigned char *)NULL; + /* length = -1; */ + /* buffer = (unsigned char *)NULL; */ for (i=1; i 0) + state=0; + next=0; + while(tokenizer(0, newstr, inputlen, token, "", "#", "", 0, + &brkused, &next, "ed)==0) { - char - *s = &token[next-1]; - - len -= convertHTMLcodes(s, strlen(s)); + if (state == 0) + dataset = (unsigned char) atoi(newstr); + else + if (state == 1) + recnum = (unsigned char) atoi(newstr); + state++; } } + else + if (state == 1) + { + int + next; - fputc(0x1c, ofile); - fputc(dataset, ofile); - fputc(recnum, ofile); - if (len < 0x10000) - { - fputc((len >> 8) & 255, ofile); - fputc(len & 255, ofile); + unsigned long + len; + + char + brkused, + quoted; + + next=0; + len = strlen(token); + while(tokenizer(0, newstr, inputlen, token, "", "&", "", 0, + &brkused, &next, "ed)==0) + { + if (brkused && next > 0) + { + char + *s = &token[next-1]; + + len -= convertHTMLcodes(s, strlen(s)); + } + } + + fputc(0x1c, ofile); + fputc(dataset, ofile); + fputc(recnum, ofile); + if (len < 0x10000) + { + fputc((len >> 8) & 255, ofile); + fputc(len & 255, ofile); + } + else + { + fputc(((len >> 24) & 255) | 0x80, ofile); + fputc((len >> 16) & 255, ofile); + fputc((len >> 8) & 255, ofile); + fputc(len & 255, ofile); + } + next=0; + while (len--) + fputc(token[next++], ofile); } - else - { - fputc(((len >> 24) & 255) | 0x80, ofile); - fputc((len >> 16) & 255, ofile); - fputc((len >> 8) & 255, ofile); - fputc(len & 255, ofile); - } - next=0; - while (len--) - fputc(token[next++], ofile); - } - state++; + state++; + } + free(token); + token = (char *)NULL; + free(newstr); + newstr = (char *)NULL; } - free(token); - token = (char *)NULL; - free(newstr); - newstr = (char *)NULL; - } free(line); fclose( ifile ); @@ -773,7 +782,7 @@ int sindex(char ch,char *string) char *cp; for(cp=string;*cp;++cp) if(ch==*cp) - return (int)(cp-string); /* return postion of character */ + return (int)(cp-string); /* return position of character */ return -1; /* eol ... no match found */ } @@ -783,32 +792,32 @@ void chstore(char *string,int max,char ch) { char c; if(_p_tokpos>=0&&_p_tokpos=0) /* break */ { - switch(_p_state) - { + if((qp=sindex(c,brkchar))>=0) /* break */ + { + switch(_p_state) + { case IN_WHITE: /* these are the same here ... */ case IN_TOKEN: /* ... just get out */ case IN_OZONE: /* ditto */ @@ -839,12 +848,12 @@ int tokenizer(unsigned inflag,char *token,int tokmax,char *line, case IN_QUOTE: /* just keep going */ chstore(token,tokmax,c); break; - } - } - else if((qp=sindex(c,quote))>=0) /* quote */ - { - switch(_p_state) - { + } + } + else if((qp=sindex(c,quote))>=0) /* quote */ + { + switch(_p_state) + { case IN_WHITE: /* these are identical, */ _p_state=IN_QUOTE; /* change states */ _p_curquote=quote[qp]; /* save quote char */ @@ -853,10 +862,10 @@ int tokenizer(unsigned inflag,char *token,int tokmax,char *line, case IN_QUOTE: if(quote[qp]==_p_curquote) /* same as the beginning quote? */ - { - _p_state=IN_OZONE; - _p_curquote=0; - } + { + _p_state=IN_OZONE; + _p_curquote=0; + } else chstore(token,tokmax,c); /* treat as regular char */ break; @@ -865,12 +874,12 @@ int tokenizer(unsigned inflag,char *token,int tokmax,char *line, case IN_OZONE: *brkused=c; /* uses quote as break char */ goto byebye; - } - } - else if((qp=sindex(c,white))>=0) /* white */ - { - switch(_p_state) - { + } + } + else if((qp=sindex(c,white))>=0) /* white */ + { + switch(_p_state) + { case IN_WHITE: case IN_OZONE: break; /* keep going */ @@ -882,20 +891,20 @@ int tokenizer(unsigned inflag,char *token,int tokmax,char *line, case IN_QUOTE: chstore(token,tokmax,c); /* it's valid here */ break; - } - } - else if(c==eschar) /* escape */ - { - nc=line[(*next)+1]; - if(nc==0) /* end of line */ - { - *brkused=0; - chstore(token,tokmax,c); - ++(*next); - goto byebye; - } - switch(_p_state) - { + } + } + else if(c==eschar) /* escape */ + { + nc=line[(*next)+1]; + if(nc==0) /* end of line */ + { + *brkused=0; + chstore(token,tokmax,c); + ++(*next); + goto byebye; + } + switch(_p_state) + { case IN_WHITE: --(*next); _p_state=IN_TOKEN; @@ -909,14 +918,15 @@ int tokenizer(unsigned inflag,char *token,int tokmax,char *line, case IN_OZONE: goto byebye; - } - } - else /* anything else is just a real character */ - { - switch(_p_state) - { + } + } + else /* anything else is just a real character */ + { + switch(_p_state) + { case IN_WHITE: _p_state=IN_TOKEN; /* switch states */ + /* Fall through */ case IN_TOKEN: /* these 2 are */ case IN_QUOTE: /* identical here */ @@ -925,11 +935,11 @@ int tokenizer(unsigned inflag,char *token,int tokmax,char *line, case IN_OZONE: goto byebye; - } - } - } /* end of main loop */ + } + } + } /* end of main loop */ -byebye: + byebye: token[_p_tokpos]=0; /* make sure token ends with EOS */ return 0; @@ -937,7 +947,7 @@ byebye: /* * Local Variables: * mode: c - * c-basic-offset: 8 + * c-basic-offset: 2 * fill-column: 78 * End: */ diff --git a/thirdparty/tiff-4.0.3/contrib/iptcutil/test.iptc b/thirdparty/tiff-4.2.0/contrib/iptcutil/test.iptc similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/iptcutil/test.iptc rename to thirdparty/tiff-4.2.0/contrib/iptcutil/test.iptc diff --git a/thirdparty/tiff-4.0.3/contrib/iptcutil/test.txt b/thirdparty/tiff-4.2.0/contrib/iptcutil/test.txt similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/iptcutil/test.txt rename to thirdparty/tiff-4.2.0/contrib/iptcutil/test.txt diff --git a/thirdparty/tiff-4.2.0/contrib/mfs/CMakeLists.txt b/thirdparty/tiff-4.2.0/contrib/mfs/CMakeLists.txt new file mode 100644 index 00000000..3f4f3a90 --- /dev/null +++ b/thirdparty/tiff-4.2.0/contrib/mfs/CMakeLists.txt @@ -0,0 +1,27 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +extra_dist( + README + mfs_file.c) diff --git a/thirdparty/tiff-4.0.3/contrib/mfs/Makefile.am b/thirdparty/tiff-4.2.0/contrib/mfs/Makefile.am similarity index 95% rename from thirdparty/tiff-4.0.3/contrib/mfs/Makefile.am rename to thirdparty/tiff-4.2.0/contrib/mfs/Makefile.am index fb8a07e2..b0bad60a 100644 --- a/thirdparty/tiff-4.0.3/contrib/mfs/Makefile.am +++ b/thirdparty/tiff-4.2.0/contrib/mfs/Makefile.am @@ -23,5 +23,7 @@ # Process this file with automake to produce Makefile.in. -EXTRA_DIST = README mfs_file.c - +EXTRA_DIST = \ + CMakeLists.txt \ + README \ + mfs_file.c diff --git a/thirdparty/tiff-4.0.3/contrib/mfs/Makefile.in b/thirdparty/tiff-4.2.0/contrib/mfs/Makefile.in similarity index 80% rename from thirdparty/tiff-4.0.3/contrib/mfs/Makefile.in rename to thirdparty/tiff-4.2.0/contrib/mfs/Makefile.in index 37ac4c25..0ed2019c 100644 --- a/thirdparty/tiff-4.0.3/contrib/mfs/Makefile.in +++ b/thirdparty/tiff-4.2.0/contrib/mfs/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -39,23 +39,61 @@ # Process this file with automake to produce Makefile.in. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -75,8 +113,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = contrib/mfs -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -84,7 +120,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = @@ -108,6 +145,8 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -121,6 +160,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -168,6 +208,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -255,7 +296,11 @@ tiff_libs_private = @tiff_libs_private@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = README mfs_file.c +EXTRA_DIST = \ + CMakeLists.txt \ + README \ + mfs_file.c + all: all-am .SUFFIXES: @@ -271,14 +316,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/mfs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign contrib/mfs/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -295,16 +339,17 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -437,15 +482,18 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/thirdparty/tiff-4.0.3/contrib/mfs/README b/thirdparty/tiff-4.2.0/contrib/mfs/README similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/mfs/README rename to thirdparty/tiff-4.2.0/contrib/mfs/README diff --git a/thirdparty/tiff-4.0.3/contrib/mfs/mfs_file.c b/thirdparty/tiff-4.2.0/contrib/mfs/mfs_file.c similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/mfs/mfs_file.c rename to thirdparty/tiff-4.2.0/contrib/mfs/mfs_file.c diff --git a/thirdparty/tiff-4.2.0/contrib/pds/CMakeLists.txt b/thirdparty/tiff-4.2.0/contrib/pds/CMakeLists.txt new file mode 100644 index 00000000..53a0e056 --- /dev/null +++ b/thirdparty/tiff-4.2.0/contrib/pds/CMakeLists.txt @@ -0,0 +1,30 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +extra_dist( + README + tif_imageiter.c + tif_imageiter.h + tif_pdsdirread.c + tif_pdsdirwrite.c) diff --git a/thirdparty/tiff-4.2.0/contrib/pds/Makefile.am b/thirdparty/tiff-4.2.0/contrib/pds/Makefile.am new file mode 100644 index 00000000..435e2b33 --- /dev/null +++ b/thirdparty/tiff-4.2.0/contrib/pds/Makefile.am @@ -0,0 +1,32 @@ +# Tag Image File Format (TIFF) Software +# +# Copyright (C) 2004, Andrey Kiselev +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +# Process this file with automake to produce Makefile.in. + +EXTRA_DIST = \ + CMakeLists.txt \ + README \ + tif_imageiter.c \ + tif_imageiter.h \ + tif_pdsdirread.c \ + tif_pdsdirwrite.c diff --git a/thirdparty/tiff-4.0.3/contrib/pds/Makefile.in b/thirdparty/tiff-4.2.0/contrib/pds/Makefile.in similarity index 80% rename from thirdparty/tiff-4.0.3/contrib/pds/Makefile.in rename to thirdparty/tiff-4.2.0/contrib/pds/Makefile.in index ddcab31b..77b02179 100644 --- a/thirdparty/tiff-4.0.3/contrib/pds/Makefile.in +++ b/thirdparty/tiff-4.2.0/contrib/pds/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -39,23 +39,61 @@ # Process this file with automake to produce Makefile.in. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -75,8 +113,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = contrib/pds -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -84,7 +120,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = @@ -108,6 +145,8 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -121,6 +160,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -168,6 +208,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -255,7 +296,14 @@ tiff_libs_private = @tiff_libs_private@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = README tif_imageiter.c tif_imageiter.h tif_pdsdirread.c tif_pdsdirwrite.c +EXTRA_DIST = \ + CMakeLists.txt \ + README \ + tif_imageiter.c \ + tif_imageiter.h \ + tif_pdsdirread.c \ + tif_pdsdirwrite.c + all: all-am .SUFFIXES: @@ -271,14 +319,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/pds/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign contrib/pds/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -295,16 +342,17 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -437,15 +485,18 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/thirdparty/tiff-4.0.3/contrib/pds/README b/thirdparty/tiff-4.2.0/contrib/pds/README similarity index 98% rename from thirdparty/tiff-4.0.3/contrib/pds/README rename to thirdparty/tiff-4.2.0/contrib/pds/README index b9abc6b3..a36b0549 100644 --- a/thirdparty/tiff-4.0.3/contrib/pds/README +++ b/thirdparty/tiff-4.2.0/contrib/pds/README @@ -30,7 +30,7 @@ Your ReadRGBA() routine works well for reading many different formats (TILED, STIP, compressed or not, etc.) of the most basic types of data (RGB, 8-bit greyscale, 8-bit colormapped) into an SGI-style data array, and serves as a good template for users with other needs. I used it as -an exmaple of how to make an iterator which, rather than fill a data +an example of how to make an iterator which, rather than fill a data array, calls an arbitrary user-supplied callback function for each "chunk" of data - that "chunk" might be a strip or a tile, and might have one sample-per-pixel or two, and might be 8-bit data or 16-bit or diff --git a/thirdparty/tiff-4.0.3/contrib/pds/tif_imageiter.c b/thirdparty/tiff-4.2.0/contrib/pds/tif_imageiter.c similarity index 98% rename from thirdparty/tiff-4.0.3/contrib/pds/tif_imageiter.c rename to thirdparty/tiff-4.2.0/contrib/pds/tif_imageiter.c index e025dc52..243cfd65 100644 --- a/thirdparty/tiff-4.0.3/contrib/pds/tif_imageiter.c +++ b/thirdparty/tiff-4.2.0/contrib/pds/tif_imageiter.c @@ -1,5 +1,3 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/contrib/pds/tif_imageiter.c,v 1.4 2010-06-08 18:55:15 bfriesen Exp $ */ - /* * Copyright (c) 1991-1996 Sam Leffler * Copyright (c) 1991-1996 Silicon Graphics, Inc. @@ -116,7 +114,7 @@ TIFFImageIterBegin(TIFFImageIter* img, TIFF* tif, int stop, char emsg[1024]) TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Missing required \"Colormap\" tag"); return (0); } - /* fall thru... */ + /* fall through... */ case PHOTOMETRIC_MINISWHITE: case PHOTOMETRIC_MINISBLACK: /* This should work now so skip the check - BSR @@ -183,7 +181,7 @@ TIFFImageIterBegin(TIFFImageIter* img, TIFF* tif, int stop, char emsg[1024]) case ORIENTATION_LEFTBOT: /* XXX */ TIFFWarning(TIFFFileName(tif), "using bottom-left orientation"); img->orientation = ORIENTATION_BOTLEFT; - /* fall thru... */ + /* fall through... */ case ORIENTATION_BOTLEFT: break; case ORIENTATION_TOPRIGHT: @@ -192,7 +190,7 @@ TIFFImageIterBegin(TIFFImageIter* img, TIFF* tif, int stop, char emsg[1024]) default: TIFFWarning(TIFFFileName(tif), "using top-left orientation"); img->orientation = ORIENTATION_TOPLEFT; - /* fall thru... */ + /* fall through... */ case ORIENTATION_TOPLEFT: break; } diff --git a/thirdparty/tiff-4.0.3/contrib/pds/tif_imageiter.h b/thirdparty/tiff-4.2.0/contrib/pds/tif_imageiter.h similarity index 98% rename from thirdparty/tiff-4.0.3/contrib/pds/tif_imageiter.h rename to thirdparty/tiff-4.2.0/contrib/pds/tif_imageiter.h index e7dbe46c..4f4fd279 100644 --- a/thirdparty/tiff-4.0.3/contrib/pds/tif_imageiter.h +++ b/thirdparty/tiff-4.2.0/contrib/pds/tif_imageiter.h @@ -44,7 +44,7 @@ struct _TIFFImageIter { uint16 samplesperpixel; /* image samples/pixel */ uint16 orientation; /* image orientation */ uint16 photometric; /* image photometric interp */ - uint16* redcmap; /* colormap pallete */ + uint16* redcmap; /* colormap palette */ uint16* greencmap; uint16* bluecmap; /* get image data routine */ diff --git a/thirdparty/tiff-4.0.3/contrib/pds/tif_pdsdirread.c b/thirdparty/tiff-4.2.0/contrib/pds/tif_pdsdirread.c similarity index 99% rename from thirdparty/tiff-4.0.3/contrib/pds/tif_pdsdirread.c rename to thirdparty/tiff-4.2.0/contrib/pds/tif_pdsdirread.c index 37e513ae..cc6231da 100644 --- a/thirdparty/tiff-4.0.3/contrib/pds/tif_pdsdirread.c +++ b/thirdparty/tiff-4.2.0/contrib/pds/tif_pdsdirread.c @@ -1,5 +1,3 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/contrib/pds/tif_pdsdirread.c,v 1.4 2010-06-08 18:55:15 bfriesen Exp $ */ - /* * Copyright (c) 1988-1996 Sam Leffler * Copyright (c) 1991-1996 Silicon Graphics, Inc. @@ -194,7 +192,7 @@ TIFFReadPrivateDataSubDirectory(TIFF* tif, toff_t pdir_offset, * the fields to check type and tag information, * and to extract info required to size data * structures. A second pass is made afterwards - * to read in everthing not taken in the first pass. + * to read in everything not taken in the first pass. */ td = &tif->tif_dir; @@ -827,7 +825,7 @@ TIFFFetchNormalSubTag(TIFF* tif, TIFFDirEntry* dp, const TIFFFieldInfo* fip, break; } } - /* fall thru... */ + /* fall through... */ case TIFF_LONG: case TIFF_SLONG: { uint32 v32 = diff --git a/thirdparty/tiff-4.0.3/contrib/pds/tif_pdsdirwrite.c b/thirdparty/tiff-4.2.0/contrib/pds/tif_pdsdirwrite.c similarity index 99% rename from thirdparty/tiff-4.0.3/contrib/pds/tif_pdsdirwrite.c rename to thirdparty/tiff-4.2.0/contrib/pds/tif_pdsdirwrite.c index 3c632da6..a670bda1 100644 --- a/thirdparty/tiff-4.0.3/contrib/pds/tif_pdsdirwrite.c +++ b/thirdparty/tiff-4.2.0/contrib/pds/tif_pdsdirwrite.c @@ -1,5 +1,3 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/contrib/pds/tif_pdsdirwrite.c,v 1.4 2010-06-08 18:55:15 bfriesen Exp $ */ - /* When writing data to TIFF files, it is often useful to store application- specific data in a private TIFF directory so that the tags don't need to be registered and won't conflict with other people's user-defined tags. diff --git a/thirdparty/tiff-4.2.0/contrib/ras/CMakeLists.txt b/thirdparty/tiff-4.2.0/contrib/ras/CMakeLists.txt new file mode 100644 index 00000000..b19a04fa --- /dev/null +++ b/thirdparty/tiff-4.2.0/contrib/ras/CMakeLists.txt @@ -0,0 +1,28 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +extra_dist( + README + ras2tif.c + tif2ras.c) diff --git a/thirdparty/tiff-4.0.3/contrib/stream/Makefile.am b/thirdparty/tiff-4.2.0/contrib/ras/Makefile.am similarity index 94% rename from thirdparty/tiff-4.0.3/contrib/stream/Makefile.am rename to thirdparty/tiff-4.2.0/contrib/ras/Makefile.am index 1e7a8dab..26617edf 100644 --- a/thirdparty/tiff-4.0.3/contrib/stream/Makefile.am +++ b/thirdparty/tiff-4.2.0/contrib/ras/Makefile.am @@ -23,5 +23,8 @@ # Process this file with automake to produce Makefile.in. -EXTRA_DIST = README tiffstream.cpp tiffstream.h - +EXTRA_DIST = \ + CMakeLists.txt \ + README \ + ras2tif.c \ + tif2ras.c diff --git a/thirdparty/tiff-4.0.3/contrib/ras/Makefile.in b/thirdparty/tiff-4.2.0/contrib/ras/Makefile.in similarity index 80% rename from thirdparty/tiff-4.0.3/contrib/ras/Makefile.in rename to thirdparty/tiff-4.2.0/contrib/ras/Makefile.in index 602ae864..dac37b63 100644 --- a/thirdparty/tiff-4.0.3/contrib/ras/Makefile.in +++ b/thirdparty/tiff-4.2.0/contrib/ras/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -39,23 +39,61 @@ # Process this file with automake to produce Makefile.in. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -75,8 +113,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = contrib/ras -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -84,7 +120,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = @@ -108,6 +145,8 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -121,6 +160,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -168,6 +208,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -255,7 +296,12 @@ tiff_libs_private = @tiff_libs_private@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = README ras2tif.c tif2ras.c +EXTRA_DIST = \ + CMakeLists.txt \ + README \ + ras2tif.c \ + tif2ras.c + all: all-am .SUFFIXES: @@ -271,14 +317,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/ras/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign contrib/ras/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -295,16 +340,17 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -437,15 +483,18 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/thirdparty/tiff-4.0.3/contrib/ras/README b/thirdparty/tiff-4.2.0/contrib/ras/README similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/ras/README rename to thirdparty/tiff-4.2.0/contrib/ras/README diff --git a/thirdparty/tiff-4.0.3/contrib/ras/ras2tif.c b/thirdparty/tiff-4.2.0/contrib/ras/ras2tif.c similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/ras/ras2tif.c rename to thirdparty/tiff-4.2.0/contrib/ras/ras2tif.c diff --git a/thirdparty/tiff-4.0.3/contrib/ras/tif2ras.c b/thirdparty/tiff-4.2.0/contrib/ras/tif2ras.c similarity index 98% rename from thirdparty/tiff-4.0.3/contrib/ras/tif2ras.c rename to thirdparty/tiff-4.2.0/contrib/ras/tif2ras.c index e1c321df..79db104e 100644 --- a/thirdparty/tiff-4.0.3/contrib/ras/tif2ras.c +++ b/thirdparty/tiff-4.2.0/contrib/ras/tif2ras.c @@ -1,6 +1,3 @@ -#ifndef lint -static char id[] = "$Id: tif2ras.c,v 1.3 2010-06-08 18:55:15 bfriesen Exp $"; -#endif /*- * tif2ras.c - Converts from a Tagged Image File Format image to a Sun Raster. * diff --git a/thirdparty/tiff-4.2.0/contrib/stream/CMakeLists.txt b/thirdparty/tiff-4.2.0/contrib/stream/CMakeLists.txt new file mode 100644 index 00000000..c874ff64 --- /dev/null +++ b/thirdparty/tiff-4.2.0/contrib/stream/CMakeLists.txt @@ -0,0 +1,28 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +extra_dist( + README + tiffstream.cpp + tiffstream.h) diff --git a/thirdparty/tiff-4.0.3/contrib/tags/Makefile.am b/thirdparty/tiff-4.2.0/contrib/stream/Makefile.am similarity index 94% rename from thirdparty/tiff-4.0.3/contrib/tags/Makefile.am rename to thirdparty/tiff-4.2.0/contrib/stream/Makefile.am index 9d92444f..0324e865 100644 --- a/thirdparty/tiff-4.0.3/contrib/tags/Makefile.am +++ b/thirdparty/tiff-4.2.0/contrib/stream/Makefile.am @@ -23,5 +23,8 @@ # Process this file with automake to produce Makefile.in. -EXTRA_DIST = README listtif.c maketif.c xtif_dir.c xtiffio.h xtiffiop.h - +EXTRA_DIST = \ + CMakeLists.txt \ + README \ + tiffstream.cpp \ + tiffstream.h diff --git a/thirdparty/tiff-4.0.3/contrib/stream/Makefile.in b/thirdparty/tiff-4.2.0/contrib/stream/Makefile.in similarity index 80% rename from thirdparty/tiff-4.0.3/contrib/stream/Makefile.in rename to thirdparty/tiff-4.2.0/contrib/stream/Makefile.in index 67d5f93e..5f7f1eba 100644 --- a/thirdparty/tiff-4.0.3/contrib/stream/Makefile.in +++ b/thirdparty/tiff-4.2.0/contrib/stream/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -39,23 +39,61 @@ # Process this file with automake to produce Makefile.in. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -75,8 +113,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = contrib/stream -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -84,7 +120,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = @@ -108,6 +145,8 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -121,6 +160,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -168,6 +208,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -255,7 +296,12 @@ tiff_libs_private = @tiff_libs_private@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = README tiffstream.cpp tiffstream.h +EXTRA_DIST = \ + CMakeLists.txt \ + README \ + tiffstream.cpp \ + tiffstream.h + all: all-am .SUFFIXES: @@ -271,14 +317,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/stream/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign contrib/stream/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -295,16 +340,17 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -437,15 +483,18 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/thirdparty/tiff-4.0.3/contrib/stream/README b/thirdparty/tiff-4.2.0/contrib/stream/README similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/stream/README rename to thirdparty/tiff-4.2.0/contrib/stream/README diff --git a/thirdparty/tiff-4.0.3/contrib/stream/tiffstream.cpp b/thirdparty/tiff-4.2.0/contrib/stream/tiffstream.cpp similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/stream/tiffstream.cpp rename to thirdparty/tiff-4.2.0/contrib/stream/tiffstream.cpp diff --git a/thirdparty/tiff-4.0.3/contrib/stream/tiffstream.h b/thirdparty/tiff-4.2.0/contrib/stream/tiffstream.h similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/stream/tiffstream.h rename to thirdparty/tiff-4.2.0/contrib/stream/tiffstream.h diff --git a/thirdparty/tiff-4.2.0/contrib/tags/CMakeLists.txt b/thirdparty/tiff-4.2.0/contrib/tags/CMakeLists.txt new file mode 100644 index 00000000..9945da76 --- /dev/null +++ b/thirdparty/tiff-4.2.0/contrib/tags/CMakeLists.txt @@ -0,0 +1,32 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +extra_dist( + README + listtif.c + maketif.c + xtif_dir.c + xtiffio.h + xtiffiop.h) + diff --git a/thirdparty/tiff-4.0.3/contrib/pds/Makefile.am b/thirdparty/tiff-4.2.0/contrib/tags/Makefile.am similarity index 92% rename from thirdparty/tiff-4.0.3/contrib/pds/Makefile.am rename to thirdparty/tiff-4.2.0/contrib/tags/Makefile.am index b3c145d5..67d99679 100644 --- a/thirdparty/tiff-4.0.3/contrib/pds/Makefile.am +++ b/thirdparty/tiff-4.2.0/contrib/tags/Makefile.am @@ -23,5 +23,11 @@ # Process this file with automake to produce Makefile.in. -EXTRA_DIST = README tif_imageiter.c tif_imageiter.h tif_pdsdirread.c tif_pdsdirwrite.c - +EXTRA_DIST = \ + CMakeLists.txt \ + README \ + listtif.c \ + maketif.c \ + xtif_dir.c \ + xtiffio.h \ + xtiffiop.h diff --git a/thirdparty/tiff-4.0.3/contrib/tags/Makefile.in b/thirdparty/tiff-4.2.0/contrib/tags/Makefile.in similarity index 80% rename from thirdparty/tiff-4.0.3/contrib/tags/Makefile.in rename to thirdparty/tiff-4.2.0/contrib/tags/Makefile.in index f3261501..502d8f05 100644 --- a/thirdparty/tiff-4.0.3/contrib/tags/Makefile.in +++ b/thirdparty/tiff-4.2.0/contrib/tags/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -39,23 +39,61 @@ # Process this file with automake to produce Makefile.in. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -75,8 +113,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = contrib/tags -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -84,7 +120,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = @@ -108,6 +145,8 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -121,6 +160,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -168,6 +208,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -255,7 +296,15 @@ tiff_libs_private = @tiff_libs_private@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = README listtif.c maketif.c xtif_dir.c xtiffio.h xtiffiop.h +EXTRA_DIST = \ + CMakeLists.txt \ + README \ + listtif.c \ + maketif.c \ + xtif_dir.c \ + xtiffio.h \ + xtiffiop.h + all: all-am .SUFFIXES: @@ -271,14 +320,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/tags/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign contrib/tags/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -295,16 +343,17 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -437,15 +486,18 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/thirdparty/tiff-4.0.3/contrib/tags/README b/thirdparty/tiff-4.2.0/contrib/tags/README similarity index 98% rename from thirdparty/tiff-4.0.3/contrib/tags/README rename to thirdparty/tiff-4.2.0/contrib/tags/README index 73c6c213..3220b7b1 100644 --- a/thirdparty/tiff-4.0.3/contrib/tags/README +++ b/thirdparty/tiff-4.2.0/contrib/tags/README @@ -2,7 +2,7 @@ NOTE: Sept/2004 The following described approach to managing tag extensions has been -mostly superceeded since libtiff 3.6.0. The described approach requires +mostly superseded since libtiff 3.6.0. The described approach requires internal knowledge of the libtiff API and tends to be very fragile in the face of libtiff upgrades. diff --git a/thirdparty/tiff-4.0.3/contrib/tags/listtif.c b/thirdparty/tiff-4.2.0/contrib/tags/listtif.c similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/tags/listtif.c rename to thirdparty/tiff-4.2.0/contrib/tags/listtif.c diff --git a/thirdparty/tiff-4.0.3/contrib/tags/maketif.c b/thirdparty/tiff-4.2.0/contrib/tags/maketif.c similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/tags/maketif.c rename to thirdparty/tiff-4.2.0/contrib/tags/maketif.c diff --git a/thirdparty/tiff-4.0.3/contrib/tags/xtif_dir.c b/thirdparty/tiff-4.2.0/contrib/tags/xtif_dir.c similarity index 99% rename from thirdparty/tiff-4.0.3/contrib/tags/xtif_dir.c rename to thirdparty/tiff-4.2.0/contrib/tags/xtif_dir.c index e67a6abf..35295526 100644 --- a/thirdparty/tiff-4.0.3/contrib/tags/xtif_dir.c +++ b/thirdparty/tiff-4.2.0/contrib/tags/xtif_dir.c @@ -269,7 +269,7 @@ _XTIFFDefaultDirectory(TIFF *tif) * Install into TIFF structure. */ TIFFMEMBER(tif,clientdir) = (tidata_t)xt; - tif->tif_flags |= XTIFF_INITIALIZED; /* dont do this again! */ + tif->tif_flags |= XTIFF_INITIALIZED; /* don't do this again! */ } /* set up our own defaults */ diff --git a/thirdparty/tiff-4.0.3/contrib/tags/xtiffio.h b/thirdparty/tiff-4.2.0/contrib/tags/xtiffio.h similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/tags/xtiffio.h rename to thirdparty/tiff-4.2.0/contrib/tags/xtiffio.h diff --git a/thirdparty/tiff-4.0.3/contrib/tags/xtiffiop.h b/thirdparty/tiff-4.2.0/contrib/tags/xtiffiop.h similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/tags/xtiffiop.h rename to thirdparty/tiff-4.2.0/contrib/tags/xtiffiop.h diff --git a/thirdparty/tiff-4.2.0/contrib/win_dib/CMakeLists.txt b/thirdparty/tiff-4.2.0/contrib/win_dib/CMakeLists.txt new file mode 100644 index 00000000..11d124f5 --- /dev/null +++ b/thirdparty/tiff-4.2.0/contrib/win_dib/CMakeLists.txt @@ -0,0 +1,30 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +extra_dist( + Makefile.w95 + README.Tiffile + README.tiff2dib + Tiffile.cpp + tiff2dib.c) diff --git a/thirdparty/tiff-4.0.3/contrib/ras/Makefile.am b/thirdparty/tiff-4.2.0/contrib/win_dib/Makefile.am similarity index 91% rename from thirdparty/tiff-4.0.3/contrib/ras/Makefile.am rename to thirdparty/tiff-4.2.0/contrib/win_dib/Makefile.am index 94809447..50a1dab0 100644 --- a/thirdparty/tiff-4.0.3/contrib/ras/Makefile.am +++ b/thirdparty/tiff-4.2.0/contrib/win_dib/Makefile.am @@ -23,5 +23,10 @@ # Process this file with automake to produce Makefile.in. -EXTRA_DIST = README ras2tif.c tif2ras.c - +EXTRA_DIST = \ + CMakeLists.txt \ + Makefile.w95 \ + README.Tiffile \ + README.tiff2dib \ + Tiffile.cpp \ + tiff2dib.c diff --git a/thirdparty/tiff-4.0.3/contrib/win_dib/Makefile.in b/thirdparty/tiff-4.2.0/contrib/win_dib/Makefile.in similarity index 80% rename from thirdparty/tiff-4.0.3/contrib/win_dib/Makefile.in rename to thirdparty/tiff-4.2.0/contrib/win_dib/Makefile.in index b58adf64..fa3b2237 100644 --- a/thirdparty/tiff-4.0.3/contrib/win_dib/Makefile.in +++ b/thirdparty/tiff-4.2.0/contrib/win_dib/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -39,23 +39,61 @@ # Process this file with automake to produce Makefile.in. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -75,8 +113,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = contrib/win_dib -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -84,7 +120,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = @@ -108,6 +145,8 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -121,6 +160,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -168,6 +208,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -255,7 +296,14 @@ tiff_libs_private = @tiff_libs_private@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = Makefile.w95 README.Tiffile README.tiff2dib Tiffile.cpp tiff2dib.c +EXTRA_DIST = \ + CMakeLists.txt \ + Makefile.w95 \ + README.Tiffile \ + README.tiff2dib \ + Tiffile.cpp \ + tiff2dib.c + all: all-am .SUFFIXES: @@ -271,14 +319,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/win_dib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign contrib/win_dib/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -295,16 +342,17 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -437,15 +485,18 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/thirdparty/tiff-4.0.3/contrib/win_dib/Makefile.w95 b/thirdparty/tiff-4.2.0/contrib/win_dib/Makefile.w95 similarity index 97% rename from thirdparty/tiff-4.0.3/contrib/win_dib/Makefile.w95 rename to thirdparty/tiff-4.2.0/contrib/win_dib/Makefile.w95 index 3f461ef5..3f15e832 100644 --- a/thirdparty/tiff-4.0.3/contrib/win_dib/Makefile.w95 +++ b/thirdparty/tiff-4.2.0/contrib/win_dib/Makefile.w95 @@ -1,5 +1,3 @@ -# $Header: /usr/people/sam/tiff/libtiff/RCS/Makefile.w95,v 1.2 1994/11/28 -06:13:31 sam Exp $ # # Tag Image File Format Library # diff --git a/thirdparty/tiff-4.0.3/contrib/win_dib/README.Tiffile b/thirdparty/tiff-4.2.0/contrib/win_dib/README.Tiffile similarity index 100% rename from thirdparty/tiff-4.0.3/contrib/win_dib/README.Tiffile rename to thirdparty/tiff-4.2.0/contrib/win_dib/README.Tiffile diff --git a/thirdparty/tiff-4.0.3/contrib/win_dib/README.tiff2dib b/thirdparty/tiff-4.2.0/contrib/win_dib/README.tiff2dib similarity index 95% rename from thirdparty/tiff-4.0.3/contrib/win_dib/README.tiff2dib rename to thirdparty/tiff-4.2.0/contrib/win_dib/README.tiff2dib index 3e6075fb..ff70ca1a 100644 --- a/thirdparty/tiff-4.0.3/contrib/win_dib/README.tiff2dib +++ b/thirdparty/tiff-4.2.0/contrib/win_dib/README.tiff2dib @@ -40,7 +40,7 @@ it contain the function LoadTIFFinDIB that load a TIFF file and build a memory DIB with it and return the HANDLE (HDIB) of the memory bloc containing this DIB. Since DIB is the "natural" bitmap format for Windows 3.1, 95 and NT, -this function sould be usefull for some Windows 95 (or NT) developer. +this function should be useful for some Windows 95 (or NT) developer. Sorry for my approximate english ... diff --git a/thirdparty/tiff-4.0.3/contrib/win_dib/Tiffile.cpp b/thirdparty/tiff-4.2.0/contrib/win_dib/Tiffile.cpp similarity index 99% rename from thirdparty/tiff-4.0.3/contrib/win_dib/Tiffile.cpp rename to thirdparty/tiff-4.2.0/contrib/win_dib/Tiffile.cpp index 9d958b1c..2f7965d6 100644 --- a/thirdparty/tiff-4.0.3/contrib/win_dib/Tiffile.cpp +++ b/thirdparty/tiff-4.2.0/contrib/win_dib/Tiffile.cpp @@ -360,7 +360,7 @@ setorientation(TIFFRGBAImage* img, uint32 h) case ORIENTATION_LEFTBOT: /* XXX */ TIFFWarning(TIFFFileName(tif), "using bottom-left orientation"); img->orientation = ORIENTATION_BOTLEFT; - /* fall thru... */ + /* fall through... */ case ORIENTATION_BOTLEFT: y = 0; break; @@ -370,7 +370,7 @@ setorientation(TIFFRGBAImage* img, uint32 h) default: TIFFWarning(TIFFFileName(tif), "using top-left orientation"); img->orientation = ORIENTATION_TOPLEFT; - /* fall thru... */ + /* fall through... */ case ORIENTATION_TOPLEFT: y = h-1; break; diff --git a/thirdparty/tiff-4.0.3/contrib/win_dib/tiff2dib.c b/thirdparty/tiff-4.2.0/contrib/win_dib/tiff2dib.c similarity index 99% rename from thirdparty/tiff-4.0.3/contrib/win_dib/tiff2dib.c rename to thirdparty/tiff-4.2.0/contrib/win_dib/tiff2dib.c index 475ef304..2fa2de69 100644 --- a/thirdparty/tiff-4.0.3/contrib/win_dib/tiff2dib.c +++ b/thirdparty/tiff-4.2.0/contrib/win_dib/tiff2dib.c @@ -106,6 +106,8 @@ HDIB LoadTIFFinDIB(LPSTR lpFileName) if (lpDIB) lpBits = FindDIBBits((LPSTR) lpDIB); + else + lpBits = NULL; //In the tiff file the lines are save from up to down //In a DIB the lines must be save from down to up diff --git a/thirdparty/tiff-4.2.0/html/CMakeLists.txt b/thirdparty/tiff-4.2.0/html/CMakeLists.txt new file mode 100644 index 00000000..5f34e1e5 --- /dev/null +++ b/thirdparty/tiff-4.2.0/html/CMakeLists.txt @@ -0,0 +1,87 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +set(docfiles + addingtags.html + bugs.html + build.html + contrib.html + document.html + images.html + index.html + internals.html + intro.html + libtiff.html + misc.html + support.html + TIFFTechNote2.html + tools.html + v3.4beta007.html + v3.4beta016.html + v3.4beta018.html + v3.4beta024.html + v3.4beta028.html + v3.4beta029.html + v3.4beta031.html + v3.4beta032.html + v3.4beta033.html + v3.4beta034.html + v3.4beta035.html + v3.4beta036.html + v3.5.1.html + v3.5.2.html + v3.5.3.html + v3.5.4.html + v3.5.5.html + v3.5.6-beta.html + v3.5.7.html + v3.6.0.html + v3.6.1.html + v3.7.0alpha.html + v3.7.0beta.html + v3.7.0beta2.html + v3.7.0.html + v3.7.1.html + v3.7.2.html + v3.7.3.html + v3.7.4.html + v3.8.0.html + v3.8.1.html + v3.8.2.html + v3.9.0beta.html + v3.9.1.html + v3.9.2.html + v4.0.0.html + v4.0.1.html + v4.0.2.html + v4.0.3.html + v4.0.4beta.html) + +install(FILES ${docfiles} + DESTINATION "${LIBTIFF_DOCDIR}/html") + +add_subdirectory(images) +add_subdirectory(man) + +extra_dist(${docfiles}) diff --git a/thirdparty/tiff-4.0.3/html/Makefile.am b/thirdparty/tiff-4.2.0/html/Makefile.am similarity index 91% rename from thirdparty/tiff-4.0.3/html/Makefile.am rename to thirdparty/tiff-4.2.0/html/Makefile.am index 8cb6706c..2929b8ed 100644 --- a/thirdparty/tiff-4.0.3/html/Makefile.am +++ b/thirdparty/tiff-4.2.0/html/Makefile.am @@ -78,9 +78,22 @@ docfiles = \ v3.9.2.html \ v4.0.0.html \ v4.0.1.html \ - v4.0.2.html + v4.0.2.html \ + v4.0.3.html \ + v4.0.4beta.html \ + v4.0.4.html \ + v4.0.5.html \ + v4.0.6.html \ + v4.0.7.html \ + v4.0.8.html \ + v4.0.9.html \ + v4.0.10.html \ + v4.1.0.html \ + v4.2.0.html dist_doc_DATA = $(docfiles) SUBDIRS = images man +EXTRA_DIST = \ + CMakeLists.txt diff --git a/thirdparty/tiff-4.0.3/html/Makefile.in b/thirdparty/tiff-4.2.0/html/Makefile.in similarity index 79% rename from thirdparty/tiff-4.0.3/html/Makefile.in rename to thirdparty/tiff-4.2.0/html/Makefile.in index 9bb4c60a..b60e5cfa 100644 --- a/thirdparty/tiff-4.0.3/html/Makefile.in +++ b/thirdparty/tiff-4.2.0/html/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -41,23 +41,61 @@ # Process this file with automake to produce Makefile.in. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -77,8 +115,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = html -DIST_COMMON = $(dist_doc_DATA) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/config/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -86,7 +122,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(dist_doc_DATA) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = @@ -105,13 +143,14 @@ am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -148,12 +187,33 @@ am__installdirs = "$(DESTDIR)$(docdir)" DATA = $(dist_doc_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -192,6 +252,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -239,6 +300,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -378,10 +440,24 @@ docfiles = \ v3.9.2.html \ v4.0.0.html \ v4.0.1.html \ - v4.0.2.html + v4.0.2.html \ + v4.0.3.html \ + v4.0.4beta.html \ + v4.0.4.html \ + v4.0.5.html \ + v4.0.6.html \ + v4.0.7.html \ + v4.0.8.html \ + v4.0.9.html \ + v4.0.10.html \ + v4.1.0.html \ + v4.2.0.html dist_doc_DATA = $(docfiles) SUBDIRS = images man +EXTRA_DIST = \ + CMakeLists.txt + all: all-recursive .SUFFIXES: @@ -397,14 +473,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign html/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign html/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -449,14 +524,13 @@ uninstall-dist_docDATA: # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. -$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ @@ -477,31 +551,13 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done -cscopelist-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ - done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -517,12 +573,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -534,15 +585,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -551,9 +598,10 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive -cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -569,7 +617,10 @@ cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -728,24 +779,23 @@ ps-am: uninstall-am: uninstall-dist_docDATA -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \ - cscopelist-recursive ctags-recursive install-am install-strip \ - tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - cscopelist cscopelist-recursive ctags ctags-recursive \ - distclean distclean-generic distclean-libtool distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dist_docDATA \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_docDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-dist_docDATA + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-dist_docDATA + +.PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/thirdparty/tiff-4.0.3/html/TIFFTechNote2.html b/thirdparty/tiff-4.2.0/html/TIFFTechNote2.html similarity index 100% rename from thirdparty/tiff-4.0.3/html/TIFFTechNote2.html rename to thirdparty/tiff-4.2.0/html/TIFFTechNote2.html diff --git a/thirdparty/tiff-4.0.3/html/addingtags.html b/thirdparty/tiff-4.2.0/html/addingtags.html similarity index 96% rename from thirdparty/tiff-4.0.3/html/addingtags.html rename to thirdparty/tiff-4.2.0/html/addingtags.html index 452821c2..bd4b972a 100644 --- a/thirdparty/tiff-4.0.3/html/addingtags.html +++ b/thirdparty/tiff-4.2.0/html/addingtags.html @@ -1,18 +1,23 @@ + Modifying The TIFF Library + - - +

Defining New TIFF Tags

Libtiff has built-in knowledge of all the standard TIFF tags, as -well as extentions. The following describes how to add knowledge of +well as extensions. The following describes how to add knowledge of new tags as builtins to libtiff, or how to application specific tags can be used by applications without modifying libtiff.

@@ -113,7 +118,7 @@ their own tags to store information outside the core TIFF specification. This is done by calling TIFFMergeFieldInfo() with one or more TIFFFieldInfos.

-The libgeotiff library provides geospatial information extentions within +The libgeotiff library provides geospatial information extensions within a TIFF file. First, a set of TIFFFieldInfo's is prepared with information on the new tags:

@@ -198,8 +203,8 @@ If tag definitions are only required for writing custom tags, you can just call TIFFMergeFieldInfo() before setting new tags. The whole extender architecture can then be avoided.

-

Adding New Builtin Tags

- +

Adding New Builtin Tags

+

A similar approach is taken to the above. However, the TIFFFieldInfo should be added to the tiffFieldInfo[] list in tif_dirinfo.c. Ensure that new tags are added in sorted order by the tag number.

@@ -238,8 +243,8 @@ about data types. Use the typedefs (uint16, etc. when dealing with data on disk and t*_t when stuff is in memory) and be careful about passing items through printf or similar vararg interfaces. -

Adding New Codec-private Tags

- +

Adding New Codec-private Tags

+

To add tags that are meaningful only when a particular compression algorithm is used follow these steps: @@ -285,7 +290,7 @@ is room for, just increase FIELD_SETLONGS at the top of


-Last updated: $Date: 2004/09/10 14:43:18 $ +Last updated: $Date: 2016-09-25 20:05:44 $ diff --git a/thirdparty/tiff-4.0.3/html/bugs.html b/thirdparty/tiff-4.2.0/html/bugs.html similarity index 51% rename from thirdparty/tiff-4.0.3/html/bugs.html rename to thirdparty/tiff-4.2.0/html/bugs.html index f09b7550..a05a4659 100644 --- a/thirdparty/tiff-4.0.3/html/bugs.html +++ b/thirdparty/tiff-4.2.0/html/bugs.html @@ -1,11 +1,16 @@ + Bugs and the TIFF Mailing List + - - +

- +cover Bugs, Bugzilla, and the TIFF Mailing List

@@ -14,40 +19,39 @@ This software is free. Please let us know when you find a problem or fix a bug.

-Thanks to MapTools.org, libtiff now uses -bugzilla to track bugs. All bugs filed in the older bugzilla at +The project is using +GitLab issues since October 2019. +Previously, the project used MapTools.org +bugzilla to track bugs: remaining tickets in that bugzilla instance have been +migrated to GitLab issues. All bugs filed in a older bugzilla at bugzilla.remotesensing.org (pre April 2008) have unfortunately been lost.

If you think you've discovered a bug, please first check to see if it is -already known by looking at the list of already reported bugs. You can do so -by visiting the buglist at -http://bugzilla.maptools.org/buglist.cgi?product=libtiff. Also verify that -the problem is still reproducable with the current development software +already known by looking at the list of already reported bugs. Also verify that +the problem is still reproducible with the current development software from CVS.

If you'd like to enter a new bug, you can do so at -http://bugzilla.maptools.org/enter_bug.cgi?product=libtiff. +https://gitlab.com/libtiff/libtiff/issues/new.

If you'd like to inform us about some kind of security issue that should not be disclosed for a period of time, then you can contact maintainers directly. Send a copies of your report to the following people: Frank Warmerdam -<warmerdam@pobox.com>, -Andrey Kiselev -<dron@ak4719.spb.edu>. +<warmerdam@pobox.com> and +Bob Friesenhahn +<bfriesen@simple.dallas.tx.us>.

Of course, reporting bugs is no substitute for discussion. The -tiff@lists.maptools.org mailing +tiff@lists.osgeo.org mailing list is for users of this software, and discussion TIFF issues in general. It is managed with the Mailman software, and the web interface for subscribing and managing your access to the list is at:

- http://lists.maptools.org/mailman/listinfo/tiff

+ http://lists.osgeo.org/mailman/listinfo/tiff

Posts to the list are only accepted from members of the list in order -to limit the amount of spam propagated. Also, to be approved as a member -you will need to email the list administrator with a brief description of -why you are interested in TIFF so we can weed out spammers.

+to limit the amount of spam propagated.

A Long Term Archive including recent messages, and most messages back to 1993, @@ -58,6 +62,6 @@ Systems.


-Last updated: $Date: 2008/09/03 08:05:04 $ +Last updated: 2019-10-01 diff --git a/thirdparty/tiff-4.0.3/html/build.html b/thirdparty/tiff-4.2.0/html/build.html similarity index 62% rename from thirdparty/tiff-4.0.3/html/build.html rename to thirdparty/tiff-4.2.0/html/build.html index ad8e1893..4186645b 100644 --- a/thirdparty/tiff-4.0.3/html/build.html +++ b/thirdparty/tiff-4.2.0/html/build.html @@ -1,20 +1,23 @@ - Building the TIFF Software Distribution + - -

Building the Software Distribution

+ +

cramps +Building the Software Distribution


This chapter contains step-by-step instructions on how to configure @@ -22,8 +25,215 @@ and build the TIFF software distribution. The software is most easily built on a UNIX system, but with a little bit of work it can easily be built and used on other non-UNIX platforms.
+ +

Building on all systems with CMake

CMake may be used to +generate build files for most common build systems and IDEs, and +supports all UNIX-like systems as well as Windows. See +the CMake website for further +details. To build the software on you need to first run +cmake to configure the build and generate the system-specific +build files. This reads the top-level CMakeLists.txt file, +which probes the target system for necessary tools and functions, +checks any options you specified to configure the build, and then +outputs build files configured for your system. If using Unix +Makefiles, once configuration is done, you simply +run make (or gmake) to build the software and +then make install to do the installation. For other build +systems, you do the equivalent steps with the tool for that system. +For example, on any UNIX system: +
+
+% cd ./tiff-4.0.5
+% cmake
+    ...lots of messages...
+% make
+    ...lots of messages...
+% make test
+    ...lots of messages...
+# make install
+
+Building is dependent on a make utility and a C +(and optionally a C++ compiler), so you will need these tools. +

In general, the software is designed such that the following +targets will always be available

+
+
+make [all]      build stuff
+make test       run the test suite
+make install    build and install stuff
+make clean      remove object files, executables and cruft
+
+ +
+

Build Trees

+There are two schemes for configuring and building the software. If +you intend to build the software for only one target system, you +can configure the software so that it is built in the same +directories as the source code. +
+
+% gzip -dc tiff-4.0.5.tar.gz | tar -xf -
+% cd ./tiff-4.0.5
+% cmake
+% make
+% make test
+% make install
+
+

Otherwise, you can configure a build tree that is parallel to +the source tree hierarchy (or in some completely different place) +but which contains only configured files and files created during +the build procedure.

+
+
+% gzip -dc tiff-4.0.5.tar.gz | tar -xf -
+% mkdir tiff-4.0.5-build
+% cd ./tiff-4.0.5-build
+% cmake ../tiff-4.0.5
+% make
+% make test
+% make install
+
+This second scheme is useful for: +
    +
  • building multiple targets from a single source tree
  • +
  • building from a read-only source tree (e.g. if you receive the +distribution on CD-ROM)
  • +
  • sharing the source files via a network, but building on +multiple systems
  • +
  • keeping the source tree clean +(unlike autoconf, cmake does not provide +a distclean target, so out of source builds are +recommended)
  • +
+ +
+

Generators

The default generator for UNIX is Unix +Makefiles, and on Windows is NMake Makefiles or MSBuild +depending upon the setup. Run cmake --help to list all the +generators available for your platform. For example, to use the Ninja +build system on UNIX or +Windows: +
+cmake -G Ninja
+cmake --build .
+ctest -V
+cmake --build . --target install
+
+

Note that cmake --build . is a build-system-independent way +of building a target; you can always use the build system directly.

+

Alternatively, using the MSBuild system on Windows (64-bit Release +build with VS2013): +

+
+cmake -G "Visual Studio 12 2013 Win64"
+cmake --build . --config Release
+ctest -V -C Release
+cmake --build . --config Release --target install
+
+With the above configuration, it's also possible to open the generated +solution file with the Visual Studio IDE as well as building on the +command-line. + +
+

Configuration Options

+The configuration process is critical to the proper compilation, +installation, and operation of the +software. The CMakeLists.txt script runs a series of tests to +decide whether or not the target system supports required +functionality and, if it does not, whether it can emulate or +workaround the missing functions. After running cmake, check +the CMakeCache.txt file; this contains all the results of the +checks performed and the options set by the user. If cmake +failed to run, check CMakeFiles/CMakeOutput.log +and CMakeFiles/CMakeError.log; these should record the error +which caused the failure. +

A second function of the configure script is to set the default +configuration parameters for the software. Of particular note are the +directories where the software is to be installed. By default the +software is installed in the /usr/local hierarchy. To change +this behaviour the appropriate parameters can be specified on the +command line. Run cmake --help to get a full list of possible +options, and cmake -LH to list all the configurable options for +this software package, or cmake -LAH to show all advanced +options in addition. Standard installation related options are shown +below.

+
+
+Installation directories:
+  CMAKE_INSTALL_PREFIX
+
+Fine tuning of the installation directories:
+  CMAKE_INSTALL_BINDIR            user executables [PREFIX/bin]
+  CMAKE_INSTALL_SBINDIR           system admin executables [PREFIX/sbin]
+  CMAKE_INSTALL_LIBEXECDIR        program executables [PREFIX/libexec]
+  CMAKE_INSTALL_SYSCONFDIR        read-only single-machine data [PREFIX/etc]
+  CMAKE_INSTALL_SHAREDSTATEDIR    modifiable architecture-independent data [PREFIX/com]
+  CMAKE_INSTALL_LOCALSTATEDIR     modifiable single-machine data [PREFIX/var]
+  CMAKE_INSTALL_LIBDIR            object code libraries [PREFIX/lib]
+  CMAKE_INSTALL_INCLUDEDIR        C header files [PREFIX/include]
+  CMAKE_INSTALL_OLDINCLUDEDIR     C header files for non-gcc [/usr/include]
+  CMAKE_INSTALL_DATAROOTDIR       read-only arch.-independent data root [PREFIX/share]
+  CMAKE_INSTALL_DATADIR           read-only architecture-independent data [DATAROOTDIR]
+  CMAKE_INSTALL_LOCALEDIR         locale-dependent data [DATAROOTDIR/locale]
+  CMAKE_INSTALL_MANDIR            man documentation [DATAROOTDIR/man]
+  CMAKE_INSTALL_DOCDIR            documentation root [DATAROOTDIR/doc/tiff]
+
+
+Also see the +CMake documentation +for additional variables which may be set. + +
+

Configuring Optional Packages/Support

+The TIFF software comes with several packages that are installed +only as needed, or only if specifically configured at the time the +configure script is run. Packages can be configured via the +cmake commandline parameters. +
+
Static/Shared Objects Support
+
BUILD_SHARED_LIBS[=ON|OFF]    build shared +libraries [default=ON]
+

This option controls whether or not to configure the software +to build a shared and static binaries for the TIFF library. Use of +shared libraries can significantly reduce the disk space needed for +users of the TIFF software. If shared libraries are not used then +the code is statically linked into each application that uses it. +

+

ld-version-script[=ON|OFF]  Enable linker version +script (default is ON)

+

Add shared library symbol versioning on ELF-based systems (e.g. +Linux and FreeBSD) which use the GNU linker. This is needed if +several major versions of libtiff might be loaded at once into the +same program.

+
+
JPEG Support
+
jpeg[=ON|OFF]        enable IJG JPEG +library usage (required for JPEG compression, enabled by default)
+JPEG_INCLUDE_DIR=DIR location of IJG +JPEG library headers
+JPEG_LIBRARY=DIR     location of IJG JPEG +library binary)
+
The JPEG package enables support for the handling of +TIFF images with JPEG-encoded data. Support for JPEG-encoded data +requires the Independent JPEG Group (IJG) libjpeg +distribution; this software is available at http://www.ijg.org/. cmake +script automatically tries to search for a working IJG JPEG +installation. If it fails to find library, JPEG support will be +automatically disabled. If you want specify the exact paths to +library binary and headers, use above options for that.
+
ZIP Support
+
The ZIP support enables support for the handling of TIFF +images with deflate-encoded data (enabled by default if +available). Support for deflate-encoded data requires the freely +available zlib distribution written by Jean-loup Gailly and +Mark Adler; this software is available at http://www.zlib.org/.
+
+
-

Building on a UNIX System

+

Building on a UNIX System with Autoconf

To build the software on a UNIX system you need to first run the configure shell script that is located in the top level of the source directory. This script probes the target system for @@ -33,14 +243,14 @@ simply run make (or gmake) to build the software and then make install to do the installation; for example:
-hyla% cd ./tiff-4.0.0
-hyla% ./configure
+% cd ./tiff-4.0.5
+% ./configure
     ...lots of messages...
-hyla% make
+% make
     ...lots of messages...
-hyla% make check
+% make check
     ...lots of messages...
-hyla# make install
+# make install
 
Supplied makefiles are dependent on a make utility and a C (and optionally a C++ compiler), so you will need these tools. @@ -50,8 +260,8 @@ should be ``make-able'' in each directory:

 make [all]      build stuff
 make check      run the test suite
-make install    build&install stuff
-make clean      remove .o files, executables and cruft
+make install    build and install stuff
+make clean      remove object files, executables and cruft
 make distclean  remove everything, that can be recreated
 
Note that after running "make distclean" the @@ -66,12 +276,12 @@ can configure the software so that it is built in the same directories as the source code.
-hyla% gzip -dc tiff-4.0.0.tar.gz | tar -xf -
-hyla% cd ./tiff-4.0.0
-hyla% ./configure
-hyla% make
-hyla% make check
-hyla% make install
+% gzip -dc tiff-4.0.5.tar.gz | tar -xf -
+% cd ./tiff-4.0.5
+% ./configure
+% make
+% make check
+% make install
 

Otherwise, you can configure a build tree that is parallel to the source tree hierarchy (or in some completely different place) @@ -79,13 +289,13 @@ but which contains only configured files and files created during the build procedure.

-hyla% gzip -dc tiff-4.0.0.tar.gz | tar -xf -
-hyla% mkdir tiff-4.0.0-build
-hyla% cd ./tiff-4.0.0-build
-hyla% ../tiff-4.0.0/configure
-hyla% make
-hyla% make check
-hyla% make install
+% gzip -dc tiff-4.0.5.tar.gz | tar -xf -
+% mkdir tiff-4.0.5-build
+% cd ./tiff-4.0.5-build
+% ../tiff-4.0.5/configure
+% make
+% make check
+% make install
 
This second scheme is useful for:
    @@ -170,7 +380,7 @@ libraries [default=yes]

    These options control whether or not to configure the software to build a shared and static binaries for the TIFF library. Use of shared libraries can significantly reduce the disk space needed for -users of the TIFF software. If shared libarries are not used then +users of the TIFF software. If shared libraries are not used then the code is statically linked into each application that uses it. By default both types of binaries is configured.

    @@ -199,7 +409,7 @@ distribution; this software is available at http://www.ijg.org/. configure script automatically tries to search for a working IJG JPEG installation. If it fails to find library, JPEG support will be -automatically disabled.If you want specify the exact paths to +automatically disabled. If you want specify the exact paths to library binary and headers, use above switches for that.

    ZIP Support
    The ZIP support enables support for the handling of @@ -212,11 +422,9 @@ enabled the DIRS_LIBINC and DIR_GZLIB parameters should also be set (see below). By default this package is not configured.
    -
    -

    Building the Software under Windows 95/98/NT/2000 with MS -VC++

    +

    Building the Software under Windows 2000/XP/7/8/10 with nmake

    With Microsoft Visual C++ installed, and properly configured for commandline use (you will likely need to source VCVARS32.BAT in AUTOEXEC.bAT or somewhere similar) you should be able to use the @@ -228,42 +436,47 @@ conventions, which work with MSVC but do not work with Windows can extract the files using Windows normal line termination conventions with a command similar to:

    -  unzip -aa -a tiff-4.0.0.zip
    +  unzip -aa -a tiff-4.0.5.zip
     
    -

    By default libtiff expects that a pre-built zlib and jpeg -library are provided by the user. If this is not the case, then you -may edit libtiff\tiffconf.h using a text editor (e.g. notepad) and -comment out the entries for JPEG_SUPPORT, PIXARLOG_SUPPORT, and -ZIP_SUPPORT. Ignore the comment at the top of the file which says -that it has no influence on the build, because the statement is not -true for Windows. However, by taking this approach, libtiff will -not be able to open some TIFF files.

    +

    By default the nmake-based libtiff build does not depend on any +additional libraries. Normally libtiff should be built with at least +JPEG and ZIP support so that it can open JPEG and ZIP-compressed TIFF +files. In order to add additional libraries (e.g. libjpeg, zlib, +jbigkit), build those libraries according to their own particular +build instructions, and then edit 'nmake.opt' (using a capable +plain-text editor) to enable use of the libraries, including +specifying where the libraries are installed. It is also necessary to +edit libtiff/tiffconf.vc.h to enable the related configuration defines +(JPEG_SUPPORT, OJPEG_SUPPORT, PIXARLOG_SUPPORT, +ZIP_SUPPORT), or to disable features which are normally +included by default. Ignore the comment at the top of the +libtiff/tiffconf.vc.h file which says that it has no influence on the +build, because the statement is not true for Windows. Please note that +the nmake build copies tiffconf.vc.h to tiffconf.h, and copies +tif_config.vc.h to tif_config.h, overwriting any files which may be +present. Likewise, the 'nmake clean' step removes those files.

    To build using the provided makefile.vc you may use:

    -  C:\tiff-4.0.0> nmake /f makefile.vc clean
    -  C:\tiff-4.0.0> nmake /f makefile.vc
    +  C:\tiff-4.0.5> nmake /f makefile.vc clean
    +  C:\tiff-4.0.5> nmake /f makefile.vc
     
         or (the hard way)
     
    -  C:\tiff-4.0.0> cd port
    -  C:\tiff-4.0.0\port> nmake /f makefile.vc clean
    -  C:\tiff-4.0.0\port> nmake /f makefile.vc
    -  C:\tiff-4.0.0> cd ../libtiff
    -  C:\tiff-4.0.0\libtiff> nmake /f makefile.vc clean
    -  C:\tiff-4.0.0\libtiff> nmake /f makefile.vc
    -  C:\tiff-4.0.0\libtiff> cd ..\tools
    -  C:\tiff-4.0.0\tools> nmake /f makefile.vc clean
    -  C:\tiff-4.0.0\tools> nmake /f makefile.vc
    +  C:\tiff-4.0.5> cd port
    +  C:\tiff-4.0.5\port> nmake /f makefile.vc clean
    +  C:\tiff-4.0.5\port> nmake /f makefile.vc
    +  C:\tiff-4.0.5> cd ../libtiff
    +  C:\tiff-4.0.5\libtiff> nmake /f makefile.vc clean
    +  C:\tiff-4.0.5\libtiff> nmake /f makefile.vc
    +  C:\tiff-4.0.5\libtiff> cd ..\tools
    +  C:\tiff-4.0.5\tools> nmake /f makefile.vc clean
    +  C:\tiff-4.0.5\tools> nmake /f makefile.vc
     
    -

    This will build the library file -libtiff\libtiff\libtiff.lib. This can be used in Win32 -programs. You may want to adjust the build options before start -compiling. All parameters contained in the nmake.opt -file.This is a plain text file you can open with your favorite text -editor.

    +

    This will build the library +file libtiff\libtiff\libtiff.lib.

    The makefile also builds a DLL (libtiff.dll) with an associated -import library (libtiff_i.lib). Any builds using libtiff will need -to include the LIBTIFF\LIBTIFF directory in the include path.

    +import library (libtiff_i.lib). Any builds using libtiff will need to +include the LIBTIFF\LIBTIFF directory in the include path.

    The libtiff\tools\makefile.vc should build .exe's for all the standard TIFF tool programs.


    @@ -476,7 +689,7 @@ libtiff/uvcode.h LogL/LogLuv codec-specific definitions libtiff/version.h version string (generated by Makefile) libtiff/tif_apple.c Apple-related OS support libtiff/tif_atari.c Atari-related OS support -libtiff/tif_aux.c auxilary directory-related functions +libtiff/tif_aux.c auxiliary directory-related functions libtiff/tif_close.c close an open TIFF file libtiff/tif_codec.c configuration table of builtin codecs libtiff/tif_compress.c compression scheme support @@ -519,6 +732,6 @@ libtiff/mkspans.c program to generate black-white span tables libtiff/mkversion.c program to generate libtiff/version.h.
    -Last updated: $Date: 2012-02-18 21:36:31 $ +Last updated: $Date: 2015-08-29 15:30:11 $ diff --git a/thirdparty/tiff-4.0.3/html/contrib.html b/thirdparty/tiff-4.2.0/html/contrib.html similarity index 88% rename from thirdparty/tiff-4.0.3/html/contrib.html rename to thirdparty/tiff-4.2.0/html/contrib.html index d138900a..9a670658 100644 --- a/thirdparty/tiff-4.0.3/html/contrib.html +++ b/thirdparty/tiff-4.2.0/html/contrib.html @@ -1,14 +1,18 @@ + Contributed TIFF Software + - - - +

    - +smallliz Contributed TIFF Software

    @@ -155,11 +159,10 @@ various routines from Conrad Poelman; a TIFF image iterator and -A utility by Bill Radcliffe to +A utility by Bill Radcliffe to convert an extracted IPTC Newsphoto caption from a binary blob to ASCII text, and vice versa. IPTC binary blobs can be extracted from -images via the ImageMagick convert(1) +images via the ImageMagick convert(1) utility. @@ -203,7 +206,7 @@ their authors.


    -Last updated: $Date: 2006/01/03 01:42:30 $ +Last updated: $Date: 2016-09-25 20:05:44 $ diff --git a/thirdparty/tiff-4.0.3/html/document.html b/thirdparty/tiff-4.2.0/html/document.html similarity index 75% rename from thirdparty/tiff-4.0.3/html/document.html rename to thirdparty/tiff-4.2.0/html/document.html index 73fc8af3..a9750933 100644 --- a/thirdparty/tiff-4.0.3/html/document.html +++ b/thirdparty/tiff-4.2.0/html/document.html @@ -1,21 +1,26 @@ + TIFF Documentation + - - +

    - +jim TIFF Documentation

    A copy of the 6.0 specification is available from Adobe at http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf, or from the libtiff -ftp site at -ftp://ftp.remotesensing.org/pub/libtiff/doc/TIFF6.pdf.

    +ftp site at +https://download.osgeo.org/libtiff/doc/TIFF6.pdf.

    Draft TIFF Technical Note #2 covers problems @@ -45,7 +50,7 @@ a TIFF variation supporting files larger than 4GB.


    - Last updated: $Date: 2006/07/10 18:13:52 $ + Last updated: $Date: 2016-09-25 20:05:44 $
    diff --git a/thirdparty/tiff-4.0.3/html/images.html b/thirdparty/tiff-4.2.0/html/images.html similarity index 65% rename from thirdparty/tiff-4.0.3/html/images.html rename to thirdparty/tiff-4.2.0/html/images.html index 150ed0c4..c93f38bf 100644 --- a/thirdparty/tiff-4.0.3/html/images.html +++ b/thirdparty/tiff-4.2.0/html/images.html @@ -1,13 +1,18 @@ + TIFF Test Images + - - +

    - +bali TIFF Test Images

    @@ -22,8 +27,8 @@ the same directory as this software.

    The latest archive of test images is located at - -ftp://ftp.remotesensing.org/pub/libtiff/pics-3.8.0.tar.gz + +https://download.osgeo.org/libtiff/pics-3.8.0.tar.gz

    There are two other good sources for TIFF test images: @@ -35,7 +40,7 @@ of images with different storage characteristics.


    -Last updated: $Date: 2006/01/02 23:50:44 $ +Last updated: $Date: 2016-09-25 20:05:44 $ diff --git a/thirdparty/tiff-4.2.0/html/images/CMakeLists.txt b/thirdparty/tiff-4.2.0/html/images/CMakeLists.txt new file mode 100644 index 00000000..e25f9f62 --- /dev/null +++ b/thirdparty/tiff-4.2.0/html/images/CMakeLists.txt @@ -0,0 +1,46 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +set(docfiles + back.gif + bali.jpg + cat.gif + cover.jpg + cramps.gif + dave.gif + info.gif + jello.jpg + jim.gif + note.gif + oxford.gif + quad.jpg + ring.gif + smallliz.jpg + strike.gif + warning.gif) + +install(FILES ${docfiles} + DESTINATION "${LIBTIFF_DOCDIR}/html/images") + +extra_dist(${docfiles}) diff --git a/thirdparty/tiff-4.0.3/html/images/Makefile.am b/thirdparty/tiff-4.2.0/html/images/Makefile.am similarity index 97% rename from thirdparty/tiff-4.0.3/html/images/Makefile.am rename to thirdparty/tiff-4.2.0/html/images/Makefile.am index 840e1495..979c8582 100644 --- a/thirdparty/tiff-4.0.3/html/images/Makefile.am +++ b/thirdparty/tiff-4.2.0/html/images/Makefile.am @@ -44,3 +44,6 @@ docfiles = \ warning.gif dist_doc_DATA = $(docfiles) + +EXTRA_DIST = \ + CMakeLists.txt diff --git a/thirdparty/tiff-4.0.3/html/images/Makefile.in b/thirdparty/tiff-4.2.0/html/images/Makefile.in similarity index 83% rename from thirdparty/tiff-4.0.3/html/images/Makefile.in rename to thirdparty/tiff-4.2.0/html/images/Makefile.in index a78ae2fe..64f473d1 100644 --- a/thirdparty/tiff-4.0.3/html/images/Makefile.in +++ b/thirdparty/tiff-4.2.0/html/images/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -40,23 +40,61 @@ # Process this file with automake to produce Makefile.in. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -76,8 +114,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = html/images -DIST_COMMON = $(dist_doc_DATA) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/config/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -85,7 +121,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(dist_doc_DATA) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = @@ -138,6 +176,8 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(docdir)" DATA = $(dist_doc_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -151,6 +191,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -198,6 +239,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -304,6 +346,9 @@ docfiles = \ warning.gif dist_doc_DATA = $(docfiles) +EXTRA_DIST = \ + CMakeLists.txt + all: all-am .SUFFIXES: @@ -319,14 +364,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign html/images/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign html/images/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -364,16 +408,17 @@ uninstall-dist_docDATA: @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -509,16 +554,19 @@ uninstall-am: uninstall-dist_docDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dist_docDATA install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-dist_docDATA + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_docDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-dist_docDATA + +.PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/thirdparty/tiff-4.0.3/html/images/back.gif b/thirdparty/tiff-4.2.0/html/images/back.gif similarity index 100% rename from thirdparty/tiff-4.0.3/html/images/back.gif rename to thirdparty/tiff-4.2.0/html/images/back.gif diff --git a/thirdparty/tiff-4.0.3/html/images/bali.jpg b/thirdparty/tiff-4.2.0/html/images/bali.jpg similarity index 100% rename from thirdparty/tiff-4.0.3/html/images/bali.jpg rename to thirdparty/tiff-4.2.0/html/images/bali.jpg diff --git a/thirdparty/tiff-4.0.3/html/images/cat.gif b/thirdparty/tiff-4.2.0/html/images/cat.gif similarity index 100% rename from thirdparty/tiff-4.0.3/html/images/cat.gif rename to thirdparty/tiff-4.2.0/html/images/cat.gif diff --git a/thirdparty/tiff-4.0.3/html/images/cover.jpg b/thirdparty/tiff-4.2.0/html/images/cover.jpg similarity index 100% rename from thirdparty/tiff-4.0.3/html/images/cover.jpg rename to thirdparty/tiff-4.2.0/html/images/cover.jpg diff --git a/thirdparty/tiff-4.0.3/html/images/cramps.gif b/thirdparty/tiff-4.2.0/html/images/cramps.gif similarity index 100% rename from thirdparty/tiff-4.0.3/html/images/cramps.gif rename to thirdparty/tiff-4.2.0/html/images/cramps.gif diff --git a/thirdparty/tiff-4.0.3/html/images/dave.gif b/thirdparty/tiff-4.2.0/html/images/dave.gif similarity index 100% rename from thirdparty/tiff-4.0.3/html/images/dave.gif rename to thirdparty/tiff-4.2.0/html/images/dave.gif diff --git a/thirdparty/tiff-4.0.3/html/images/info.gif b/thirdparty/tiff-4.2.0/html/images/info.gif similarity index 100% rename from thirdparty/tiff-4.0.3/html/images/info.gif rename to thirdparty/tiff-4.2.0/html/images/info.gif diff --git a/thirdparty/tiff-4.0.3/html/images/jello.jpg b/thirdparty/tiff-4.2.0/html/images/jello.jpg similarity index 100% rename from thirdparty/tiff-4.0.3/html/images/jello.jpg rename to thirdparty/tiff-4.2.0/html/images/jello.jpg diff --git a/thirdparty/tiff-4.0.3/html/images/jim.gif b/thirdparty/tiff-4.2.0/html/images/jim.gif similarity index 100% rename from thirdparty/tiff-4.0.3/html/images/jim.gif rename to thirdparty/tiff-4.2.0/html/images/jim.gif diff --git a/thirdparty/tiff-4.0.3/html/images/note.gif b/thirdparty/tiff-4.2.0/html/images/note.gif similarity index 100% rename from thirdparty/tiff-4.0.3/html/images/note.gif rename to thirdparty/tiff-4.2.0/html/images/note.gif diff --git a/thirdparty/tiff-4.0.3/html/images/oxford.gif b/thirdparty/tiff-4.2.0/html/images/oxford.gif similarity index 100% rename from thirdparty/tiff-4.0.3/html/images/oxford.gif rename to thirdparty/tiff-4.2.0/html/images/oxford.gif diff --git a/thirdparty/tiff-4.0.3/html/images/quad.jpg b/thirdparty/tiff-4.2.0/html/images/quad.jpg similarity index 100% rename from thirdparty/tiff-4.0.3/html/images/quad.jpg rename to thirdparty/tiff-4.2.0/html/images/quad.jpg diff --git a/thirdparty/tiff-4.0.3/html/images/ring.gif b/thirdparty/tiff-4.2.0/html/images/ring.gif similarity index 100% rename from thirdparty/tiff-4.0.3/html/images/ring.gif rename to thirdparty/tiff-4.2.0/html/images/ring.gif diff --git a/thirdparty/tiff-4.0.3/html/images/smallliz.jpg b/thirdparty/tiff-4.2.0/html/images/smallliz.jpg similarity index 100% rename from thirdparty/tiff-4.0.3/html/images/smallliz.jpg rename to thirdparty/tiff-4.2.0/html/images/smallliz.jpg diff --git a/thirdparty/tiff-4.0.3/html/images/strike.gif b/thirdparty/tiff-4.2.0/html/images/strike.gif similarity index 100% rename from thirdparty/tiff-4.0.3/html/images/strike.gif rename to thirdparty/tiff-4.2.0/html/images/strike.gif diff --git a/thirdparty/tiff-4.0.3/html/images/warning.gif b/thirdparty/tiff-4.2.0/html/images/warning.gif similarity index 100% rename from thirdparty/tiff-4.0.3/html/images/warning.gif rename to thirdparty/tiff-4.2.0/html/images/warning.gif diff --git a/thirdparty/tiff-4.0.3/html/index.html b/thirdparty/tiff-4.2.0/html/index.html similarity index 67% rename from thirdparty/tiff-4.0.3/html/index.html rename to thirdparty/tiff-4.2.0/html/index.html index 17db67a8..fd7b5f77 100644 --- a/thirdparty/tiff-4.0.3/html/index.html +++ b/thirdparty/tiff-4.2.0/html/index.html @@ -10,47 +10,41 @@ --> - +

    LibTIFF - TIFF Library and Utilities


    - - + + - + + + + + - + - - - - - + - - - + +
    Home Pagehttp://www.remotesensing.org/libtiff/Home Page #1http://www.simplesystems.org/libtiff/
    Home Page MirrorHome Page #2https://libtiff.gitlab.io/libtiff/
    Home Page #3 http://libtiff.maptools.org/
    Latest Stable Releasev4.0.3v4.2.0
    Master Download Sitedownload.osgeo.org, directory libtiff
    Windows BinariesGnuWin32 Projectdownload.osgeo.org, directory libtiff
    Mailing Listtiff@lists.maptools.org, - Subscription, + tiff@lists.osgeo.org, + Subscription, Archive. Please, read the TIFF FAQ before asking questions.
    Anonymous CVSexport CVSROOT=:pserver:cvsanon@cvs.maptools.org:/cvs/maptools/cvsroot
    - cvs login

    - (use empty password)
    - cvs checkout libtiff
    - to get the stable libtiff code or
    - cvs checkout -r branch-3-9 libtiff
    - to get the previous stable branch supporting the 3.9.X release series.
    git repositoryhttps://gitlab.com/libtiff/libtiff

    @@ -75,21 +69,24 @@ machines.

    - The software was originally authored and maintained by Sam Leffler. + The software was originally authored and maintained by Sam Leffler + but has been maintained by a cast of others since 1999.

    Questions should be sent to the TIFF mailing list: - tiff@lists.maptools.org, with + tiff@lists.osgeo.org, with a subscription interface at - http://lists.maptools.org/mailman/listinfo/tiff. + http://lists.osgeo.org/mailman/listinfo/tiff.

    - The persons responsible for putting up this site and putting together - versions >= 3.5.1 are + The persons currently actively maintaining and releasing libtiff + are Even Rouault + and Bob Friesenhahn. +

    +

    Significant maintainers in the past (since the 3.5.1 release) are Frank Warmerdam, Andrey Kiselev, - Bob Friesenhahn, - Joris Van Damme and Lee Howard. + Joris Van Damme, and Lee Howard.

    The following sections are included in this documentation: @@ -103,7 +100,7 @@

  • Contributed software
  • TIFF documentation
  • Building the software distribution
  • -
  • Bugs, Bugzilla, and the TIFF mailing list
  • +
  • Bugs, GitLab issues, and the TIFF mailing list
  • Test images
  • Acknowledgements and copyright issues
  • Man Pages
  • @@ -117,7 +114,7 @@

- Last updated $Date: 2012-06-16 00:19:37 $. + Last updated 2019-11-03

diff --git a/thirdparty/tiff-4.0.3/html/internals.html b/thirdparty/tiff-4.2.0/html/internals.html similarity index 90% rename from thirdparty/tiff-4.0.3/html/internals.html rename to thirdparty/tiff-4.2.0/html/internals.html index 3cc96731..20061ef0 100644 --- a/thirdparty/tiff-4.0.3/html/internals.html +++ b/thirdparty/tiff-4.2.0/html/internals.html @@ -1,13 +1,18 @@ + Modifying The TIFF Library + - - +

- +dave Modifying The TIFF Library

@@ -19,18 +24,19 @@ how to add new support to the library. The following sections are found in this chapter: -


Library Configuration

- +
+

Library Configuration

+

Information on compiling the library is given elsewhere in this documentation. This section describes the low-level mechanisms used to control @@ -71,11 +77,11 @@ To override the default compression behaviour define to enable configuration of the appropriate codecs (see the table below); e.g. -

    +
     #define	COMPRESSION_SUPPORT
     #define	CCITT_SUPPORT
     #define	PACKBITS_SUPPORT
    -
+ Several other compression schemes are configured separately from the default set because they depend on ancillary software @@ -87,7 +93,7 @@ The JPEG codec that comes with libtiff is designed for use with release 5 or later of the Independent JPEG Group's freely available software distribution. This software can be retrieved from the directory -ftp.uu.net:/graphics/jpeg/. +ftp.uu.net:/graphics/jpeg/.

@@ -103,14 +109,14 @@ for use with version 0.99 or later of the freely available libz library written by Jean-loup Gailly and Mark Adler. The data format used by this library is described in the files -zlib-3.1.doc, +zlib-3.1.doc, and -deflate-1.1.doc, +deflate-1.1.doc, available in the directory -ftp.uu.net:/pub/archiving/zip/doc. +ftp.uu.net:/pub/archiving/zip/doc. The library can be retried from the directory -ftp.uu.net:/pub/archiving/zip/zlib/ -(or try quest.jpl.nasa.gov:/beta/zlib/). +ftp.uu.net:/pub/archiving/zip/zlib/ +(or try quest.jpl.nasa.gov:/beta/zlib/).

NOTE: @@ -205,15 +211,15 @@ run-length encoding scheme from ThunderScan (compression 32809) The ICC Profile Format Specification, Annex B.3 "Embedding ICC Profiles in TIFF Files"; available at -http://www.color.org +http://www.color.org - -


General Portability Comments

- +
+

General Portability Comments

+

This software is developed on Silicon Graphics UNIX systems (big-endian, MIPS CPU, 32-bit ints, IEEE floating point). @@ -271,7 +277,7 @@ codecs for optimization purposes. The following defines control general portability:

- +
@@ -317,8 +323,9 @@ Note that tiffcomp.h defines HAVE_IEEEFP to be 1 (BSDTYPES is not defined). -


Types and Portability

- +
+

Types and Portability

+

The software makes extensive use of C typedefs to promote portability. Two sets of typedefs are used, one for communication with clients of the library and one for internal data structures and parsing of the @@ -328,7 +335,7 @@ purely by fiddling with the following machine-dependent typedefs:

-

BSDTYPES
+
@@ -385,10 +392,10 @@ structure:

-

uint8
+
- + @@ -451,8 +458,9 @@ passed as opaque handles and only cast at the lowest layers where their type is presumed. -


General Comments

- +
+

General Comments

+

The library is designed to hide as much of the details of TIFF from applications as possible. In particular, TIFF directories are read in their entirety @@ -460,7 +468,9 @@ into an internal format. Only the tags known by the library are available to a user and certain tag data may be maintained that a user does not care about (e.g. transfer function tables). -


Adding New Builtin Codecs

+
+

Adding New Builtin Codecs

+

To add builtin support for a new compression algorithm, you can either use the "tag-extension" trick to override the handling of the @@ -514,8 +524,9 @@ encoded or decoded if the image is organized with PlanarConfig=2 (separate planes). This is important for algorithms such as JPEG. If PlanarConfig=1 (interleaved), then sample will always be 0. -


Other Comments

- +
+

Other Comments

+

The library handles most I/O buffering. There are two data buffers when decoding data: a raw data buffer that holds all the data in a strip, and a user-supplied scanline buffer that compression schemes @@ -565,7 +576,7 @@ the portability of your TIFF files.


-Last updated: $Date: 2004/09/10 14:47:31 $ +Last updated: $Date: 2016-09-25 20:05:44 $ diff --git a/thirdparty/tiff-4.0.3/html/intro.html b/thirdparty/tiff-4.2.0/html/intro.html similarity index 88% rename from thirdparty/tiff-4.0.3/html/intro.html rename to thirdparty/tiff-4.2.0/html/intro.html index 61c01d4a..ad3b2d91 100644 --- a/thirdparty/tiff-4.0.3/html/intro.html +++ b/thirdparty/tiff-4.2.0/html/intro.html @@ -1,13 +1,18 @@ + Introduction to the TIFF Documentation + - - +

- +strike Introduction to the TIFF Documentation

@@ -37,7 +42,7 @@ They are consistent with the terminology used in the TIFF 6.0 specification.
Codec
Software that implements the decoding and encoding algorithms of a compression scheme. - +

In order to better understand how TIFF works (and consequently this @@ -62,7 +67,7 @@ application.


-Last updated: $Date: 1999/08/09 20:21:21 $ +Last updated: $Date: 2016-09-25 20:05:44 $ diff --git a/thirdparty/tiff-4.0.3/html/libtiff.html b/thirdparty/tiff-4.2.0/html/libtiff.html similarity index 96% rename from thirdparty/tiff-4.0.3/html/libtiff.html rename to thirdparty/tiff-4.2.0/html/libtiff.html index 6a2c42e6..cda66b5a 100644 --- a/thirdparty/tiff-4.0.3/html/libtiff.html +++ b/thirdparty/tiff-4.2.0/html/libtiff.html @@ -10,7 +10,7 @@ --> - +
typedef unsigned int ttag_t; directory tagtypedef unsigned int ttag_t; directory tag
@@ -45,8 +45,8 @@ to the capabilities of the library; it is not an attempt to describe everything a developer needs to know about the library or about TIFF. Detailed information on the interfaces to the library are given in - the UNIX - manual pages that accompany this software. + the UNIX manual pages that accompany + this software.

Michael Still has also written a useful introduction to libtiff for the @@ -97,7 +97,7 @@ information. The library include file <tiffio.h> contains a C pre-processor define TIFFLIB_VERSION that can be used to check library - version compatiblity at compile time. + version compatibility at compile time.


Library Datatypes

@@ -518,9 +518,9 @@         TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imagelength);
        buf = _TIFFmalloc(TIFFScanlineSize(tif));
        for (row = 0; row < imagelength; row++)
-             tiffreadscanline(tif, buf, row);
-         _tifffree(buf);
-         tiffclose(tif);
+             TIFFReadScanline(tif, buf, row, 0);
+         _TIFFfree(buf);
+         TIFFClose(tif);
    }
}

@@ -547,17 +547,17 @@         buf = _TIFFmalloc(TIFFScanlineSize(tif));
        if (config == PLANARCONFIG_CONTIG) {
            for (row = 0; row < imagelength; row++)
-                 tiffreadscanline(tif, buf, row);
+                 TIFFReadScanline(tif, buf, row, 0);
        } else if (config == planarconfig_separate) {
            uint16 s, nsamples;
            
            tiffgetfield(tif, tifftag_samplesperpixel, &nsamples);
            for (s = 0; s < nsamples; s++)
                for (row = 0; row < imagelength; row++)
-                     tiffreadscanline(tif, buf, row, s);
+                     TIFFReadScanline(tif, buf, row, s);
        }
-         _tifffree(buf);
-         tiffclose(tif);
+         _TIFFfree(buf);
+         TIFFClose(tif);
    }
}

@@ -568,7 +568,7 @@

            for (row = 0; row < imagelength; row++)
                for (s = 0; s < nsamples; s++)
-                     tiffreadscanline(tif, buf, row, s);
+                     TIFFReadScanline(tif, buf, row, s);

...then problems would arise if RowsPerStrip was not one @@ -601,8 +601,8 @@         buf = _TIFFmalloc(TIFFStripSize(tif));
        for (strip = 0; strip < tiffnumberofstrips(tif); strip++)
            tiffreadencodedstrip(tif, strip, buf, (tsize_t) -1);
-         _tifffree(buf);
-         tiffclose(tif);
+         _TIFFfree(buf);
+         TIFFClose(tif);
    }
}

@@ -702,8 +702,8 @@         for (y = 0; y < imagelength; y += tilelength)
            for (x = 0; x < imagewidth; x += tilewidth)
                tiffreadtile(tif, buf, x, y, 0);
-         _tifffree(buf);
-         tiffclose(tif);
+         _TIFFfree(buf);
+         TIFFClose(tif);
    }
}

@@ -729,8 +729,8 @@         buf = _TIFFmalloc(TIFFTileSize(tif));
        for (tile = 0; tile < tiffnumberoftiles(tif); tile++)
            tiffreadencodedtile(tif, tile, buf, (tsize_t) -1);
-         _tifffree(buf);
-         tiffclose(tif);
+         _TIFFfree(buf);
+         TIFFClose(tif);
    }
}

@@ -741,7 +741,7 @@


- Last updated: $Date: 2005/12/28 06:53:18 $ + Last updated: $Date: 2016-09-25 20:05:44 $

diff --git a/thirdparty/tiff-4.2.0/html/man/CMakeLists.txt b/thirdparty/tiff-4.2.0/html/man/CMakeLists.txt new file mode 100644 index 00000000..897a0e73 --- /dev/null +++ b/thirdparty/tiff-4.2.0/html/man/CMakeLists.txt @@ -0,0 +1,108 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +set(indexfile index.html) + +set(docfiles + libtiff.3tiff.html + TIFFbuffer.3tiff.html + TIFFClose.3tiff.html + TIFFcodec.3tiff.html + TIFFcolor.3tiff.html + TIFFDataWidth.3tiff.html + TIFFError.3tiff.html + TIFFFieldDataType.3tiff.html + TIFFFieldName.3tiff.html + TIFFFieldPassCount.3tiff.html + TIFFFieldReadCount.3tiff.html + TIFFFieldTag.3tiff.html + TIFFFieldWriteCount.3tiff.html + TIFFFlush.3tiff.html + TIFFGetField.3tiff.html + TIFFmemory.3tiff.html + TIFFOpen.3tiff.html + TIFFPrintDirectory.3tiff.html + TIFFquery.3tiff.html + TIFFReadDirectory.3tiff.html + TIFFReadEncodedStrip.3tiff.html + TIFFReadEncodedTile.3tiff.html + TIFFReadRawStrip.3tiff.html + TIFFReadRawTile.3tiff.html + TIFFReadRGBAImage.3tiff.html + TIFFReadRGBAStrip.3tiff.html + TIFFReadRGBATile.3tiff.html + TIFFReadScanline.3tiff.html + TIFFReadTile.3tiff.html + TIFFRGBAImage.3tiff.html + TIFFSetDirectory.3tiff.html + TIFFSetField.3tiff.html + TIFFsize.3tiff.html + TIFFstrip.3tiff.html + TIFFswab.3tiff.html + TIFFtile.3tiff.html + TIFFWarning.3tiff.html + TIFFWriteDirectory.3tiff.html + TIFFWriteEncodedStrip.3tiff.html + TIFFWriteEncodedTile.3tiff.html + TIFFWriteRawStrip.3tiff.html + TIFFWriteRawTile.3tiff.html + TIFFWriteScanline.3tiff.html + TIFFWriteTile.3tiff.html + fax2ps.1.html + fax2tiff.1.html + pal2rgb.1.html + ppm2tiff.1.html + raw2tiff.1.html + tiff2bw.1.html + tiff2pdf.1.html + tiff2ps.1.html + tiff2rgba.1.html + tiffcmp.1.html + tiffcp.1.html + tiffcrop.1.html + tiffdither.1.html + tiffdump.1.html + tiffgt.1.html + tiffinfo.1.html + tiffmedian.1.html + tiffset.1.html + tiffsplit.1.html) + +set(doc_DATA ${indexfile} ${docfiles}) + +extra_dist(${doc_DATA}) + +install(FILES ${doc_DATA} + DESTINATION "${LIBTIFF_DOCDIR}/html/man") + +# htmldoc target to regenerate HTML files +string(REPLACE ";" "^" escaped_docfiles "${docfiles}") +add_custom_target(htmldoc + COMMAND "${CMAKE_COMMAND}" + "-DMANSRCDIR=${PROJECT_SOURCE_DIR}/man" + "-DHTMLMANDIR=${PROJECT_SOURCE_DIR}/html/man" + "-DINDEXFILE=${indexfile}" + "-DDOCFILES=${escaped_docfiles}" + -P "${CMAKE_CURRENT_SOURCE_DIR}/HtmlDoc.cmake") + diff --git a/thirdparty/tiff-4.2.0/html/man/HtmlDoc.cmake b/thirdparty/tiff-4.2.0/html/man/HtmlDoc.cmake new file mode 100644 index 00000000..7e5a1a0c --- /dev/null +++ b/thirdparty/tiff-4.2.0/html/man/HtmlDoc.cmake @@ -0,0 +1,50 @@ +# CMake documentation generation for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +string(REPLACE "^" ";" DOCFILES "${DOCFILES}") + +set(INDEXSTART "Libtiff HTML manpage index

    Man Pages

    ") +set(INDEXEND "

") + +set(indexcontent "${INDEXSTART} +") + +foreach(doc ${DOCFILES}) + string(REGEX REPLACE "(.*)\\.html$" "\\1" man "${doc}") + execute_process(COMMAND groff -Thtml -mandoc "${MANSRCDIR}/${man}" + OUTPUT_FILE "${HTMLMANDIR}/${doc}" + RESULT_VARIABLE GROFF_STATUS) + if(GROFF_STATUS) + message(FATAL_ERROR "Groff failed to generate HTML manpage") + endif() + message(STATUS "Generated ${HTMLMANDIR}/${doc} from ${MANSRCDIR}/${man}") + + set(indexcontent "${indexcontent}
  • ${man} +") +endforeach() + +set(indexcontent "${indexcontent}${INDEXEND} +") +file(WRITE "${HTMLMANDIR}/${INDEXFILE}" "${indexcontent}") +message(STATUS "Generated ${HTMLMANDIR}/${INDEXFILE}") diff --git a/thirdparty/tiff-4.0.3/html/man/Makefile.am b/thirdparty/tiff-4.2.0/html/man/Makefile.am similarity index 95% rename from thirdparty/tiff-4.0.3/html/man/Makefile.am rename to thirdparty/tiff-4.2.0/html/man/Makefile.am index ca222dea..3ed00d44 100644 --- a/thirdparty/tiff-4.0.3/html/man/Makefile.am +++ b/thirdparty/tiff-4.2.0/html/man/Makefile.am @@ -76,17 +76,11 @@ docfiles = \ TIFFWriteRawTile.3tiff.html \ TIFFWriteScanline.3tiff.html \ TIFFWriteTile.3tiff.html \ - bmp2tiff.1.html \ fax2ps.1.html \ fax2tiff.1.html \ - gif2tiff.1.html \ pal2rgb.1.html \ ppm2tiff.1.html \ - ras2tiff.1.html \ raw2tiff.1.html \ - rgb2ycbcr.1.html \ - sgi2tiff.1.html \ - thumbnail.1.html \ tiff2bw.1.html \ tiff2pdf.1.html \ tiff2ps.1.html \ @@ -100,8 +94,7 @@ docfiles = \ tiffinfo.1.html \ tiffmedian.1.html \ tiffset.1.html \ - tiffsplit.1.html \ - tiffsv.1.html + tiffsplit.1.html dist_doc_DATA = $(indexfile) $(docfiles) @@ -124,3 +117,6 @@ htmldoc: ${GROFF} $(MANSRCDIR)/$$i > $(HTMLMANDIR)/$$i.html; \ done +EXTRA_DIST = \ + CMakeLists.txt \ + HtmlDoc.cmake diff --git a/thirdparty/tiff-4.0.3/html/man/Makefile.in b/thirdparty/tiff-4.2.0/html/man/Makefile.in similarity index 85% rename from thirdparty/tiff-4.0.3/html/man/Makefile.in rename to thirdparty/tiff-4.2.0/html/man/Makefile.in index 86f71e98..f6d6cef2 100644 --- a/thirdparty/tiff-4.0.3/html/man/Makefile.in +++ b/thirdparty/tiff-4.2.0/html/man/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -40,23 +40,61 @@ # Process this file with automake to produce Makefile.in. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -76,8 +114,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = html/man -DIST_COMMON = $(dist_doc_DATA) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/config/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -85,7 +121,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(dist_doc_DATA) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = @@ -138,6 +176,8 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(docdir)" DATA = $(dist_doc_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -151,6 +191,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -198,6 +239,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -335,17 +377,11 @@ docfiles = \ TIFFWriteRawTile.3tiff.html \ TIFFWriteScanline.3tiff.html \ TIFFWriteTile.3tiff.html \ - bmp2tiff.1.html \ fax2ps.1.html \ fax2tiff.1.html \ - gif2tiff.1.html \ pal2rgb.1.html \ ppm2tiff.1.html \ - ras2tiff.1.html \ raw2tiff.1.html \ - rgb2ycbcr.1.html \ - sgi2tiff.1.html \ - thumbnail.1.html \ tiff2bw.1.html \ tiff2pdf.1.html \ tiff2ps.1.html \ @@ -359,13 +395,16 @@ docfiles = \ tiffinfo.1.html \ tiffmedian.1.html \ tiffset.1.html \ - tiffsplit.1.html \ - tiffsv.1.html + tiffsplit.1.html dist_doc_DATA = $(indexfile) $(docfiles) INDEXSTART = 'Libtiff HTML manpage index

      Man Pages

      ' INDEXEND = '

    ' manpages = $(docfiles:.html=) +EXTRA_DIST = \ + CMakeLists.txt \ + HtmlDoc.cmake + all: all-am .SUFFIXES: @@ -381,14 +420,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign html/man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign html/man/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -426,16 +464,17 @@ uninstall-dist_docDATA: @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -571,16 +610,19 @@ uninstall-am: uninstall-dist_docDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dist_docDATA install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-dist_docDATA + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_docDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-dist_docDATA + +.PRECIOUS: Makefile .PHONY: index diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFClose.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFClose.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFClose.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFClose.3tiff.html index 720ca327..908dcc70 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFClose.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFClose.3tiff.html @@ -79,7 +79,7 @@ warning messages are directed to the

    libtiff(3TIFF), TIFFOpen(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


  • diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFDataWidth.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFDataWidth.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFDataWidth.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFDataWidth.3tiff.html index 575e3cb8..9eede060 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFDataWidth.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFDataWidth.3tiff.html @@ -90,7 +90,7 @@ supplied.

    libtiff(3TIFF),

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFError.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFError.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFError.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFError.3tiff.html index 721cec7e..cd30c7ed 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFError.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFError.3tiff.html @@ -98,7 +98,7 @@ previous error handling function.

    printf(3)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFFieldDataType.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFFieldDataType.3tiff.html similarity index 97% rename from thirdparty/tiff-4.0.3/html/man/TIFFFieldDataType.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFFieldDataType.3tiff.html index d6a463f8..2270a5c9 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFFieldDataType.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFFieldDataType.3tiff.html @@ -83,7 +83,7 @@ returns a member of the enum type TIFFDataType.

    libtiff(3TIFF),

    Libtiff library -home page: http://www.remotesensing.org/libtiff/

    +home page: http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFFieldName.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFFieldName.3tiff.html similarity index 97% rename from thirdparty/tiff-4.0.3/html/man/TIFFFieldName.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFFieldName.3tiff.html index b270d4ae..df4ee506 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFFieldName.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFFieldName.3tiff.html @@ -80,7 +80,7 @@ returns a constant C string.

    libtiff(3TIFF),

    Libtiff library -home page: http://www.remotesensing.org/libtiff/

    +home page: http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFFieldPassCount.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFFieldPassCount.3tiff.html similarity index 97% rename from thirdparty/tiff-4.0.3/html/man/TIFFFieldPassCount.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFFieldPassCount.3tiff.html index 480f736d..5dc31262 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFFieldPassCount.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFFieldPassCount.3tiff.html @@ -92,7 +92,7 @@ returns an integer that is always 1 (true) or 0 (false).

    libtiff(3TIFF),

    Libtiff library -home page: http://www.remotesensing.org/libtiff/

    +home page: http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFFieldReadCount.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFFieldReadCount.3tiff.html similarity index 97% rename from thirdparty/tiff-4.0.3/html/man/TIFFFieldReadCount.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFFieldReadCount.3tiff.html index c77d4d37..d800a861 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFFieldReadCount.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFFieldReadCount.3tiff.html @@ -95,7 +95,7 @@ returns an integer.

    libtiff(3TIFF),

    Libtiff library -home page: http://www.remotesensing.org/libtiff/

    +home page: http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFFieldTag.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFFieldTag.3tiff.html similarity index 97% rename from thirdparty/tiff-4.0.3/html/man/TIFFFieldTag.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFFieldTag.3tiff.html index d1cc04a4..b1fdea0f 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFFieldTag.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFFieldTag.3tiff.html @@ -82,7 +82,7 @@ returns an integer tag value.

    libtiff(3TIFF),

    Libtiff library -home page: http://www.remotesensing.org/libtiff/

    +home page: http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFFieldWriteCount.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFFieldWriteCount.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFFieldWriteCount.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFFieldWriteCount.3tiff.html index d72a8e3c..0d446bc7 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFFieldWriteCount.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFFieldWriteCount.3tiff.html @@ -102,7 +102,7 @@ returns an integer.

    libtiff(3TIFF),

    Libtiff library -home page: http://www.remotesensing.org/libtiff/

    +home page: http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFFlush.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFFlush.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFFlush.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFFlush.3tiff.html index 742f3aee..77782e64 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFFlush.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFFlush.3tiff.html @@ -105,7 +105,7 @@ returned.

    libtiff(3TIFF),

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFGetField.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFGetField.3tiff.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/man/TIFFGetField.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFGetField.3tiff.html index bd2f78bb..cbbb8be7 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFGetField.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFGetField.3tiff.html @@ -1963,7 +1963,7 @@ field, tag 0x%x. An unknown tag was supplied.

    TIFFWriteDirectory(3TIFF) libtiff(3TIFF),

    Libtiff library -home page: http://www.remotesensing.org/libtiff/

    +home page: http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFOpen.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFOpen.3tiff.html similarity index 100% rename from thirdparty/tiff-4.0.3/html/man/TIFFOpen.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFOpen.3tiff.html diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFPrintDirectory.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFPrintDirectory.3tiff.html similarity index 100% rename from thirdparty/tiff-4.0.3/html/man/TIFFPrintDirectory.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFPrintDirectory.3tiff.html diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFRGBAImage.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFRGBAImage.3tiff.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/man/TIFFRGBAImage.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFRGBAImage.3tiff.html index 08a99240..83581f11 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFRGBAImage.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFRGBAImage.3tiff.html @@ -311,7 +311,7 @@ insufficient memory to allocate a table used to map data to TIFFReadRGBATile(3TIFF), libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFReadDirectory.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFReadDirectory.3tiff.html similarity index 97% rename from thirdparty/tiff-4.0.3/html/man/TIFFReadDirectory.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFReadDirectory.3tiff.html index 82350ad3..5e4004db 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFReadDirectory.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFReadDirectory.3tiff.html @@ -151,23 +151,23 @@ specification. This error is not fatal.

    unknown tag was encountered in the directory; the library ignores all such tags.

    -

    TIFF directory is missing requred +

    TIFF directory is missing required "ImageLength" field. The image violates the specification by not having a necessary field. There is no way for the library to recover from this error.

    -

    TIFF directory is missing requred +

    TIFF directory is missing required "PlanarConfig" field. The image violates the specification by not having a necessary field. There is no way for the library to recover from this error.

    -

    TIFF directory is missing requred +

    TIFF directory is missing required "StripOffsets" field. The image has multiple strips, but is missing the tag that specifies the file offset to each strip of data. There is no way for the library to recover from this error.

    -

    TIFF directory is missing requred +

    TIFF directory is missing required "TileOffsets" field. The image has multiple tiles, but is missing the tag that specifies the file offset to each tile of data. There is no way for the library to @@ -210,7 +210,7 @@ size.

    libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFReadEncodedStrip.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFReadEncodedStrip.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFReadEncodedStrip.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFReadEncodedStrip.3tiff.html index d5c4c15e..c942063f 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFReadEncodedStrip.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFReadEncodedStrip.3tiff.html @@ -125,7 +125,7 @@ returns −1 if an error was encountered.

    libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFReadEncodedTile.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFReadEncodedTile.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFReadEncodedTile.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFReadEncodedTile.3tiff.html index b42dc090..92eb72a3 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFReadEncodedTile.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFReadEncodedTile.3tiff.html @@ -122,7 +122,7 @@ opposite to the native machine byte order,

    TIFFReadTile(3TIFF), libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFReadRGBAImage.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFReadRGBAImage.3tiff.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/man/TIFFReadRGBAImage.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFReadRGBAImage.3tiff.html index 1ebb09b8..f648f099 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFReadRGBAImage.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFReadRGBAImage.3tiff.html @@ -293,7 +293,7 @@ insufficient memory to allocate a table used to map data to TIFFReadRGBATile(3TIFF), libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFReadRGBAStrip.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFReadRGBAStrip.3tiff.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/man/TIFFReadRGBAStrip.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFReadRGBAStrip.3tiff.html index 37d36d3c..3358df7d 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFReadRGBAStrip.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFReadRGBAStrip.3tiff.html @@ -200,7 +200,7 @@ insufficient memory to allocate a table used to map data to TIFFReadRGBATile(3TIFF), libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFReadRGBATile.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFReadRGBATile.3tiff.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/man/TIFFReadRGBATile.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFReadRGBATile.3tiff.html index 6bd298a2..bdbb43cc 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFReadRGBATile.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFReadRGBATile.3tiff.html @@ -253,7 +253,7 @@ insufficient memory to allocate a table used to map data to TIFFReadRGBAStrip(3TIFF), libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFReadRawStrip.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFReadRawStrip.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFReadRawStrip.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFReadRawStrip.3tiff.html index 4dd1fbcc..4fe1a995 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFReadRawStrip.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFReadRawStrip.3tiff.html @@ -101,7 +101,7 @@ typically be at least as large as the number returned by libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFReadRawTile.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFReadRawTile.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFReadRawTile.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFReadRawTile.3tiff.html index e74295be..0065d2cf 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFReadRawTile.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFReadRawTile.3tiff.html @@ -103,7 +103,7 @@ typically be at least as large as the value returned by libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFReadScanline.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFReadScanline.3tiff.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/man/TIFFReadScanline.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFReadScanline.3tiff.html index e825e4cb..79f17fcd 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFReadScanline.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFReadScanline.3tiff.html @@ -149,7 +149,7 @@ interfaces to read these formats.

    TIFFReadRawStrip(3TIFF), libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFReadTile.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFReadTile.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFReadTile.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFReadTile.3tiff.html index be245f88..26054803 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFReadTile.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFReadTile.3tiff.html @@ -125,7 +125,7 @@ returned.

    TIFFReadRawTile(3TIFF), libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFSetDirectory.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFSetDirectory.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFSetDirectory.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFSetDirectory.3tiff.html index 9047b0bc..c3434056 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFSetDirectory.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFSetDirectory.3tiff.html @@ -114,7 +114,7 @@ file.

    TIFFWriteDirectory(3TIFF), libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFSetField.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFSetField.3tiff.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/man/TIFFSetField.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFSetField.3tiff.html index f160fedd..ce6a88b0 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFSetField.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFSetField.3tiff.html @@ -1859,7 +1859,7 @@ for the named tag.

    TIFFReadDirectory(3TIFF), libtiff(3TIFF)

    Libtiff library -home page: http://www.remotesensing.org/libtiff/

    +home page: http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFWarning.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFWarning.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFWarning.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFWarning.3tiff.html index 18f2e8b4..856cd40b 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFWarning.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFWarning.3tiff.html @@ -100,7 +100,7 @@ previous error handling function.

    printf(3)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFWriteDirectory.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFWriteDirectory.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFWriteDirectory.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFWriteDirectory.3tiff.html index 1e72a5be..6483aa6a 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFWriteDirectory.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFWriteDirectory.3tiff.html @@ -69,7 +69,7 @@ have an established location in the file. It will rewrite the directory, but instead of place it at it’s old location (as TIFFWriteDirectory would) it will place them at the end of the file, correcting the pointer from the -preceeding directory or file header to point to it’s +preceding directory or file header to point to it’s new location. This is particularly important in cases where the size of the directory and pointed to data has grown, so it won’t fit in the space available at the old @@ -168,7 +168,7 @@ the directory that is being written.

    TIFFSetDirectory(3TIFF), libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFWriteEncodedStrip.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFWriteEncodedStrip.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFWriteEncodedStrip.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFWriteEncodedStrip.3tiff.html index 3b90199a..cf7a488f 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFWriteEncodedStrip.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFWriteEncodedStrip.3tiff.html @@ -145,7 +145,7 @@ and byte counts.

    libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFWriteEncodedTile.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFWriteEncodedTile.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFWriteEncodedTile.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFWriteEncodedTile.3tiff.html index 5e85f6dd..8cd44112 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFWriteEncodedTile.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFWriteEncodedTile.3tiff.html @@ -139,7 +139,7 @@ byte counts.

    libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFWriteRawStrip.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFWriteRawStrip.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFWriteRawStrip.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFWriteRawStrip.3tiff.html index 9a3ef0c1..3379b8b0 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFWriteRawStrip.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFWriteRawStrip.3tiff.html @@ -136,7 +136,7 @@ specified image dimensions.

    TIFFWriteScanline(3TIFF), libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFWriteRawTile.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFWriteRawTile.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFWriteRawTile.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFWriteRawTile.3tiff.html index 639af6c7..92d64f0f 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFWriteRawTile.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFWriteRawTile.3tiff.html @@ -120,7 +120,7 @@ specified image dimensions.

    TIFFWriteScanline(3TIFF), libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFWriteScanline.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFWriteScanline.3tiff.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/man/TIFFWriteScanline.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFWriteScanline.3tiff.html index 4c68f9d4..8f300217 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFWriteScanline.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFWriteScanline.3tiff.html @@ -198,7 +198,7 @@ block-interleaved samples.

    TIFFWriteRawStrip(3TIFF), libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFWriteTile.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFWriteTile.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFWriteTile.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFWriteTile.3tiff.html index 6f6ffd23..d450ee12 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFWriteTile.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFWriteTile.3tiff.html @@ -107,7 +107,7 @@ returned.

    TIFFWriteRawTile(3TIFF), libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFbuffer.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFbuffer.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFbuffer.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFbuffer.3tiff.html index 09009b5f..d96621d0 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFbuffer.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFbuffer.3tiff.html @@ -108,7 +108,7 @@ allocate space for a data buffer.

    libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFcodec.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFcodec.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFcodec.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFcodec.3tiff.html index d2007542..e18c0ed4 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFcodec.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFcodec.3tiff.html @@ -108,7 +108,7 @@ schemes.

    libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFcolor.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFcolor.3tiff.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/man/TIFFcolor.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFcolor.3tiff.html index edf423b6..e598ae6e 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFcolor.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFcolor.3tiff.html @@ -967,7 +967,7 @@ _TIFFfree(cielab);

    TIFFRGBAImage(3TIFF) libtiff(3TIFF),

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFmemory.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFmemory.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFmemory.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFmemory.3tiff.html index c3f38e0b..283be9bd 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFmemory.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFmemory.3tiff.html @@ -76,7 +76,7 @@ another memory location using _TIFFmemcpy, or compared for equality using _TIFFmemcmp. These routines conform to the equivalent ANSI C routines: memset, memcpy, and memcmp, -repsectively.

    +respectively.

    @@ -102,7 +102,7 @@ repsectively.

    libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFquery.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFquery.3tiff.html similarity index 100% rename from thirdparty/tiff-4.0.3/html/man/TIFFquery.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFquery.3tiff.html diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFsize.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFsize.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFsize.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFsize.3tiff.html index 5a14254e..f2e2b772 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFsize.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFsize.3tiff.html @@ -87,7 +87,7 @@ planes.

    libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFstrip.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFstrip.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFstrip.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFstrip.3tiff.html index b8bc7c62..ae6b7903 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFstrip.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFstrip.3tiff.html @@ -121,7 +121,7 @@ the image.

    TIFFWriteRawStrip(3TIFF), libtiff(3TIFF),

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFswab.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFswab.3tiff.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/TIFFswab.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFswab.3tiff.html index 80d1db45..3f7ebfef 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFswab.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFswab.3tiff.html @@ -102,7 +102,7 @@ table that can be used as an identity function; i.e.

    libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/TIFFtile.3tiff.html b/thirdparty/tiff-4.2.0/html/man/TIFFtile.3tiff.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/man/TIFFtile.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/TIFFtile.3tiff.html index addeb515..b69cc919 100644 --- a/thirdparty/tiff-4.0.3/html/man/TIFFtile.3tiff.html +++ b/thirdparty/tiff-4.2.0/html/man/TIFFtile.3tiff.html @@ -133,7 +133,7 @@ the image.

    libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/fax2ps.1.html b/thirdparty/tiff-4.2.0/html/man/fax2ps.1.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/man/fax2ps.1.html rename to thirdparty/tiff-4.2.0/html/man/fax2ps.1.html index aba6fc30..7c5c1f3e 100644 --- a/thirdparty/tiff-4.0.3/html/man/fax2ps.1.html +++ b/thirdparty/tiff-4.2.0/html/man/fax2ps.1.html @@ -244,7 +244,7 @@ PostScript to image the bitmap raster instead.

    tiff2ps(1), libtiff(3)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/fax2tiff.1.html b/thirdparty/tiff-4.2.0/html/man/fax2tiff.1.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/man/fax2tiff.1.html rename to thirdparty/tiff-4.2.0/html/man/fax2tiff.1.html index 3aac8c79..a1c1b0b6 100644 --- a/thirdparty/tiff-4.0.3/html/man/fax2tiff.1.html +++ b/thirdparty/tiff-4.2.0/html/man/fax2tiff.1.html @@ -599,7 +599,7 @@ TIFF 5.0 specification prepared by Cygnet Technologies.

    tiffgt(1), libtiff(3)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/index.html b/thirdparty/tiff-4.2.0/html/man/index.html similarity index 94% rename from thirdparty/tiff-4.0.3/html/man/index.html rename to thirdparty/tiff-4.2.0/html/man/index.html index 7e9e8d2c..4456f990 100644 --- a/thirdparty/tiff-4.0.3/html/man/index.html +++ b/thirdparty/tiff-4.2.0/html/man/index.html @@ -38,13 +38,13 @@
  • TIFFWriteTile.3tiff.html
  • fax2ps.1.html
  • fax2tiff.1.html -
  • gif2tiff.1.html +
  • pal2rgb.1.html
  • ppm2tiff.1.html -
  • ras2tiff.1.html +
  • raw2tiff.1.html
  • rgb2ycbcr.1.html -
  • sgi2tiff.1.html +
  • thumbnail.1.html
  • tiff2bw.1.html
  • tiff2pdf.1.html @@ -60,5 +60,5 @@
  • tiffmedian.1.html
  • tiffset.1.html
  • tiffsplit.1.html -
  • tiffsv.1.html + diff --git a/thirdparty/tiff-4.0.3/html/man/libtiff.3tiff.html b/thirdparty/tiff-4.2.0/html/man/libtiff.3tiff.html similarity index 100% rename from thirdparty/tiff-4.0.3/html/man/libtiff.3tiff.html rename to thirdparty/tiff-4.2.0/html/man/libtiff.3tiff.html diff --git a/thirdparty/tiff-4.0.3/html/man/pal2rgb.1.html b/thirdparty/tiff-4.2.0/html/man/pal2rgb.1.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/man/pal2rgb.1.html rename to thirdparty/tiff-4.2.0/html/man/pal2rgb.1.html index d06ddb6d..42ecdc17 100644 --- a/thirdparty/tiff-4.0.3/html/man/pal2rgb.1.html +++ b/thirdparty/tiff-4.2.0/html/man/pal2rgb.1.html @@ -181,7 +181,7 @@ has approximately 8 kilobytes of data in it.

    tiffmedian(1), libtiff(3)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/ppm2tiff.1.html b/thirdparty/tiff-4.2.0/html/man/ppm2tiff.1.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/ppm2tiff.1.html rename to thirdparty/tiff-4.2.0/html/man/ppm2tiff.1.html index e3c664e2..79a89f2e 100644 --- a/thirdparty/tiff-4.0.3/html/man/ppm2tiff.1.html +++ b/thirdparty/tiff-4.2.0/html/man/ppm2tiff.1.html @@ -133,7 +133,7 @@ resolution (in dots/inch).

    tiffmedian(1), libtiff(3)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/raw2tiff.1.html b/thirdparty/tiff-4.2.0/html/man/raw2tiff.1.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/man/raw2tiff.1.html rename to thirdparty/tiff-4.2.0/html/man/raw2tiff.1.html index ce47e9f8..59d5506b 100644 --- a/thirdparty/tiff-4.0.3/html/man/raw2tiff.1.html +++ b/thirdparty/tiff-4.2.0/html/man/raw2tiff.1.html @@ -502,7 +502,7 @@ images guessing method will work fine.

    tiffmedian(1), libtiff(3)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/tiff2bw.1.html b/thirdparty/tiff-4.2.0/html/man/tiff2bw.1.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/tiff2bw.1.html rename to thirdparty/tiff-4.2.0/html/man/tiff2bw.1.html index 1ebb4d39..413808ec 100644 --- a/thirdparty/tiff-4.0.3/html/man/tiff2bw.1.html +++ b/thirdparty/tiff-4.2.0/html/man/tiff2bw.1.html @@ -153,7 +153,7 @@ strip is approximately 8 kilobytes.

    tiffmedian(1), libtiff(3)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/tiff2pdf.1.html b/thirdparty/tiff-4.2.0/html/man/tiff2pdf.1.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/man/tiff2pdf.1.html rename to thirdparty/tiff-4.2.0/html/man/tiff2pdf.1.html index 3b6dd4b1..1feaf6b7 100644 --- a/thirdparty/tiff-4.0.3/html/man/tiff2pdf.1.html +++ b/thirdparty/tiff-4.2.0/html/man/tiff2pdf.1.html @@ -601,7 +601,7 @@ page, compressing the output with JPEG, with JPEG quality tiff2ps(1)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/tiff2ps.1.html b/thirdparty/tiff-4.2.0/html/man/tiff2ps.1.html similarity index 86% rename from thirdparty/tiff-4.0.3/html/man/tiff2ps.1.html rename to thirdparty/tiff-4.2.0/html/man/tiff2ps.1.html index ef2cd7f9..7b309b0f 100644 --- a/thirdparty/tiff-4.0.3/html/man/tiff2ps.1.html +++ b/thirdparty/tiff-4.2.0/html/man/tiff2ps.1.html @@ -128,6 +128,19 @@ images.

    +

    −8

    + + + + +

    Disable use of ASCII85 encoding with PostScript Level 2/3.

    + + + + + + +

    −a

    @@ -171,6 +184,19 @@ an effect if both the −w and the +

    −C

    + + + + +

    Specify the document creator name.

    + + + + + + +

    −d

    @@ -187,6 +213,19 @@ individual pages in a multi-page (e.g. facsimile) file.

    +

    −D

    + + + + +

    Enable duplex printing (two pages per sheet of paper).

    + + + + + + +

    −e

    @@ -252,8 +291,8 @@ and non-zero to enable. The default is enabled.

    Specify the size of overlapping for split images (in -inches). Used in conjunction with −H -option.

    +inches). Used in conjunction with −H and −W +options.

    @@ -309,6 +348,19 @@ are hidden using the SubIFD tag.

    +

    −O

    + + + + +

    Write PostScript to specified file instead of standard output.

    + + + + + + +

    −p

    @@ -323,6 +375,19 @@ PostScript.

    +

    −P

    + + + + +

    Set optional PageOrientation DSC comment to Landscape or Portrait.

    + + + + + + +

    −r

    @@ -350,6 +415,32 @@ file.

    +

    −t

    + + + + +

    Specify the document title string.

    + + + + + + + +

    −T

    + + + + +

    Print pages for top edge binding.

    + + + + + + +

    −w

    @@ -364,6 +455,22 @@ inches).

    +

    −W

    + + + + +

    Specify the maximum width of image (in inches). Images +with larger sizes will be split in several pages. Option +−L may be used for specifying size of split +images overlapping.

    + + + + + + +

    −x

    @@ -524,7 +631,7 @@ Level I output.

    tiffsv(1), libtiff(3)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/tiff2rgba.1.html b/thirdparty/tiff-4.2.0/html/man/tiff2rgba.1.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/tiff2rgba.1.html rename to thirdparty/tiff-4.2.0/html/man/tiff2rgba.1.html index 35e06a54..203f7def 100644 --- a/thirdparty/tiff-4.0.3/html/man/tiff2rgba.1.html +++ b/thirdparty/tiff-4.2.0/html/man/tiff2rgba.1.html @@ -154,7 +154,7 @@ a pure RGB file. Currently this does not work if the libtiff(3)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/tiffcmp.1.html b/thirdparty/tiff-4.2.0/html/man/tiffcmp.1.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/tiffcmp.1.html rename to thirdparty/tiff-4.2.0/html/man/tiffcmp.1.html index acd2e90f..d1474caf 100644 --- a/thirdparty/tiff-4.0.3/html/man/tiffcmp.1.html +++ b/thirdparty/tiff-4.2.0/html/man/tiffcmp.1.html @@ -148,7 +148,7 @@ may be off in some exotic cases.

    tiffmedian(1), libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/tiffcp.1.html b/thirdparty/tiff-4.2.0/html/man/tiffcp.1.html similarity index 94% rename from thirdparty/tiff-4.0.3/html/man/tiffcp.1.html rename to thirdparty/tiff-4.2.0/html/man/tiffcp.1.html index 4c7fcb62..a376f94e 100644 --- a/thirdparty/tiff-4.0.3/html/man/tiffcp.1.html +++ b/thirdparty/tiff-4.2.0/html/man/tiffcp.1.html @@ -70,27 +70,33 @@ any way.

    OPTIONS

    + cols="5" cellspacing="0" cellpadding="0"> - - -
    -

    −b image

    - - + + + + + + - + + + -
    +

    −a

    +
    + +

    Append to an existing output file instead of overwriting it.

    +
    +
    +

    −b

    subtract the following monochrome image from all others processed. This can be used to remove a noise bias from a set of images. This bias image is typically an image of noise the camera saw with its shutter closed.

    - - + @@ -260,6 +267,19 @@ images.

    + + + + + + @@ -355,6 +375,19 @@ in sequence.

    + + + + + +
    +
    @@ -135,8 +141,9 @@ output file: none for no compression, packbits for PackBits compression, lzw for Lempel-Ziv & Welch compression, jpeg for baseline JPEG compression, zip for Deflate compression, g3 -for CCITT Group 3 (T.4) compression, and g4 for CCITT -Group 4 (T.6) compression. By default tiffcp will +for CCITT Group 3 (T.4) compression, g4 for CCITT +Group 4 (T.6) compression, or sgilog for SGILOG compression. +By default tiffcp will compress data according to the value of the Compression tag found in the source file.

    +

    −o

    +
    + +

    Set initial directory offset.

    +
    +
    +

    −p

    + +

    −8

    +
    + +

    Write BigTIFF instead of classic TIFF format.

    +
    +
    libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/tiffcrop.1.html b/thirdparty/tiff-4.2.0/html/man/tiffcrop.1.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/man/tiffcrop.1.html rename to thirdparty/tiff-4.2.0/html/man/tiffcrop.1.html index 9c1edbbc..4c868db9 100644 --- a/thirdparty/tiff-4.0.3/html/man/tiffcrop.1.html +++ b/thirdparty/tiff-4.2.0/html/man/tiffcrop.1.html @@ -676,7 +676,7 @@ decompressing) with the command:

    libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/tiffdither.1.html b/thirdparty/tiff-4.2.0/html/man/tiffdither.1.html similarity index 95% rename from thirdparty/tiff-4.0.3/html/man/tiffdither.1.html rename to thirdparty/tiff-4.2.0/html/man/tiffdither.1.html index 5e3cb7c5..40e3d6ed 100644 --- a/thirdparty/tiff-4.0.3/html/man/tiffdither.1.html +++ b/thirdparty/tiff-4.2.0/html/man/tiffdither.1.html @@ -139,6 +139,19 @@ with the Fill- Order tag set to MSB2LSB +

    −r

    + + + + +

    Make each strip have no more than the given number of rows.

    + + + + + + +

    −t

    @@ -175,7 +188,7 @@ threshold value is 128.

    libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/tiffdump.1.html b/thirdparty/tiff-4.2.0/html/man/tiffdump.1.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/tiffdump.1.html rename to thirdparty/tiff-4.2.0/html/man/tiffdump.1.html index c37d2eeb..7a23feb6 100644 --- a/thirdparty/tiff-4.0.3/html/man/tiffdump.1.html +++ b/thirdparty/tiff-4.2.0/html/man/tiffdump.1.html @@ -137,7 +137,7 @@ using the usual C-style syntax; i.e. a leading

    tiffinfo(1), libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/tiffgt.1.html b/thirdparty/tiff-4.2.0/html/man/tiffgt.1.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/man/tiffgt.1.html rename to thirdparty/tiff-4.2.0/html/man/tiffgt.1.html index 5a04996a..d8fcef50 100644 --- a/thirdparty/tiff-4.0.3/html/man/tiffgt.1.html +++ b/thirdparty/tiff-4.2.0/html/man/tiffgt.1.html @@ -543,7 +543,7 @@ manager.

    libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/tiffinfo.1.html b/thirdparty/tiff-4.2.0/html/man/tiffinfo.1.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/tiffinfo.1.html rename to thirdparty/tiff-4.2.0/html/man/tiffinfo.1.html index d3a013ce..9accdd51 100644 --- a/thirdparty/tiff-4.0.3/html/man/tiffinfo.1.html +++ b/thirdparty/tiff-4.2.0/html/man/tiffinfo.1.html @@ -188,7 +188,7 @@ in a directory.

    tiffmedian(1), libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/tiffmedian.1.html b/thirdparty/tiff-4.2.0/html/man/tiffmedian.1.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/man/tiffmedian.1.html rename to thirdparty/tiff-4.2.0/html/man/tiffmedian.1.html index 78310511..ec6d0b1c 100644 --- a/thirdparty/tiff-4.0.3/html/man/tiffmedian.1.html +++ b/thirdparty/tiff-4.2.0/html/man/tiffmedian.1.html @@ -175,7 +175,7 @@ more than 8 kilobytes of data appear in a strip.

    Paul Heckbert, SIGGRAPH proceedings, 1982, pp. 297-307.

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/tiffset.1.html b/thirdparty/tiff-4.2.0/html/man/tiffset.1.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/man/tiffset.1.html rename to thirdparty/tiff-4.2.0/html/man/tiffset.1.html index 7192d6e9..0c30b010 100644 --- a/thirdparty/tiff-4.0.3/html/man/tiffset.1.html +++ b/thirdparty/tiff-4.2.0/html/man/tiffset.1.html @@ -168,7 +168,7 @@ tiffset −s 283 300.0 a.tif libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/man/tiffsplit.1.html b/thirdparty/tiff-4.2.0/html/man/tiffsplit.1.html similarity index 98% rename from thirdparty/tiff-4.0.3/html/man/tiffsplit.1.html rename to thirdparty/tiff-4.2.0/html/man/tiffsplit.1.html index 4de5c812..5cf8dd85 100644 --- a/thirdparty/tiff-4.0.3/html/man/tiffsplit.1.html +++ b/thirdparty/tiff-4.2.0/html/man/tiffsplit.1.html @@ -94,7 +94,7 @@ tags’’ is copied when splitting.

    libtiff(3TIFF)

    Libtiff library home page: -http://www.remotesensing.org/libtiff/

    +http://www.simplesystems.org/libtiff/


    diff --git a/thirdparty/tiff-4.0.3/html/misc.html b/thirdparty/tiff-4.2.0/html/misc.html similarity index 91% rename from thirdparty/tiff-4.0.3/html/misc.html rename to thirdparty/tiff-4.2.0/html/misc.html index aed91a92..69d3ba18 100644 --- a/thirdparty/tiff-4.0.3/html/misc.html +++ b/thirdparty/tiff-4.2.0/html/misc.html @@ -1,13 +1,18 @@ + Acknowledgments and Other Issues + - - +

    - +ring Acknowledgments and Other Issues

    @@ -77,13 +82,14 @@ the more persistent contributors have been: Joris Van Damme Tavis Ormandy Richard Nolde + Even Rouault (my apology to anyone that was inadvertently not listed.)

    Use and Copyright

    -

    +
    
     Copyright (c) 1988-1997 Sam Leffler
     Copyright (c) 1991-1997 Silicon Graphics, Inc.
     
    @@ -105,12 +111,11 @@ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
     WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
     LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
     OF THIS SOFTWARE.
    -
    + -


    -Last updated: $Date: 2007/02/24 15:47:04 $ +Last updated: $Date: 2016-09-25 20:05:44 $ diff --git a/thirdparty/tiff-4.0.3/html/support.html b/thirdparty/tiff-4.2.0/html/support.html similarity index 99% rename from thirdparty/tiff-4.0.3/html/support.html rename to thirdparty/tiff-4.2.0/html/support.html index f6f5d608..e29d2d0d 100644 --- a/thirdparty/tiff-4.0.3/html/support.html +++ b/thirdparty/tiff-4.2.0/html/support.html @@ -10,7 +10,7 @@ --> - + @@ -648,7 +648,7 @@


    - Last updated: $Date: 2005/12/28 06:53:18 $ + Last updated: $Date: 2016-09-25 20:05:45 $

    diff --git a/thirdparty/tiff-4.0.3/html/tools.html b/thirdparty/tiff-4.2.0/html/tools.html similarity index 79% rename from thirdparty/tiff-4.0.3/html/tools.html rename to thirdparty/tiff-4.2.0/html/tools.html index 65e9c0dd..d567ad8a 100644 --- a/thirdparty/tiff-4.0.3/html/tools.html +++ b/thirdparty/tiff-4.2.0/html/tools.html @@ -1,14 +1,16 @@ -TIFF Tools Overview + - -

    TIFF -Tools Overview

    + +

    quad +TIFF Tools Overview

    This software distribution comes with a small collection of programs for converting non-TIFF format images to TIFF and for manipulating and interrogating the contents of TIFF images. Several @@ -26,21 +28,11 @@ examples for writing programs to display and save TIFF images. The software makes extensive use of the TIFFRGBAImage facilities described elsewhere.

    - - - -
    tiffsvA program to save all or part of a screen dump on a Silicon -Graphics system. As for tiffgt this code, while written to -use the IRIS GL, can be easily tailored to other devices.

    Device-independent Programs

    The remaining programs should be device-independent: - - - - - - - - @@ -64,11 +52,6 @@ applying the colormap - - - - @@ -78,12 +61,7 @@ applying the colormap TIFF image; it's mainly provided for testing - - - - - +

    Check out the manual pages for details about the above programs.


    -Last updated: $Date: 2009-10-28 22:13:37 $ +Last updated: $Date: 2016-06-05 19:54:00 $ diff --git a/thirdparty/tiff-4.0.3/html/v3.4beta007.html b/thirdparty/tiff-4.2.0/html/v3.4beta007.html similarity index 93% rename from thirdparty/tiff-4.0.3/html/v3.4beta007.html rename to thirdparty/tiff-4.2.0/html/v3.4beta007.html index c535d270..c2b51f0a 100644 --- a/thirdparty/tiff-4.0.3/html/v3.4beta007.html +++ b/thirdparty/tiff-4.2.0/html/v3.4beta007.html @@ -1,3 +1,4 @@ + @@ -16,7 +17,7 @@ Changes in TIFF v3.4beta007 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.4beta007<BR> <B>Previous Version</B>: v3.4beta004<BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> +<B>Master Download Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -105,7 +106,7 @@ The following information is located here: <ADDRESS> <A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A> -Last updated $Date: 1999/08/09 20:21:21 $. +Last updated $Date: 2016-09-25 20:05:45 $. </ADDRESS> </BODY> diff --git a/thirdparty/tiff-4.0.3/html/v3.4beta016.html b/thirdparty/tiff-4.2.0/html/v3.4beta016.html similarity index 94% rename from thirdparty/tiff-4.0.3/html/v3.4beta016.html rename to thirdparty/tiff-4.2.0/html/v3.4beta016.html index 22f185f5..11035384 100644 --- a/thirdparty/tiff-4.0.3/html/v3.4beta016.html +++ b/thirdparty/tiff-4.2.0/html/v3.4beta016.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -16,7 +17,7 @@ Changes in TIFF v3.4beta016 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.4beta016<BR> <B>Previous Version</B>: <A HREF=v3.4beta007.html>v3.4beta007</A><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> +<B>Master Download Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -115,7 +116,7 @@ The following information is located here: <ADDRESS> <A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A> -Last updated $Date: 1999/08/09 20:21:21 $. +Last updated $Date: 2016-09-25 20:05:45 $. </ADDRESS> </BODY> diff --git a/thirdparty/tiff-4.0.3/html/v3.4beta018.html b/thirdparty/tiff-4.2.0/html/v3.4beta018.html similarity index 91% rename from thirdparty/tiff-4.0.3/html/v3.4beta018.html rename to thirdparty/tiff-4.2.0/html/v3.4beta018.html index ac1877fa..63ffb497 100644 --- a/thirdparty/tiff-4.0.3/html/v3.4beta018.html +++ b/thirdparty/tiff-4.2.0/html/v3.4beta018.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -16,7 +17,7 @@ Changes in TIFF v3.4beta018 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.4beta018<BR> <B>Previous Version</B>: <A HREF=v3.4beta016.html>v3.4beta016</A><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> +<B>Master Download Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -77,7 +78,7 @@ The following information is located here: <ADDRESS> <A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A> -Last updated $Date: 1999/08/09 20:21:21 $. +Last updated $Date: 2016-09-25 20:05:45 $. </ADDRESS> </BODY> diff --git a/thirdparty/tiff-4.0.3/html/v3.4beta024.html b/thirdparty/tiff-4.2.0/html/v3.4beta024.html similarity index 95% rename from thirdparty/tiff-4.0.3/html/v3.4beta024.html rename to thirdparty/tiff-4.2.0/html/v3.4beta024.html index 25a33478..ec82840c 100644 --- a/thirdparty/tiff-4.0.3/html/v3.4beta024.html +++ b/thirdparty/tiff-4.2.0/html/v3.4beta024.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -16,7 +17,7 @@ Changes in TIFF v3.4beta024 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.4beta024<BR> <B>Previous Version</B>: <A HREF=v3.4beta018.html>v3.4beta018</A><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> +<B>Master Download Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -132,7 +133,7 @@ The following information is located here: <ADDRESS> <A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A> -Last updated $Date: 1999/08/09 20:21:21 $. +Last updated $Date: 2016-09-25 20:05:45 $. </ADDRESS> </BODY> diff --git a/thirdparty/tiff-4.0.3/html/v3.4beta028.html b/thirdparty/tiff-4.2.0/html/v3.4beta028.html similarity index 96% rename from thirdparty/tiff-4.0.3/html/v3.4beta028.html rename to thirdparty/tiff-4.2.0/html/v3.4beta028.html index ff7ef69a..5ae0e490 100644 --- a/thirdparty/tiff-4.0.3/html/v3.4beta028.html +++ b/thirdparty/tiff-4.2.0/html/v3.4beta028.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -16,7 +17,7 @@ Changes in TIFF v3.4beta028 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.4beta028<BR> <B>Previous Version</B>: <A HREF=v3.4beta024.html>v3.4beta024</A><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> +<B>Master Download Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -139,7 +140,7 @@ The following information is located here: <ADDRESS> <A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A> -Last updated $Date: 1999/08/09 20:21:21 $. +Last updated $Date: 2016-09-25 20:05:45 $. </ADDRESS> </BODY> diff --git a/thirdparty/tiff-4.0.3/html/v3.4beta029.html b/thirdparty/tiff-4.2.0/html/v3.4beta029.html similarity index 91% rename from thirdparty/tiff-4.0.3/html/v3.4beta029.html rename to thirdparty/tiff-4.2.0/html/v3.4beta029.html index f2a3d3f6..580cfc49 100644 --- a/thirdparty/tiff-4.0.3/html/v3.4beta029.html +++ b/thirdparty/tiff-4.2.0/html/v3.4beta029.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -16,7 +17,7 @@ Changes in TIFF v3.4beta029 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.4beta029<BR> <B>Previous Version</B>: <A HREF=v3.4beta028.html>v3.4beta028</A><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> +<B>Master Download Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -79,7 +80,7 @@ The following information is located here: <ADDRESS> <A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A> -Last updated $Date: 1999/08/09 20:21:21 $. +Last updated $Date: 2016-09-25 20:05:45 $. </ADDRESS> </BODY> diff --git a/thirdparty/tiff-4.0.3/html/v3.4beta031.html b/thirdparty/tiff-4.2.0/html/v3.4beta031.html similarity index 92% rename from thirdparty/tiff-4.0.3/html/v3.4beta031.html rename to thirdparty/tiff-4.2.0/html/v3.4beta031.html index d5b7eac4..2dff6349 100644 --- a/thirdparty/tiff-4.0.3/html/v3.4beta031.html +++ b/thirdparty/tiff-4.2.0/html/v3.4beta031.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -16,7 +17,7 @@ Changes in TIFF v3.4beta031 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.4beta031<BR> <B>Previous Version</B>: <A HREF=v3.4beta029.html>v3.4beta029</A><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> +<B>Master Download Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -87,7 +88,7 @@ The following information is located here: <ADDRESS> <A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A> -Last updated $Date: 1999/08/09 20:21:21 $. +Last updated $Date: 2016-09-25 20:05:45 $. </ADDRESS> </BODY> diff --git a/thirdparty/tiff-4.0.3/html/v3.4beta032.html b/thirdparty/tiff-4.2.0/html/v3.4beta032.html similarity index 91% rename from thirdparty/tiff-4.0.3/html/v3.4beta032.html rename to thirdparty/tiff-4.2.0/html/v3.4beta032.html index bc14ef33..8ac2cc2d 100644 --- a/thirdparty/tiff-4.0.3/html/v3.4beta032.html +++ b/thirdparty/tiff-4.2.0/html/v3.4beta032.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -16,7 +17,7 @@ Changes in TIFF v3.4beta032 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.4beta032<BR> <B>Previous Version</B>: <A HREF=v3.4beta031.html>v3.4beta031</A><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> +<B>Master Download Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -83,7 +84,7 @@ The following information is located here: <ADDRESS> <A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A> -Last updated $Date: 1999/08/09 20:21:21 $. +Last updated $Date: 2016-09-25 20:05:45 $. </ADDRESS> </BODY> diff --git a/thirdparty/tiff-4.0.3/html/v3.4beta033.html b/thirdparty/tiff-4.2.0/html/v3.4beta033.html similarity index 89% rename from thirdparty/tiff-4.0.3/html/v3.4beta033.html rename to thirdparty/tiff-4.2.0/html/v3.4beta033.html index 8d8345a8..256b3f8e 100644 --- a/thirdparty/tiff-4.0.3/html/v3.4beta033.html +++ b/thirdparty/tiff-4.2.0/html/v3.4beta033.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -16,7 +17,7 @@ Changes in TIFF v3.4beta033 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.4beta033 (aka the v3.4 release)<BR> <B>Previous Version</B>: <A HREF=v3.4beta032.html>v3.4beta032</A><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> +<B>Master Download Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -75,7 +76,7 @@ The following information is located here: <ADDRESS> <A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A> -Last updated $Date: 1999/08/09 20:21:21 $. +Last updated $Date: 2016-09-25 20:05:45 $. </ADDRESS> </BODY> diff --git a/thirdparty/tiff-4.0.3/html/v3.4beta034.html b/thirdparty/tiff-4.2.0/html/v3.4beta034.html similarity index 89% rename from thirdparty/tiff-4.0.3/html/v3.4beta034.html rename to thirdparty/tiff-4.2.0/html/v3.4beta034.html index 77d9863b..33ca2f19 100644 --- a/thirdparty/tiff-4.0.3/html/v3.4beta034.html +++ b/thirdparty/tiff-4.2.0/html/v3.4beta034.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -16,7 +17,7 @@ Changes in TIFF v3.4beta034 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.4beta034<BR> <B>Previous Version</B>: <A HREF=v3.4beta033.html>v3.4beta033</A><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> +<B>Master Download Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -61,7 +62,7 @@ The following information is located here: <ADDRESS> <A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A> -Last updated $Date: 1999/08/09 20:21:21 $. +Last updated $Date: 2016-09-25 20:05:45 $. </ADDRESS> </BODY> diff --git a/thirdparty/tiff-4.0.3/html/v3.4beta035.html b/thirdparty/tiff-4.2.0/html/v3.4beta035.html similarity index 87% rename from thirdparty/tiff-4.0.3/html/v3.4beta035.html rename to thirdparty/tiff-4.2.0/html/v3.4beta035.html index 22fb2b8d..51e4116c 100644 --- a/thirdparty/tiff-4.0.3/html/v3.4beta035.html +++ b/thirdparty/tiff-4.2.0/html/v3.4beta035.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -16,7 +17,7 @@ Changes in TIFF v3.4beta035 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.4beta035<BR> <B>Previous Version</B>: <A HREF=v3.4beta034.html>v3.4beta034</A><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> +<B>Master Download Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -56,7 +57,7 @@ The following information is located here: <ADDRESS> <A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A> -Last updated $Date: 1999/08/09 20:21:21 $. +Last updated $Date: 2016-09-25 20:05:45 $. </ADDRESS> </BODY> diff --git a/thirdparty/tiff-4.0.3/html/v3.4beta036.html b/thirdparty/tiff-4.2.0/html/v3.4beta036.html similarity index 94% rename from thirdparty/tiff-4.0.3/html/v3.4beta036.html rename to thirdparty/tiff-4.2.0/html/v3.4beta036.html index e36754d3..91c2721f 100644 --- a/thirdparty/tiff-4.0.3/html/v3.4beta036.html +++ b/thirdparty/tiff-4.2.0/html/v3.4beta036.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -16,7 +17,7 @@ Changes in TIFF v3.4beta036 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.4beta036<BR> <B>Previous Version</B>: <A HREF=v3.4beta035.html>v3.4beta035</A><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> +<B>Master Download Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -110,7 +111,7 @@ The following information is located here: <ADDRESS> <A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A> -Last updated $Date: 1999/08/09 20:21:21 $. +Last updated $Date: 2016-09-25 20:05:45 $. </ADDRESS> </BODY> diff --git a/thirdparty/tiff-4.0.3/html/v3.5.1.html b/thirdparty/tiff-4.2.0/html/v3.5.1.html similarity index 84% rename from thirdparty/tiff-4.0.3/html/v3.5.1.html rename to thirdparty/tiff-4.2.0/html/v3.5.1.html index 0c88de95..559f5496 100644 --- a/thirdparty/tiff-4.0.3/html/v3.5.1.html +++ b/thirdparty/tiff-4.2.0/html/v3.5.1.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,8 +18,8 @@ Changes in TIFF v3.5.1 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.5.1<BR> <B>Previous Version</B>: v3.4beta037<BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com, directory graphics/tiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff/>http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com, directory graphics/tiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff//>http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -69,7 +70,7 @@ utility. <HR> -Last updated $Date: 2006/01/03 01:42:30 $. +Last updated $Date: 2016-09-25 20:05:45 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.5.2.html b/thirdparty/tiff-4.2.0/html/v3.5.2.html similarity index 89% rename from thirdparty/tiff-4.0.3/html/v3.5.2.html rename to thirdparty/tiff-4.2.0/html/v3.5.2.html index 71b486a6..2c4cbf51 100644 --- a/thirdparty/tiff-4.0.3/html/v3.5.2.html +++ b/thirdparty/tiff-4.2.0/html/v3.5.2.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,8 +18,8 @@ Changes in TIFF v3.5.2 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.5.2<BR> <B>Previous Version</B>: <A HREF=v3.5.1.html>v3.5.1</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com, directory graphics/tiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff/">http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com, directory graphics/tiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff//">http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -102,7 +103,7 @@ The following information is located here: <HR> -Last updated $Date: 2004/11/26 14:37:20 $. +Last updated $Date: 2016-09-25 20:05:45 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.5.3.html b/thirdparty/tiff-4.2.0/html/v3.5.3.html similarity index 90% rename from thirdparty/tiff-4.0.3/html/v3.5.3.html rename to thirdparty/tiff-4.2.0/html/v3.5.3.html index e7910d9b..0aabcaa8 100644 --- a/thirdparty/tiff-4.0.3/html/v3.5.3.html +++ b/thirdparty/tiff-4.2.0/html/v3.5.3.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,8 +18,8 @@ Changes in TIFF v3.5.3 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.5.3<BR> <B>Previous Version</B>: <A HREF=v3.5.2.html>v3.5.2</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff/">http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff//">http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -49,7 +50,7 @@ From <A HREF=http://burnallgifs.org>Burn All GIF's Day</a>: Unisys license to use LZW in free software that complies with the Open Source Definition</em> <P> -Unfortunatly, the removal of LZW compression means that saved image size has +Unfortunately, the removal of LZW compression means that saved image size has grown dramatically. Without a change in the TIFF spec to support another lossless compression format, this is unavoidable. <P> @@ -126,7 +127,7 @@ LZW decompression is unchanged. <HR> -Last updated $Date: 2004/11/26 14:37:20 $. +Last updated $Date: 2016-09-25 20:05:45 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.5.4.html b/thirdparty/tiff-4.2.0/html/v3.5.4.html similarity index 85% rename from thirdparty/tiff-4.0.3/html/v3.5.4.html rename to thirdparty/tiff-4.2.0/html/v3.5.4.html index 714621e0..c9fdcf65 100644 --- a/thirdparty/tiff-4.0.3/html/v3.5.4.html +++ b/thirdparty/tiff-4.2.0/html/v3.5.4.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,8 +18,8 @@ Changes in TIFF v3.5.4 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.5.4<BR> <B>Previous Version</B>: <A HREF=v3.5.3.html>v3.5.3</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff/">http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff//">http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -82,7 +83,7 @@ The following information is located here: <HR> -Last updated $Date: 2006/01/03 01:45:41 $. +Last updated $Date: 2016-09-25 20:05:45 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.5.5.html b/thirdparty/tiff-4.2.0/html/v3.5.5.html similarity index 93% rename from thirdparty/tiff-4.0.3/html/v3.5.5.html rename to thirdparty/tiff-4.2.0/html/v3.5.5.html index 20be92f8..aa606fd1 100644 --- a/thirdparty/tiff-4.0.3/html/v3.5.5.html +++ b/thirdparty/tiff-4.2.0/html/v3.5.5.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,8 +18,8 @@ Changes in TIFF v3.5.5 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.5.5<BR> <B>Previous Version</B>: <A HREF=v3.5.4.html>v3.5.4</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff/">http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff//">http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -149,7 +150,7 @@ The following information is located here: <HR> -Last updated $Date: 2004/11/26 14:37:20 $. +Last updated $Date: 2016-09-25 20:05:45 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.5.6-beta.html b/thirdparty/tiff-4.2.0/html/v3.5.6-beta.html similarity index 93% rename from thirdparty/tiff-4.0.3/html/v3.5.6-beta.html rename to thirdparty/tiff-4.2.0/html/v3.5.6-beta.html index 682f845b..81f11a36 100644 --- a/thirdparty/tiff-4.0.3/html/v3.5.6-beta.html +++ b/thirdparty/tiff-4.2.0/html/v3.5.6-beta.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,8 +18,8 @@ Changes in TIFF v3.5.6 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.5.6beta<BR> <B>Previous Version</B>: <A HREF=v3.5.5.html>v3.5.5</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff/">http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff//">http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -112,7 +113,7 @@ The following information is located here: <LI> Modified tiffio.h logic with regard to including windows.h. It won't include it when building with __CYGWIN__. - <LI> README: update to mention www.libtiff.org, don't list Sam's old + <LI> README: update to mention {REDACTED - defunct web site}, don't list Sam's old email address. <LI> libtiff/tif_dirread.c: Don't use estimate strip byte count for @@ -179,7 +180,7 @@ The following information is located here: <HR> -Last updated $Date: 2006/03/18 17:12:47 $. +Last updated $Date: 2016-09-25 20:05:45 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.5.7.html b/thirdparty/tiff-4.2.0/html/v3.5.7.html similarity index 96% rename from thirdparty/tiff-4.0.3/html/v3.5.7.html rename to thirdparty/tiff-4.2.0/html/v3.5.7.html index 528df74e..a58b7e5a 100644 --- a/thirdparty/tiff-4.0.3/html/v3.5.7.html +++ b/thirdparty/tiff-4.2.0/html/v3.5.7.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,8 +18,8 @@ Changes in TIFF v3.5.7 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.5.7<BR> <B>Previous Version</B>: <A HREF=v3.5.6-beta.html>v3.5.6 Beta</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff/">http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff">download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff//">http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -200,7 +201,7 @@ that corrects behaviour for non-Letter paper sizes. (Bug 35) It fixes two problems: <br> Without scaling (-S) the fax is now centered on the page size specified - with -H and/or -W. Before, fax2ps was using an obscure and practially + with -H and/or -W. Before, fax2ps was using an obscure and practically useless algorithm to allocate the image relative to Letter sized paper which sometime sled to useless whitespace on the paper, while at the same time cutting of the faxes printable area at the opposite border. @@ -253,7 +254,7 @@ Updated bug section of tiffcmp.1 to note tiled file issues. <HR> -Last updated $Date: 2004/11/26 14:37:20 $. +Last updated $Date: 2016-09-25 20:05:45 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.6.0.html b/thirdparty/tiff-4.2.0/html/v3.6.0.html similarity index 97% rename from thirdparty/tiff-4.0.3/html/v3.6.0.html rename to thirdparty/tiff-4.2.0/html/v3.6.0.html index 888e5472..1a3ba4a9 100644 --- a/thirdparty/tiff-4.0.3/html/v3.6.0.html +++ b/thirdparty/tiff-4.2.0/html/v3.6.0.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,10 +18,10 @@ Changes in TIFF v3.6.0 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.6.0<BR> <B>Previous Version</B>: <A HREF=v3.5.7.html>v3.5.7</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff"> -ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff"> -http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/"> +http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -64,12 +65,12 @@ TIFFDirectory structure would changing, breaking any dynamically linked software that used the private data structures.<p> Also, any tag not recognised -by libtiff would not be read and accessable to applications without some +by libtiff would not be read and accessible to applications without some fairly complicated work on the applications part to pre-register the tags as exemplified by the support for "Geo"TIFF tags by libgeotiff layered on libtiff. <p> -Amoung other things this approach required the extension code +Among other things this approach required the extension code to access the private libtiff structures ... which made the higher level non-libtiff code be locked into a specific version of libtiff at compile time. This caused no end of bug reports!<p> @@ -428,7 +429,7 @@ KIT:</B></A> <HR> -Last updated $Date: 2003/10/04 11:38:17 $. +Last updated $Date: 2016-09-25 20:05:45 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.6.1.html b/thirdparty/tiff-4.2.0/html/v3.6.1.html similarity index 94% rename from thirdparty/tiff-4.0.3/html/v3.6.1.html rename to thirdparty/tiff-4.2.0/html/v3.6.1.html index d1060622..6a357f4c 100644 --- a/thirdparty/tiff-4.0.3/html/v3.6.1.html +++ b/thirdparty/tiff-4.2.0/html/v3.6.1.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,10 +18,10 @@ Changes in TIFF v3.6.1 <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.6.1<BR> <B>Previous Version</B>: <A HREF=v3.6.0.html>v3.6.0</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff"> -ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff"> -http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/"> +http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -116,7 +117,7 @@ Patch supplied by Ross Finlayson. it was done in 3.6.0). <li> libtiff/{tiff.h, tif_dirinfo.c}: Added support for IFD (13) datatype, -intruduced in "Adobe PageMaker TIFF Technical Notes". +introduced in "Adobe PageMaker TIFF Technical Notes". <li> libtiff/{tif_color.c, tif_getimage.c, tiffio.h}: New color space conversion code: CIE L*a*b* 1976 images now supported by the TIFFRGBAImage @@ -193,7 +194,7 @@ KIT:</B></A> <HR> -Last updated $Date: 2003/12/24 22:14:15 $. +Last updated $Date: 2016-09-25 20:05:45 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.7.0.html b/thirdparty/tiff-4.2.0/html/v3.7.0.html similarity index 91% rename from thirdparty/tiff-4.0.3/html/v3.7.0.html rename to thirdparty/tiff-4.2.0/html/v3.7.0.html index 413f2c60..9c0819a4 100644 --- a/thirdparty/tiff-4.0.3/html/v3.7.0.html +++ b/thirdparty/tiff-4.2.0/html/v3.7.0.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,10 +18,10 @@ <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.7.0<BR> <B>Previous Version</B>: <A HREF=v3.7.0beta2.html>v3.7.0beta2</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff"> -ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff"> -http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/"> +http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -138,7 +139,7 @@ KIT:</B></A> <HR> -Last updated $Date: 2004/12/20 19:31:44 $. +Last updated $Date: 2016-09-25 20:05:45 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.7.0alpha.html b/thirdparty/tiff-4.2.0/html/v3.7.0alpha.html similarity index 96% rename from thirdparty/tiff-4.0.3/html/v3.7.0alpha.html rename to thirdparty/tiff-4.2.0/html/v3.7.0alpha.html index 95c633ca..39b63238 100644 --- a/thirdparty/tiff-4.0.3/html/v3.7.0alpha.html +++ b/thirdparty/tiff-4.2.0/html/v3.7.0alpha.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,10 +18,10 @@ <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.7.0alpha<BR> <B>Previous Version</B>: <A HREF=v3.6.1.html>v3.6.1</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff"> -ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff"> -http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/"> +http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -243,7 +244,7 @@ KIT:</B></A> <HR> -Last updated $Date: 2006/03/18 17:12:47 $. +Last updated $Date: 2016-09-25 20:05:45 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.7.0beta.html b/thirdparty/tiff-4.2.0/html/v3.7.0beta.html similarity index 93% rename from thirdparty/tiff-4.0.3/html/v3.7.0beta.html rename to thirdparty/tiff-4.2.0/html/v3.7.0beta.html index 7d7c868b..f646480f 100644 --- a/thirdparty/tiff-4.0.3/html/v3.7.0beta.html +++ b/thirdparty/tiff-4.2.0/html/v3.7.0beta.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,10 +18,10 @@ <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.7.0beta<BR> <B>Previous Version</B>: <A HREF=v3.7.0alpha.html>v3.7.0alpha</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff"> -ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff"> -http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/"> +http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -156,7 +157,7 @@ KIT:</B></A> <HR> -Last updated $Date: 2006/03/18 17:12:47 $. +Last updated $Date: 2016-09-25 20:05:45 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.7.0beta2.html b/thirdparty/tiff-4.2.0/html/v3.7.0beta2.html similarity index 90% rename from thirdparty/tiff-4.0.3/html/v3.7.0beta2.html rename to thirdparty/tiff-4.2.0/html/v3.7.0beta2.html index 67dd8dad..41ba6c3a 100644 --- a/thirdparty/tiff-4.0.3/html/v3.7.0beta2.html +++ b/thirdparty/tiff-4.2.0/html/v3.7.0beta2.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,10 +18,10 @@ <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.7.0beta2<BR> <B>Previous Version</B>: <A HREF=v3.7.0beta.html>v3.7.0beta</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff"> -ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff"> -http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/"> +http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -125,7 +126,7 @@ KIT:</B></A> <HR> -Last updated $Date: 2006/03/18 17:12:47 $. +Last updated $Date: 2016-09-25 20:05:45 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.7.1.html b/thirdparty/tiff-4.2.0/html/v3.7.1.html similarity index 95% rename from thirdparty/tiff-4.0.3/html/v3.7.1.html rename to thirdparty/tiff-4.2.0/html/v3.7.1.html index b888792f..164b4059 100644 --- a/thirdparty/tiff-4.0.3/html/v3.7.1.html +++ b/thirdparty/tiff-4.2.0/html/v3.7.1.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,10 +18,10 @@ <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.7.1<BR> <B>Previous Version</B>: <A HREF=v3.7.0.html>v3.7.0</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff"> -ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff"> -http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/"> +http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -227,7 +228,7 @@ The following information is located here: </UL> -Last updated $Date: 2004/12/20 19:31:44 $. +Last updated $Date: 2016-09-25 20:05:45 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.7.2.html b/thirdparty/tiff-4.2.0/html/v3.7.2.html similarity index 94% rename from thirdparty/tiff-4.0.3/html/v3.7.2.html rename to thirdparty/tiff-4.2.0/html/v3.7.2.html index 6cb6f7cd..d396021e 100644 --- a/thirdparty/tiff-4.0.3/html/v3.7.2.html +++ b/thirdparty/tiff-4.2.0/html/v3.7.2.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,10 +18,10 @@ <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.7.2<BR> <B>Previous Version</B>: <A HREF=v3.7.1.html>v3.7.1</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff"> -ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff"> -http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/"> +http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -46,7 +47,7 @@ The following information is located here: <UL> - <li> Maintainance release. Many bugfixes in the build environment + <li> Maintenance release. Many bugfixes in the build environment and compatibility improvements. </UL> @@ -216,7 +217,7 @@ The following information is located here: </UL> -Last updated $Date: 2005/03/15 15:17:44 $. +Last updated $Date: 2016-09-25 20:05:45 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.7.3.html b/thirdparty/tiff-4.2.0/html/v3.7.3.html similarity index 95% rename from thirdparty/tiff-4.0.3/html/v3.7.3.html rename to thirdparty/tiff-4.2.0/html/v3.7.3.html index d6984517..54978c8f 100644 --- a/thirdparty/tiff-4.0.3/html/v3.7.3.html +++ b/thirdparty/tiff-4.2.0/html/v3.7.3.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,10 +18,10 @@ <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.7.3<BR> <B>Previous Version</B>: <A HREF=v3.7.2.html>v3.7.2</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff"> -ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff"> -http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/"> +http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -45,7 +46,7 @@ The following information is located here: <A NAME="highlights"><B><FONT SIZE=+3>M</FONT>AJOR CHANGES:</B></A> <UL> - <li> Replace runtime endianess check with the compile time one. + <li> Replace runtime endianness check with the compile time one. <li> Added support for the new predictor type (floating point predictor), defined at the TIFF Technical Note 3. @@ -224,7 +225,7 @@ The following information is located here: </UL> -Last updated $Date: 2006/01/04 22:04:46 $. +Last updated $Date: 2016-09-25 20:05:45 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.7.4.html b/thirdparty/tiff-4.2.0/html/v3.7.4.html similarity index 92% rename from thirdparty/tiff-4.0.3/html/v3.7.4.html rename to thirdparty/tiff-4.2.0/html/v3.7.4.html index 94373201..eeb0f3ca 100644 --- a/thirdparty/tiff-4.0.3/html/v3.7.4.html +++ b/thirdparty/tiff-4.2.0/html/v3.7.4.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,10 +18,10 @@ <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.7.4<BR> <B>Previous Version</B>: <A HREF=v3.7.3.html>v3.7.3</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff"> -ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff"> -http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/"> +http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -127,7 +128,7 @@ The following information is located here: </UL> -Last updated $Date: 2005/11/03 14:18:43 $. +Last updated $Date: 2016-09-25 20:05:45 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.8.0.html b/thirdparty/tiff-4.2.0/html/v3.8.0.html similarity index 95% rename from thirdparty/tiff-4.0.3/html/v3.8.0.html rename to thirdparty/tiff-4.2.0/html/v3.8.0.html index 914dcb0c..81a8b0c6 100644 --- a/thirdparty/tiff-4.0.3/html/v3.8.0.html +++ b/thirdparty/tiff-4.2.0/html/v3.8.0.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,10 +18,10 @@ <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.8.0<BR> <B>Previous Version</B>: <A HREF=v3.7.4.html>v3.7.4</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff"> -ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff"> -http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/"> +http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -193,7 +194,7 @@ The following information is located here: </UL> -Last updated $Date: 2006/01/04 23:38:38 $. +Last updated $Date: 2016-09-25 20:05:45 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.8.1.html b/thirdparty/tiff-4.2.0/html/v3.8.1.html similarity index 95% rename from thirdparty/tiff-4.0.3/html/v3.8.1.html rename to thirdparty/tiff-4.2.0/html/v3.8.1.html index 9fea1407..0fe7d9c0 100644 --- a/thirdparty/tiff-4.0.3/html/v3.8.1.html +++ b/thirdparty/tiff-4.2.0/html/v3.8.1.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,10 +18,10 @@ <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.8.1<BR> <B>Previous Version</B>: <A HREF=v3.8.0.html>v3.8.0</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff"> -ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff"> -http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/"> +http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -211,7 +212,7 @@ The following information is located here: <UL> </UL> -Last updated $Date: 2006/03/13 14:52:12 $. +Last updated $Date: 2016-09-25 20:05:45 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.8.2.html b/thirdparty/tiff-4.2.0/html/v3.8.2.html similarity index 92% rename from thirdparty/tiff-4.0.3/html/v3.8.2.html rename to thirdparty/tiff-4.2.0/html/v3.8.2.html index e6481275..41bb2e55 100644 --- a/thirdparty/tiff-4.0.3/html/v3.8.2.html +++ b/thirdparty/tiff-4.2.0/html/v3.8.2.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,10 +18,10 @@ <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.8.2<BR> <B>Previous Version</B>: <A HREF=v3.8.1.html>v3.8.1</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff"> -ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff"> -http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/"> +http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -131,7 +132,7 @@ The following information is located here: <UL> </UL> -Last updated $Date: 2006/03/23 14:54:01 $. +Last updated $Date: 2016-09-25 20:05:46 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.9.0beta.html b/thirdparty/tiff-4.2.0/html/v3.9.0beta.html similarity index 97% rename from thirdparty/tiff-4.0.3/html/v3.9.0beta.html rename to thirdparty/tiff-4.2.0/html/v3.9.0beta.html index d7d8821a..56f32ed3 100644 --- a/thirdparty/tiff-4.0.3/html/v3.9.0beta.html +++ b/thirdparty/tiff-4.2.0/html/v3.9.0beta.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,10 +18,10 @@ <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.9.0beta<BR> <B>Previous Version</B>: <A HREF=v3.8.2.html>v3.8.2</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff"> -ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff"> -http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/"> +http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -298,7 +299,7 @@ The following information is located here: </UL> -Last updated $Date: 2009-08-20 22:57:39 $. +Last updated $Date: 2016-09-25 20:05:46 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.9.1.html b/thirdparty/tiff-4.2.0/html/v3.9.1.html similarity index 89% rename from thirdparty/tiff-4.0.3/html/v3.9.1.html rename to thirdparty/tiff-4.2.0/html/v3.9.1.html index c97d94f8..1f369a83 100644 --- a/thirdparty/tiff-4.0.3/html/v3.9.1.html +++ b/thirdparty/tiff-4.2.0/html/v3.9.1.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,10 +18,10 @@ <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.9.1<BR> <B>Previous Version</B>: <A HREF=v3.9.1.html>v3.9.1</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff"> -ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff"> -http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/"> +http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -109,7 +110,7 @@ information is located here: </UL> -Last updated $Date: 2009-08-28 18:54:11 $. +Last updated $Date: 2016-09-25 20:05:47 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v3.9.2.html b/thirdparty/tiff-4.2.0/html/v3.9.2.html similarity index 90% rename from thirdparty/tiff-4.0.3/html/v3.9.2.html rename to thirdparty/tiff-4.2.0/html/v3.9.2.html index bb76794c..a190a301 100644 --- a/thirdparty/tiff-4.0.3/html/v3.9.2.html +++ b/thirdparty/tiff-4.2.0/html/v3.9.2.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,10 +18,10 @@ <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v3.9.2<BR> <B>Previous Version</B>: <A HREF=v3.9.1.html>v3.9.1</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff"> -ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff"> -http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/"> +http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -116,7 +117,7 @@ information is located here: </UL> -Last updated $Date: 2009-11-04 17:38:13 $. +Last updated $Date: 2016-09-25 20:05:47 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v4.0.0.html b/thirdparty/tiff-4.2.0/html/v4.0.0.html similarity index 96% rename from thirdparty/tiff-4.0.3/html/v4.0.0.html rename to thirdparty/tiff-4.2.0/html/v4.0.0.html index 9694a1e0..a7e9bb63 100644 --- a/thirdparty/tiff-4.0.3/html/v4.0.0.html +++ b/thirdparty/tiff-4.2.0/html/v4.0.0.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -17,10 +18,10 @@ <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v4.0.0<BR> <B>Previous Version</B>: <A HREF=v3.9.5.html>v3.9.5</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff"> -ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://download.osgeo.org/libtiff"> -http://download.osgeo.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +https://download.osgeo.org/libtiff</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -263,7 +264,7 @@ Other important backward incompatible changes in the public API: <UL> </UL> -Last updated $Date: 2011-04-09 21:01:00 $. +Last updated $Date: 2016-09-25 20:05:47 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.0.3/html/v4.0.1.html b/thirdparty/tiff-4.2.0/html/v4.0.1.html similarity index 88% rename from thirdparty/tiff-4.0.3/html/v4.0.1.html rename to thirdparty/tiff-4.2.0/html/v4.0.1.html index 1f113c19..5e927173 100644 --- a/thirdparty/tiff-4.0.3/html/v4.0.1.html +++ b/thirdparty/tiff-4.2.0/html/v4.0.1.html @@ -1,3 +1,4 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> @@ -16,10 +17,10 @@ <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v4.0.1<BR> <B>Previous Version</B>: <A HREF=v4.0.0.html>v4.0.0</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff"> -ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff"> -http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/"> +http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -107,7 +108,7 @@ information is located here: </UL> -Last updated $Date: 2012-02-18 21:53:27 $. +Last updated $Date: 2016-09-25 20:05:47 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.2.0/html/v4.0.10.html b/thirdparty/tiff-4.2.0/html/v4.0.10.html new file mode 100644 index 00000000..578404e1 --- /dev/null +++ b/thirdparty/tiff-4.2.0/html/v4.0.10.html @@ -0,0 +1,327 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<HTML> +<HEAD> +<TITLE> + Changes in TIFF v4.0.10 + + + + + + + + +TIFF CHANGE INFORMATION + + + + +

    +This document describes the changes made to the software between the +previous and current versions (see above). If you don't +find something listed here, then it was not done in this timeframe, or +it was not considered important enough to be mentioned. The following +information is located here: +

    +

    +


    + + + +MAJOR CHANGES: + +
      + +
    • The libtiff source repository is changed from CVS to Git and the master libtiff source repository is now at Gitlab. This is the first release to be made from the new Git repository.
    • + +
    + + +


    + + +CHANGES IN THE SOFTWARE CONFIGURATION: + +
      + +
    • Minimum CMake version is now v2.8.11 for the CMake-based build.
    • + +
    • Libwebp will be automatically detected and used by configure/cmake if present. + +
    • Libzstd will be automatically detected and used by configure/cmake if present. + + +
    + +


    + + + +CHANGES IN LIBTIFF: + +
    bmp2tiffConvert BMP images to TIFF
    fax2ps Convert a Group 3- or Group 4- compressed TIFF to PostScript that is significantly more compressed than is generated by @@ -51,10 +43,6 @@ that is significantly more compressed than is generated by Convert raw Group 3 or Group 4 facsimile data to TIFF
    gif2tiffA quick hack that converts GIF 87a (old) format images to TIFF
    pal2rgb Convert a Palette-style image to a full color RGB image by applying the colormap A quick hack that converts 8-bit PPM format images to TIFF
    ras2tiffA quick hack that converts Sun rasterfile format images to TIFF --- it's less than complete
    raw2tiff Create a TIFF file from raw data
    sgi2tiffA program to convert SGI image files to TIFF. This program is -only useful on SGI machines as it uses -limage.
    thumbnailthumbnail Copy a bilevel TIFF to one that includes 8-bit greyscale "thumbnail images" for each page; it is provided as an example of how one might use the SubIFD tag (and the library support @@ -159,6 +137,6 @@ multi-image file
    + + + + +
    Compressor Compression time Decompression time File size
    ZSTD 35 s 3.2 s 399 700 498
    ZIP/Deflate 1m 20 s 4.9 s 419 622 336
    + +

    Please note that COMPRESSION_ZSTD is self-assigned the id 50000 + by the libtiff project and is not officially registered with Adobe + since Adobe's registration function is defunct.

    +
  • + +
  • Added WebP compression codec. + + WebP is + a high performance compressor intended for photos as commonly used + on the Web. The WebP encoder is not designed for huge images, but + serves very well for compressing strips and tiles in TIFF as long + as the strips or tiles do not exceed the capability of the + encoder.

    + +

    As a test of compression performance metrics, GraphicsMagick + was used on an extremely high quality 8-bit TIFF image from a + Hasselblad H4D-200MS camera with pixel dimensions of + 16352x12264. The image was re-encoded with 1024x1024 tiles and + various compression algorithms, using default settings for each + algorithm. Based on this test, the compression and decompression + performance (in iterations per second), the resulting file size, + and the calculated total PSNR are provided here. It can be seen + that WebP provided excellent encode and decode performance, and + the compressed file size was very small:

    + + + + + + + + + + + + + + +
    Compressor Relative Performance
    Compressor Compression Decompression File size PSNR
    None 0.536 iter/s 1.506 iter/s 576.03MiB Inf
    LZW 0.105 iter/s 0.266 iter/s 270.68MiB Inf
    ZStd 0.020 iter/s 0.518 iter/s 238.42MiB Inf
    LZMA 0.009 iter/s 0.056 iter/s 247.61MiB Inf
    ZIP 0.009 iter/s 0.301 iter/s 247.88MiB Inf
    JPEG 0.446 iter/s 0.760 iter/s 18.59MiB 39.00
    WebP 0.019 iter/s 0.330 iter/s 9.38MiB 37.78
    + +

    Please note that COMPRESSION_WEBP is self-assigned the id 50001 + by the libtiff project and is not officially registered with Adobe + since Adobe's registration function is defunct.

    + +
  • + +
  • TIFFPrintDirectory(): fix null pointer dereference on corrupted + file. Fixes Bug + 2770 - NULL Pointer Dereference in tiffinfo.c with crafted TIFF + image.
  • + +
  • _TIFFVGetField(): fix heap out-of-bounds access when requesting + TIFFTAG_NUMBEROFINKS on a EXIF + directory. Fixes Bug + 2765 - Heap Out-Of-Bounds Memory Access - 68122422. Reported by + Google Autofuzz project
  • + +
  • Fix a memory leak in TIFFStreamOpen. TIFFStreamOpen allocates a + new tiff{o,i}s_data, but if TIFFClientOpen fails then that struct is + leaked.
  • + +
  • Fix for bug 2772. It is possible to craft a TIFF document where + the IFD list is circular, leading to an infinite loop while + traversing the chain. The libtiff directory reader has a failsafe + that will break out of this loop after reading 65535 directory + entries, but it will continue processing, consuming time and + resources to process what is essentially a bogus TIFFdocument.

    + +

    This change fixes the above behavior by breaking out of processing + when a TIFF document has >= 65535 directories and terminating with an + error.

  • + +
  • ChopUpSingleUncompressedStrip: avoid memory exhaustion + (CVE-2017-11613). In ChopUpSingleUncompressedStrip(), if the + computed number of strips is big enough and we are in read only + mode, validate that the file size is consistent with that number of + strips to avoid useless attempts at allocating a lot of memory for + the td_stripbytecount and td_stripoffset + arrays. Fixes Bug + 2724 - memory exhaustion in ChopUpSingleUncompressedStrip
  • + +
  • Port code: Add strtol, strtoll and strtoull. Also update + strtoul. All use the same implementation from NetBSD libc.
  • + +
  • Fix for CVE-2018-7456 "NULL pointer dereference in + TIFFPrintDirectory".
  • + +
  • TIFFWriteDirectorySec: avoid + assertion. Fixes Bug + 2795 - There is a reachable assertion abort in function + TIFFWriteDirectorySec() of libtiff 4.0.9. A crafted input will lead + to remote denial of attack. (CVE-2018-10963).
  • + +
  • LZWDecodeCompat(): fix potential index-out-of-bounds + write. Fixes Bug + 2780 - A heap-buffer-overflow in function LZWDecodeCompat in + libtiff4.0.9 (CVE-2018-8905). The fix consists in using the + similar code as LZWDecode() to validate we don't write outside of + the output buffer.
  • + +
  • Remove builtin support for GUI warning and error message + boxes. Now warnings always go to the console by default unless + applications define their own warning and error handlers.

    + +

    GUI applications (and Windows CE) are required to define such handlers.

  • + +
  • Add tag and pseudo-tag definitions for ESRI LERC codec (out of + tree codec whose source is + at + https://github.com/OSGeo/gdal/blob/master/gdal/frmts/gtiff/tif_lerc.c).
  • + +
  • Fix libtiff 4.0.8 regression when reading LZW-compressed strips with scanline API + Fixes + Bug 2800 - Regression: Opening a tiff file with v4.0.9 gives an error with LZWDecode.
  • + +
  • TIFFSetupStrips(): avoid potential uint32 overflow on 32-bit + systems with large number of strips. Probably relates + to Bug + 2788 - Heap Buffer Overflow in TIFFWriteScanline of tif_write.c + (CVE-2018-10779)
  • + +
  • Fix out-of-bound read on some tiled images.
  • + +
  • Avoid potential int32 overflows in multiply_ms().
  • + +
  • Only read/write TIFFTAG_GROUP3OPTIONS or TIFFTAG_GROUP4OPTIONS + if compression is COMPRESSION_CCITTFAX3 or + COMPRESSION_CCITTFAX4.
  • + +
  • JBIG: fix potential out-of-bounds write in JBIGDecode(). Also + fix a (harmless) potential use of uninitialized memory when + tif->tif_rawsize > tif->tif_rawcc. In case libtiff is compiled with + CHUNKY_STRIP_READ_SUPPORT, make sure that whole strip data is + provided to JBIGDecode().
  • + +
  • LZMAPreEncode: emit verbose error if lzma_stream_encoder() fails + (typically because not enough memory available)
  • + + + + +


    + + + +CHANGES IN THE TOOLS: + + + +


    + + + +CHANGES IN THE CONTRIB AREA: + +
      + +
    • None
    • + +
    + + + diff --git a/thirdparty/tiff-4.0.3/html/v4.0.2.html b/thirdparty/tiff-4.2.0/html/v4.0.2.html similarity index 88% rename from thirdparty/tiff-4.0.3/html/v4.0.2.html rename to thirdparty/tiff-4.2.0/html/v4.0.2.html index c265b952..cbed8b89 100644 --- a/thirdparty/tiff-4.0.3/html/v4.0.2.html +++ b/thirdparty/tiff-4.2.0/html/v4.0.2.html @@ -1,3 +1,4 @@ + @@ -16,10 +17,10 @@ <HR SIZE=4 WIDTH=65% ALIGN=left> <B>Current Version</B>: v4.0.2<BR> <B>Previous Version</B>: <A HREF=v4.0.1.html>v4.0.1</a><BR> -<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff"> -ftp.remotesensing.org</a>, directory pub/libtiff</A><BR> -<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff"> -http://www.remotesensing.org/libtiff</a> +<B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff"> +download.osgeo.org</a>, directory pub/libtiff</A><BR> +<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/"> +http://www.simplesystems.org/libtiff/</a> <HR SIZE=4 WIDTH=65% ALIGN=left> </UL> @@ -112,7 +113,7 @@ information is located here: </UL> -Last updated $Date: 2012-06-16 00:19:37 $. +Last updated $Date: 2016-09-25 20:05:47 $. </BODY> </HTML> diff --git a/thirdparty/tiff-4.2.0/html/v4.0.3.html b/thirdparty/tiff-4.2.0/html/v4.0.3.html new file mode 100644 index 00000000..e034c3f0 --- /dev/null +++ b/thirdparty/tiff-4.2.0/html/v4.0.3.html @@ -0,0 +1,126 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<HTML> +<HEAD> +<TITLE> + Changes in TIFF v4.0.3 + + + + + + + +TIFF CHANGE INFORMATION + + + + +

    +This document describes the changes made to the software between the +previous and current versions (see above). If you don't +find something listed here, then it was not done in this timeframe, or +it was not considered important enough to be mentioned. The following +information is located here: +

    +

    +


    + + + +MAJOR CHANGES: + +
      + +
    • None + +
    + + +


    + + +CHANGES IN THE SOFTWARE CONFIGURATION: + +
      + +
    • Updated to use Automake 1.12.4. Avoids security problem with + 'make distcheck' (CVE-2012-3386). + +
    + +


    + + + +CHANGES IN LIBTIFF: + +
      + +
    • Various memory buffer access fixes. + +
    • Fix handling when writing RGBA jpeg compressed imagery + (http://trac.osgeo.org/gdal/ticket/4732). + +
    • Fix to work properly with IJG JPEG 7+. + +
    • New functions TIFFFieldTag(), TIFFFieldName(), + TIFFFieldDataType(), TIFFFieldPassCount(), TIFFFieldReadCount(), + TIFFFieldWriteCount() to use as external accessors for the opaque + type TIFFField. + +
    • Fix bug rewriting image tiles in a compressed + file (http://trac.osgeo.org/gdal/ticket/4771). + +
    • Add TIFF/FX tag support in libtiff. + +
    + +


    + + + +CHANGES IN THE TOOLS: + +
      + +
    • tiff2pdf: Fail when TIFFSetDirectory() fails. This prevents + core dumps or perhaps even arbitrary code execution when processing + a corrupt input file (CVE-2012-3401). + +
    • tiff2pdf: Fix two places where t2p_error didn't get set after a + malloc failure. No crash risk AFAICS, but the program might not + report exit code 1 as desired. + +
    + +


    + + + +CHANGES IN THE CONTRIB AREA: + +
      + +
    • None + +
    + +Last updated $Date: 2016-09-25 20:05:47 $. + + + diff --git a/thirdparty/tiff-4.2.0/html/v4.0.4.html b/thirdparty/tiff-4.2.0/html/v4.0.4.html new file mode 100644 index 00000000..61c31101 --- /dev/null +++ b/thirdparty/tiff-4.2.0/html/v4.0.4.html @@ -0,0 +1,275 @@ + + + + + Changes in TIFF v4.0.4 + + + + + + + +TIFF CHANGE INFORMATION + + + + +

    +This document describes the changes made to the software between the +previous and current versions (see above). If you don't +find something listed here, then it was not done in this timeframe, or +it was not considered important enough to be mentioned. The following +information is located here: +

    +

    +


    + + + +MAJOR CHANGES: + +
      + +
    • None + +
    + + +


    + + +CHANGES IN THE SOFTWARE CONFIGURATION: + +
      + +
    • configure.ac / configure +
        +
      • Bugzilla Bug #2405: Correct shell equality operator. +
      • Bugzilla Bug #2498: Adds an option to select the file I/O style on Windows hosts. +
      + +
    + +


    + + + +CHANGES IN LIBTIFF: + +
      + +
    • tif_dir.c: +
        +
      • TIFFNumberOfDirectories: Coverity 1134470 "Logically dead code" +
      + +
    • tif_dirread.c: +
        +
      • TIFFReadDirEntryDoubleArray: Coverity 298626 "Logically dead code". +
      • TIFFReadDirEntryFloatArray: Coverity 298627 "Logically dead code". +
      • TIFFReadDirEntryIfd8Array: Coverity 298628 "Logically dead code". +
      • TIFFReadDirEntrySlong8Array: Coverity 298629 "Logically dead code" +
      + +
    • tif_dirwrite.c +
        +
      • _TIFFRewriteField: Coverity 1024310 "Resource leak". +
      + +
    • tif_jpeg.c +
        +
      • JPEGCleanup: Coverity 298624 "Dereference before null check". +
      • JPEGDecode: Coverity 602597 "Operands don't affect result". +
      + +
    • tif_getimage.c +
        +
      • Bugzilla Bug #2409: Correct reading of certain tiled TIFFs. +
      + +
    • tif_luv.c +
        +
      • LogLuvDecodeStrip: Coverity 991239 "Division or modulo by zero". +
      • LogLuvDecodeTile: Coverity 991227 "Division or modulo by zero". +
      • LogLuvEncodeStrip: Coverity 991240 "Division or modulo by zero". +
      • LogLuvEncodeTile: Coverity 991241 "Division or modulo by zero". +
      + +
    • tif_lzw.c +
        +
      • Decode files that contain consecutive CODE_CLEAR codes. +
      + +
    • tif_ojpeg.c +
        +
      • OJPEGReadBufferFill: Coverity 603400 "Missing break in switch". +
      • OJPEGReadHeaderInfoSecStreamDht: Coverity 601720 "Resource leak". +
      + +
    • tif_read.c +
        +
      • TIFFStartTile: Coverity 715973 and 715974 "Division or modulo by zero". +
      + +
    • tif_unix.c +
        +
      • Bugzilla Bug #2510: Fix several harmless but still annoying warnings. +
      + +
    • tif_write +
        +
      • TIFFWriteEncodedStrip: Coverity 715975 "Division or modulo by zero". +
      • TIFFWriteEncodedTile: Coverity 715976 and 715977 "Division or modulo by zero". +
      • TIFFWriteRawStrip: Coverity 715978 "Division or modulo by zero". +
      • TIFFWriteScanline: Coverity 715979 "Division or modulo by zero". +
      + +
    + +


    + + + +CHANGES IN THE TOOLS: + +
      + +
    • bmp2tiff +
        +
      • Coverity 1024225 "Untrusted value as argument". +
      • Coverity 1024678 "Unchecked return value from library". +
      • Coverity 1024679 "Unchecked return value from library". +
      • Coverity 1214160 "Ignoring number of bytes read". +
      + +
    • gif2tiff +
        +
      • Coverity 1024222 "Untrusted value as argument". +
      • Coverity 1024890 "Ignoring number of bytes read". +
      • Coverity 1024891 "Ignoring number of bytes read". +
      • Coverity 1024892 "Ignoring number of bytes read". +
      • Coverity 1024893 "Ignoring number of bytes read". +
      • Coverity 1024894 "Ignoring number of bytes read". +
      + +
    • ras2tiff +
        +
      • Corrected Sun Raster header definition to be safe for + 64-bit systems. Add some header validations. Fixes many + (unspecified) Coverity issues. +
      • Coverity 1024223 "Untrusted value as argument". +
      • Coverity 1301206: "Integer handling issues (BAD_SHIFT)". +
      + +
    • raw2tiff +
        +
      • Coverity 1024887 "Unchecked return value from library". +
      • Coverity 1024888 "Unchecked return value from library". +
      • Coverity 1024889 "Unchecked return value from library". +
      • Coverity 1214162 "Ignoring number of bytes read". +
      + +
    • tiff2pdf +
        +
      • Bugzilla Bug #2078. Suppress initial output of the header. +
      • Bugzilla Bug #2150. Change ColorTransform from "0" to "1". +
      • Take care in using the return value from snprintf(). +
      • Coverity 1024181 "Structurally dead code". +
      • Coverity 1024181 "Structurally dead code". +
      • Coverity 1227690 "Unused value". +
      • Coverity 298621 "Resource leak". +
      + +
    • tiff2ps +
        +
      • Correct sizing and scaling problems with output document. +
      + +
    • tiffcp +
        +
      • Coverity 1024306, 1024307, 1024308, 1024309 "Resource leak". +
      + +
    • tiffcrop +
        +
      • Correctly copy the compression tag from the source TIFF. +
      • Coverity 1024545 "Division or modulo by zero". +
      • Coverity 1024586 "Logically dead code". +
      • Coverity 1024796 "Nesting level does not match indentation". +
      • Coverity 1024797 "Nesting level does not match indentation". +
      • Coverity 1294542 "Logical vs. bitwise operator". +
      • Coverity 1299740 "Out-of-bounds write". +
      • Coverity 1299741 "Dereference before null check". +
      + +
    • tiffdither +
        +
      • Check memory allocations for failure. Also check + multiplication overflow. (Fixes #2501, CVE-2014-8128) +
      + +
    • tiffgt.c +
        +
      • Bugzilla Bug #2401. Appropriately call glFlush(). +
      + +
    • tiffmedian +
        +
      • Coverity 1024386 "Out-of-bounds read". +
      • Coverity 1024386 "Out-of-bounds read". +
      • Coverity 1024795 "Nesting level does not match indentation". +
      • Coverity 1024795 "Nesting level does not match indentation". +
      + +
    • tiffsplit +
        +
      • Coverity 1024304 "Resource leak". +
      • Coverity 1024305 "Resource leak". +
      + +
    + +


    + + + +CHANGES IN THE CONTRIB AREA: + +
      + +
    • addtiffo +
        +
      • Check buffer size calculation for overflow. +
      • Coverity 298615 "Resource leak". +
      • Coverity 1024649 "Unintended sign extension". +
      + +
    • iptcutil +
        +
      • Coverity 1024468 "Infinite loop". +
      • Coverity 1024727 "Truncated stdio return value". +
      • Coverity 1214240 "Untrusted loop bound". +
      + +
    + +Last updated $Date: 2016-09-25 20:05:47 $. + + + diff --git a/thirdparty/tiff-4.2.0/html/v4.0.4beta.html b/thirdparty/tiff-4.2.0/html/v4.0.4beta.html new file mode 100644 index 00000000..e9e70a55 --- /dev/null +++ b/thirdparty/tiff-4.2.0/html/v4.0.4beta.html @@ -0,0 +1,292 @@ + + + + + Changes in TIFF v4.0.4beta + + + + + + + +TIFF CHANGE INFORMATION + + + + +

    +This document describes the changes made to the software between the +previous and current versions (see above). If you don't +find something listed here, then it was not done in this timeframe, or +it was not considered important enough to be mentioned. The following +information is located here: +

    +

    +


    + + + +MAJOR CHANGES: + +
      + +
    • None + +
    + + +


    + + +CHANGES IN THE SOFTWARE CONFIGURATION: + +
      + +
    • Updated to use Automake 1.15 and Libtool 2.4.5 + +
    + +


    + + + +CHANGES IN LIBTIFF: + +
      + +
    • TIFFCheckDirOffset(): avoid uint16 overflow + when reading more than 65535 directories, and effectively error out when + eaching that limit. + +
    • TIFFNumberOfDirectories(): generate error in case of directory count + overflow. + +
    • TIFFAdvanceDirectory(): If nextdir is found to + be defective, then set it to zero before returning error in order + to terminate processing of truncated TIFF. + +
    • JPEG-in-TIFF: recognize SOF2, SOF9 and SOF10 + markers to avoid emitting a warning. Fix for compatibility with mozjpeg library. + Note: the default settings of mozjpeg will produce progressive scans, which + is forbidden by the TechNote. + +
    • JPEG-in-TIFF: Fix regression introduced in 3.9.3/4.0.0 that caused + all tiles/strips to include quantization tables even when the jpegtablesmode + had the JPEGTABLESMODE_QUANT bit set. + Also add explicit removal of Huffman tables when jpegtablesmode has the + JPEGTABLESMODE_HUFF bit set, which avoids Huffman tables to be emitted in the + first tile/strip (only useful in update scenarios. create-only was + fine) + +
    • JPEG-in-TIFF: fix segfault in JPEGFixupTagsSubsampling() on + corrupted image where tif->tif_dir.td_stripoffset == NULL. + (#2471) + +
    • NeXT codec: add new tests to check that we don't read outside of + the compressed input stream buffer. + +
    • NeXT codec: check that BitsPerSample = 2. Fixes + #2487 (CVE-2014-8129) + +
    • NeXT codec: in the "run mode", use tilewidth for tiled images + instead of imagewidth to avoid crash + +
    • tif_getimage.c: in OJPEG case, fix checks on strile width/height + in the putcontig8bitYCbCr42tile, putcontig8bitYCbCr41tile and + putcontig8bitYCbCr21tile cases. + +
    • in TIFFDefaultDirectory(), reset any already existing + extented tags installed by user code through the extender mechaninm before + calling the extender callback (GDAL #5054) + +
    • Fix warnings about unused parameters. + +
    • Fix various typos in comments found by Debian lintian tool (GDAL #5756) + +
    • tif_getimage.c: avoid divide by zero on invalid YCbCr subsampling. + (#2235) + +
    • tif_dirread.c: In EstimateStripByteCounts(), check return code + of _TIFFFillStriles(). This solves crashing bug on corrupted + images generated by afl. + +
    • tif_read.c: fix several invalid comparisons of a uint64 value with + <= 0 by casting it to int64 first. This solves crashing bug on corrupted + images generated by afl. + +
    • TIFFSetField(): refuse to set negative values for + TIFFTAG_XRESOLUTION and TIFFTAG_YRESOLUTION that cause asserts when writing + the directory + +
    • TIFFReadDirectory(): refuse to read ColorMap or + TransferFunction if BitsPerSample has not yet been read, otherwise reading + it later will cause user code to crash if BitsPerSample > 1 + +
    • TIFFRGBAImageOK(): return FALSE if LOGLUV with + SamplesPerPixel != 3, or if CIELAB with SamplesPerPixel != 3 or BitsPerSample != 8 + +
    • tif_config.vc.h: no longer use "#define snprintf _snprintf" with + Visual Studio 2015 aka VC 14 aka MSVC 1900 + +
    • LZW codec: prevent potential null dereference of sp->dec_codetab in LZWPreDecode + (#2459) + +
    • TIFFReadBufferSetup(): avoid passing -1 size + to TIFFmalloc() if passed user buffer size is 0 + (#2459) + +
    • TIFFReadDirEntryOutputErr(): Incorrect + count for tag should be a warning rather than an error since + errors terminate processing. + +
    • tif_dirinfo.c (TIFFField) : Fix data type for TIFFTAG_GLOBALPARAMETERSIFD tag. + +
    • Add definitions for TIFF/EP CFARepeatPatternDim and CFAPattern tags + (#2457) + +
    • tif_codec.c, tif_dirinfo.c: Enlarge some fixed-size buffers that weren't + large enough, and eliminate substantially all uses of sprintf(buf, + ...) in favor of using snprintf(buf, sizeof(buf), ...) +
    • configure.ac: Improve pkg-config static linking by adding -lm to Libs.private when needed. + +
    • tif_write.c: tmsize_t related casting warning fixed for + 64bit linux. + +
    • tif_read.c: uint64/tmsize_t change for MSVC warnings. + (#2427) + +
    • Fix TIFFPrintDirectory's handling of + field_passcount fields: it had the TIFF_VARIABLE and + TIFF_VARIABLE2 cases backwards. + +
    • PixarLog codec: Improve previous patch for CVE-2012-4447 + (to enlarge tbuf for possible partial stride at end) so that + overflow in the integer addition is detected. + +
    • tif_{unix,vms,win32}.c (_TIFFmalloc): ANSI C does not + require malloc() to return NULL pointer if requested allocation + size is zero. Assure that _TIFFmalloc does. + +
    • tif_zip.c: Avoid crash on NULL error messages. + +
    + +


    + + + +CHANGES IN THE TOOLS: + +
      + +
    • tiff2pdf: Fis various crashes and memory buffer access errors (oCERT-2014-013). +
    • tiff2pdf: fix buffer overflow on some YCbCr JPEG compressed images. + (#2445) +
    • tiff2pdf: fix buffer overflow on YCbCr JPEG compressed image. + (#2443) +
    • tiff2pdf: check return code of TIFFGetField() when reading TIFFTAG_SAMPLESPERPIXEL +
    • tiff2pdf: fix crash due to invalid tile count. +
    • tiff2pdf: Detect invalid settings of BitsPerSample/SamplesPerPixel for CIELAB / ITULAB +
    • tiff2pdf: Assure that memory size calculations for + _TIFFmalloc() do not overflow the range of tmsize_t. +
    • tiff2pdf: Avoid crash when TIFFTAG_TRANSFERFUNCTION tag returns one channel, + with the other two channels set to NULL. +
    • tiff2pdf: close PDF file. (#2479) +
    • tiff2pdf: Preserve input file directory order when pages + are tagged with the same page number. +
    • tiff2pdf.c: terminate after failure of allocating ycbcr buffer + (#2449 CVE-2013-4232) +
    • tiff2pdf: Rewrite JPEG marker parsing in + t2p_process_jpeg_strip to be at least marginally competent. The + approach is still fundamentally flawed, but at least now it won't + stomp all over memory when given bogus input. Fixes CVE-2013-1960. +
    • tiffdump: Guard against arithmetic overflow when calculating allocation buffer sizes. +
    • tiffdump: fix crash due to overflow of entry count. +
    • tiffdump: Fix double-free bug. +
    • tiffdump: detect cycle in TIFF directory chaining. + (#2463) +
    • tiffdump: avoid passing a NULL pointer to read() if seek() failed before. + (#2459) +
    • tiff2bw: when Photometric=RGB, the utility only works if SamplesPerPixel = 3. Enforce that. + (#2485, CVE-2014-8127) +
    • pal2rgb, thumbnail: fix crash by disabling TIFFTAG_INKNAMES copying. + (#2484, CVE-2014-8127) +
    • thumbnail: fix out-of-buffer write. + (#2489, CVE-2014-8128) +
    • thumbnail, tiffcmp: only read/write TIFFTAG_GROUP3OPTIONS + or TIFFTAG_GROUP4OPTIONS if compression is COMPRESSION_CCITTFAX3 or + COMPRESSION_CCITTFAX4. + (#2493, CVE-2014-8128) +
    • tiffcp: fix crash when converting YCbCr JPEG-compressed to none. + (#2480) +
    • bmp2tiff: fix crash due to int overflow related to input BMP dimensions +
    • tiffcrop: fix crash due to invalid TileWidth/TileHeight +
    • tiffcrop: fix segfault if bad value passed to -Z option + ( #2459) + and add missing va_end in dump_info +
    • thumbnail, tiffcrop: "fix" heap read over-run found with + Valgrind and Address Sanitizer on test suite +
    • fax2ps: check malloc()/realloc() result. (#2470) +
    • gif2tiff: apply patch for CVE-2013-4243. (#2451) +
    • gif2tiff: fix possible OOB write. (#2452, CVE-2013-4244) +
    • gif2tiff: Be more careful about corrupt or hostile input files (#2450, CVE-2013-4231) +
    • tiff2rgba: fix usage message in that zip was wrongly described +
    • tiffinfo: Default various values fetched with TIFFGetField() to avoid being uninitialized. +
    • tiff2ps: Fix bug in auto rotate option code. +
    • ppm2tiff: avoid zero size buffer vulnerability (CVE-2012-4564). + check the linebytes calculation too, get the max() calculation + straight, avoid redundant error messages, check for malloc + failure. +
    • tiffset: now supports a -u option to unset a tag. + (#2419) +
    • Fix warnings about unused parameters. +
    • rgb2ycbcr, tiff2bw, tiff2pdf, tiff2ps, tiffcrop, tiffdither : + Enlarge some fixed-size buffers that weren't + large enough, and eliminate substantially all uses of sprintf(buf, + ...) in favor of using snprintf(buf, sizeof(buf), ...), so as to + protect against overflow of fixed-size buffers. This responds in + particular to CVE-2013-1961 concerning overflow in tiff2pdf.c's + t2p_write_pdf_page(). +
    • html/man/tiff2ps.1.html, html/man/tiffcp.1.html, + html/man/tiffdither.1.html, man/tiff2ps.1, man/tiffcp.1, + man/tiffdither.1, tools/tiff2ps.c, tools/tiffcp.c, + tools/tiffdither.c: Sync tool usage printouts and man pages with + reality + +
    + +


    + + + +CHANGES IN THE CONTRIB AREA: + +
      + +
    • Fix warnings about variables set but not used. +
    • contrib/dbs/xtiff/xtiff.c: Enlarge some fixed-size buffers that weren't + large enough, and eliminate substantially all uses of sprintf(buf, + ...) in favor of using snprintf(buf, sizeof(buf), ...), so as to + protect against overflow of fixed-size buffers. +
    + +Last updated $Date: 2016-09-25 20:05:47 $. + + + diff --git a/thirdparty/tiff-4.2.0/html/v4.0.5.html b/thirdparty/tiff-4.2.0/html/v4.0.5.html new file mode 100644 index 00000000..a3354704 --- /dev/null +++ b/thirdparty/tiff-4.2.0/html/v4.0.5.html @@ -0,0 +1,149 @@ + + + + + Changes in TIFF v4.0.5 + + + + + + + +TIFF CHANGE INFORMATION + + + + +

    +This document describes the changes made to the software between the +previous and current versions (see above). If you don't +find something listed here, then it was not done in this timeframe, or +it was not considered important enough to be mentioned. The following +information is located here: +

    +

    +


    + + + +MAJOR CHANGES: + +
      + +
    • Support for configure/build using CMake. +
    • Support for large (> 2GB) files under Microsoft Windows. + +
    + + +


    + + +CHANGES IN THE SOFTWARE CONFIGURATION: + +
      + +
    • CMakeLists.txt / CMake +
        +
      • Configuration and building using CMake is now supported + under Microsoft Windows and on Unix-type systems. +
      +
    • + +
    • configure.ac / configure +
        +
      • Test for and use fseeko() if it is available. This allows + supporting large files on Unix-type systems with a 32-bit 'long' + type and a 64-bit 'off_t' type. +
      +
    • + +
    + +


    + + + +CHANGES IN LIBTIFF: + +
      + +
    • tiffiop.h: +
        +
      • Macros added to use 64-bit equivalents for all standard I/O + and POSIX APIs used by libtiff and its tools which are limited + to 2GB in Windows builds. Note that these 64-bit equivalents + were introduced by the CRT provided with Visual Studio 2005 and + if the necessary CRT is not installed on the target computer, + the program will not run. The wrapper macros will not be + activated unless the definition _MSC_VER is at least 1400 or + __MSVCRT_VERSION__ is at least 0x800. +
      + +
    • tif_unix.c: +
        +
      • Updated to support large files under Microsoft Windows. + This makes tif_unix.c a completely viable candidate for use + under Windows (in spite of its name) if the CRT is modern + enough. Please note that tif_win32.c already supported large + files, but only 'tiffinfo' and 'tiffdump' made any provision to + support large files under Windows. +
      • _tiffReadProc() and _tiffWriteProc() are modified to chunk + I/O to a maximum size of 2GB for extremely large I/O + requests. This surmounts limitations in the Microsoft Windows + read() and write() APIs (which are limited to the range of a + 32-bit 'int'), and may avoid poor behavior with extremely large + I/O requests on other systems. +
      + + +
    + +


    + + + +CHANGES IN THE TOOLS: + +
      + +
    • All tools +
        +
      • Updated to use I/O wrapper macros from tiffiop.h in order + to support large files under Microsoft Windows. +
      + +
    + +


    + + + +CHANGES IN THE CONTRIB AREA: + +
      + +
    • None + +
    + +Last updated $Date: 2016-09-25 20:05:47 $. + + + diff --git a/thirdparty/tiff-4.2.0/html/v4.0.6.html b/thirdparty/tiff-4.2.0/html/v4.0.6.html new file mode 100644 index 00000000..dbca5c86 --- /dev/null +++ b/thirdparty/tiff-4.2.0/html/v4.0.6.html @@ -0,0 +1,140 @@ + + + + + Changes in TIFF v4.0.6 + + + + + + + +TIFF CHANGE INFORMATION + + + + +

    +This document describes the changes made to the software between the +previous and current versions (see above). If you don't +find something listed here, then it was not done in this timeframe, or +it was not considered important enough to be mentioned. The following +information is located here: +

    +

    +


    + + + +MAJOR CHANGES: + +
      + +
    • Now builds with CMake 2.8.9 and newer (previously required 3.0.0) + +
    + + +


    + + +CHANGES IN THE SOFTWARE CONFIGURATION: + +
      + +
    • CMakeLists.txt / CMake +
        +
      • Supports CMake 2.8.9 and later. +
      • Add missing file which wasn't being distributed, causing + unit tests to fail. +
      • Make shared/static library building configurable. +
      • CMake reads all version information directly from + configure.ac to avoid duplication of values. +
      • CMake builds are now included in 'distcheck' target. +
      +
    • + +
    • Makefile.am +
        +
      • Autotools 'make distcheck' now tests the CMake-based build + if CMake is available. +
      +
    • + +
    + +


    + + + +CHANGES IN LIBTIFF: + +
      + +
    • Fixes to avoid undefined behaviour of signed types (C + standard compliance). +
    • Fixes to avoid possible isses when casting to unsigned char. +
    • Fixes to avoid undefined behaviour with shifts. +
    • Fix generation of output with 16 bit or 32 bit integer, when + byte swapping is needed, in horizontal predictor (#2521). +
    • Fix decoding when there is a single pixel to decode (unlikely + case...) and byte swapping is involved. +
    • Add add explicit masking with 0xff before casting to uchar in + floating-point horizontal differencing and accumulation routines. +
    • Eliminate requirement for and use of 64-bit constant values. + +
    + +


    + + + +CHANGES IN THE TOOLS: + +
      + +
    • tiffgt +
        +
      • Silence glut API deprecation warnings on MacOS X. +
      + + +
    • fax2ps +
        +
      • Detect failure to write to temporary file. +
      + +
    + +


    + + + +CHANGES IN THE CONTRIB AREA: + +
      + +
    • None + +
    + +Last updated $Date: 2016-09-25 20:05:47 $. + + + diff --git a/thirdparty/tiff-4.2.0/html/v4.0.7.html b/thirdparty/tiff-4.2.0/html/v4.0.7.html new file mode 100644 index 00000000..4f92c129 --- /dev/null +++ b/thirdparty/tiff-4.2.0/html/v4.0.7.html @@ -0,0 +1,412 @@ + + + + + Changes in TIFF v4.0.7 + + + + + + + +TIFF CHANGE INFORMATION + + + + +

    +This document describes the changes made to the software between the +previous and current versions (see above). If you don't +find something listed here, then it was not done in this timeframe, or +it was not considered important enough to be mentioned. The following +information is located here: +

    +

    +


    + + + +MAJOR CHANGES: + +
      + +
    • The libtiff tools bmp2tiff, gif2tiff, ras2tiff, sgi2tiff, + sgisv, and ycbcr are completely removed from the distribution. + These tools were written in the late 1980s and early 1990s for + test and demonstration purposes. In some cases the tools were + never updated to support updates to the file format, or the + file formats are now rarely used. In all cases these tools + increased the libtiff security and maintenance exposure beyond + the value offered by the tool. + +
    + + +


    + + +CHANGES IN THE SOFTWARE CONFIGURATION: + +
      + +
    • None + +
    + +


    + + + +CHANGES IN LIBTIFF: + +
      + +
    • libtiff/tif_dirread.c: in TIFFFetchNormalTag(), do not + dereference NULL pointer when values of tags with + TIFF_SETGET_C16_ASCII / TIFF_SETGET_C32_ASCII access are + 0-byte arrays. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2593 (regression + introduced by previous fix done on 2016-11-11 for + CVE-2016-9297). Reported by Henri Salo. Assigned as + CVE-2016-9448 + +
    • libtiff/tif_aux.c: fix crash in TIFFVGetFieldDefaulted() when + requesting Predictor tag and that the zip/lzw codec is not + configured. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2591 + +
    • libtiff/tif_dirread.c: in TIFFFetchNormalTag(), make sure + that values of tags with TIFF_SETGET_C16_ASCII / + TIFF_SETGET_C32_ASCII access are null terminated, to avoid + potential read outside buffer in _TIFFPrintField(). Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2590 + +
    • libtiff/tif_dirread.c: reject images with OJPEG compression + that have no TileOffsets/StripOffsets tag, when OJPEG + compression is disabled. Prevent null pointer dereference in + TIFFReadRawStrip1() and other functions that expect + td_stripbytecount to be non NULL. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2585 + +
    • libtiff/tif_strip.c: make TIFFNumberOfStrips() return the + td->td_nstrips value when it is non-zero, instead of + recomputing it. This is needed in TIFF_STRIPCHOP mode where + td_nstrips is modified. Fixes a read outsize of array in + tiffsplit (or other utilities using TIFFNumberOfStrips()). + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2587 + (CVE-2016-9273) + +
    • libtiff/tif_predict.h, libtiff/tif_predict.c: Replace + assertions by runtime checks to avoid assertions in debug + mode, or buffer overflows in release mode. Can happen when + dealing with unusual tile size like YCbCr with + subsampling. Reported as MSVR 35105 by Axel Souchet & Vishal + Chauhan from the MSRC Vulnerabilities & Mitigations + +
    • libtiff/tif_dir.c: discard values of SMinSampleValue and + SMaxSampleValue when they have been read and the value of + SamplesPerPixel is changed afterwards (like when reading a + OJPEG compressed image with a missing SamplesPerPixel tag, and + whose photometric is RGB or YCbCr, forcing SamplesPerPixel + being 3). Otherwise when rewriting the directory (for example + with tiffset, we will expect 3 values whereas the array had + been allocated with just one), thus causing a out of bound + read access. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2500 + (CVE-2014-8127, duplicate: CVE-2016-3658) + +
    • libtiff/tif_dirwrite.c: avoid null pointer dereference on + td_stripoffset when writing directory, if FIELD_STRIPOFFSETS + was artificially set for a hack case in OJPEG case. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2500 + (CVE-2014-8127, duplicate: CVE-2016-3658) + +
    • libtiff/tif_getimage.c (TIFFRGBAImageOK): Reject attempts to + read floating point images. + +
    • libtiff/tif_predict.c (PredictorSetup): Enforce + bits-per-sample requirements of floating point predictor (3). + Fixes CVE-2016-3622 "Divide By Zero in the tiff2rgba tool." + +
    • libtiff/tif_pixarlog.c: fix out-of-bounds write vulnerabilities + in heap allocated buffers. Reported as MSVR 35094. Discovered by + Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & + Mitigations team. + +
    • libtiff/tif_write.c: fix issue in error code path of + TIFFFlushData1() that didn't reset the tif_rawcc and tif_rawcp + members. I'm not completely sure if that could happen in + practice outside of the odd behaviour of t2p_seekproc() of + tiff2pdf). The report points that a better fix could be to + check the return value of TIFFFlushData1() in places where it + isn't done currently, but it seems this patch is enough. + Reported as MSVR 35095. Discovered by Axel Souchet & Vishal + Chauhan & Suha Can from the MSRC Vulnerabilities & Mitigations + team. + +
    • libtiff/tif_pixarlog.c: Fix write buffer overflow in + PixarLogEncode if more input samples are provided than + expected by PixarLogSetupEncode. Idea based on + libtiff-CVE-2016-3990.patch from + libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro, but with + different and simpler check. (bugzilla #2544) + +
    • libtiff/tif_read.c: Fix out-of-bounds read on memory-mapped + files in TIFFReadRawStrip1() and TIFFReadRawTile1() when + stripoffset is beyond tmsize_t max value (reported by Mathias + Svensson) + +
    • libtiff/tif_read.c: make TIFFReadEncodedStrip() and + TIFFReadEncodedTile() directly use user provided buffer when + no compression (and other conditions) to save a memcpy() + +
    • libtiff/tif_write.c: make TIFFWriteEncodedStrip() and + TIFFWriteEncodedTile() directly use user provided buffer when + no compression to save a memcpy(). + +
    • libtiff/tif_luv.c: validate that for COMPRESSION_SGILOG and + PHOTOMETRIC_LOGL, there is only one sample per pixel. Avoid + potential invalid memory write on corrupted/unexpected images + when using the TIFFRGBAImageBegin() interface (reported by + Clay Wood) + +
    • libtiff/tif_pixarlog.c: fix potential buffer write overrun in + PixarLogDecode() on corrupted/unexpected images (reported by + Mathias Svensson) (CVE-2016-5875) + +
    • libtiff/libtiff.def: Added _TIFFMultiply32 and + _TIFFMultiply64 to libtiff.def + +
    • libtiff/tif_config.vc.h (HAVE_SNPRINTF): Add a '1' to the + HAVE_SNPRINTF definition. + +
    • libtiff/tif_config.vc.h (HAVE_SNPRINTF): Applied patch by + Edward Lam to define HAVE_SNPRINTF for Visual Studio 2015. + +
    • libtiff/tif_dirread.c: when compiled with DEFER_STRILE_LOAD, + fix regression, introduced on 2014-12-23, when reading a + one-strip file without a StripByteCounts tag. GDAL #6490 + +
    • libtiff/*: upstream typo fixes (mostly contributed by Kurt + Schwehr) coming from GDAL internal libtiff + +
    • libtiff/tif_fax3.h: make Param member of TIFFFaxTabEnt + structure a uint16 to reduce size of the binary. + +
    • libtiff/tif_read.c, tif_dirread.c: fix indentation issues + raised by GCC 6 -Wmisleading-indentation + +
    • libtiff/tif_pixarlog.c: avoid zlib error messages to pass a + NULL string to %s formatter, which is undefined behaviour in + sprintf(). + +
    • libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode() + triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif + (bugzilla #2508) + +
    • libtiff/tif_luv.c: fix potential out-of-bound writes in + decode functions in non debug builds by replacing assert()s by + regular if checks (bugzilla #2522). Fix potential + out-of-bound reads in case of short input data. + +
    • libtiff/tif_getimage.c: fix out-of-bound reads in + TIFFRGBAImage interface in case of unsupported values of + SamplesPerPixel/ExtraSamples for LogLUV / CIELab. Add explicit + call to TIFFRGBAImageOK() in TIFFRGBAImageBegin(). Fix + CVE-2015-8665 reported by limingxing and CVE-2015-8683 + reported by zzf of Alibaba. + +
    • libtiff/tif_dirread.c: workaround false positive warning of + Clang Static Analyzer about null pointer dereference in + TIFFCheckDirOffset(). + +
    • libtiff/tif_fax3.c: remove dead assignment in + Fax3PutEOLgdal(). Found by Clang Static Analyzer + +
    • libtiff/tif_dirwrite.c: fix truncation to 32 bit of file + offsets in TIFFLinkDirectory() and TIFFWriteDirectorySec() + when aligning directory offsets on a even offset (affects + BigTIFF). This was a regression of the changeset of + 2015-10-19. + +
    • libtiff/tif_write.c: TIFFWriteEncodedStrip() and + TIFFWriteEncodedTile() should return -1 in case of failure of + tif_encodestrip() as documented + +
    • libtiff/tif_dumpmode.c: DumpModeEncode() should return 0 in + case of failure so that the above mentionned functions detect + the error. + +
    • libtiff/*.c: fix MSVC warnings related to cast shortening and + assignment within conditional expression + +
    • libtiff/*.c: fix clang -Wshorten-64-to-32 warnings + +
    • libtiff/tif_dirread.c: prevent reading ColorMap or + TransferFunction if BitsPerPixel > 24, so as to avoid huge + memory allocation and file read attempts + +
    • libtiff/tif_dirread.c: remove duplicated assignment (reported + by Clang static analyzer) + +
    • libtiff/tif_dir.c, libtiff/tif_dirinfo.c, + libtiff/tif_compress.c, libtiff/tif_jpeg_12.c: suppress + warnings about 'no previous declaration/prototype' + +
    • libtiff/tiffiop.h, libtiff/tif_dirwrite.c: suffix constants + by U to fix 'warning: negative integer implicitly converted to + unsigned type' warning (part of -Wconversion) + +
    • libtiff/tif_dir.c, libtiff/tif_dirread.c, + libtiff/tif_getimage.c, libtiff/tif_print.c: fix -Wshadow + warnings (only in libtiff/) + +
    + +


    + + + +CHANGES IN THE TOOLS: + +
      + +
    • tools/Makefile.am: The libtiff tools bmp2tiff, gif2tiff, + ras2tiff, sgi2tiff, sgisv, and ycbcr are completely removed + from the distribution. The libtiff tools rgb2ycbcr and + thumbnail are only built in the build tree for testing. Old + files are put in new 'archive' subdirectory of the source + repository, but not in distribution archives. These changes + are made in order to lessen the maintenance burden. + +
    • tools/tiff2pdf.c: avoid undefined behaviour related to + overlapping of source and destination buffer in memcpy() call + in t2p_sample_rgbaa_to_rgb() Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2577 + +
    • tools/tiff2pdf.c: fix potential integer overflows on 32 bit + builds in t2p_read_tiff_size() Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2576 + +
    • tools/fax2tiff.c: fix segfault when specifying -r without + argument. Patch by Yuriy M. Kaminskiy. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2572 + +
    • tools/tiffinfo.c: fix out-of-bound read on some tiled images. + (http://bugzilla.maptools.org/show_bug.cgi?id=2517) + +
    • tools/tiffcrop.c: fix multiple uint32 overflows in + writeBufferToSeparateStrips(), writeBufferToContigTiles() and + writeBufferToSeparateTiles() that could cause heap buffer + overflows. Reported by Henri Salo from Nixu Corporation. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2592 + +
    • tools/tiffcrop.c: fix out-of-bound read of up to 3 bytes in + readContigTilesIntoBuffer(). Reported as MSVR 35092 by Axel + Souchet & Vishal Chauhan from the MSRC Vulnerabilities & + Mitigations team. + +
    • tools/tiff2pdf.c: fix write buffer overflow of 2 bytes on + JPEG compressed images. Reported by Tyler Bohan of Cisco Talos + as TALOS-CAN-0187 / CVE-2016-5652. Also prevents writing 2 + extra uninitialized bytes to the file stream. + +
    • tools/tiffcp.c: fix out-of-bounds write on tiled images with odd + tile width vs image width. Reported as MSVR 35103 + by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities & + Mitigations team. + +
    • tools/tiff2pdf.c: fix read -largely- outsize of buffer in + t2p_readwrite_pdf_image_tile(), causing crash, when reading a + JPEG compressed image with TIFFTAG_JPEGTABLES length being + one. Reported as MSVR 35101 by Axel Souchet and Vishal + Chauhan from the MSRC Vulnerabilities & Mitigations team. + +
    • tools/tiffcp.c: fix read of undefined variable in case of + missing required tags. Found on test case of MSVR 35100. + +
    • tools/tiffcrop.c: fix read of undefined buffer in + readContigStripsIntoBuffer() due to uint16 overflow. Probably + not a security issue but I can be wrong. Reported as MSVR + 35100 by Axel Souchet from the MSRC Vulnerabilities & + Mitigations team. + +
    • tools/tiffcrop.c: fix various out-of-bounds write + vulnerabilities in heap or stack allocated buffers. Reported + as MSVR 35093, MSVR 35096 and MSVR 35097. Discovered by Axel + Souchet and Vishal Chauhan from the MSRC Vulnerabilities & + Mitigations team. + +
    • tools/tiff2pdf.c: fix out-of-bounds write vulnerabilities in + heap allocate buffer in t2p_process_jpeg_strip(). Reported as + MSVR 35098. Discovered by Axel Souchet and Vishal Chauhan from + the MSRC Vulnerabilities & Mitigations team. + +
    • tools/tiff2bw.c: fix weight computation that could result of + color value overflow (no security implication). Fix bugzilla + #2550. Patch by Frank Freudenberg. + +
    • tools/rgb2ycbcr.c: validate values of -v and -h parameters to + avoid potential divide by zero. Fixes CVE-2016-3623 (bugzilla #2569) + +
    • tools/tiffcrop.c: Fix out-of-bounds write in loadImage(). + From patch libtiff-CVE-2016-3991.patch from + libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro (bugzilla + #2543) + +
    • tools/tiff2rgba.c: Fix integer overflow in size of allocated + buffer, when -b mode is enabled, that could result in + out-of-bounds write. Based initially on patch + tiff-CVE-2016-3945.patch from libtiff-4.0.3-25.el7_2.src.rpm + by Nikola Forro, with correction for invalid tests that + rejected valid files. (bugzilla #2545) + +
    • tools/tiffcrop.c: Avoid access outside of stack allocated + array on a tiled separate TIFF with more than 8 samples per + pixel. Reported by Kaixiang Zhang of the Cloud Security Team, + Qihoo 360 (CVE-2016-5321 / CVE-2016-5323 , bugzilla #2558 / + #2559) + +
    • tools/tiffdump.c: fix a few misaligned 64-bit reads warned by + -fsanitize + +
    • tools/tiffdump.c (ReadDirectory): Remove uint32 cast to + _TIFFmalloc() argument which resulted in Coverity report. + Added more mutiplication overflow checks. + +
    + +


    + + + +CHANGES IN THE CONTRIB AREA: + +
      + +
    • None + +
    + +Last updated $Date: 2016-11-19 17:47:40 $. + + + diff --git a/thirdparty/tiff-4.2.0/html/v4.0.8.html b/thirdparty/tiff-4.2.0/html/v4.0.8.html new file mode 100644 index 00000000..bd3f751c --- /dev/null +++ b/thirdparty/tiff-4.2.0/html/v4.0.8.html @@ -0,0 +1,446 @@ + + + + + Changes in TIFF v4.0.8 + + + + + + + +TIFF CHANGE INFORMATION + + + + +

    +This document describes the changes made to the software between the +previous and current versions (see above). If you don't +find something listed here, then it was not done in this timeframe, or +it was not considered important enough to be mentioned. The following +information is located here: +

    +

    +


    + + + +MAJOR CHANGES: + +
      + +
    • None + +
    + + +


    + + +CHANGES IN THE SOFTWARE CONFIGURATION: + +
      + +
    • None + +
    + +


    + + + +CHANGES IN LIBTIFF: + +
      + +
    • libtiff/tif_getimage.c, libtiff/tif_open.c: add parenthesis + to fix cppcheck clarifyCalculation warnings * + libtiff/tif_predict.c, libtiff/tif_print.c: fix printf + unsigned vs signed formatting (cppcheck + invalidPrintfArgType_uint warnings) + +
    • libtiff/tif_read.c, libtiff/tiffiop.h: fix uint32 overflow in + TIFFReadEncodedStrip() that caused an integer division by + zero. Reported by Agostino Sarubbo. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2596 + +
    • libtiff/tif_pixarlog.c, libtiff/tif_luv.c: fix heap-based + buffer overflow on generation of PixarLog / LUV compressed + files, with ColorMap, TransferFunction attached and nasty + plays with bitspersample. The fix for LUV has not been + tested, but suffers from the same kind of issue of PixarLog. + Reported by Agostino Sarubbo. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2604 + +
    • libtiff/tif_strip.c: revert the change in + TIFFNumberOfStrips() done for + http://bugzilla.maptools.org/show_bug.cgi?id=2587 / + CVE-2016-9273 since the above change is a better fix that + makes it unnecessary. + +
    • libtiff/tif_dirread.c: modify ChopUpSingleUncompressedStrip() + to instanciate compute ntrips as + TIFFhowmany_32(td->td_imagelength, rowsperstrip), instead of a + logic based on the total size of data. Which is faulty is the + total size of data is not sufficient to fill the whole image, + and thus results in reading outside of the + StripByCounts/StripOffsets arrays when using + TIFFReadScanline(). Reported by Agostino Sarubbo. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2608. + +
    • libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of + failure in OJPEGPreDecode(). This will avoid a divide by zero, + and potential other issues. Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2611 + +
    • libtiff/tif_write.c: fix misleading indentation as warned by GCC. + + +
    • libtiff/tif_fax3.h: revert change done on 2016-01-09 that + made Param member of TIFFFaxTabEnt structure a uint16 to + reduce size of the binary. It happens that the Hylafax + software uses the tables that follow this typedef + (TIFFFaxMainTable, TIFFFaxWhiteTable, TIFFFaxBlackTable), + although they are not in a public libtiff header. Raised by + Lee Howard. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2636 + +
    • libtiff/tiffio.h, libtiff/tif_getimage.c: add + TIFFReadRGBAStripExt() and TIFFReadRGBATileExt() variants of + the functions without ext, with an extra argument to control + the stop_on_error behaviour. + +
    • libtiff/tif_getimage.c: fix potential memory leaks in error + code path of TIFFRGBAImageBegin(). Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2627 + +
    • libtiff/tif_jpeg.c: increase libjpeg max memory usable to 10 + MB instead of libjpeg 1MB default. This helps when creating + files with "big" tile, without using libjpeg temporary files. + Related to https://trac.osgeo.org/gdal/ticket/6757 + +
    • libtiff/tif_jpeg.c: avoid integer division by zero in + JPEGSetupEncode() when horizontal or vertical sampling is set + to 0. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2653 + +
    • libtiff/tif_dirwrite.c: in + TIFFWriteDirectoryTagCheckedRational, replace assertion by + runtime check to error out if passed value is strictly + negative. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2535 + +
    • libtiff/tif_dirread.c: avoid division by floating point 0 in + TIFFReadDirEntryCheckedRational() and + TIFFReadDirEntryCheckedSrational(), and return 0 in that case + (instead of infinity as before presumably) Apparently some + sanitizers do not like those divisions by zero. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2644 + +
    • libtiff/tif_dir.c, tif_dirread.c, tif_dirwrite.c: implement + various clampings of double to other data types to avoid + undefined behaviour if the output range isn't big enough to + hold the input value. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2643 + http://bugzilla.maptools.org/show_bug.cgi?id=2642 + http://bugzilla.maptools.org/show_bug.cgi?id=2646 + http://bugzilla.maptools.org/show_bug.cgi?id=2647 + +
    • libtiff/tif_jpeg.c: validate BitsPerSample in + JPEGSetupEncode() to avoid undefined behaviour caused by + invalid shift exponent. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2648 + +
    • libtiff/tif_read.c: avoid potential undefined behaviour on + signed integer addition in TIFFReadRawStrip1() in isMapped() + case. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2650 + +
    • libtiff/tif_getimage.c: add explicit uint32 cast in + putagreytile to avoid UndefinedBehaviorSanitizer warning. + Patch by Nicolás Peña. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2658 + +
    • libtiff/tif_read.c: TIFFReadBufferSetup(): use _TIFFcalloc() + to zero initialize tif_rawdata. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2651 + +
    • libtiff/tiffio.h, tif_unix.c, tif_win32.c, tif_vms.c: add + _TIFFcalloc() + +
    • libtiff/tif_luv.c, tif_lzw.c, tif_packbits.c: return 0 in + Encode functions instead of -1 when TIFFFlushData1() fails. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2130 + +
    • libtiff/tif_ojpeg.c: fix leak in + OJPEGReadHeaderInfoSecTablesQTable, + OJPEGReadHeaderInfoSecTablesDcTable and + OJPEGReadHeaderInfoSecTablesAcTable when read fails. Patch by + Nicolás Peña. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2659 + +
    • libtiff/tif_jpeg.c: only run JPEGFixupTagsSubsampling() if + the YCbCrSubsampling tag is not explicitly present. This helps + a bit to reduce the I/O amount when the tag is present + (especially on cloud hosted files). + +
    • libtiff/tif_lzw.c: in LZWPostEncode(), increase, if + necessary, the code bit-width after flushing the remaining + code and before emitting the EOI code. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=1982 + +
    • libtiff/tif_pixarlog.c: fix memory leak in error code path of + PixarLogSetupDecode(). Patch by Nicolás Peña. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2665 + +
    • libtiff/tif_fax3.c, tif_predict.c, tif_getimage.c: fix GCC 7 + -Wimplicit-fallthrough warnings. + +
    • libtiff/tif_dirread.c: fix memory leak in non + DEFER_STRILE_LOAD mode (ie default) when there is both a + StripOffsets and TileOffsets tag, or a StripByteCounts and + TileByteCounts Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2689 + +
    • libtiff/tif_ojpeg.c: fix potential memory leak in + OJPEGReadHeaderInfoSecTablesQTable, + OJPEGReadHeaderInfoSecTablesDcTable and + OJPEGReadHeaderInfoSecTablesAcTable Patch by Nicolás Peña. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2670 + +
    • libtiff/tif_fax3.c: avoid crash in Fax3Close() on empty file. + Patch by Alan Coopersmith + complement by myself. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2673 + +
    • libtiff/tif_read.c: TIFFFillStrip(): add limitation to the + number of bytes read in case td_stripbytecount[strip] is + bigger than reasonable, so as to avoid excessive memory + allocation. + +
    • libtiff/tif_zip.c, tif_pixarlog.c, tif_predict.c: fix memory + leak when the underlying codec (ZIP, PixarLog) succeeds its + setupdecode() method, but PredictorSetup fails. Credit to + OSS-Fuzz (locally run, on GDAL) + +
    • libtiff/tif_read.c: TIFFFillStrip() and TIFFFillTile(): avoid + excessive memory allocation in case of shorten files. Only + effective on 64 bit builds and non-mapped cases. Credit to + OSS-Fuzz (locally run, on GDAL) + +
    • libtiff/tif_read.c: TIFFFillStripPartial() / TIFFSeek(), + avoid potential integer overflows with read_ahead in + CHUNKY_STRIP_READ_SUPPORT mode. Should + especially occur on 32 bit platforms. + +
    • libtiff/tif_read.c: TIFFFillStripPartial(): avoid excessive + memory allocation in case of shorten files. Only effective on + 64 bit builds. Credit to OSS-Fuzz (locally run, on GDAL) + +
    • libtiff/tif_read.c: update tif_rawcc in + CHUNKY_STRIP_READ_SUPPORT mode with tif_rawdataloaded when + calling TIFFStartStrip() or TIFFFillStripPartial(). This + avoids reading beyond tif_rawdata when bytecount > + tif_rawdatasize. Fixes + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1545. + Credit to OSS-Fuzz + +
    • libtiff/tif_color.c: avoid potential int32 overflow in + TIFFYCbCrToRGBInit() Fixes + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1533 + Credit to OSS-Fuzz + +
    • libtiff/tif_pixarlog.c, tif_luv.c: avoid potential int32 + overflows in multiply_ms() and add_ms(). Fixes + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1558 + Credit to OSS-Fuzz + +
    • libtiff/tif_packbits.c: fix out-of-buffer read in + PackBitsDecode() Fixes + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1563 + Credit to OSS-Fuzz + +
    • libtiff/tif_luv.c: LogL16InitState(): avoid excessive memory + allocation when RowsPerStrip tag is missing. + Credit to OSS-Fuzz (locally run, on GDAL) + +
    • libtiff/tif_lzw.c: update dec_bitsleft at beginning of + LZWDecode(), and update tif_rawcc at end of LZWDecode(). This + is needed to properly work with the latest chnges in + tif_read.c in CHUNKY_STRIP_READ_SUPPORT mode. + +
    • libtiff/tif_pixarlog.c: PixarLogDecode(): resync tif_rawcp + with next_in and tif_rawcc with avail_in at beginning and end + of function, similarly to what is done in LZWDecode(). Likely + needed so that it works properly with latest chnges in + tif_read.c in CHUNKY_STRIP_READ_SUPPORT mode. But untested... + +
    • libtiff/tif_getimage.c: initYCbCrConversion(): add basic + validation of luma and refBlackWhite coefficients (just check + they are not NaN for now), to avoid potential float to int + overflows. Fixes + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1663 + Credit to OSS Fuzz + +
    • libtiff/tif_read.c: _TIFFVSetField(): fix outside range cast + of double to float. Credit to Google Autofuzz project + +
    • libtiff/tif_getimage.c: initYCbCrConversion(): check luma[1] + is not zero to avoid division by zero. Fixes + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1665 + Credit to OSS Fuzz + +
    • libtiff/tif_read.c: _TIFFVSetField(): fix outside range cast + of double to float. Credit to Google Autofuzz project + +
    • libtiff/tif_getimage.c: initYCbCrConversion(): check luma[1] + is not zero to avoid division by zero. Fixes + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1665 + Credit to OSS Fuzz + +
    • libtiff/tif_getimage.c: initYCbCrConversion(): stricter + validation for refBlackWhite coefficients values. To avoid + invalid float->int32 conversion. Fixes + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1718 + Credit to OSS Fuzz + +
    + +


    + + + +CHANGES IN THE TOOLS: + +
      + +
    • tools/fax2tiff.c (main): Applied patch by Jörg Ahrens to fix + passing client data for Win32 builds using tif_win32.c + (USE_WIN32_FILEIO defined) for file I/O. Patch was provided + via email on November 20, 2016. + +
    • tools/tiffcp.c: avoid uint32 underflow in cpDecodedStrips + that can cause various issues, such as buffer overflows in the + library. Reported by Agostino Sarubbo. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2598 + +
    • tools/tiffcrop.c: fix readContigStripsIntoBuffer() in -i + (ignore) mode so that the output buffer is correctly + incremented to avoid write outside bounds. Reported by + Agostino Sarubbo. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2620 + +
    • tools/tiffcrop.c: add 3 extra bytes at end of strip buffer in + readSeparateStripsIntoBuffer() to avoid read outside of heap + allocated buffer. Reported by Agostino Sarubbo. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2621 + +
    • tools/tiffcrop.c: fix integer division by zero when + BitsPerSample is missing. Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2619 + +
    • tools/tiffinfo.c: fix null pointer dereference in -r mode + when the image has no StripByteCount tag. Reported by + Agostino Sarubbo. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2594 + +
    • tools/tiffcp.c: avoid potential division by zero is + BitsPerSamples tag is missing. Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2597 + +
    • tools/tif_dir.c: when TIFFGetField(, TIFFTAG_NUMBEROFINKS, ) + is called, limit the return number of inks to SamplesPerPixel, + so that code that parses ink names doesn't go past the end of + the buffer. Reported by Agostino Sarubbo. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2599 + +
    • tools/tiffcp.c: avoid potential division by zero is + BitsPerSamples tag is missing. Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2607 + +
    • tools/tiffcp.c: fix uint32 underflow/overflow that can cause + heap-based buffer overflow. Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2610 + +
    • tools/tiffcp.c: replace assert( (bps % 8) == 0 ) by a non + assert check. Reported by Agostino Sarubbo. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2605 + +
    • tools/tiff2ps.c: fix 2 heap-based buffer overflows (in + PSDataBW and PSDataColorContig). Reported by Agostino Sarubbo. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2633 and + http://bugzilla.maptools.org/show_bug.cgi?id=2634. + +
    • tools/tiff2pdf.c: prevent heap-based buffer overflow in -j + mode on a paletted image. Note: this fix errors out before the + overflow happens. There could probably be a better fix. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2635 + +
    • tools/tiff2pdf.c: fix wrong usage of memcpy() that can + trigger unspecified behaviour. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2638 + +
    • tools/tiff2pdf.c: avoid potential invalid memory read in + t2p_writeproc. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2639 + +
    • tools/tiff2pdf.c: avoid potential heap-based overflow in + t2p_readwrite_pdf_image_tile(). Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2640 + +
    • tools/tiffcrop.c: remove extraneous TIFFClose() in error code + path, that caused double free. Related to + http://bugzilla.maptools.org/show_bug.cgi?id=2535 + +
    • tools/tiffcp.c: error out cleanly in cpContig2SeparateByRow + and cpSeparate2ContigByRow if BitsPerSample != 8 to avoid heap + based overflow. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2656 and + http://bugzilla.maptools.org/show_bug.cgi?id=2657 + +
    • tools/raw2tiff.c: avoid integer division by zero. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2631 + +
    • tools/tiff2ps.c: call TIFFClose() in error code paths. + +
    • tools/fax2tiff.c: emit appropriate message if the input file + is empty. Patch by Alan Coopersmith. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2672 + +
    • tools/tiff2bw.c: close TIFF handle in error code path. Fixes + http://bugzilla.maptools.org/show_bug.cgi?id=2677 + +
    + +


    + + + +CHANGES IN THE CONTRIB AREA: + +
      + +
    • None + +
    + +Last updated $Date: 2017-05-21 17:47:46 $. + + + diff --git a/thirdparty/tiff-4.2.0/html/v4.0.9.html b/thirdparty/tiff-4.2.0/html/v4.0.9.html new file mode 100644 index 00000000..19b370a4 --- /dev/null +++ b/thirdparty/tiff-4.2.0/html/v4.0.9.html @@ -0,0 +1,374 @@ + + + + + Changes in TIFF v4.0.9 + + + + + + + +TIFF CHANGE INFORMATION + + + + +

    +This document describes the changes made to the software between the +previous and current versions (see above). If you don't +find something listed here, then it was not done in this timeframe, or +it was not considered important enough to be mentioned. The following +information is located here: +

    +

    +


    + + + +MAJOR CHANGES: + +
      + +
    • None + +
    + + +


    + + +CHANGES IN THE SOFTWARE CONFIGURATION: + +
      + +
    • test/Makefile.am: Add some tests for tiff2bw. +
    • * .appveyor.yml, .travis.yml, build/travis-ci: apply patches + 0001-ci-Travis-script-improvements.patch and + 0002-ci-Invoke-helper-script-via-shell.patch by Roger Leigh + (sent to mailing list) +
    • .travis.yml, build/travis-ci: new files from + 0001-ci-Add-Travis-support-for-Linux-builds-with-Autoconf.patch by + Roger Leigh (sent to mailing list on 2017-06-08) + This patch adds support for the Travis-CI service. +
    • .appveyor.yml: new file from + 0002-ci-Add-AppVeyor-support.patch by Roger Leigh (sent to mailing + list on 2017-06-08) + This patch adds a .appveyor.yml file to the top-level. This allows + one to opt in to having a branch built on Windows with Cygwin, + MinGW and MSVC automatically when a branch is pushed to GitHub, + GitLab, BitBucket or any other supported git hosting service. +
    • CMakeLists.txt, test/CMakeLists.txt, test/TiffTestCommon.cmake: apply + patch 0001-cmake-Improve-Cygwin-and-MingGW-test-support.patch from Roger + Leigh (sent to mailing list on 2017-06-08) + This patch makes the CMake build system support running the tests + with MinGW or Cygwin. + +
    • test/tiffcp-lzw-compat.sh, test/images/quad-lzw-compat.tiff: new files + to test old-style LZW decompression +
    • test/common.sh, Makefile.am, CMakeList.txt: updated with above +
    • test/Makefile.am: add missing reference to images/quad-lzw-compat.tiff + to fix "make distcheck". Patch by Roger Leigh +
    • nmake.opt: support a DEBUG=1 option, so as to adjust OPTFLAGS and use + /MDd runtime in debug mode. + + +
    + +


    + + + +CHANGES IN LIBTIFF: + +
      + +
    • libtiff/tif_color.c: TIFFYCbCrToRGBInit(): stricter clamping to avoid + int32 overflow in TIFFYCbCrtoRGB(). + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1844 + Credit to OSS Fuzz + +
    • libtiff/tif_getimage.c: initYCbCrConversion(): stricter validation for + refBlackWhite coefficients values. To avoid invalid float->int32 conversion + (when refBlackWhite[0] == 2147483648.f) + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1907 + Credit to OSS Fuzz + +
    • libtiff/tif_dirinfo.c, tif_dirread.c: add _TIFFCheckFieldIsValidForCodec(), + and use it in TIFFReadDirectory() so as to ignore fields whose tag is a + codec-specified tag but this codec is not enabled. This avoids TIFFGetField() + to behave differently depending on whether the codec is enabled or not, and + thus can avoid stack based buffer overflows in a number of TIFF utilities + such as tiffsplit, tiffcmp, thumbnail, etc. + Patch derived from 0063-Handle-properly-CODEC-specific-tags.patch + (http://bugzilla.maptools.org/show_bug.cgi?id=2580) by Raphaël Hertzog. + Fixes: + http://bugzilla.maptools.org/show_bug.cgi?id=2580 + http://bugzilla.maptools.org/show_bug.cgi?id=2693 + http://bugzilla.maptools.org/show_bug.cgi?id=2625 (CVE-2016-10095) + http://bugzilla.maptools.org/show_bug.cgi?id=2564 (CVE-2015-7554) + http://bugzilla.maptools.org/show_bug.cgi?id=2561 (CVE-2016-5318) + http://bugzilla.maptools.org/show_bug.cgi?id=2499 (CVE-2014-8128) + http://bugzilla.maptools.org/show_bug.cgi?id=2441 + http://bugzilla.maptools.org/show_bug.cgi?id=2433 + +
    • libtiff/tif_swab.c: if DISABLE_CHECK_TIFFSWABMACROS is defined, do not do + the #ifdef TIFFSwabXXX checks. Make it easier for GDAL to rename the symbols + of its internal libtiff copy. + + +
    • libtiff/tif_dirread.c: fix regression of libtiff 4.0.8 in + ChopUpSingleUncompressedStrip() regarding update of newly single-strip + uncompressed files whose bytecount is 0. Before the change of 2016-12-03, + the condition bytecount==0 used to trigger an early exit/disabling of + strip chop. Re-introduce that in update mode. Otherwise this cause + later incorrect setting for the value of StripByCounts/StripOffsets. + ( https://trac.osgeo.org/gdal/ticket/6924 ) +
    • libtiff/tif_dirread.c: TIFFFetchStripThing(): limit the number of items + read in StripOffsets/StripByteCounts tags to the number of strips to avoid + excessive memory allocation. + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2215 + Credit to OSS Fuzz +
    • libtiff/tif_getimage.c: avoid many (harmless) unsigned int overflows. +
    • libtiff/tif_fax3.c: avoid unsigned int overflow in Fax3Encode2DRow(). Could + potentially be a bug with huge rows. +
    • libtiff/tif_jpeg.c: avoid (harmless) unsigned int overflow on tiled images. +
    • libtiff/tif_dirread.c: avoid unsigned int overflow in EstimateStripByteCounts() + and BYTECOUNTLOOKSBAD when file is too short. +
    • libtiff/tif_predict.c: decorate legitimate functions where unsigned int + overflow occur with TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW + * libtiff/tif_dirread.c: avoid unsigned int overflow in EstimateStripByteCounts() +
    • libtiff/tiffiop.h: add TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW macro to + disable CLang warnings raised by -fsanitize=undefined,unsigned-integer-overflow +
    • libtiff/tif_jpeg.c: add anti-denial of service measure to avoid excessive + CPU consumption on progressive JPEGs with a huge number of scans. + See http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf + Note: only affects libtiff since 2014-12-29 where support of non-baseline JPEG + was added. + +
    • libtiff/tif_jpeg.c: error out at decoding time if anticipated libjpeg + memory allocation is above 100 MB. libjpeg in case of multiple scans, + which is allowed even in baseline JPEG, if components are spread over several + scans and not interleavedin a single one, needs to allocate memory (or + backing store) for the whole strip/tile. + See http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf + This limitation may be overriden by setting the + LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC environment variable, or recompiling + libtiff with a custom value of TIFF_LIBJPEG_LARGEST_MEM_ALLOC macro. +
    • libtiff/tif_jbig.c: fix memory leak in error code path of JBIGDecode() + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2706 + Reported by team OWL337 +
    • libtiff/tif_dirread.c: in TIFFReadDirEntryFloat(), check that a + double value can fit in a float before casting. Patch by Nicolas RUFF +
    • libtiff/tiffiop.h, libtiff/tif_jpeg.c, libtiff/tif_jpeg_12.c, + libtiff/tif_read.c: make TIFFReadScanline() works in + CHUNKY_STRIP_READ_SUPPORT mode with JPEG stream with multiple scans. + Also make configurable through a LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER + environment variable the maximum number of scans allowed. Defaults to + 100. +
    • libtiff/tif_read.c: TIFFFillTile(): add limitation to the number + of bytes read in case td_stripbytecount[strip] is bigger than + reasonable, so as to avoid excessive memory allocation (similarly to + what was done for TIFFFileStrip() on 2017-05-10) +
    • libtiff/tif_getimage.c: use _TIFFReadEncodedStripAndAllocBuffer(). + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2708 and + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2433 . + Credit to OSS Fuzz +
    • libtiff/tif_read.c, tiffiop.h: add a _TIFFReadEncodedStripAndAllocBuffer() + function, variant of TIFFReadEncodedStrip() that allocates the + decoded buffer only after a first successful TIFFFillStrip(). This avoids + excessive memory allocation on corrupted files. +
    • libtiff/tif_dirwrite.c: in TIFFWriteDirectoryTagCheckedXXXX() + functions associated with LONG8/SLONG8 data type, replace assertion that + the file is BigTIFF, by a non-fatal error. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2712 + Reported by team OWL337 +
    • libtiff/tif_read.c: TIFFStartTile(): set tif_rawcc to + tif_rawdataloaded when it is set. Similarly to TIFFStartStrip(). + This issue was revealed by the change of 2017-06-30 in TIFFFileTile(), + limiting the number of bytes read. But it could probably have been hit + too in CHUNKY_STRIP_READ_SUPPORT mode previously ? + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2454 + Credit to OSS Fuzz +
    • libtiff/tif_error.c, tif_warning.c: correctly use va_list when both + an old-style and new-style warning/error handlers are installed. + Patch by Paavo Helde (sent on the mailing list) +
    • libtiff/tif_getimage.c: use _TIFFReadTileAndAllocBuffer(). + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2470 + Credit to OSS Fuzz. +
    • libtiff/tif_read.c, tiffiop.h: add a _TIFFReadEncodedTileAndAllocBuffer() + and _TIFFReadTileAndAllocBuffer() variants of TIFFReadEncodedTile() and + TIFFReadTile() that allocates the decoded buffer only after a first + successful TIFFFillTile(). This avoids excessive memory allocation + on corrupted files. +
    • libtiff/tif_pixarlog.c: avoid excessive memory allocation on decoding + when RowsPerStrip tag is not defined (and thus td_rowsperstrip == UINT_MAX) + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2554 + Credit to OSS Fuzz +
    • libtiff/tif_lzw.c: fix 4.0.8 regression in the decoding of old-style LZW + compressed files. +
    • libtiff/tif_lzw.c: fix potential out-of-buffer read on 1-byte LZW + strips. Crashing issue only on memory mapped files, where the strip + offset is the last byte of the file, and the file size is a multiple + of one page size on the CPU architecture (typically 4096). Credit + to myself :-) +
    • libtiff/tif_dir.c: avoid potential null pointer dereference in + _TIFFVGetField() on corrupted TIFFTAG_NUMBEROFINKS tag instance. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2713 +
    • tools/tiff2pdf.c: prevent heap buffer overflow write in "Raw" + mode on PlanarConfig=Contig input images. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2715 + Reported by team OWL337 +
    • libtiff/tif_read.c: TIFFFillStrip() / TIFFFillTile(). + Complementary fix for http://bugzilla.maptools.org/show_bug.cgi?id=2708 + in the isMapped() case, so as to avoid excessive memory allocation + when we need a temporary buffer but the file is truncated. +
    • libtiff/tif_read.c: TIFFFillStrip() / TIFFFillTile(). + Complementary fix for http://bugzilla.maptools.org/show_bug.cgi?id=2708 + in the isMapped() case, so as to avoid excessive memory allocation + when we need a temporary buffer but the file is truncated. +
    • libtiff/tif_read.c: in TIFFFetchStripThing(), only grow the + arrays that hold StripOffsets/StripByteCounts, when they are smaller + than the expected number of striles, up to 1 million striles, and + error out beyond. Can be tweaked by setting the environment variable + LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT. + This partially goes against a change added on 2002-12-17 to accept + those arrays of wrong sizes, but is needed to avoid denial of services. + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2350 + Credit to OSS Fuzz +
    • libtiff/tif_read.c: in TIFFFetchStripThing(), only grow the + arrays that hold StripOffsets/StripByteCounts, when they are smaller + than the expected number of striles, up to 1 million striles, and + error out beyond. Can be tweaked by setting the environment variable + LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT. + This partially goes against a change added on 2002-12-17 to accept + those arrays of wrong sizes, but is needed to avoid denial of services. + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2350 + Credit to OSS Fuzz +
    • libtiff/tif_read.c: add protection against excessive memory + allocation attempts in TIFFReadDirEntryArray() on short files. + Effective for mmap'ed case. And non-mmap'ed case, but restricted + to 64bit builds. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2675 +
    • libtiff/tif_read.c: add protection against excessive memory + allocation attempts in TIFFReadDirEntryArray() on short files. + Effective for mmap'ed case. And non-mmap'ed case, but restricted + to 64bit builds. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2675 +
    • libtiff/tif_luv.c: LogLuvInitState(): avoid excessive memory + allocation when RowsPerStrip tag is missing. + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2683 + Credit to OSS-Fuzz +
    • libtiff/tif_getimage.c: gtTileContig() and gtTileSeparate(): + properly break from loops on error when stoponerr is set, instead + of going on iterating on row based loop. +
    • libtiff/tif_getimage.c: fix fromskew computation when to-be-skipped + pixel number is not a multiple of the horizontal subsampling, and + also in some other cases. Impact putcontig8bitYCbCr44tile, + putcontig8bitYCbCr42tile, putcontig8bitYCbCr41tile, + putcontig8bitYCbCr21tile and putcontig8bitYCbCr12tile + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2637 (discovered + by Agostino Sarubbo) + and https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2691 (credit + to OSS Fuzz) +
    • libtiff/tif_luv.c: further reduce memory requirements for temporary + buffer when RowsPerStrip >= image_length in LogLuvInitState() and + LogL16InitState(). + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2700 + Credit to OSS Fuzz +
    • libtiff/tif_dirwrite.c: replace assertion related to not finding the + SubIFD tag by runtime check (in TIFFWriteDirectorySec()) + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2727 + Reported by team OWL337 +
    • libtiff/tif_dirwrite.c: replace assertion to tag value not fitting + on uint32 when selecting the value of SubIFD tag by runtime check + (in TIFFWriteDirectoryTagSubifd()). + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2728 + Reported by team OWL337 +
    • libtiff/tif_jpeg.c: accept reading the last strip of a JPEG compressed + file if the codestream height is larger than the truncated height of the + strip. Emit a warning in this situation since this is non compliant. +
    • libtiff/tiffiop.h, tif_aux.c: redirect SeekOK() macro to a _TIFFSeekoK() + function that checks if the offset is not bigger than INT64_MAX, so as + to avoid a -1 error return code of TIFFSeekFile() to match a required + seek to UINT64_MAX/-1. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2726 + Adapted from proposal by Nicolas Ruff. +
    • libtiff/tif_dirread.c: add NULL check to avoid likely false positive + null-pointer dereference warning by CLang Static Analyzer. +
    • libtiff/libtiff.def: add TIFFReadRGBAStripExt and TIFFReadRGBATileExt + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2735 +
    • libtiff/tif_jpeg.c: add compatibility with libjpeg-turbo 1.5.2 that + honours max_memory_to_use > 0. + Cf https://github.com/libjpeg-turbo/libjpeg-turbo/issues/162 +
    • libtiff/tif_getimage.c: avoid floating point division by zero in + initCIELabConversion() + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3733 + Credit to OSS Fuzz +
    + +


    + + + +CHANGES IN THE TOOLS: + +
      + +
    • tools/tiff2pdf.c: prevent heap buffer overflow write in "Raw" + mode on PlanarConfig=Contig input images. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2715 + Reported by team OWL337 +
    • tools/tiffset.c: fix setting a single value for the ExtraSamples tag + (and other tags with variable number of values). + So 'tiffset -s ExtraSamples 1 X'. This only worked + when setting 2 or more values, but not just one. +
    • tools/fax2tiff.c (_FAX_Client_Data): Pass FAX_Client_Data as the + client data. This client data is not used at all at the moment, + but it makes the most sense. Issue that the value of + client_data.fd was passed where a pointer is expected was reported + via email by Gerald Schade on Sun, 29 Oct 2017. +
    • tools/tiff2pdf.c (t2p_sample_realize_palette): Fix possible + arithmetic overflow in bounds checking code and eliminate + comparison between signed and unsigned type. +
    • tools/tiff2bw.c (main): Free memory allocated in the tiff2bw + program. This is in response to the report associated with + CVE-2017-16232 but does not solve the extremely high memory usage + with the associated POC file. + +
    + +


    + + + +CHANGES IN THE CONTRIB AREA: + +
      + +
    • None + +
    + +Last updated $Date: 2017-11-18 19:38:06 $. + + + diff --git a/thirdparty/tiff-4.2.0/html/v4.1.0.html b/thirdparty/tiff-4.2.0/html/v4.1.0.html new file mode 100644 index 00000000..80dac5bf --- /dev/null +++ b/thirdparty/tiff-4.2.0/html/v4.1.0.html @@ -0,0 +1,205 @@ + + + + + Changes in TIFF v4.1.0 + + + + + + + +TIFF CHANGE INFORMATION + + +
    +
    +Current Version: v4.1.0
    +Previous Version: v4.0.10
    +Master Download Site: +download.osgeo.org, directory pub/libtiff<
    +Master HTTP Site #1: +http://www.simplesystems.org/libtiff/
    +Master HTTP Site #2: +http://libtiff.maptools.org/ +
    +
    + +

    +This document describes the changes made to the software between the +previous and current versions (see above). If you don't +find something listed here, then it was not done in this timeframe, or +it was not considered important enough to be mentioned. The following +information is located here. A change summary is also provided by the +ChangeLog file included in the release package and by the Git commit +history: +

    +

    +


    + + + +MAJOR CHANGES: + +
      + +
    • Make defer strile offset/bytecount loading available at runtime + and add per-strile offset/bytecount loading capabilities. Part of + this commit makes the behaviour that was previously met when libtiff + was compiled with -DDEFER_STRILE_LOAD available for default builds + when specifying the new 'D' (Deferred) TIFFOpen() flag. In that + mode, the [Tile/Strip][ByteCounts/Offsets] arrays are only loaded + when first accessed. This can speed-up the opening of files stored + on the network when just metadata retrieval is needed. + + Another addition is the capability of loading only the values of + the offset/bytecount of the strile of interest instead of the + whole array. This is enabled with the new 'O' (Ondemand) flag of + TIFFOpen() (which implies 'D'). + + The public TIFFGetStrileOffset[WithErr]() and + TIFFGetStrileByteCount[WithErr]() functions have been added to + API. They are of particular interest when using sparse files (with + offset == bytecount == 0) and you want to detect if a strile is + present or not without decompressing the data, or updating an + existing sparse file. +
    • + +
    • The BigTIFF writer now optimizes file size by using 32-bit LONG + values (rather than 64-bit) where it is reasonable and safe to do + so. Likewise, the 16-bit SHORT type is used when possible for + StripByteCounts/TileByteCounts. +
    • + +
    + + +


    + + +CHANGES IN THE SOFTWARE CONFIGURATION: + +
      + +
    • The WIN32 build now uses tif_win32.c when building with CMake.
    • + +
    • Properly set value of HOST_FILLORDER to LSB2MSB for Windows + CMake builds. It was not being properly set!
    • + +
    + +


    + + + +CHANGES IN LIBTIFF: + +
      + +
    • + Changes in the libtiff library may be viewed on-line + at Libtiff + Library Commits. +
    • + +
    • + New function TIFFReadFromUserBuffer() which replaces the use of + TIFFReadEncodedStrip()/TIFFReadEncodedTile() when the user can + provide the buffer for the input data, for example when he wants + to avoid libtiff to read the strile offset/count values from the + [Strip|Tile][Offsets/ByteCounts] array. +
    • + +
    • + New functions TIFFDeferStrileArrayWriting() and TIFFForceStrileArrayWriting() + Those advanced writing functions must be used in a particular sequence + to make their intended effect. Their aim is to control when/where + the [Strip/Tile][Offsets/ByteCounts] arrays are written into the file. + + The purpose of this is to generate 'cloud-optimized geotiff' files where + the first KB of the file only contain the IFD entries without the potentially + large strile arrays. Those are written afterwards. +
    • + +
    + +


    + + + +CHANGES IN THE TOOLS: + + + +


    + + + +CHANGES IN THE CONTRIB AREA: + + + + + diff --git a/thirdparty/tiff-4.2.0/html/v4.2.0.html b/thirdparty/tiff-4.2.0/html/v4.2.0.html new file mode 100644 index 00000000..c81ecdd2 --- /dev/null +++ b/thirdparty/tiff-4.2.0/html/v4.2.0.html @@ -0,0 +1,205 @@ + + + + + Changes in TIFF v4.2.0 + + + + + + + +TIFF CHANGE INFORMATION + + +
    +
    +Current Version: v4.2.0
    +Previous Version: v4.1.0
    +Master Download Site: +download.osgeo.org, directory pub/libtiff<
    +Master HTTP Site #1: +http://www.simplesystems.org/libtiff/
    +Master HTTP Site #2: +http://libtiff.maptools.org/ +
    +
    + +

    +This document provides a summary of significant changes made to the +software between the previous and current versions (see +above). A fully-detailed change summary is provided by the ChangeLog file +included in the release package and by the Git commit history: +

    +

    +


    + + + +MAJOR CHANGES: + +
      + +
    • Optional support for using libdeflate is added.
    • + +
    • Many of the tools now support a memory usage limit.
    • + +
    + + +


    + + +CHANGES IN THE SOFTWARE CONFIGURATION: + +
      + +
    • The Microsoft Windows 'nmake' build is resuscitated and provides + a default HAVE_STRTOLL setting in 'nmake.opt' which is suitable for + MSVC++ 14.0 ("Visual Studio 2015") and later but may be disabled in + order to compile with earlier compiler versions.
    • + +
    • mingw-w64 cmake build fixes to not add libm
    • + +
    + +


    + + + +CHANGES IN LIBTIFF: + +
      + +
    • A great many issues discovered by fuzzers (via oss-fuzz and other reports) have been addressed.
    • + +
    • EXIF 2.32 and GPS tags and functionality have been upgraded: +
        +
      • Existing EXIF field definition of tags are upgraded to EXIF version 2.3.2
      • +
      • EXIF-GPS structure, tags and access functions are added as special CustomDirectory (like it was done for EXIF).
      • +
      • Reading error for FileSource and SceneType tags corrected.
      • +
      + +
    • Make TIFFTAG_CFAPATTERN variable count.
    • + +
    • Cmake configuration fixes for big-endian targets.
    • + +
    • Added support for optional building against libdeflate for + faster Zip/Deflate compression/decompression.

      + +

      We now have 2 kinds of builds with the Zip/Deflate codec:

      +
        +
      • zlib only
      • +
      • zlib + libdeflate
      • +
      + +

      Speed improvements in the 35%-50% range can be expected when libdeflate is used. + Compression level up to 12 is now supported (capped to 9 when zlib is used). + Still requires zlib for situations where libdeflate cannot be used (that + is for scanline access, since libdeflate has no streaming mode)

      + +

      Pseudo-tag TIFFTAG_DEFLATE_SUBCODEC=DEFLATE_SUBCODEC_ZLIB/DEFLATE_SUBCODEC_LIBDEFLATE + is added to control which subcodec (zlib or libdeflate) should be used (it defaults + of course to libdeflate, when it is available). + This is mostly aimed at being used on the writing side, to be able to reproduce + output of previous libtiff versions at a binary level, in situations where this would + be really needed. Or as a safety belt in case there would be unforeseen issues + with using libdeflate. + It can be used to know when libdeflate is available at runtime (DEFLATE_SUBCODEC_LIBDEFLATE + will be the default value in that situation).

      +

      Of course, deflate codestreams produced by libdeflate can be read by zlib, and vice-versa.

      + +
    • + +
    + +


    + + + +CHANGES IN THE TOOLS: + +
      + +
    • A great many issues discovered by fuzzers (via oss-fuzz and other reports) have been addressed.
    • + +
    • ppm2tiff: support any bps value from 1 to 16.
    • + +
    • tiff2ps, tiff2rgba: A default memory limit is now enforced (256MiB) and a '-M' option is added to allow the user to adjust the limit.
    • + +
    • tiff2pdf, tiffcp: A default memory limit is now enforced (256MiB) and a '-m' option is added to allow the user to adjust the limit.
    • + +
    • tiffcrop: A default memory limit is now enforced (256MiB) and a '-k' option is added to allow the user to adjust the limit.
    • + +
    • tiff2pdf: fix "raw" copy of Deflate streams.
    • + +
    • tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr
    • + +
    • tiffcp: disable strip chopping when trying to convert to JBIG compression
    • + +
    + +


    + + + +CHANGES IN THE CONTRIB AREA: + +
      + +
    • None
    • + +
    + + + diff --git a/thirdparty/tiff-4.2.0/lib/LibTIFF-4.2.0_2019.lib b/thirdparty/tiff-4.2.0/lib/LibTIFF-4.2.0_2019.lib new file mode 100644 index 00000000..7f8d876e --- /dev/null +++ b/thirdparty/tiff-4.2.0/lib/LibTIFF-4.2.0_2019.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b1b61a0a70ce9c483991b712161664c35d931212f6e1287c5ebffba742f950e6 +size 6655488 diff --git a/thirdparty/tiff-4.2.0/lib/LibTIFF-4.2.0_2019_64.lib b/thirdparty/tiff-4.2.0/lib/LibTIFF-4.2.0_2019_64.lib new file mode 100644 index 00000000..49077b99 --- /dev/null +++ b/thirdparty/tiff-4.2.0/lib/LibTIFF-4.2.0_2019_64.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ef1bfa5ef438763ec859c9938ded5c13fa8a6df36db932e1bd39d4853d21958 +size 6656412 diff --git a/thirdparty/tiff-4.2.0/lib/LibTIFF-4.2.0_2019_64d.lib b/thirdparty/tiff-4.2.0/lib/LibTIFF-4.2.0_2019_64d.lib new file mode 100644 index 00000000..17242384 --- /dev/null +++ b/thirdparty/tiff-4.2.0/lib/LibTIFF-4.2.0_2019_64d.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36f3ad70db4891d2ae63efe49104949094441b2ffffc7b456819267c993588cb +size 2397504 diff --git a/thirdparty/tiff-4.2.0/lib/LibTIFF-4.2.0_2019d.lib b/thirdparty/tiff-4.2.0/lib/LibTIFF-4.2.0_2019d.lib new file mode 100644 index 00000000..060db3d3 --- /dev/null +++ b/thirdparty/tiff-4.2.0/lib/LibTIFF-4.2.0_2019d.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:180d27b6295b3901031a9d92492699b292da0705361812ae3562697f7ed05b1b +size 2134918 diff --git a/thirdparty/tiff-4.0.3/libtiff-4.pc.in b/thirdparty/tiff-4.2.0/libtiff-4.pc.in similarity index 100% rename from thirdparty/tiff-4.0.3/libtiff-4.pc.in rename to thirdparty/tiff-4.2.0/libtiff-4.pc.in diff --git a/thirdparty/tiff-4.2.0/libtiff/CMakeLists.txt b/thirdparty/tiff-4.2.0/libtiff/CMakeLists.txt new file mode 100644 index 00000000..080685db --- /dev/null +++ b/thirdparty/tiff-4.2.0/libtiff/CMakeLists.txt @@ -0,0 +1,169 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +# Generate headers +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tif_config.h.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/tif_config.h + @ONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tiffconf.h.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/tiffconf.h + @ONLY) + +extra_dist( + SConstruct + tif_config.h-vms + tif_config.vc.h + tif_config.wince.h + tiffconf.vc.h + tiffconf.wince.h + libtiff.def + libtiff.map + libtiffxx.map) + +set(tiff_HEADERS + tiff.h + tiffio.h + tiffvers.h) + +set(tiff_noinst_HEADERS + t4.h + tif_dir.h + tif_predict.h + tiffiop.h + uvcode.h) + +set(nodist_tiff_HEADERS + ${CMAKE_CURRENT_BINARY_DIR}/tiffconf.h) + +set(tiff_SOURCES + tif_aux.c + tif_close.c + tif_codec.c + tif_color.c + tif_compress.c + tif_dir.c + tif_dirinfo.c + tif_dirread.c + tif_dirwrite.c + tif_dumpmode.c + tif_error.c + tif_extension.c + tif_fax3.c + tif_fax3sm.c + tif_flush.c + tif_getimage.c + tif_jbig.c + tif_jpeg.c + tif_jpeg_12.c + tif_luv.c + tif_lzma.c + tif_lzw.c + tif_next.c + tif_ojpeg.c + tif_open.c + tif_packbits.c + tif_pixarlog.c + tif_predict.c + tif_print.c + tif_read.c + tif_strip.c + tif_swab.c + tif_thunder.c + tif_tile.c + tif_version.c + tif_warning.c + tif_webp.c + tif_write.c + tif_zip.c + tif_zstd.c) + +set(tiffxx_HEADERS + tiffio.hxx) + +set(tiffxx_SOURCES + tif_stream.cxx) + +if(USE_WIN32_FILEIO) + extra_dist(tif_unix.c) + list(APPEND tiff_SOURCES tif_win32.c) +else() + extra_dist(tif_win32.c) + list(APPEND tiff_SOURCES tif_unix.c) +endif() + +add_library(tiff ${tiff_SOURCES} ${tiff_HEADERS} ${nodist_tiff_HEADERS} + ${tiff_port_SOURCES} libtiff.def) +target_include_directories(tiff + PUBLIC + $ + $ + ${TIFF_INCLUDES} +) +target_link_libraries(tiff ${TIFF_LIBRARY_DEPS}) +set_target_properties(tiff PROPERTIES SOVERSION ${SO_COMPATVERSION}) +if(NOT CYGWIN) + # This property causes shared libraries on Linux to have the full version + # encoded into their final filename. We disable this on Cygwin because + # it causes cygz-${TIFF_FULL_VERSION}.dll to be created when cygz.dll + # seems to be the default. + set_target_properties(tiff PROPERTIES VERSION ${SO_VERSION}) +endif() +if(HAVE_LD_VERSION_SCRIPT) + set_target_properties(tiff PROPERTIES LINK_FLAGS + "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtiff.map") +endif() + +install(TARGETS tiff + RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}) + +install(FILES ${tiff_HEADERS} ${nodist_tiff_HEADERS} + DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}") + +if(CXX_SUPPORT) + add_library(tiffxx ${tiffxx_SOURCES} ${tiffxx_HEADERS}) + target_link_libraries(tiffxx tiff) + set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION}) + if(NOT CYGWIN) + # This property causes shared libraries on Linux to have the full version + # encoded into their final filename. We disable this on Cygwin because + # it causes cygz-${TIFF_FULL_VERSION}.dll to be created when cygz.dll + # seems to be the default. + set_target_properties(tiffxx PROPERTIES VERSION ${SO_VERSION}) + endif() + if(HAVE_LD_VERSION_SCRIPT) + set_target_properties(tiffxx PROPERTIES LINK_FLAGS + "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtiffxx.map") + endif() + + install(TARGETS tiffxx + RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}) + + install(FILES ${tiffxx_HEADERS} + DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}") + +endif() diff --git a/thirdparty/tiff-4.0.3/libtiff/Makefile.am b/thirdparty/tiff-4.2.0/libtiff/Makefile.am similarity index 92% rename from thirdparty/tiff-4.0.3/libtiff/Makefile.am rename to thirdparty/tiff-4.2.0/libtiff/Makefile.am index 0a47dabc..0fafa411 100644 --- a/thirdparty/tiff-4.0.3/libtiff/Makefile.am +++ b/thirdparty/tiff-4.2.0/libtiff/Makefile.am @@ -27,16 +27,20 @@ LIBPORT = $(top_builddir)/port/libport.la LIBTIFF = $(top_builddir)/libtiff/libtiff.la libtiffincludedir = $(includedir) -EXTRA_DIST = Makefile.vc \ - SConstruct \ - tif_config.h-vms \ - tif_config.vc.h \ - tif_config.wince.h \ - tiffconf.vc.h \ - tiffconf.wince.h \ - libtiff.def \ - libtiff.map \ - libtiffxx.map +EXTRA_DIST = \ + CMakeLists.txt \ + Makefile.vc \ + SConstruct \ + libtiff.def \ + libtiff.map \ + libtiffxx.map \ + tif_config.h-vms \ + tif_config.h.cmake.in \ + tif_config.vc.h \ + tif_config.wince.h \ + tiffconf.h.cmake.in \ + tiffconf.vc.h \ + tiffconf.wince.h libtiffinclude_HEADERS = \ tiff.h \ @@ -95,8 +99,10 @@ libtiff_la_SOURCES = \ tif_tile.c \ tif_version.c \ tif_warning.c \ + tif_webp.c \ tif_write.c \ - tif_zip.c + tif_zip.c \ + tif_zstd.c libtiffxx_la_SOURCES = \ tif_stream.cxx diff --git a/thirdparty/tiff-4.0.3/libtiff/Makefile.in b/thirdparty/tiff-4.2.0/libtiff/Makefile.in similarity index 73% rename from thirdparty/tiff-4.0.3/libtiff/Makefile.in rename to thirdparty/tiff-4.2.0/libtiff/Makefile.in index 8f7bced2..14a101c4 100644 --- a/thirdparty/tiff-4.0.3/libtiff/Makefile.in +++ b/thirdparty/tiff-4.2.0/libtiff/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -42,23 +42,61 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -89,11 +127,6 @@ host_triplet = @host@ @HAVE_LD_VERSION_SCRIPT_TRUE@am__append_10 = -Wl,--version-script=$(srcdir)/libtiffxx.map noinst_PROGRAMS = mkg3states$(EXEEXT) subdir = libtiff -DIST_COMMON = $(am__libtiffinclude_HEADERS_DIST) $(noinst_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/tif_config.h.in $(srcdir)/tiffconf.h.in \ - $(top_srcdir)/config/depcomp \ - $(top_srcdir)/config/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -101,10 +134,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(am__libtiffinclude_HEADERS_DIST) \ + $(noinst_HEADERS) $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = tif_config.h tiffconf.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +PROGRAMS = $(noinst_PROGRAMS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -145,8 +181,8 @@ am__libtiff_la_SOURCES_DIST = tif_aux.c tif_close.c tif_codec.c \ tif_lzma.c tif_lzw.c tif_next.c tif_ojpeg.c tif_open.c \ tif_packbits.c tif_pixarlog.c tif_predict.c tif_print.c \ tif_read.c tif_strip.c tif_swab.c tif_thunder.c tif_tile.c \ - tif_version.c tif_warning.c tif_write.c tif_zip.c tif_win32.c \ - tif_unix.c + tif_version.c tif_warning.c tif_webp.c tif_write.c tif_zip.c \ + tif_zstd.c tif_win32.c tif_unix.c @WIN32_IO_TRUE@am__objects_1 = tif_win32.lo @WIN32_IO_FALSE@am__objects_2 = tif_unix.lo am_libtiff_la_OBJECTS = tif_aux.lo tif_close.lo tif_codec.lo \ @@ -158,7 +194,8 @@ am_libtiff_la_OBJECTS = tif_aux.lo tif_close.lo tif_codec.lo \ tif_open.lo tif_packbits.lo tif_pixarlog.lo tif_predict.lo \ tif_print.lo tif_read.lo tif_strip.lo tif_swab.lo \ tif_thunder.lo tif_tile.lo tif_version.lo tif_warning.lo \ - tif_write.lo tif_zip.lo $(am__objects_1) $(am__objects_2) + tif_webp.lo tif_write.lo tif_zip.lo tif_zstd.lo \ + $(am__objects_1) $(am__objects_2) libtiff_la_OBJECTS = $(am_libtiff_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -173,7 +210,6 @@ libtiffxx_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libtiffxx_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_CXX_TRUE@am_libtiffxx_la_rpath = -rpath $(libdir) -PROGRAMS = $(noinst_PROGRAMS) am_mkg3states_OBJECTS = mkg3states.$(OBJEXT) mkg3states_OBJECTS = $(am_mkg3states_OBJECTS) mkg3states_DEPENDENCIES = $(LIBPORT) @@ -191,7 +227,30 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/mkg3states.Po \ + ./$(DEPDIR)/tif_aux.Plo ./$(DEPDIR)/tif_close.Plo \ + ./$(DEPDIR)/tif_codec.Plo ./$(DEPDIR)/tif_color.Plo \ + ./$(DEPDIR)/tif_compress.Plo ./$(DEPDIR)/tif_dir.Plo \ + ./$(DEPDIR)/tif_dirinfo.Plo ./$(DEPDIR)/tif_dirread.Plo \ + ./$(DEPDIR)/tif_dirwrite.Plo ./$(DEPDIR)/tif_dumpmode.Plo \ + ./$(DEPDIR)/tif_error.Plo ./$(DEPDIR)/tif_extension.Plo \ + ./$(DEPDIR)/tif_fax3.Plo ./$(DEPDIR)/tif_fax3sm.Plo \ + ./$(DEPDIR)/tif_flush.Plo ./$(DEPDIR)/tif_getimage.Plo \ + ./$(DEPDIR)/tif_jbig.Plo ./$(DEPDIR)/tif_jpeg.Plo \ + ./$(DEPDIR)/tif_jpeg_12.Plo ./$(DEPDIR)/tif_luv.Plo \ + ./$(DEPDIR)/tif_lzma.Plo ./$(DEPDIR)/tif_lzw.Plo \ + ./$(DEPDIR)/tif_next.Plo ./$(DEPDIR)/tif_ojpeg.Plo \ + ./$(DEPDIR)/tif_open.Plo ./$(DEPDIR)/tif_packbits.Plo \ + ./$(DEPDIR)/tif_pixarlog.Plo ./$(DEPDIR)/tif_predict.Plo \ + ./$(DEPDIR)/tif_print.Plo ./$(DEPDIR)/tif_read.Plo \ + ./$(DEPDIR)/tif_stream.Plo ./$(DEPDIR)/tif_strip.Plo \ + ./$(DEPDIR)/tif_swab.Plo ./$(DEPDIR)/tif_thunder.Plo \ + ./$(DEPDIR)/tif_tile.Plo ./$(DEPDIR)/tif_unix.Plo \ + ./$(DEPDIR)/tif_version.Plo ./$(DEPDIR)/tif_warning.Plo \ + ./$(DEPDIR)/tif_webp.Plo ./$(DEPDIR)/tif_win32.Plo \ + ./$(DEPDIR)/tif_write.Plo ./$(DEPDIR)/tif_zip.Plo \ + ./$(DEPDIR)/tif_zstd.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -242,8 +301,28 @@ am__libtiffinclude_HEADERS_DIST = tiff.h tiffio.h tiffvers.h \ tiffio.hxx HEADERS = $(libtiffinclude_HEADERS) $(nodist_libtiffinclude_HEADERS) \ $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + tif_config.h.in tiffconf.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/tif_config.h.in \ + $(srcdir)/tiffconf.h.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -257,6 +336,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -304,6 +384,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -394,9 +475,11 @@ top_srcdir = @top_srcdir@ LIBPORT = $(top_builddir)/port/libport.la LIBTIFF = $(top_builddir)/libtiff/libtiff.la libtiffincludedir = $(includedir) -EXTRA_DIST = Makefile.vc SConstruct tif_config.h-vms tif_config.vc.h \ - tif_config.wince.h tiffconf.vc.h tiffconf.wince.h libtiff.def \ - libtiff.map libtiffxx.map $(am__append_2) $(am__append_4) +EXTRA_DIST = CMakeLists.txt Makefile.vc SConstruct libtiff.def \ + libtiff.map libtiffxx.map tif_config.h-vms \ + tif_config.h.cmake.in tif_config.vc.h tif_config.wince.h \ + tiffconf.h.cmake.in tiffconf.vc.h tiffconf.wince.h \ + $(am__append_2) $(am__append_4) libtiffinclude_HEADERS = tiff.h tiffio.h tiffvers.h $(am__append_1) noinst_HEADERS = \ t4.h \ @@ -416,8 +499,8 @@ libtiff_la_SOURCES = tif_aux.c tif_close.c tif_codec.c tif_color.c \ tif_next.c tif_ojpeg.c tif_open.c tif_packbits.c \ tif_pixarlog.c tif_predict.c tif_print.c tif_read.c \ tif_strip.c tif_swab.c tif_thunder.c tif_tile.c tif_version.c \ - tif_warning.c tif_write.c tif_zip.c $(am__append_3) \ - $(am__append_5) + tif_warning.c tif_webp.c tif_write.c tif_zip.c tif_zstd.c \ + $(am__append_3) $(am__append_5) libtiffxx_la_SOURCES = \ tif_stream.cxx @@ -448,14 +531,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libtiff/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign libtiff/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -468,8 +550,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): tif_config.h: stamp-h1 - @if test ! -f $@; then rm -f stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/tif_config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -480,8 +562,8 @@ $(srcdir)/tif_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) touch $@ tiffconf.h: stamp-h2 - @if test ! -f $@; then rm -f stamp-h2; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h2; else :; fi + @test -f $@ || rm -f stamp-h2 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h2 stamp-h2: $(srcdir)/tiffconf.h.in $(top_builddir)/config.status @rm -f stamp-h2 @@ -489,6 +571,16 @@ stamp-h2: $(srcdir)/tiffconf.h.in $(top_builddir)/config.status distclean-hdr: -rm -f tif_config.h stamp-h1 tiffconf.h stamp-h2 + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ @@ -523,19 +615,13 @@ clean-libLTLIBRARIES: echo rm -f $${locs}; \ rm -f $${locs}; \ } + libtiff.la: $(libtiff_la_OBJECTS) $(libtiff_la_DEPENDENCIES) $(EXTRA_libtiff_la_DEPENDENCIES) $(AM_V_CCLD)$(libtiff_la_LINK) -rpath $(libdir) $(libtiff_la_OBJECTS) $(libtiff_la_LIBADD) $(LIBS) + libtiffxx.la: $(libtiffxx_la_OBJECTS) $(libtiffxx_la_DEPENDENCIES) $(EXTRA_libtiffxx_la_DEPENDENCIES) $(AM_V_CXXLD)$(libtiffxx_la_LINK) $(am_libtiffxx_la_rpath) $(libtiffxx_la_OBJECTS) $(libtiffxx_la_LIBADD) $(LIBS) -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list mkg3states$(EXEEXT): $(mkg3states_OBJECTS) $(mkg3states_DEPENDENCIES) $(EXTRA_mkg3states_DEPENDENCIES) @rm -f mkg3states$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mkg3states_OBJECTS) $(mkg3states_LDADD) $(LIBS) @@ -546,63 +632,71 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkg3states.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_aux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_close.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_codec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_color.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_compress.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dir.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dirinfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dirread.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dirwrite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dumpmode.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_error.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_extension.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_fax3.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_fax3sm.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_flush.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_getimage.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_getimage_64.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_jbig.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_jpeg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_jpeg_12.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_luv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_lzma.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_lzw.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_next.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_ojpeg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_open.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_packbits.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_pixarlog.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_predict.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_print.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_read.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_stream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_strip.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_swab.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_thunder.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_tile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_unix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_version.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_warning.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_win32.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_write.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_zip.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkg3states.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_aux.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_close.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_codec.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_color.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_compress.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dir.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dirinfo.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dirread.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dirwrite.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_dumpmode.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_error.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_extension.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_fax3.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_fax3sm.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_flush.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_getimage.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_getimage_64.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_jbig.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_jpeg.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_jpeg_12.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_luv.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_lzma.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_lzw.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_next.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_ojpeg.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_open.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_packbits.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_pixarlog.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_predict.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_print.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_read.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_stream.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_strip.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_swab.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_thunder.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_tile.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_unix.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_version.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_warning.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_webp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_win32.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_write.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_zip.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tif_zstd.Plo@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -680,26 +774,15 @@ uninstall-nodist_libtiffincludeHEADERS: files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libtiffincludedir)'; $(am__uninstall_files_from_dir) -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) tif_config.h.in tiffconf.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) tif_config.h.in tiffconf.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -711,15 +794,11 @@ TAGS: $(HEADERS) $(SOURCES) tif_config.h.in tiffconf.h.in $(TAGS_DEPENDENCIES) $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) tif_config.h.in tiffconf.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) tif_config.h.in tiffconf.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -728,9 +807,10 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am -cscopelist: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -746,7 +826,10 @@ cscopelist: $(HEADERS) $(SOURCES) $(LISP) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -778,7 +861,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) tif_config.h \ +all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(HEADERS) tif_config.h \ tiffconf.h installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libtiffincludedir)" "$(DESTDIR)$(libtiffincludedir)"; do \ @@ -820,7 +903,50 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/mkg3states.Po + -rm -f ./$(DEPDIR)/tif_aux.Plo + -rm -f ./$(DEPDIR)/tif_close.Plo + -rm -f ./$(DEPDIR)/tif_codec.Plo + -rm -f ./$(DEPDIR)/tif_color.Plo + -rm -f ./$(DEPDIR)/tif_compress.Plo + -rm -f ./$(DEPDIR)/tif_dir.Plo + -rm -f ./$(DEPDIR)/tif_dirinfo.Plo + -rm -f ./$(DEPDIR)/tif_dirread.Plo + -rm -f ./$(DEPDIR)/tif_dirwrite.Plo + -rm -f ./$(DEPDIR)/tif_dumpmode.Plo + -rm -f ./$(DEPDIR)/tif_error.Plo + -rm -f ./$(DEPDIR)/tif_extension.Plo + -rm -f ./$(DEPDIR)/tif_fax3.Plo + -rm -f ./$(DEPDIR)/tif_fax3sm.Plo + -rm -f ./$(DEPDIR)/tif_flush.Plo + -rm -f ./$(DEPDIR)/tif_getimage.Plo + -rm -f ./$(DEPDIR)/tif_jbig.Plo + -rm -f ./$(DEPDIR)/tif_jpeg.Plo + -rm -f ./$(DEPDIR)/tif_jpeg_12.Plo + -rm -f ./$(DEPDIR)/tif_luv.Plo + -rm -f ./$(DEPDIR)/tif_lzma.Plo + -rm -f ./$(DEPDIR)/tif_lzw.Plo + -rm -f ./$(DEPDIR)/tif_next.Plo + -rm -f ./$(DEPDIR)/tif_ojpeg.Plo + -rm -f ./$(DEPDIR)/tif_open.Plo + -rm -f ./$(DEPDIR)/tif_packbits.Plo + -rm -f ./$(DEPDIR)/tif_pixarlog.Plo + -rm -f ./$(DEPDIR)/tif_predict.Plo + -rm -f ./$(DEPDIR)/tif_print.Plo + -rm -f ./$(DEPDIR)/tif_read.Plo + -rm -f ./$(DEPDIR)/tif_stream.Plo + -rm -f ./$(DEPDIR)/tif_strip.Plo + -rm -f ./$(DEPDIR)/tif_swab.Plo + -rm -f ./$(DEPDIR)/tif_thunder.Plo + -rm -f ./$(DEPDIR)/tif_tile.Plo + -rm -f ./$(DEPDIR)/tif_unix.Plo + -rm -f ./$(DEPDIR)/tif_version.Plo + -rm -f ./$(DEPDIR)/tif_warning.Plo + -rm -f ./$(DEPDIR)/tif_webp.Plo + -rm -f ./$(DEPDIR)/tif_win32.Plo + -rm -f ./$(DEPDIR)/tif_write.Plo + -rm -f ./$(DEPDIR)/tif_zip.Plo + -rm -f ./$(DEPDIR)/tif_zstd.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags @@ -867,7 +993,50 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/mkg3states.Po + -rm -f ./$(DEPDIR)/tif_aux.Plo + -rm -f ./$(DEPDIR)/tif_close.Plo + -rm -f ./$(DEPDIR)/tif_codec.Plo + -rm -f ./$(DEPDIR)/tif_color.Plo + -rm -f ./$(DEPDIR)/tif_compress.Plo + -rm -f ./$(DEPDIR)/tif_dir.Plo + -rm -f ./$(DEPDIR)/tif_dirinfo.Plo + -rm -f ./$(DEPDIR)/tif_dirread.Plo + -rm -f ./$(DEPDIR)/tif_dirwrite.Plo + -rm -f ./$(DEPDIR)/tif_dumpmode.Plo + -rm -f ./$(DEPDIR)/tif_error.Plo + -rm -f ./$(DEPDIR)/tif_extension.Plo + -rm -f ./$(DEPDIR)/tif_fax3.Plo + -rm -f ./$(DEPDIR)/tif_fax3sm.Plo + -rm -f ./$(DEPDIR)/tif_flush.Plo + -rm -f ./$(DEPDIR)/tif_getimage.Plo + -rm -f ./$(DEPDIR)/tif_jbig.Plo + -rm -f ./$(DEPDIR)/tif_jpeg.Plo + -rm -f ./$(DEPDIR)/tif_jpeg_12.Plo + -rm -f ./$(DEPDIR)/tif_luv.Plo + -rm -f ./$(DEPDIR)/tif_lzma.Plo + -rm -f ./$(DEPDIR)/tif_lzw.Plo + -rm -f ./$(DEPDIR)/tif_next.Plo + -rm -f ./$(DEPDIR)/tif_ojpeg.Plo + -rm -f ./$(DEPDIR)/tif_open.Plo + -rm -f ./$(DEPDIR)/tif_packbits.Plo + -rm -f ./$(DEPDIR)/tif_pixarlog.Plo + -rm -f ./$(DEPDIR)/tif_predict.Plo + -rm -f ./$(DEPDIR)/tif_print.Plo + -rm -f ./$(DEPDIR)/tif_read.Plo + -rm -f ./$(DEPDIR)/tif_stream.Plo + -rm -f ./$(DEPDIR)/tif_strip.Plo + -rm -f ./$(DEPDIR)/tif_swab.Plo + -rm -f ./$(DEPDIR)/tif_thunder.Plo + -rm -f ./$(DEPDIR)/tif_tile.Plo + -rm -f ./$(DEPDIR)/tif_unix.Plo + -rm -f ./$(DEPDIR)/tif_version.Plo + -rm -f ./$(DEPDIR)/tif_warning.Plo + -rm -f ./$(DEPDIR)/tif_webp.Plo + -rm -f ./$(DEPDIR)/tif_win32.Plo + -rm -f ./$(DEPDIR)/tif_write.Plo + -rm -f ./$(DEPDIR)/tif_zip.Plo + -rm -f ./$(DEPDIR)/tif_zstd.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -889,24 +1058,27 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-libtiffincludeHEADERS \ .MAKE: all install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS \ - cscopelist ctags distclean distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-libLTLIBRARIES \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-libLTLIBRARIES clean-libtool \ + clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-hdr \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-libLTLIBRARIES \ install-libtiffincludeHEADERS install-man \ install-nodist_libtiffincludeHEADERS install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-libLTLIBRARIES \ + tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES \ uninstall-libtiffincludeHEADERS \ uninstall-nodist_libtiffincludeHEADERS +.PRECIOUS: Makefile + faxtable: mkg3states (rm -f tif_fax3sm.c && ./mkg3states -b -c const tif_fax3sm.c) diff --git a/thirdparty/tiff-4.0.3/libtiff/Makefile.vc b/thirdparty/tiff-4.2.0/libtiff/Makefile.vc similarity index 94% rename from thirdparty/tiff-4.0.3/libtiff/Makefile.vc rename to thirdparty/tiff-4.2.0/libtiff/Makefile.vc index 42792ba1..5aac3310 100644 --- a/thirdparty/tiff-4.0.3/libtiff/Makefile.vc +++ b/thirdparty/tiff-4.2.0/libtiff/Makefile.vc @@ -1,5 +1,3 @@ -# $Id: Makefile.vc,v 1.22 2009-06-23 18:25:43 fwarmerdam Exp $ -# # Copyright (C) 2004, Andrey Kiselev # # Permission to use, copy, modify, distribute, and sell this software and @@ -87,11 +85,11 @@ tiffconf.h: tiffconf.vc.h copy tiffconf.vc.h tiffconf.h libtiff.lib: tif_config.h tiffconf.h $(OBJ) - $(AR) /out:libtiff.lib $(OBJ) $(LIBS) + $(AR) /out:libtiff.lib ..\port\libport.lib $(OBJ) $(LIBS) $(DLLNAME): tif_config.h tiffconf.h libtiff.def $(OBJ) $(LD) /debug /dll /def:libtiff.def /out:$(DLLNAME) \ - /implib:libtiff_i.lib $(OBJ) $(LIBS) + /implib:libtiff_i.lib ..\port\libport.lib $(OBJ) $(LIBS) clean: -del tif_config.h tiffconf.h diff --git a/thirdparty/tiff-4.0.3/libtiff/SConstruct b/thirdparty/tiff-4.2.0/libtiff/SConstruct similarity index 97% rename from thirdparty/tiff-4.0.3/libtiff/SConstruct rename to thirdparty/tiff-4.2.0/libtiff/SConstruct index cb6a7cc9..af3daace 100644 --- a/thirdparty/tiff-4.0.3/libtiff/SConstruct +++ b/thirdparty/tiff-4.2.0/libtiff/SConstruct @@ -1,5 +1,3 @@ -# $Id: SConstruct,v 1.4 2007/02/24 15:03:50 dron Exp $ - # Tag Image File Format (TIFF) Software # # Copyright (C) 2005, Andrey Kiselev diff --git a/thirdparty/tiff-4.0.3/libtiff/libtiff.def b/thirdparty/tiff-4.2.0/libtiff/libtiff.def similarity index 81% rename from thirdparty/tiff-4.0.3/libtiff/libtiff.def rename to thirdparty/tiff-4.2.0/libtiff/libtiff.def index 892ad23e..b2d03fe7 100644 --- a/thirdparty/tiff-4.0.3/libtiff/libtiff.def +++ b/thirdparty/tiff-4.2.0/libtiff/libtiff.def @@ -1,158 +1,179 @@ -EXPORTS TIFFOpen - TIFFOpenW - TIFFGetVersion - TIFFCleanup - TIFFClose - TIFFFlush - TIFFFlushData - TIFFGetField - TIFFVGetField - TIFFGetFieldDefaulted - TIFFVGetFieldDefaulted - TIFFGetTagListEntry - TIFFGetTagListCount - TIFFReadDirectory - TIFFScanlineSize64 - TIFFScanlineSize - TIFFStripSize64 - TIFFStripSize - TIFFVStripSize64 - TIFFVStripSize - TIFFRawStripSize64 - TIFFRawStripSize - TIFFTileRowSize64 - TIFFTileRowSize - TIFFTileSize64 - TIFFTileSize - TIFFVTileSize64 - TIFFVTileSize - TIFFFileno - TIFFSetFileno - TIFFGetMode - TIFFIsTiled - TIFFIsByteSwapped - TIFFIsBigEndian - TIFFIsMSB2LSB - TIFFIsUpSampled +EXPORTS TIFFAccessTagMethods TIFFCIELabToRGBInit TIFFCIELabToXYZ - TIFFXYZToRGB - TIFFYCbCrToRGBInit - TIFFYCbCrtoRGB - TIFFCurrentRow + TIFFCheckTile + TIFFCheckpointDirectory + TIFFCleanup + TIFFClientOpen + TIFFClientdata + TIFFClose + TIFFComputeStrip + TIFFComputeTile + TIFFCreateCustomDirectory + TIFFCreateDirectory + TIFFCreateEXIFDirectory + TIFFCreateGPSDirectory + TIFFCurrentDirOffset TIFFCurrentDirectory + TIFFCurrentRow TIFFCurrentStrip TIFFCurrentTile TIFFDataWidth - TIFFReadBufferSetup - TIFFWriteBufferSetup - TIFFSetupStrips - TIFFLastDirectory - TIFFSetDirectory - TIFFSetSubDirectory - TIFFUnlinkDirectory - TIFFSetField - TIFFVSetField - TIFFCheckpointDirectory - TIFFWriteDirectory - TIFFRewriteDirectory - TIFFPrintDirectory - TIFFReadScanline - TIFFWriteScanline - TIFFReadRGBAImage - TIFFReadRGBAImageOriented - TIFFFdOpen - TIFFClientOpen - TIFFFileName - TIFFError - TIFFErrorExt - TIFFWarning - TIFFWarningExt - TIFFSetErrorHandler - TIFFSetErrorHandlerExt - TIFFSetWarningHandler - TIFFSetWarningHandlerExt - TIFFComputeTile - TIFFCheckTile - TIFFNumberOfTiles - TIFFReadTile - TIFFWriteTile - TIFFComputeStrip - TIFFNumberOfStrips - TIFFRGBAImageBegin - TIFFRGBAImageGet - TIFFRGBAImageEnd - TIFFReadEncodedStrip - TIFFReadRawStrip - TIFFReadEncodedTile - TIFFReadRawTile - TIFFReadRGBATile - TIFFReadRGBAStrip - TIFFWriteEncodedStrip - TIFFWriteRawStrip - TIFFWriteEncodedTile - TIFFWriteRawTile - TIFFSetWriteOffset - TIFFSwabFloat - TIFFSwabDouble - TIFFSwabShort - TIFFSwabLong - TIFFSwabArrayOfShort - TIFFSwabArrayOfLong - TIFFSwabArrayOfFloat - TIFFSwabArrayOfDouble - TIFFSwabArrayOfTriples - TIFFReverseBits - TIFFGetBitRevTable TIFFDefaultStripSize TIFFDefaultTileSize - TIFFRasterScanlineSize64 - TIFFRasterScanlineSize - _TIFFmalloc - _TIFFrealloc - _TIFFfree - _TIFFmemset - _TIFFmemcpy - _TIFFmemcmp - _TIFFCheckMalloc - TIFFCreateDirectory - TIFFSetTagExtender - TIFFFieldWithName - TIFFFieldWithTag - TIFFFieldTag - TIFFFieldName + TIFFDeferStrileArrayWriting + TIFFError + TIFFErrorExt + TIFFFdOpen TIFFFieldDataType + TIFFFieldName TIFFFieldPassCount TIFFFieldReadCount + TIFFFieldTag + TIFFFieldWithName + TIFFFieldWithTag TIFFFieldWriteCount - TIFFCurrentDirOffset - TIFFWriteCheck - TIFFRGBAImageOK - TIFFNumberOfDirectories - TIFFSetFileName - TIFFSetClientdata - TIFFSetMode - TIFFClientdata - TIFFGetReadProc - TIFFGetWriteProc - TIFFGetSeekProc - TIFFGetCloseProc - TIFFGetSizeProc - TIFFGetMapFileProc - TIFFGetUnmapFileProc - TIFFIsCODECConfigured - TIFFGetConfiguredCODECs - TIFFFindCODEC - TIFFRegisterCODEC - TIFFUnRegisterCODEC - TIFFFreeDirectory - TIFFReadCustomDirectory - TIFFReadEXIFDirectory - TIFFAccessTagMethods - TIFFGetClientInfo - TIFFSetClientInfo - TIFFSwabLong8 - TIFFSwabArrayOfLong8 + TIFFFileName + TIFFFileno + TIFFFindCODEC TIFFFindField - TIFFUnsetField + TIFFFlush + TIFFFlushData + TIFFForceStrileArrayWriting + TIFFFreeDirectory + TIFFGetBitRevTable + TIFFGetClientInfo + TIFFGetCloseProc + TIFFGetConfiguredCODECs + TIFFGetField + TIFFGetFieldDefaulted + TIFFGetMapFileProc + TIFFGetMode + TIFFGetReadProc + TIFFGetSeekProc + TIFFGetSizeProc + TIFFGetStrileByteCount + TIFFGetStrileByteCountWithErr + TIFFGetStrileOffset + TIFFGetStrileOffsetWithErr + TIFFGetTagListCount + TIFFGetTagListEntry + TIFFGetUnmapFileProc + TIFFGetVersion + TIFFGetWriteProc + TIFFIsBigEndian + TIFFIsByteSwapped + TIFFIsCODECConfigured + TIFFIsMSB2LSB + TIFFIsTiled + TIFFIsUpSampled + TIFFLastDirectory TIFFMergeFieldInfo + TIFFNumberOfDirectories + TIFFNumberOfStrips + TIFFNumberOfTiles + TIFFOpen + TIFFOpenW + TIFFPrintDirectory + TIFFRGBAImageBegin + TIFFRGBAImageEnd + TIFFRGBAImageGet + TIFFRGBAImageOK + TIFFRasterScanlineSize + TIFFRasterScanlineSize64 + TIFFRawStripSize + TIFFRawStripSize64 + TIFFReadBufferSetup + TIFFReadCustomDirectory + TIFFReadDirectory + TIFFReadEXIFDirectory + TIFFReadGPSDirectory + TIFFReadEncodedStrip + TIFFReadEncodedTile + TIFFReadFromUserBuffer + TIFFReadRGBAImage + TIFFReadRGBAImageOriented + TIFFReadRGBAStrip + TIFFReadRGBAStripExt + TIFFReadRGBATile + TIFFReadRGBATileExt + TIFFReadRawStrip + TIFFReadRawTile + TIFFReadScanline + TIFFReadTile + TIFFRegisterCODEC + TIFFReverseBits + TIFFRewriteDirectory + TIFFScanlineSize + TIFFScanlineSize64 + TIFFSetClientInfo + TIFFSetClientdata + TIFFSetCompressionScheme + TIFFSetDirectory + TIFFSetErrorHandler + TIFFSetErrorHandlerExt + TIFFSetField + TIFFSetFileName + TIFFSetFileno + TIFFSetMode + TIFFSetSubDirectory + TIFFSetTagExtender + TIFFSetWarningHandler + TIFFSetWarningHandlerExt + TIFFSetWriteOffset + TIFFSetupStrips + TIFFStripSize + TIFFStripSize64 + TIFFSwabArrayOfDouble + TIFFSwabArrayOfFloat + TIFFSwabArrayOfLong + TIFFSwabArrayOfLong8 + TIFFSwabArrayOfShort + TIFFSwabArrayOfTriples + TIFFSwabDouble + TIFFSwabFloat + TIFFSwabLong + TIFFSwabLong8 + TIFFSwabShort + TIFFTileRowSize + TIFFTileRowSize64 + TIFFTileSize + TIFFTileSize64 + TIFFUnRegisterCODEC + TIFFUnlinkDirectory + TIFFUnsetField + TIFFVGetField + TIFFVGetFieldDefaulted + TIFFVSetField + TIFFVStripSize + TIFFVStripSize64 + TIFFVTileSize + TIFFVTileSize64 + TIFFWarning + TIFFWarningExt + TIFFWriteBufferSetup + TIFFWriteCheck + TIFFWriteCustomDirectory + TIFFWriteDirectory + TIFFWriteEncodedStrip + TIFFWriteEncodedTile + TIFFWriteRawStrip + TIFFWriteRawTile + TIFFWriteScanline + TIFFWriteTile + TIFFXYZToRGB + TIFFYCbCrToRGBInit + TIFFYCbCrtoRGB + _TIFFCheckMalloc + _TIFFCheckRealloc + _TIFFRewriteField + _TIFFfree + _TIFFmalloc + _TIFFmemcmp + _TIFFmemcpy + _TIFFmemset + _TIFFrealloc + _TIFFMultiply32 + _TIFFMultiply64 + _TIFFGetExifFields + _TIFFGetGpsFields diff --git a/thirdparty/tiff-4.0.3/libtiff/libtiff.map b/thirdparty/tiff-4.2.0/libtiff/libtiff.map similarity index 100% rename from thirdparty/tiff-4.0.3/libtiff/libtiff.map rename to thirdparty/tiff-4.2.0/libtiff/libtiff.map diff --git a/thirdparty/tiff-4.0.3/libtiff/libtiffxx.map b/thirdparty/tiff-4.2.0/libtiff/libtiffxx.map similarity index 100% rename from thirdparty/tiff-4.0.3/libtiff/libtiffxx.map rename to thirdparty/tiff-4.2.0/libtiff/libtiffxx.map diff --git a/thirdparty/tiff-4.0.3/libtiff/mkg3states.c b/thirdparty/tiff-4.2.0/libtiff/mkg3states.c similarity index 98% rename from thirdparty/tiff-4.0.3/libtiff/mkg3states.c rename to thirdparty/tiff-4.2.0/libtiff/mkg3states.c index 1df9ccc5..2cb9174c 100644 --- a/thirdparty/tiff-4.0.3/libtiff/mkg3states.c +++ b/thirdparty/tiff-4.2.0/libtiff/mkg3states.c @@ -1,5 +1,3 @@ -/* "$Id: mkg3states.c,v 1.11 2010-03-10 18:56:48 bfriesen Exp $ */ - /* * Copyright (c) 1991-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -42,7 +40,7 @@ #include "tif_fax3.h" #ifndef HAVE_GETOPT -extern int getopt(int, char**, char*); +extern int getopt(int argc, char * const argv[], const char *optstring); #endif #define streq(a,b) (strcmp(a,b) == 0) @@ -383,8 +381,11 @@ main(int argc, char* argv[]) FILE* fd; char* outputfile; int c; + +#if !HAVE_DECL_OPTARG extern int optind; extern char* optarg; +#endif while ((c = getopt(argc, argv, "c:s:bp")) != -1) switch (c) { diff --git a/thirdparty/tiff-4.0.3/libtiff/t4.h b/thirdparty/tiff-4.2.0/libtiff/t4.h similarity index 99% rename from thirdparty/tiff-4.0.3/libtiff/t4.h rename to thirdparty/tiff-4.2.0/libtiff/t4.h index b908f54f..fb0951a1 100644 --- a/thirdparty/tiff-4.0.3/libtiff/t4.h +++ b/thirdparty/tiff-4.2.0/libtiff/t4.h @@ -1,5 +1,3 @@ -/* $Id: t4.h,v 1.3 2010-03-10 18:56:48 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_aux.c b/thirdparty/tiff-4.2.0/libtiff/tif_aux.c similarity index 71% rename from thirdparty/tiff-4.0.3/libtiff/tif_aux.c rename to thirdparty/tiff-4.2.0/libtiff/tif_aux.c index 927150a4..c9f19054 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_aux.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_aux.c @@ -1,5 +1,3 @@ -/* $Id: tif_aux.c,v 1.26 2010-07-01 15:33:28 dron Exp $ */ - /* * Copyright (c) 1991-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -32,31 +30,66 @@ #include "tiffiop.h" #include "tif_predict.h" #include +#include uint32 _TIFFMultiply32(TIFF* tif, uint32 first, uint32 second, const char* where) { - uint32 bytes = first * second; - - if (second && bytes / second != first) { + if (second && first > TIFF_UINT32_MAX / second) { TIFFErrorExt(tif->tif_clientdata, where, "Integer overflow in %s", where); - bytes = 0; + return 0; } - return bytes; + return first * second; } uint64 _TIFFMultiply64(TIFF* tif, uint64 first, uint64 second, const char* where) { - uint64 bytes = first * second; - - if (second && bytes / second != first) { + if (second && first > TIFF_UINT64_MAX / second) { TIFFErrorExt(tif->tif_clientdata, where, "Integer overflow in %s", where); - bytes = 0; + return 0; } - return bytes; + return first * second; +} + +tmsize_t +_TIFFMultiplySSize(TIFF* tif, tmsize_t first, tmsize_t second, const char* where) +{ + if( first <= 0 || second <= 0 ) + { + if( tif != NULL && where != NULL ) + { + TIFFErrorExt(tif->tif_clientdata, where, + "Invalid argument to _TIFFMultiplySSize() in %s", where); + } + return 0; + } + + if( first > TIFF_TMSIZE_T_MAX / second ) + { + if( tif != NULL && where != NULL ) + { + TIFFErrorExt(tif->tif_clientdata, where, + "Integer overflow in %s", where); + } + return 0; + } + return first * second; +} + +tmsize_t _TIFFCastUInt64ToSSize(TIFF* tif, uint64 val, const char* module) +{ + if( val > (uint64)TIFF_TMSIZE_T_MAX ) + { + if( tif != NULL && module != NULL ) + { + TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); + } + return 0; + } + return (tmsize_t)val; } void* @@ -64,13 +97,14 @@ _TIFFCheckRealloc(TIFF* tif, void* buffer, tmsize_t nmemb, tmsize_t elem_size, const char* what) { void* cp = NULL; - tmsize_t bytes = nmemb * elem_size; - + tmsize_t count = _TIFFMultiplySSize(tif, nmemb, elem_size, NULL); /* - * XXX: Check for integer overflow. + * Check for integer overflow. */ - if (nmemb && elem_size && bytes / elem_size == nmemb) - cp = _TIFFrealloc(buffer, bytes); + if (count != 0) + { + cp = _TIFFrealloc(buffer, count); + } if (cp == NULL) { TIFFErrorExt(tif->tif_clientdata, tif->tif_name, @@ -100,7 +134,8 @@ TIFFDefaultTransferFunction(TIFFDirectory* td) n = ((tmsize_t)1)<td_bitspersample; nbytes = n * sizeof (uint16); - if (!(tf[0] = (uint16 *)_TIFFmalloc(nbytes))) + tf[0] = (uint16 *)_TIFFmalloc(nbytes); + if (tf[0] == NULL) return 0; tf[0][0] = 0; for (i = 1; i < n; i++) { @@ -109,10 +144,12 @@ TIFFDefaultTransferFunction(TIFFDirectory* td) } if (td->td_samplesperpixel - td->td_extrasamples > 1) { - if (!(tf[1] = (uint16 *)_TIFFmalloc(nbytes))) + tf[1] = (uint16 *)_TIFFmalloc(nbytes); + if(tf[1] == NULL) goto bad; _TIFFmemcpy(tf[1], tf[0], nbytes); - if (!(tf[2] = (uint16 *)_TIFFmalloc(nbytes))) + tf[2] = (uint16 *)_TIFFmalloc(nbytes); + if (tf[2] == NULL) goto bad; _TIFFmemcpy(tf[2], tf[0], nbytes); } @@ -134,7 +171,8 @@ TIFFDefaultRefBlackWhite(TIFFDirectory* td) { int i; - if (!(td->td_refblackwhite = (float *)_TIFFmalloc(6*sizeof (float)))) + td->td_refblackwhite = (float *)_TIFFmalloc(6*sizeof (float)); + if (td->td_refblackwhite == NULL) return 0; if (td->td_photometric == PHOTOMETRIC_YCBCR) { /* @@ -163,7 +201,7 @@ TIFFDefaultRefBlackWhite(TIFFDirectory* td) * value if the tag is not present in the directory. * * NB: We use the value in the directory, rather than - * explcit values so that defaults exist only one + * explicit values so that defaults exist only one * place in the library -- in TIFFDefaultDirectory. */ int @@ -208,11 +246,18 @@ TIFFVGetFieldDefaulted(TIFF* tif, uint32 tag, va_list ap) *va_arg(ap, uint16 *) = td->td_resolutionunit; return (1); case TIFFTAG_PREDICTOR: - { - TIFFPredictorState* sp = (TIFFPredictorState*) tif->tif_data; - *va_arg(ap, uint16*) = (uint16) sp->predictor; - return 1; - } + { + TIFFPredictorState* sp = (TIFFPredictorState*) tif->tif_data; + if( sp == NULL ) + { + TIFFErrorExt(tif->tif_clientdata, tif->tif_name, + "Cannot get \"Predictor\" tag as plugin is not configured"); + *va_arg(ap, uint16*) = 0; + return 0; + } + *va_arg(ap, uint16*) = (uint16) sp->predictor; + return 1; + } case TIFFTAG_DOTRANGE: *va_arg(ap, uint16 *) = 0; *va_arg(ap, uint16 *) = (1<td_bitspersample)-1; @@ -225,7 +270,7 @@ TIFFVGetFieldDefaulted(TIFF* tif, uint32 tag, va_list ap) return (1); case TIFFTAG_EXTRASAMPLES: *va_arg(ap, uint16 *) = td->td_extrasamples; - *va_arg(ap, uint16 **) = td->td_sampleinfo; + *va_arg(ap, const uint16 **) = td->td_sampleinfo; return (1); case TIFFTAG_MATTEING: *va_arg(ap, uint16 *) = @@ -247,8 +292,8 @@ TIFFVGetFieldDefaulted(TIFF* tif, uint32 tag, va_list ap) case TIFFTAG_YCBCRCOEFFICIENTS: { /* defaults are from CCIR Recommendation 601-1 */ - static float ycbcrcoeffs[] = { 0.299f, 0.587f, 0.114f }; - *va_arg(ap, float **) = ycbcrcoeffs; + static const float ycbcrcoeffs[] = { 0.299f, 0.587f, 0.114f }; + *va_arg(ap, const float **) = ycbcrcoeffs; return 1; } case TIFFTAG_YCBCRSUBSAMPLING: @@ -260,14 +305,14 @@ TIFFVGetFieldDefaulted(TIFF* tif, uint32 tag, va_list ap) return (1); case TIFFTAG_WHITEPOINT: { - static float whitepoint[2]; - /* TIFF 6.0 specification tells that it is no default value for the WhitePoint, but AdobePhotoshop TIFF Technical Note tells that it should be CIE D50. */ - whitepoint[0] = D50_X0 / (D50_X0 + D50_Y0 + D50_Z0); - whitepoint[1] = D50_Y0 / (D50_X0 + D50_Y0 + D50_Z0); - *va_arg(ap, float **) = whitepoint; + static const float whitepoint[] = { + D50_X0 / (D50_X0 + D50_Y0 + D50_Z0), + D50_Y0 / (D50_X0 + D50_Y0 + D50_Z0) + }; + *va_arg(ap, const float **) = whitepoint; return 1; } case TIFFTAG_TRANSFERFUNCTION: @@ -276,16 +321,16 @@ TIFFVGetFieldDefaulted(TIFF* tif, uint32 tag, va_list ap) TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "No space for \"TransferFunction\" tag"); return (0); } - *va_arg(ap, uint16 **) = td->td_transferfunction[0]; + *va_arg(ap, const uint16 **) = td->td_transferfunction[0]; if (td->td_samplesperpixel - td->td_extrasamples > 1) { - *va_arg(ap, uint16 **) = td->td_transferfunction[1]; - *va_arg(ap, uint16 **) = td->td_transferfunction[2]; + *va_arg(ap, const uint16 **) = td->td_transferfunction[1]; + *va_arg(ap, const uint16 **) = td->td_transferfunction[2]; } return (1); case TIFFTAG_REFERENCEBLACKWHITE: if (!td->td_refblackwhite && !TIFFDefaultRefBlackWhite(td)) return (0); - *va_arg(ap, float **) = td->td_refblackwhite; + *va_arg(ap, const float **) = td->td_refblackwhite; return (1); } return 0; @@ -348,6 +393,22 @@ _TIFFUInt64ToDouble(uint64 ui64) } } +float _TIFFClampDoubleToFloat( double val ) +{ + if( val > FLT_MAX ) + return FLT_MAX; + if( val < -FLT_MAX ) + return -FLT_MAX; + return (float)val; +} + +int _TIFFSeekOK(TIFF* tif, toff_t off) +{ + /* Huge offsets, especially -1 / UINT64_MAX, can cause issues */ + /* See http://bugzilla.maptools.org/show_bug.cgi?id=2726 */ + return off <= (~(uint64)0)/2 && TIFFSeekFile(tif,off,SEEK_SET)==off; +} + /* vim: set ts=8 sts=8 sw=8 noet: */ /* * Local Variables: diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_close.c b/thirdparty/tiff-4.2.0/libtiff/tif_close.c similarity index 93% rename from thirdparty/tiff-4.0.3/libtiff/tif_close.c rename to thirdparty/tiff-4.2.0/libtiff/tif_close.c index 13d2bab5..e4228df9 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_close.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_close.c @@ -1,5 +1,3 @@ -/* $Id: tif_close.c,v 1.19 2010-03-10 18:56:48 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -36,7 +34,7 @@ /** * Auxiliary function to free the TIFF structure. Given structure will be - * completetly freed, so you should save opened file handle and pointer + * completely freed, so you should save opened file handle and pointer * to the close procedure in external variables before calling * _TIFFCleanup(), if you will need these ones to close the file. * @@ -62,11 +60,11 @@ TIFFCleanup(TIFF* tif) */ while( tif->tif_clientinfo ) { - TIFFClientInfoLink *link = tif->tif_clientinfo; + TIFFClientInfoLink *psLink = tif->tif_clientinfo; - tif->tif_clientinfo = link->next; - _TIFFfree( link->name ); - _TIFFfree( link ); + tif->tif_clientinfo = psLink->next; + _TIFFfree( psLink->name ); + _TIFFfree( psLink ); } if (tif->tif_rawdata && (tif->tif_flags&TIFF_MYBUFFER)) diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_codec.c b/thirdparty/tiff-4.2.0/libtiff/tif_codec.c similarity index 94% rename from thirdparty/tiff-4.0.3/libtiff/tif_codec.c rename to thirdparty/tiff-4.2.0/libtiff/tif_codec.c index e2016673..b6c04f01 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_codec.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_codec.c @@ -1,5 +1,3 @@ -/* $Id: tif_codec.c,v 1.15 2010-12-14 12:53:00 dron Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -72,6 +70,12 @@ static int NotConfigured(TIFF*, int); #ifndef LZMA_SUPPORT #define TIFFInitLZMA NotConfigured #endif +#ifndef ZSTD_SUPPORT +#define TIFFInitZSTD NotConfigured +#endif +#ifndef WEBP_SUPPORT +#define TIFFInitWebP NotConfigured +#endif /* * Compression schemes statically built into the library. @@ -99,6 +103,8 @@ TIFFCodec _TIFFBuiltinCODECS[] = { { "SGILog", COMPRESSION_SGILOG, TIFFInitSGILog }, { "SGILog24", COMPRESSION_SGILOG24, TIFFInitSGILog }, { "LZMA", COMPRESSION_LZMA, TIFFInitLZMA }, + { "ZSTD", COMPRESSION_ZSTD, TIFFInitZSTD }, + { "WEBP", COMPRESSION_WEBP, TIFFInitWebP }, { NULL, 0, NULL } }; @@ -108,7 +114,7 @@ _notConfigured(TIFF* tif) const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression); char compression_code[20]; - sprintf( compression_code, "%d", tif->tif_dir.td_compression ); + sprintf(compression_code, "%d",tif->tif_dir.td_compression ); TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "%s compression support is not configured", c ? c->name : compression_code ); diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_color.c b/thirdparty/tiff-4.2.0/libtiff/tif_color.c similarity index 82% rename from thirdparty/tiff-4.0.3/libtiff/tif_color.c rename to thirdparty/tiff-4.2.0/libtiff/tif_color.c index be4850ce..8fae40ea 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_color.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_color.c @@ -1,5 +1,3 @@ -/* $Id: tif_color.c,v 1.19 2010-12-14 02:22:42 faxguy Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -126,37 +124,37 @@ TIFFCIELabToRGBInit(TIFFCIELabToRGB* cielab, const TIFFDisplay *display, float *refWhite) { int i; - double gamma; + double dfGamma; cielab->range = CIELABTORGB_TABLE_RANGE; _TIFFmemcpy(&cielab->display, display, sizeof(TIFFDisplay)); /* Red */ - gamma = 1.0 / cielab->display.d_gammaR ; + dfGamma = 1.0 / cielab->display.d_gammaR ; cielab->rstep = (cielab->display.d_YCR - cielab->display.d_Y0R) / cielab->range; for(i = 0; i <= cielab->range; i++) { cielab->Yr2r[i] = cielab->display.d_Vrwr - * ((float)pow((double)i / cielab->range, gamma)); + * ((float)pow((double)i / cielab->range, dfGamma)); } /* Green */ - gamma = 1.0 / cielab->display.d_gammaG ; + dfGamma = 1.0 / cielab->display.d_gammaG ; cielab->gstep = (cielab->display.d_YCR - cielab->display.d_Y0R) / cielab->range; for(i = 0; i <= cielab->range; i++) { cielab->Yg2g[i] = cielab->display.d_Vrwg - * ((float)pow((double)i / cielab->range, gamma)); + * ((float)pow((double)i / cielab->range, dfGamma)); } /* Blue */ - gamma = 1.0 / cielab->display.d_gammaB ; + dfGamma = 1.0 / cielab->display.d_gammaB ; cielab->bstep = (cielab->display.d_YCR - cielab->display.d_Y0R) / cielab->range; for(i = 0; i <= cielab->range; i++) { cielab->Yb2b[i] = cielab->display.d_Vrwb - * ((float)pow((double)i / cielab->range, gamma)); + * ((float)pow((double)i / cielab->range, dfGamma)); } /* Init reference white point */ @@ -168,14 +166,14 @@ TIFFCIELabToRGBInit(TIFFCIELabToRGB* cielab, } /* - * Convert color value from the YCbCr space to CIE XYZ. + * Convert color value from the YCbCr space to RGB. * The colorspace conversion algorithm comes from the IJG v5a code; * see below for more information on how it works. */ #define SHIFT 16 #define FIX(x) ((int32)((x) * (1L<(max)?(max):(f)) #define HICLAMP(f,max) ((f)>(max)?(max):(f)) @@ -186,7 +184,9 @@ TIFFYCbCrtoRGB(TIFFYCbCrToRGB *ycbcr, uint32 Y, int32 Cb, int32 Cr, int32 i; /* XXX: Only 8-bit YCbCr input supported for now */ - Y = HICLAMP(Y, 255), Cb = CLAMP(Cb, 0, 255), Cr = CLAMP(Cr, 0, 255); + Y = HICLAMP(Y, 255); + Cb = CLAMP(Cb, 0, 255); + Cr = CLAMP(Cr, 0, 255); i = ycbcr->Y_tab[Y] + ycbcr->Cr_r_tab[Cr]; *r = CLAMP(i, 0, 255); @@ -197,6 +197,23 @@ TIFFYCbCrtoRGB(TIFFYCbCrToRGB *ycbcr, uint32 Y, int32 Cb, int32 Cr, *b = CLAMP(i, 0, 255); } +/* Clamp function for sanitization purposes. Normally clamping should not */ +/* occur for well behaved chroma and refBlackWhite coefficients */ +static float CLAMPw(float v, float vmin, float vmax) +{ + if( v < vmin ) + { + /* printf("%f clamped to %f\n", v, vmin); */ + return vmin; + } + if( v > vmax ) + { + /* printf("%f clamped to %f\n", v, vmax); */ + return vmax; + } + return v; +} + /* * Initialize the YCbCr->RGB conversion tables. The conversion * is done according to the 6.0 spec: @@ -236,10 +253,10 @@ TIFFYCbCrToRGBInit(TIFFYCbCrToRGB* ycbcr, float *luma, float *refBlackWhite) ycbcr->Cb_g_tab = ycbcr->Cr_g_tab + 256; ycbcr->Y_tab = ycbcr->Cb_g_tab + 256; - { float f1 = 2-2*LumaRed; int32 D1 = FIX(f1); - float f2 = LumaRed*f1/LumaGreen; int32 D2 = -FIX(f2); - float f3 = 2-2*LumaBlue; int32 D3 = FIX(f3); - float f4 = LumaBlue*f3/LumaGreen; int32 D4 = -FIX(f4); + { float f1 = 2-2*LumaRed; int32 D1 = FIX(CLAMP(f1,0.0F,2.0F)); + float f2 = LumaRed*f1/LumaGreen; int32 D2 = -FIX(CLAMP(f2,0.0F,2.0F)); + float f3 = 2-2*LumaBlue; int32 D3 = FIX(CLAMP(f3,0.0F,2.0F)); + float f4 = LumaBlue*f3/LumaGreen; int32 D4 = -FIX(CLAMP(f4,0.0F,2.0F)); int x; #undef LumaBlue @@ -254,17 +271,20 @@ TIFFYCbCrToRGBInit(TIFFYCbCrToRGB* ycbcr, float *luma, float *refBlackWhite) * constructing tables indexed by the raw pixel data. */ for (i = 0, x = -128; i < 256; i++, x++) { - int32 Cr = (int32)Code2V(x, refBlackWhite[4] - 128.0F, - refBlackWhite[5] - 128.0F, 127); - int32 Cb = (int32)Code2V(x, refBlackWhite[2] - 128.0F, - refBlackWhite[3] - 128.0F, 127); + int32 Cr = (int32)CLAMPw(Code2V(x, refBlackWhite[4] - 128.0F, + refBlackWhite[5] - 128.0F, 127), + -128.0F * 32, 128.0F * 32); + int32 Cb = (int32)CLAMPw(Code2V(x, refBlackWhite[2] - 128.0F, + refBlackWhite[3] - 128.0F, 127), + -128.0F * 32, 128.0F * 32); ycbcr->Cr_r_tab[i] = (int32)((D1*Cr + ONE_HALF)>>SHIFT); ycbcr->Cb_b_tab[i] = (int32)((D3*Cb + ONE_HALF)>>SHIFT); ycbcr->Cr_g_tab[i] = D2*Cr; ycbcr->Cb_g_tab[i] = D4*Cb + ONE_HALF; ycbcr->Y_tab[i] = - (int32)Code2V(x + 128, refBlackWhite[0], refBlackWhite[1], 255); + (int32)CLAMPw(Code2V(x + 128, refBlackWhite[0], refBlackWhite[1], 255), + -128.0F * 32, 128.0F * 32); } } diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_compress.c b/thirdparty/tiff-4.2.0/libtiff/tif_compress.c similarity index 97% rename from thirdparty/tiff-4.0.3/libtiff/tif_compress.c rename to thirdparty/tiff-4.2.0/libtiff/tif_compress.c index 20e72fd0..915478f5 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_compress.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_compress.c @@ -1,5 +1,3 @@ -/* $Id: tif_compress.c,v 1.22 2010-03-10 18:56:48 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -82,10 +80,10 @@ TIFFNoDecode(TIFF* tif, const char* method) TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Compression scheme %u %s decoding is not implemented", tif->tif_dir.td_compression, method); - return (-1); + return (0); } -int +static int _TIFFNoFixupTags(TIFF* tif) { (void) tif; @@ -227,7 +225,7 @@ TIFFUnRegisterCODEC(TIFFCodec* c) codec_t* cd; codec_t** pcd; - for (pcd = ®isteredCODECS; (cd = *pcd); pcd = &cd->next) + for (pcd = ®isteredCODECS; (cd = *pcd) != NULL; pcd = &cd->next) if (cd->info == c) { *pcd = cd->next; _TIFFfree(cd); @@ -266,7 +264,7 @@ TIFFGetConfiguredCODECs() return NULL; } codecs = new_codecs; - _TIFFmemcpy(codecs + i - 1, cd, sizeof(TIFFCodec)); + _TIFFmemcpy(codecs + i - 1, cd->info, sizeof(TIFFCodec)); i++; } for (c = _TIFFBuiltinCODECS; c->name; c++) { diff --git a/thirdparty/tiff-4.2.0/libtiff/tif_config.h b/thirdparty/tiff-4.2.0/libtiff/tif_config.h new file mode 100644 index 00000000..939594f8 --- /dev/null +++ b/thirdparty/tiff-4.2.0/libtiff/tif_config.h @@ -0,0 +1,150 @@ +#ifndef _TIF_CONFIG_H_ +#define _TIF_CONFIG_H_ + +/* Define to 1 if you have the header file. */ +#define HAVE_ASSERT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define as 0 or 1 according to the floating point format suported by the + machine */ +#define HAVE_IEEEFP 1 + +/* Define to 1 if you have the `jbg_newlen' function. */ +#define HAVE_JBG_NEWLEN 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SEARCH_H 1 + +/* Define to 1 if you have the `setmode' function. */ +#define HAVE_SETMODE 1 + +/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. */ +#define HAVE_DECL_OPTARG 0 + +/* The size of a `int', as computed by sizeof. */ +#define SIZEOF_INT 4 + +/* The size of a `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* Signed 64-bit type formatter */ +#define TIFF_INT64_FORMAT "%I64d" + +/* Signed 64-bit type */ +#define TIFF_INT64_T signed __int64 + +/* Unsigned 64-bit type formatter */ +#define TIFF_UINT64_FORMAT "%I64u" + +/* Unsigned 64-bit type */ +#define TIFF_UINT64_T unsigned __int64 + +#if _WIN64 +/* + Windows 64-bit build +*/ + +/* Pointer difference type */ +# define TIFF_PTRDIFF_T TIFF_INT64_T + +/* The size of `size_t', as computed by sizeof. */ +# define SIZEOF_SIZE_T 8 + +/* Size type formatter */ +# define TIFF_SIZE_FORMAT TIFF_INT64_FORMAT + +/* Unsigned size type */ +# define TIFF_SIZE_T TIFF_UINT64_T + +/* Signed size type formatter */ +# define TIFF_SSIZE_FORMAT TIFF_INT64_FORMAT + +/* Signed size type */ +# define TIFF_SSIZE_T TIFF_INT64_T + +#else +/* + Windows 32-bit build +*/ + +/* Pointer difference type */ +# define TIFF_PTRDIFF_T signed int + +/* The size of `size_t', as computed by sizeof. */ +# define SIZEOF_SIZE_T 4 + +/* Size type formatter */ +# define TIFF_SIZE_FORMAT "%u" + +/* Size type formatter */ +# define TIFF_SIZE_FORMAT "%u" + +/* Unsigned size type */ +# define TIFF_SIZE_T unsigned int + +/* Signed size type formatter */ +# define TIFF_SSIZE_FORMAT "%d" + +/* Signed size type */ +# define TIFF_SSIZE_T signed int + +#endif + +/* Set the native cpu bit order */ +#define HOST_FILLORDER FILLORDER_LSB2MSB + +/* + Please see associated settings in "nmake.opt" which configure porting + settings. It should not be necessary to edit the following pre-processor + logic. +*/ +#if defined(_MSC_VER) +/* Visual Studio 2015 / VC 14 / MSVC 19.00 finally has snprintf() */ +# if _MSC_VER < 1900 /* Visual C++ 2015 */ +# define snprintf _snprintf +# else +# define HAVE_SNPRINTF 1 +# endif +# define HAVE_STRTOL 1 +# define HAVE_STRTOUL 1 +# if _MSC_VER >= 1900 /* Visual Studio 2015 added strtoll/strtoull */ +# define HAVE_STRTOLL 1 +# define HAVE_STRTOULL 1 +# endif +#endif + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +/* #undef WORDS_BIGENDIAN */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +# ifndef inline +# define inline __inline +# endif +#endif + +#define lfind _lfind + +#pragma warning(disable : 4996) /* function deprecation warnings */ + +#endif /* _TIF_CONFIG_H_ */ +/* + * Local Variables: + * mode: c + * c-basic-offset: 8 + * fill-column: 78 + * End: + */ diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_config.h-vms b/thirdparty/tiff-4.2.0/libtiff/tif_config.h-vms similarity index 100% rename from thirdparty/tiff-4.0.3/libtiff/tif_config.h-vms rename to thirdparty/tiff-4.2.0/libtiff/tif_config.h-vms diff --git a/thirdparty/tiff-4.2.0/libtiff/tif_config.h.cmake.in b/thirdparty/tiff-4.2.0/libtiff/tif_config.h.cmake.in new file mode 100644 index 00000000..24144603 --- /dev/null +++ b/thirdparty/tiff-4.2.0/libtiff/tif_config.h.cmake.in @@ -0,0 +1,231 @@ +/* libtiff/tif_config.h.cmake.in. Not generated, but originated from autoheader. */ +/* This file must be kept up-to-date with needed substitutions from libtiff/tif_config.h.in. */ + +/* Support CCITT Group 3 & 4 algorithms */ +#cmakedefine CCITT_SUPPORT 1 + +/* Pick up YCbCr subsampling info from the JPEG data stream to support files + lacking the tag (default enabled). */ +#cmakedefine CHECK_JPEG_YCBCR_SUBSAMPLING 1 + +/* enable partial strip reading for large strips (experimental) */ +#cmakedefine CHUNKY_STRIP_READ_SUPPORT 1 + +/* Support C++ stream API (requires C++ compiler) */ +#cmakedefine CXX_SUPPORT 1 + +/* enable deferred strip/tile offset/size loading (experimental) */ +#cmakedefine DEFER_STRILE_LOAD 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_ASSERT_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `getopt' function. */ +#cmakedefine HAVE_GETOPT 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_GLUT_GLUT_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_GL_GLUT_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_GL_GLU_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_GL_GL_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_IO_H 1 + +/* Define to 1 if you have the `jbg_newlen' function. */ +#cmakedefine HAVE_JBG_NEWLEN 1 + +/* Define to 1 if you have the `lfind' function. */ +#cmakedefine HAVE_LFIND 1 + +/* Define to 1 if you have the `mmap' function. */ +#cmakedefine HAVE_MMAP 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_OPENGL_GLU_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_OPENGL_GL_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SEARCH_H 1 + +/* Define to 1 if you have the `setmode' function. */ +#cmakedefine HAVE_SETMODE 1 + +/* Define to 1 if you have the `snprintf' function. */ +#cmakedefine HAVE_SNPRINTF 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDINT_H 1 + +/* Define to 1 if you have the `strcasecmp' function. */ +#cmakedefine HAVE_STRCASECMP 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STRING_H 1 + +/* Define to 1 if you have the `strtol' function. */ +#cmakedefine HAVE_STRTOL 1 + +/* Define to 1 if you have the `strtoll' function. */ +#cmakedefine HAVE_STRTOLL 1 + +/* Define to 1 if you have the `strtoul' function. */ +#cmakedefine HAVE_STRTOUL 1 + +/* Define to 1 if you have the `strtoull' function. */ +#cmakedefine HAVE_STRTOULL 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_UNISTD_H 1 + +/* 8/12 bit libjpeg dual mode enabled */ +#cmakedefine JPEG_DUAL_MODE_8_12 1 + +/* 12bit libjpeg primary include file with path */ +#define LIBJPEG_12_PATH @LIBJPEG_12_PATH@ + +/* Support LZMA2 compression */ +#cmakedefine LZMA_SUPPORT 1 + +/* Support ZSTD compression */ +#cmakedefine ZSTD_SUPPORT 1 + +/* Support WEBP compression */ +#cmakedefine WEBP_SUPPORT 1 + +/* Name of package */ +#define PACKAGE "@PACKAGE_NAME@" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "@PACKAGE_NAME@" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "@PACKAGE_STRING@" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "@PACKAGE_TARNAME@" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "@PACKAGE_URL@" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "@PACKAGE_VERSION@" + +/* The size of `signed int', as computed by sizeof. */ +#define SIZEOF_SIGNED_INT @SIZEOF_SIGNED_INT@ + +/* The size of `signed long', as computed by sizeof. */ +#define SIZEOF_SIGNED_LONG @SIZEOF_SIGNED_LONG@ + +/* The size of `signed long long', as computed by sizeof. */ +#define SIZEOF_SIGNED_LONG_LONG @SIZEOF_SIGNED_LONG_LONG@ + +/* The size of `unsigned char *', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_CHAR_P @SIZEOF_UNSIGNED_CHAR_P@ + +/* The size of `unsigned int', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_INT @SIZEOF_UNSIGNED_INT@ + +/* The size of `unsigned long', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_LONG @SIZEOF_UNSIGNED_LONG@ + +/* The size of `unsigned long long', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_LONG_LONG @SIZEOF_UNSIGNED_LONG_LONG@ + +/* The size of `unsigned short', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_SHORT @SIZEOF_UNSIGNED_SHORT@ + +/* Default size of the strip in bytes (when strip chopping enabled) */ +#define STRIP_SIZE_DEFAULT @STRIP_SIZE_DEFAULT@ + +/* Signed 32-bit type formatter */ +#define TIFF_INT32_FORMAT "@TIFF_INT32_FORMAT@" + +/* Signed 64-bit type formatter */ +#define TIFF_INT64_FORMAT "@TIFF_INT64_FORMAT@" + +/* Pointer difference type formatter */ +#define TIFF_PTRDIFF_FORMAT "@TIFF_PTRDIFF_FORMAT@" + +/* Unsigned size type formatter */ +#define TIFF_SIZE_FORMAT "@TIFF_SIZE_FORMAT@" + +/* Signed size type formatter */ +#define TIFF_SSIZE_FORMAT "@TIFF_SSIZE_FORMAT@" + +/* Unsigned 32-bit type formatter */ +#define TIFF_UINT32_FORMAT "@TIFF_UINT32_FORMAT@" + +/* Unsigned 64-bit type formatter */ +#define TIFF_UINT64_FORMAT "@TIFF_UINT64_FORMAT@" + +/* Unsigned 8-bit type */ +#define TIFF_UINT8_T @TIFF_UINT8_T@ + +/* Define to 1 if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define to 1 if your declares `struct tm'. */ +#cmakedefine TM_IN_SYS_TIME 1 + +/* define to use win32 IO system */ +#cmakedefine USE_WIN32_FILEIO 1 + +/* Version number of package */ +#define VERSION "@PACKAGE_VERSION@" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#define _FILE_OFFSET_BITS @FILE_OFFSET_BITS@ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#define inline @INLINE_KEYWORD@ +#endif + +/* Define to `long int' if does not define. */ +#undef off_t + +/* Define to `unsigned int' if does not define. */ +#undef size_t diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_config.h.in b/thirdparty/tiff-4.2.0/libtiff/tif_config.h.in similarity index 84% rename from thirdparty/tiff-4.0.3/libtiff/tif_config.h.in rename to thirdparty/tiff-4.2.0/libtiff/tif_config.h.in index b2cea354..30afd7a1 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_config.h.in +++ b/thirdparty/tiff-4.2.0/libtiff/tif_config.h.in @@ -21,20 +21,24 @@ packages produce RGBA files but don't mark the alpha properly. */ #undef DEFAULT_EXTRASAMPLE_AS_ALPHA -/* enable deferred strip/tile offset/size loading (experimental) */ +/* enable deferred strip/tile offset/size loading */ #undef DEFER_STRILE_LOAD /* Define to 1 if you have the header file. */ #undef HAVE_ASSERT_H +/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. + */ +#undef HAVE_DECL_OPTARG + /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H -/* Define to 1 if you have the `floor' function. */ -#undef HAVE_FLOOR +/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ +#undef HAVE_FSEEKO /* Define to 1 if you have the `getopt' function. */ #undef HAVE_GETOPT @@ -55,48 +59,21 @@ machine */ #undef HAVE_IEEEFP -/* Define to 1 if the system has the type `int16'. */ -#undef HAVE_INT16 - -/* Define to 1 if the system has the type `int32'. */ -#undef HAVE_INT32 - -/* Define to 1 if the system has the type `int8'. */ -#undef HAVE_INT8 - /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_IO_H -/* Define to 1 if you have the `isascii' function. */ -#undef HAVE_ISASCII - /* Define to 1 if you have the `jbg_newlen' function. */ #undef HAVE_JBG_NEWLEN /* Define to 1 if you have the `lfind' function. */ #undef HAVE_LFIND -/* Define to 1 if you have the `m' library (-lm). */ -#undef HAVE_LIBM - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MALLOC_H - -/* Define to 1 if you have the `memmove' function. */ -#undef HAVE_MEMMOVE - /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H -/* Define to 1 if you have the `memset' function. */ -#undef HAVE_MEMSET - /* Define to 1 if you have the `mmap' function. */ #undef HAVE_MMAP @@ -106,9 +83,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_OPENGL_GL_H -/* Define to 1 if you have the `pow' function. */ -#undef HAVE_POW - /* Define if you have POSIX threads libraries and header files. */ #undef HAVE_PTHREAD @@ -118,8 +92,8 @@ /* Define to 1 if you have the `setmode' function. */ #undef HAVE_SETMODE -/* Define to 1 if you have the `sqrt' function. */ -#undef HAVE_SQRT +/* Define to 1 if you have the `snprintf' function. */ +#undef HAVE_SNPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H @@ -130,24 +104,18 @@ /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP -/* Define to 1 if you have the `strchr' function. */ -#undef HAVE_STRCHR - /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H -/* Define to 1 if you have the `strrchr' function. */ -#undef HAVE_STRRCHR - -/* Define to 1 if you have the `strstr' function. */ -#undef HAVE_STRSTR - /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL +/* Define to 1 if you have the `strtoll' function. */ +#undef HAVE_STRTOLL + /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL @@ -157,9 +125,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H @@ -188,14 +153,16 @@ /* Support JPEG compression (requires IJG JPEG library) */ #undef JPEG_SUPPORT +/* Support libdeflate enhanced compression */ +#undef LIBDEFLATE_SUPPORT + /* 12bit libjpeg primary include file with path */ #undef LIBJPEG_12_PATH /* Support LogLuv high dynamic range encoding */ #undef LOGLUV_SUPPORT -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ +/* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Support LZMA2 compression */ @@ -210,9 +177,6 @@ /* Support NeXT 2-bit RLE algorithm */ #undef NEXT_SUPPORT -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - /* Support Old JPEG compresson (read-only) */ #undef OJPEG_SUPPORT @@ -256,8 +220,8 @@ /* The size of `signed long long', as computed by sizeof. */ #undef SIZEOF_SIGNED_LONG_LONG -/* The size of `signed short', as computed by sizeof. */ -#undef SIZEOF_SIGNED_SHORT +/* The size of `size_t', as computed by sizeof. */ +#undef SIZEOF_SIZE_T /* The size of `unsigned char *', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_CHAR_P @@ -271,9 +235,6 @@ /* The size of `unsigned long long', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_LONG_LONG -/* The size of `unsigned short', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_SHORT - /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS @@ -314,6 +275,12 @@ /* Pointer difference type */ #undef TIFF_PTRDIFF_T +/* Size type formatter */ +#undef TIFF_SIZE_FORMAT + +/* Unsigned size type */ +#undef TIFF_SIZE_T + /* Signed size type formatter */ #undef TIFF_SSIZE_FORMAT @@ -350,6 +317,9 @@ /* Version number of package */ #undef VERSION +/* Support webp compression */ +#undef WEBP_SUPPORT + /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD @@ -368,6 +338,9 @@ /* Support Deflate compression */ #undef ZIP_SUPPORT +/* Support zstd compression */ +#undef ZSTD_SUPPORT + /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 @@ -376,6 +349,9 @@ /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS +/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ +#undef _LARGEFILE_SOURCE + /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_config.vc.h b/thirdparty/tiff-4.2.0/libtiff/tif_config.vc.h similarity index 50% rename from thirdparty/tiff-4.0.3/libtiff/tif_config.vc.h rename to thirdparty/tiff-4.2.0/libtiff/tif_config.vc.h index 859a606d..939594f8 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_config.vc.h +++ b/thirdparty/tiff-4.2.0/libtiff/tif_config.vc.h @@ -1,3 +1,6 @@ +#ifndef _TIF_CONFIG_H_ +#define _TIF_CONFIG_H_ + /* Define to 1 if you have the header file. */ #define HAVE_ASSERT_H 1 @@ -26,6 +29,9 @@ /* Define to 1 if you have the `setmode' function. */ #define HAVE_SETMODE 1 +/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. */ +#define HAVE_DECL_OPTARG 0 + /* The size of a `int', as computed by sizeof. */ #define SIZEOF_INT 4 @@ -44,11 +50,78 @@ /* Unsigned 64-bit type */ #define TIFF_UINT64_T unsigned __int64 +#if _WIN64 +/* + Windows 64-bit build +*/ + +/* Pointer difference type */ +# define TIFF_PTRDIFF_T TIFF_INT64_T + +/* The size of `size_t', as computed by sizeof. */ +# define SIZEOF_SIZE_T 8 + +/* Size type formatter */ +# define TIFF_SIZE_FORMAT TIFF_INT64_FORMAT + +/* Unsigned size type */ +# define TIFF_SIZE_T TIFF_UINT64_T + +/* Signed size type formatter */ +# define TIFF_SSIZE_FORMAT TIFF_INT64_FORMAT + +/* Signed size type */ +# define TIFF_SSIZE_T TIFF_INT64_T + +#else +/* + Windows 32-bit build +*/ + +/* Pointer difference type */ +# define TIFF_PTRDIFF_T signed int + +/* The size of `size_t', as computed by sizeof. */ +# define SIZEOF_SIZE_T 4 + +/* Size type formatter */ +# define TIFF_SIZE_FORMAT "%u" + +/* Size type formatter */ +# define TIFF_SIZE_FORMAT "%u" + +/* Unsigned size type */ +# define TIFF_SIZE_T unsigned int + +/* Signed size type formatter */ +# define TIFF_SSIZE_FORMAT "%d" + +/* Signed size type */ +# define TIFF_SSIZE_T signed int + +#endif + /* Set the native cpu bit order */ #define HOST_FILLORDER FILLORDER_LSB2MSB -#if defined(_MSC_VER) && (_MSC_VER < 1900) -#define snprintf _snprintf +/* + Please see associated settings in "nmake.opt" which configure porting + settings. It should not be necessary to edit the following pre-processor + logic. +*/ +#if defined(_MSC_VER) +/* Visual Studio 2015 / VC 14 / MSVC 19.00 finally has snprintf() */ +# if _MSC_VER < 1900 /* Visual C++ 2015 */ +# define snprintf _snprintf +# else +# define HAVE_SNPRINTF 1 +# endif +# define HAVE_STRTOL 1 +# define HAVE_STRTOUL 1 +# if _MSC_VER >= 1900 /* Visual Studio 2015 added strtoll/strtoull */ +# define HAVE_STRTOLL 1 +# define HAVE_STRTOULL 1 +# endif #endif /* Define to 1 if your processor stores words with the most significant byte @@ -64,6 +137,10 @@ #endif #define lfind _lfind + +#pragma warning(disable : 4996) /* function deprecation warnings */ + +#endif /* _TIF_CONFIG_H_ */ /* * Local Variables: * mode: c diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_config.wince.h b/thirdparty/tiff-4.2.0/libtiff/tif_config.wince.h similarity index 96% rename from thirdparty/tiff-4.0.3/libtiff/tif_config.wince.h rename to thirdparty/tiff-4.2.0/libtiff/tif_config.wince.h index 94e92bbf..e85e2e62 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_config.wince.h +++ b/thirdparty/tiff-4.2.0/libtiff/tif_config.wince.h @@ -1,5 +1,3 @@ -/* $Id: tif_config.wince.h,v 1.3 2010-03-10 18:56:48 bfriesen Exp $ */ - /* * TIFF library configuration header for Windows CE platform. */ diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_dir.c b/thirdparty/tiff-4.2.0/libtiff/tif_dir.c similarity index 80% rename from thirdparty/tiff-4.0.3/libtiff/tif_dir.c rename to thirdparty/tiff-4.2.0/libtiff/tif_dir.c index 8bf3ea71..347b7115 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_dir.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_dir.c @@ -1,5 +1,3 @@ -/* $Id: tif_dir.c,v 1.113 2012-06-14 20:32:53 fwarmerdam Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -31,6 +29,7 @@ * (and also some miscellaneous stuff) */ #include "tiffiop.h" +#include /*--: for Rational2Double */ /* * These are used in the backwards compatibility code... @@ -43,11 +42,13 @@ static void setByteArray(void** vpp, void* vp, size_t nmemb, size_t elem_size) { - if (*vpp) - _TIFFfree(*vpp), *vpp = 0; + if (*vpp) { + _TIFFfree(*vpp); + *vpp = 0; + } if (vp) { - tmsize_t bytes = (tmsize_t)(nmemb * elem_size); - if (elem_size && bytes / elem_size == nmemb) + tmsize_t bytes = _TIFFMultiplySSize(NULL, nmemb, elem_size, NULL); + if (bytes) *vpp = (void*) _TIFFmalloc(bytes); if (*vpp) _TIFFmemcpy(*vpp, vp, bytes); @@ -57,13 +58,13 @@ void _TIFFsetByteArray(void** vpp, void* vp, uint32 n) { setByteArray(vpp, vp, n, 1); } void _TIFFsetString(char** cpp, char* cp) { setByteArray((void**) cpp, (void*) cp, strlen(cp)+1, 1); } -void _TIFFsetNString(char** cpp, char* cp, uint32 n) +static void _TIFFsetNString(char** cpp, char* cp, uint32 n) { setByteArray((void**) cpp, (void*) cp, n, 1); } void _TIFFsetShortArray(uint16** wpp, uint16* wp, uint32 n) { setByteArray((void**) wpp, (void*) wp, n, sizeof (uint16)); } void _TIFFsetLongArray(uint32** lpp, uint32* lp, uint32 n) { setByteArray((void**) lpp, (void*) lp, n, sizeof (uint32)); } -void _TIFFsetLong8Array(uint64** lpp, uint64* lp, uint32 n) +static void _TIFFsetLong8Array(uint64** lpp, uint64* lp, uint32 n) { setByteArray((void**) lpp, (void*) lp, n, sizeof (uint64)); } void _TIFFsetFloatArray(float** fpp, float* fp, uint32 n) { setByteArray((void**) fpp, (void*) fp, n, sizeof (float)); } @@ -87,13 +88,15 @@ setDoubleArrayOneValue(double** vpp, double value, size_t nmemb) * Install extra samples information. */ static int -setExtraSamples(TIFFDirectory* td, va_list ap, uint32* v) +setExtraSamples(TIFF* tif, va_list ap, uint32* v) { /* XXX: Unassociated alpha data == 999 is a known Corel Draw bug, see below */ #define EXTRASAMPLE_COREL_UNASSALPHA 999 uint16* va; uint32 i; + TIFFDirectory* td = &tif->tif_dir; + static const char module[] = "setExtraSamples"; *v = (uint16) va_arg(ap, uint16_vap); if ((uint16) *v > td->td_samplesperpixel) @@ -115,6 +118,18 @@ setExtraSamples(TIFFDirectory* td, va_list ap, uint32* v) return 0; } } + + if ( td->td_transferfunction[0] != NULL && (td->td_samplesperpixel - *v > 1) && + !(td->td_samplesperpixel - td->td_extrasamples > 1)) + { + TIFFWarningExt(tif->tif_clientdata,module, + "ExtraSamples tag value is changing, " + "but TransferFunction was read with a different value. Canceling it"); + TIFFClrFieldBit(tif,FIELD_TRANSFERFUNCTION); + _TIFFfree(td->td_transferfunction[0]); + td->td_transferfunction[0] = NULL; + } + td->td_extrasamples = (uint16) *v; _TIFFsetShortArray(&td->td_sampleinfo, va, td->td_extrasamples); return 1; @@ -160,15 +175,17 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) TIFFDirectory* td = &tif->tif_dir; int status = 1; uint32 v32, i, v; + double dblval; char* s; const TIFFField *fip = TIFFFindField(tif, tag, TIFF_ANY); uint32 standard_tag = tag; - + if( fip == NULL ) /* cannot happen since OkToChangeTag() already checks it */ + return 0; /* * We want to force the custom code to be used for custom * fields even if the tag happens to match a well known * one - important for reinterpreted handling of standard - * tag values in custom directories (ie. EXIF) + * tag values in custom directories (i.e. EXIF) */ if (fip->field_bit == FIELD_CUSTOM) { standard_tag = 0; @@ -189,7 +206,7 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) /* * If the data require post-decoding processing to byte-swap * samples, set it up here. Note that since tags are required - * to be ordered, compression code can override this behaviour + * to be ordered, compression code can override this behavior * in the setup method if it wants to roll the post decoding * work in with its normal work. */ @@ -252,6 +269,40 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) v = (uint16) va_arg(ap, uint16_vap); if (v == 0) goto badvalue; + if( v != td->td_samplesperpixel ) + { + /* See http://bugzilla.maptools.org/show_bug.cgi?id=2500 */ + if( td->td_sminsamplevalue != NULL ) + { + TIFFWarningExt(tif->tif_clientdata,module, + "SamplesPerPixel tag value is changing, " + "but SMinSampleValue tag was read with a different value. Canceling it"); + TIFFClrFieldBit(tif,FIELD_SMINSAMPLEVALUE); + _TIFFfree(td->td_sminsamplevalue); + td->td_sminsamplevalue = NULL; + } + if( td->td_smaxsamplevalue != NULL ) + { + TIFFWarningExt(tif->tif_clientdata,module, + "SamplesPerPixel tag value is changing, " + "but SMaxSampleValue tag was read with a different value. Canceling it"); + TIFFClrFieldBit(tif,FIELD_SMAXSAMPLEVALUE); + _TIFFfree(td->td_smaxsamplevalue); + td->td_smaxsamplevalue = NULL; + } + /* Test if 3 transfer functions instead of just one are now needed + See http://bugzilla.maptools.org/show_bug.cgi?id=2820 */ + if( td->td_transferfunction[0] != NULL && (v - td->td_extrasamples > 1) && + !(td->td_samplesperpixel - td->td_extrasamples > 1)) + { + TIFFWarningExt(tif->tif_clientdata,module, + "SamplesPerPixel tag value is changing, " + "but TransferFunction was read with a different value. Canceling it"); + TIFFClrFieldBit(tif,FIELD_TRANSFERFUNCTION); + _TIFFfree(td->td_transferfunction[0]); + td->td_transferfunction[0] = NULL; + } + } td->td_samplesperpixel = (uint16) v; break; case TIFFTAG_ROWSPERSTRIP: @@ -283,10 +334,16 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) setDoubleArrayOneValue(&td->td_smaxsamplevalue, va_arg(ap, double), td->td_samplesperpixel); break; case TIFFTAG_XRESOLUTION: - td->td_xresolution = (float) va_arg(ap, double); + dblval = va_arg(ap, double); + if( dblval < 0 ) + goto badvaluedouble; + td->td_xresolution = _TIFFClampDoubleToFloat( dblval ); break; case TIFFTAG_YRESOLUTION: - td->td_yresolution = (float) va_arg(ap, double); + dblval = va_arg(ap, double); + if( dblval < 0 ) + goto badvaluedouble; + td->td_yresolution = _TIFFClampDoubleToFloat( dblval ); break; case TIFFTAG_PLANARCONFIG: v = (uint16) va_arg(ap, uint16_vap); @@ -295,10 +352,10 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) td->td_planarconfig = (uint16) v; break; case TIFFTAG_XPOSITION: - td->td_xposition = (float) va_arg(ap, double); + td->td_xposition = _TIFFClampDoubleToFloat( va_arg(ap, double) ); break; case TIFFTAG_YPOSITION: - td->td_yposition = (float) va_arg(ap, double); + td->td_yposition = _TIFFClampDoubleToFloat( va_arg(ap, double) ); break; case TIFFTAG_RESOLUTIONUNIT: v = (uint16) va_arg(ap, uint16_vap); @@ -321,7 +378,7 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) _TIFFsetShortArray(&td->td_colormap[2], va_arg(ap, uint16*), v32); break; case TIFFTAG_EXTRASAMPLES: - if (!setExtraSamples(td, ap, &v)) + if (!setExtraSamples(tif, ap, &v)) goto badvalue; break; case TIFFTAG_MATTEING: @@ -337,7 +394,7 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) if (tif->tif_mode != O_RDONLY) goto badvalue32; TIFFWarningExt(tif->tif_clientdata, tif->tif_name, - "Nonstandard tile width %d, convert file", v32); + "Nonstandard tile width %u, convert file", v32); } td->td_tilewidth = v32; tif->tif_flags |= TIFF_ISTILED; @@ -348,7 +405,7 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) if (tif->tif_mode != O_RDONLY) goto badvalue32; TIFFWarningExt(tif->tif_clientdata, tif->tif_name, - "Nonstandard tile length %d, convert file", v32); + "Nonstandard tile length %u, convert file", v32); } td->td_tilelength = v32; tif->tif_flags |= TIFF_ISTILED; @@ -394,7 +451,7 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) if ((tif->tif_flags & TIFF_INSUBIFD) == 0) { td->td_nsubifd = (uint16) va_arg(ap, uint16_vap); _TIFFsetLong8Array(&td->td_subifd, (uint64*) va_arg(ap, uint64*), - (long) td->td_nsubifd); + (uint32) td->td_nsubifd); } else { TIFFErrorExt(tif->tif_clientdata, module, "%s: Sorry, cannot nest SubIFDs", @@ -413,7 +470,7 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) v = (td->td_samplesperpixel - td->td_extrasamples) > 1 ? 3 : 1; for (i = 0; i < v; i++) _TIFFsetShortArray(&td->td_transferfunction[i], - va_arg(ap, uint16*), 1L<td_bitspersample); + va_arg(ap, uint16*), 1U<td_bitspersample); break; case TIFFTAG_REFERENCEBLACKWHITE: /* XXX should check for null range */ @@ -449,11 +506,11 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) * happens, for example, when tiffcp is used to convert between * compression schemes and codec-specific tags are blindly copied. */ - if(fip == NULL || fip->field_bit != FIELD_CUSTOM) { + if(fip->field_bit != FIELD_CUSTOM) { TIFFErrorExt(tif->tif_clientdata, module, "%s: Invalid %stag \"%s\" (not supported by codec)", tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "", - fip ? fip->field_name : "Unknown"); + fip->field_name); status = 0; break; } @@ -503,6 +560,10 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) * Set custom value ... save a copy of the custom tag value. */ tv_size = _TIFFDataSize(fip->field_type); + /*--: Rational2Double: For Rationals evaluate "set_field_type" to determine internal storage size. */ + if (fip->field_type == TIFF_RATIONAL || fip->field_type == TIFF_SRATIONAL) { + tv_size = _TIFFSetGetFieldSize(fip->set_field_type); + } if (tv_size == 0) { status = 0; TIFFErrorExt(tif->tif_clientdata, module, @@ -571,10 +632,10 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) handled this way ... likely best if we move it into the directory structure with an explicit field in libtiff 4.1 and assign it a FIELD_ value */ - uint16 v[2]; - v[0] = (uint16)va_arg(ap, int); - v[1] = (uint16)va_arg(ap, int); - _TIFFmemcpy(tv->value, &v, 4); + uint16 v2[2]; + v2[0] = (uint16)va_arg(ap, int); + v2[1] = (uint16)va_arg(ap, int); + _TIFFmemcpy(tv->value, &v2, 4); } else if (fip->field_passcount @@ -582,6 +643,7 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) || fip->field_writecount == TIFF_VARIABLE2 || fip->field_writecount == TIFF_SPP || tv->count > 1) { + /*--: Rational2Double: For Rationals tv_size is set above to 4 or 8 according to fip->set_field_type! */ _TIFFmemcpy(tv->value, va_arg(ap, void *), tv->count * tv_size); } else { @@ -592,66 +654,82 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) case TIFF_BYTE: case TIFF_UNDEFINED: { - uint8 v = (uint8)va_arg(ap, int); - _TIFFmemcpy(val, &v, tv_size); + uint8 v2 = (uint8)va_arg(ap, int); + _TIFFmemcpy(val, &v2, tv_size); } break; case TIFF_SBYTE: { - int8 v = (int8)va_arg(ap, int); - _TIFFmemcpy(val, &v, tv_size); + int8 v2 = (int8)va_arg(ap, int); + _TIFFmemcpy(val, &v2, tv_size); } break; case TIFF_SHORT: { - uint16 v = (uint16)va_arg(ap, int); - _TIFFmemcpy(val, &v, tv_size); + uint16 v2 = (uint16)va_arg(ap, int); + _TIFFmemcpy(val, &v2, tv_size); } break; case TIFF_SSHORT: { - int16 v = (int16)va_arg(ap, int); - _TIFFmemcpy(val, &v, tv_size); + int16 v2 = (int16)va_arg(ap, int); + _TIFFmemcpy(val, &v2, tv_size); } break; case TIFF_LONG: case TIFF_IFD: { - uint32 v = va_arg(ap, uint32); - _TIFFmemcpy(val, &v, tv_size); + uint32 v2 = va_arg(ap, uint32); + _TIFFmemcpy(val, &v2, tv_size); } break; case TIFF_SLONG: { - int32 v = va_arg(ap, int32); - _TIFFmemcpy(val, &v, tv_size); + int32 v2 = va_arg(ap, int32); + _TIFFmemcpy(val, &v2, tv_size); } break; case TIFF_LONG8: case TIFF_IFD8: { - uint64 v = va_arg(ap, uint64); - _TIFFmemcpy(val, &v, tv_size); + uint64 v2 = va_arg(ap, uint64); + _TIFFmemcpy(val, &v2, tv_size); } break; case TIFF_SLONG8: { - int64 v = va_arg(ap, int64); - _TIFFmemcpy(val, &v, tv_size); + int64 v2 = va_arg(ap, int64); + _TIFFmemcpy(val, &v2, tv_size); } break; case TIFF_RATIONAL: case TIFF_SRATIONAL: + /*-- Rational2Double: For Rationals tv_size is set above to 4 or 8 according to fip->set_field_type! */ + { + if (tv_size == 8) { + double v2 = va_arg(ap, double); + _TIFFmemcpy(val, &v2, tv_size); + } else { + /*-- default should be tv_size == 4 */ + float v3 = (float)va_arg(ap, double); + _TIFFmemcpy(val, &v3, tv_size); + /*-- ToDo: After Testing, this should be removed and tv_size==4 should be set as default. */ + if (tv_size != 4) { + TIFFErrorExt(0,"TIFFLib: _TIFFVSetField()", "Rational2Double: .set_field_type in not 4 but %d", tv_size); + } + } + } + break; case TIFF_FLOAT: { - float v = (float)va_arg(ap, double); - _TIFFmemcpy(val, &v, tv_size); + float v2 = _TIFFClampDoubleToFloat(va_arg(ap, double)); + _TIFFmemcpy(val, &v2, tv_size); } break; case TIFF_DOUBLE: { - double v = va_arg(ap, double); - _TIFFmemcpy(val, &v, tv_size); + double v2 = va_arg(ap, double); + _TIFFmemcpy(val, &v2, tv_size); } break; default: @@ -664,9 +742,9 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) } } if (status) { - const TIFFField* fip=TIFFFieldWithTag(tif,tag); - if (fip) - TIFFSetFieldBit(tif, fip->field_bit); + const TIFFField* fip2=TIFFFieldWithTag(tif,tag); + if (fip2) + TIFFSetFieldBit(tif, fip2->field_bit); tif->tif_flags |= TIFF_DIRTYDIRECT; } @@ -675,24 +753,34 @@ end: return (status); badvalue: { - const TIFFField* fip=TIFFFieldWithTag(tif,tag); + const TIFFField* fip2=TIFFFieldWithTag(tif,tag); TIFFErrorExt(tif->tif_clientdata, module, "%s: Bad value %u for \"%s\" tag", tif->tif_name, v, - fip ? fip->field_name : "Unknown"); + fip2 ? fip2->field_name : "Unknown"); va_end(ap); } return (0); badvalue32: { - const TIFFField* fip=TIFFFieldWithTag(tif,tag); + const TIFFField* fip2=TIFFFieldWithTag(tif,tag); TIFFErrorExt(tif->tif_clientdata, module, "%s: Bad value %u for \"%s\" tag", tif->tif_name, v32, - fip ? fip->field_name : "Unknown"); + fip2 ? fip2->field_name : "Unknown"); va_end(ap); } return (0); +badvaluedouble: + { + const TIFFField* fip2=TIFFFieldWithTag(tif,tag); + TIFFErrorExt(tif->tif_clientdata, module, + "%s: Bad value %f for \"%s\" tag", + tif->tif_name, dblval, + fip2 ? fip2->field_name : "Unknown"); + va_end(ap); + } + return (0); } /* @@ -809,16 +897,46 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) int ret_val = 1; uint32 standard_tag = tag; const TIFFField* fip = TIFFFindField(tif, tag, TIFF_ANY); - + if( fip == NULL ) /* cannot happen since TIFFGetField() already checks it */ + return 0; + /* * We want to force the custom code to be used for custom * fields even if the tag happens to match a well known * one - important for reinterpreted handling of standard - * tag values in custom directories (ie. EXIF) + * tag values in custom directories (i.e. EXIF) */ if (fip->field_bit == FIELD_CUSTOM) { standard_tag = 0; } + + if( standard_tag == TIFFTAG_NUMBEROFINKS ) + { + int i; + for (i = 0; i < td->td_customValueCount; i++) { + uint16 val; + TIFFTagValue *tv = td->td_customValues + i; + if (tv->info->field_tag != standard_tag) + continue; + if( tv->value == NULL ) + return 0; + val = *(uint16 *)tv->value; + /* Truncate to SamplesPerPixel, since the */ + /* setting code for INKNAMES assume that there are SamplesPerPixel */ + /* inknames. */ + /* Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2599 */ + if( val > td->td_samplesperpixel ) + { + TIFFWarningExt(tif->tif_clientdata,"_TIFFVGetField", + "Truncating NumberOfInks from %u to %u", + val, td->td_samplesperpixel); + val = td->td_samplesperpixel; + } + *va_arg(ap, uint16*) = val; + return 1; + } + return 0; + } switch (standard_tag) { case TIFFTAG_SUBFILETYPE: @@ -865,7 +983,7 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) *va_arg(ap, double**) = td->td_sminsamplevalue; else { - /* libtiff historially treats this as a single value. */ + /* libtiff historically treats this as a single value. */ uint16 i; double v = td->td_sminsamplevalue[0]; for (i=1; i < td->td_samplesperpixel; ++i) @@ -879,7 +997,7 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) *va_arg(ap, double**) = td->td_smaxsamplevalue; else { - /* libtiff historially treats this as a single value. */ + /* libtiff historically treats this as a single value. */ uint16 i; double v = td->td_smaxsamplevalue[0]; for (i=1; i < td->td_samplesperpixel; ++i) @@ -915,19 +1033,19 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) *va_arg(ap, uint16*) = td->td_halftonehints[1]; break; case TIFFTAG_COLORMAP: - *va_arg(ap, uint16**) = td->td_colormap[0]; - *va_arg(ap, uint16**) = td->td_colormap[1]; - *va_arg(ap, uint16**) = td->td_colormap[2]; + *va_arg(ap, const uint16**) = td->td_colormap[0]; + *va_arg(ap, const uint16**) = td->td_colormap[1]; + *va_arg(ap, const uint16**) = td->td_colormap[2]; break; case TIFFTAG_STRIPOFFSETS: case TIFFTAG_TILEOFFSETS: _TIFFFillStriles( tif ); - *va_arg(ap, uint64**) = td->td_stripoffset; + *va_arg(ap, const uint64**) = td->td_stripoffset_p; break; case TIFFTAG_STRIPBYTECOUNTS: case TIFFTAG_TILEBYTECOUNTS: _TIFFFillStriles( tif ); - *va_arg(ap, uint64**) = td->td_stripbytecount; + *va_arg(ap, const uint64**) = td->td_stripbytecount_p; break; case TIFFTAG_MATTEING: *va_arg(ap, uint16*) = @@ -936,7 +1054,7 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) break; case TIFFTAG_EXTRASAMPLES: *va_arg(ap, uint16*) = td->td_extrasamples; - *va_arg(ap, uint16**) = td->td_sampleinfo; + *va_arg(ap, const uint16**) = td->td_sampleinfo; break; case TIFFTAG_TILEWIDTH: *va_arg(ap, uint32*) = td->td_tilewidth; @@ -971,7 +1089,7 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) break; case TIFFTAG_SUBIFD: *va_arg(ap, uint16*) = td->td_nsubifd; - *va_arg(ap, uint64**) = td->td_subifd; + *va_arg(ap, const uint64**) = td->td_subifd; break; case TIFFTAG_YCBCRPOSITIONING: *va_arg(ap, uint16*) = td->td_ycbcrpositioning; @@ -981,17 +1099,20 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) *va_arg(ap, uint16*) = td->td_ycbcrsubsampling[1]; break; case TIFFTAG_TRANSFERFUNCTION: - *va_arg(ap, uint16**) = td->td_transferfunction[0]; + *va_arg(ap, const uint16**) = td->td_transferfunction[0]; if (td->td_samplesperpixel - td->td_extrasamples > 1) { - *va_arg(ap, uint16**) = td->td_transferfunction[1]; - *va_arg(ap, uint16**) = td->td_transferfunction[2]; + *va_arg(ap, const uint16**) = td->td_transferfunction[1]; + *va_arg(ap, const uint16**) = td->td_transferfunction[2]; + } else { + *va_arg(ap, const uint16**) = NULL; + *va_arg(ap, const uint16**) = NULL; } break; case TIFFTAG_REFERENCEBLACKWHITE: - *va_arg(ap, float**) = td->td_refblackwhite; + *va_arg(ap, const float**) = td->td_refblackwhite; break; case TIFFTAG_INKNAMES: - *va_arg(ap, char**) = td->td_inknames; + *va_arg(ap, const char**) = td->td_inknames; break; default: { @@ -1006,14 +1127,14 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) * get a tag that is not valid for the image's * codec then we'll arrive here. */ - if( fip == NULL || fip->field_bit != FIELD_CUSTOM ) + if( fip->field_bit != FIELD_CUSTOM ) { TIFFErrorExt(tif->tif_clientdata, "_TIFFVGetField", "%s: Invalid %stag \"%s\" " "(not supported by codec)", tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "", - fip ? fip->field_name : "Unknown"); + fip->field_name); ret_val = 0; break; } @@ -1033,7 +1154,7 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) *va_arg(ap, uint32*) = (uint32)tv->count; else /* Assume TIFF_VARIABLE */ *va_arg(ap, uint16*) = (uint16)tv->count; - *va_arg(ap, void **) = tv->value; + *va_arg(ap, const void **) = tv->value; ret_val = 1; } else if (fip->field_tag == TIFFTAG_DOTRANGE && strcmp(fip->field_name,"DotRange") == 0) { @@ -1101,6 +1222,23 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) break; case TIFF_RATIONAL: case TIFF_SRATIONAL: + { + /*-- Rational2Double: For Rationals evaluate "set_field_type" to determine internal storage size and return value size. */ + int tv_size = _TIFFSetGetFieldSize(fip->set_field_type); + if (tv_size == 8) { + *va_arg(ap, double*) = *(double *)val; + ret_val = 1; + } else { + /*-- default should be tv_size == 4 */ + *va_arg(ap, float*) = *(float *)val; + ret_val = 1; + /*-- ToDo: After Testing, this should be removed and tv_size==4 should be set as default. */ + if (tv_size != 4) { + TIFFErrorExt(0,"TIFFLib: _TIFFVGetField()", "Rational2Double: .set_field_type in not 4 but %d", tv_size); + } + } + } + break; case TIFF_FLOAT: *va_arg(ap, float*) = *(float *)val; @@ -1183,8 +1321,9 @@ TIFFFreeDirectory(TIFF* tif) CleanupField(td_transferfunction[0]); CleanupField(td_transferfunction[1]); CleanupField(td_transferfunction[2]); - CleanupField(td_stripoffset); - CleanupField(td_stripbytecount); + CleanupField(td_stripoffset_p); + CleanupField(td_stripbytecount_p); + td->td_stripoffsetbyteallocsize = 0; TIFFClrFieldBit(tif, FIELD_YCBCRSUBSAMPLING); TIFFClrFieldBit(tif, FIELD_YCBCRPOSITIONING); @@ -1197,10 +1336,8 @@ TIFFFreeDirectory(TIFF* tif) td->td_customValueCount = 0; CleanupField(td_customValues); -#if defined(DEFER_STRILE_LOAD) _TIFFmemset( &(td->td_stripoffset_entry), 0, sizeof(TIFFDirEntry)); _TIFFmemset( &(td->td_stripbytecount_entry), 0, sizeof(TIFFDirEntry)); -#endif } #undef CleanupField @@ -1266,6 +1403,17 @@ TIFFCreateEXIFDirectory(TIFF* tif) return TIFFCreateCustomDirectory(tif, exifFieldArray); } +/* + * Creates the EXIF GPS custom directory + */ +int +TIFFCreateGPSDirectory(TIFF* tif) +{ + const TIFFFieldArray* gpsFieldArray; + gpsFieldArray = _TIFFGetGpsFields(); + return TIFFCreateCustomDirectory(tif, gpsFieldArray); +} + /* * Setup a default directory structure. */ @@ -1288,7 +1436,9 @@ TIFFDefaultDirectory(TIFF* tif) td->td_tilewidth = 0; td->td_tilelength = 0; td->td_tiledepth = 1; +#ifdef STRIPBYTECOUNTSORTED_UNUSED td->td_stripbytecountsorted = 1; /* Our own arrays always sorted. */ +#endif td->td_resolutionunit = RESUNIT_INCH; td->td_sampleformat = SAMPLEFORMAT_UINT; td->td_imagedepth = 1; @@ -1302,8 +1452,20 @@ TIFFDefaultDirectory(TIFF* tif) tif->tif_tagmethods.printdir = NULL; /* * Give client code a chance to install their own - * tag extensions & methods, prior to compression overloads. + * tag extensions & methods, prior to compression overloads, + * but do some prior cleanup first. (http://trac.osgeo.org/gdal/ticket/5054) */ + if (tif->tif_nfieldscompat > 0) { + uint32 i; + + for (i = 0; i < tif->tif_nfieldscompat; i++) { + if (tif->tif_fieldscompat[i].allocated_size) + _TIFFfree(tif->tif_fieldscompat[i].fields); + } + _TIFFfree(tif->tif_fieldscompat); + tif->tif_nfieldscompat = 0; + tif->tif_fieldscompat = NULL; + } if (_TIFFextender) (*_TIFFextender)(tif); (void) TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE); @@ -1344,6 +1506,7 @@ TIFFAdvanceDirectory(TIFF* tif, uint64* nextdir, uint64* off) if (((uint64)poffa!=poff)||(poffbtif->tif_size)) { TIFFErrorExt(tif->tif_clientdata,module,"Error fetching directory count"); + *nextdir=0; return(0); } _TIFFmemcpy(&dircount,tif->tif_base+poffa,sizeof(uint16)); @@ -1453,7 +1616,8 @@ TIFFAdvanceDirectory(TIFF* tif, uint64* nextdir, uint64* off) (void) TIFFSeekFile(tif, dircount16*20, SEEK_CUR); if (!ReadOK(tif, nextdir, sizeof (uint64))) { - TIFFErrorExt(tif->tif_clientdata, module, "%s: Error fetching directory link", + TIFFErrorExt(tif->tif_clientdata, module, + "%s: Error fetching directory link", tif->tif_name); return (0); } @@ -1470,6 +1634,7 @@ TIFFAdvanceDirectory(TIFF* tif, uint64* nextdir, uint64* off) uint16 TIFFNumberOfDirectories(TIFF* tif) { + static const char module[] = "TIFFNumberOfDirectories"; uint64 nextdir; uint16 n; if (!(tif->tif_flags&TIFF_BIGTIFF)) @@ -1478,7 +1643,18 @@ TIFFNumberOfDirectories(TIFF* tif) nextdir = tif->tif_header.big.tiff_diroff; n = 0; while (nextdir != 0 && TIFFAdvanceDirectory(tif, &nextdir, NULL)) - n++; + { + if (n != 65535) { + ++n; + } + else + { + TIFFErrorExt(tif->tif_clientdata, module, + "Directory count exceeded 65535 limit," + " giving up on counting."); + return (65535); + } + } return (n); } diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_dir.h b/thirdparty/tiff-4.2.0/libtiff/tif_dir.h similarity index 93% rename from thirdparty/tiff-4.0.3/libtiff/tif_dir.h rename to thirdparty/tiff-4.2.0/libtiff/tif_dir.h index 6af5f3dc..f608dd71 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_dir.h +++ b/thirdparty/tiff-4.2.0/libtiff/tif_dir.h @@ -1,5 +1,3 @@ -/* $Id: tif_dir.h,v 1.54 2011-02-18 20:53:05 fwarmerdam Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -26,6 +24,10 @@ #ifndef _TIFFDIR_ #define _TIFFDIR_ + +#include "tiff.h" +#include "tiffio.h" + /* * ``Library-private'' Directory-related Definitions. */ @@ -56,6 +58,7 @@ typedef struct { uint32 toff_long; uint64 toff_long8; } tdir_offset; /* either offset or the data itself if fits */ + uint8 tdir_ignore; /* flag status to ignore tag when parsing tags in tif_dirread.c */ } TIFFDirEntry; /* @@ -95,13 +98,14 @@ typedef struct { * number of striles */ uint32 td_stripsperimage; uint32 td_nstrips; /* size of offset & bytecount arrays */ - uint64* td_stripoffset; - uint64* td_stripbytecount; + uint64* td_stripoffset_p; /* should be accessed with TIFFGetStrileOffset */ + uint64* td_stripbytecount_p; /* should be accessed with TIFFGetStrileByteCount */ + uint32 td_stripoffsetbyteallocsize; /* number of elements currently allocated for td_stripoffset/td_stripbytecount. Only used if TIFF_LAZYSTRILELOAD is set */ +#ifdef STRIPBYTECOUNTSORTED_UNUSED int td_stripbytecountsorted; /* is the bytecount array sorted ascending? */ -#if defined(DEFER_STRILE_LOAD) +#endif TIFFDirEntry td_stripoffset_entry; /* for deferred loading */ TIFFDirEntry td_stripbytecount_entry; /* for deferred loading */ -#endif uint16 td_nsubifd; uint64* td_subifd; /* YCbCr parameters */ @@ -116,6 +120,8 @@ typedef struct { int td_customValueCount; TIFFTagValue *td_customValues; + + unsigned char td_deferstrilearraywriting; /* see TIFFDeferStrileArrayWriting() */ } TIFFDirectory; /* @@ -255,6 +261,7 @@ extern "C" { extern const TIFFFieldArray* _TIFFGetFields(void); extern const TIFFFieldArray* _TIFFGetExifFields(void); +extern const TIFFFieldArray* _TIFFGetGpsFields(void); extern void _TIFFSetupFields(TIFF* tif, const TIFFFieldArray* infoarray); extern void _TIFFPrintFieldInfo(TIFF*, FILE*); @@ -263,6 +270,7 @@ extern int _TIFFFillStriles(TIFF*); typedef enum { tfiatImage, tfiatExif, + tfiatGps, /* EXIF-GPS fields array type */ tfiatOther } TIFFFieldArrayType; @@ -291,6 +299,7 @@ struct _TIFFField { extern int _TIFFMergeFields(TIFF*, const TIFFField[], uint32); extern const TIFFField* _TIFFFindOrRegisterField(TIFF *, uint32, TIFFDataType); extern TIFFField* _TIFFCreateAnonField(TIFF *, uint32, TIFFDataType); +extern int _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag); #if defined(__cplusplus) } diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_dirinfo.c b/thirdparty/tiff-4.2.0/libtiff/tif_dirinfo.c similarity index 66% rename from thirdparty/tiff-4.0.3/libtiff/tif_dirinfo.c rename to thirdparty/tiff-4.2.0/libtiff/tif_dirinfo.c index d3199318..7217042c 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_dirinfo.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_dirinfo.c @@ -1,5 +1,3 @@ -/* $Id: tif_dirinfo.c,v 1.117 2012-08-19 16:56:34 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -38,14 +36,32 @@ * NOTE: The second field (field_readcount) and third field (field_writecount) * sometimes use the values TIFF_VARIABLE (-1), TIFF_VARIABLE2 (-3) * and TIFF_SPP (-2). The macros should be used but would throw off - * the formatting of the code, so please interprete the -1, -2 and -3 + * the formatting of the code, so please interpret the -1, -2 and -3 * values accordingly. */ -static TIFFFieldArray tiffFieldArray; -static TIFFFieldArray exifFieldArray; +/* const object should be initialized */ +#ifdef _MSC_VER +#pragma warning( push ) +#pragma warning( disable : 4132 ) +#endif +static const TIFFFieldArray tiffFieldArray; +static const TIFFFieldArray exifFieldArray; +static const TIFFFieldArray gpsFieldArray; +#ifdef _MSC_VER +#pragma warning( pop ) +#endif +/*--: Rational2Double: -- + * The Rational2Double upgraded libtiff functionality allows the definition and achievement of true double-precision accuracy + * for TIFF tags of RATIONAL type and field_bit=FIELD_CUSTOM using the set_field_type = TIFF_SETGET_DOUBLE. + * Unfortunately, that changes the old implemented interface for TIFFGetField(). + * In order to keep the old TIFFGetField() interface behavior those tags have to be redefined with set_field_type = TIFF_SETGET_FLOAT! + * + * Rational custom arrays are already defined as _Cxx_FLOAT, thus can stay. + * + */ -static TIFFField +static const TIFFField tiffFields[] = { { TIFFTAG_SUBFILETYPE, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_SUBFILETYPE, 1, 0, "SubfileType", NULL }, { TIFFTAG_OSUBFILETYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_SUBFILETYPE, 1, 0, "OldSubfileType", NULL }, @@ -69,12 +85,12 @@ tiffFields[] = { { TIFFTAG_STRIPBYTECOUNTS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_STRIPBYTECOUNTS, 0, 0, "StripByteCounts", NULL }, { TIFFTAG_MINSAMPLEVALUE, -2, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_MINSAMPLEVALUE, 1, 0, "MinSampleValue", NULL }, { TIFFTAG_MAXSAMPLEVALUE, -2, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_MAXSAMPLEVALUE, 1, 0, "MaxSampleValue", NULL }, - { TIFFTAG_XRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_RESOLUTION, 1, 0, "XResolution", NULL }, - { TIFFTAG_YRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_RESOLUTION, 1, 0, "YResolution", NULL }, + { TIFFTAG_XRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_RESOLUTION, 1, 0, "XResolution", NULL }, + { TIFFTAG_YRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_RESOLUTION, 1, 0, "YResolution", NULL }, { TIFFTAG_PLANARCONFIG, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_PLANARCONFIG, 0, 0, "PlanarConfiguration", NULL }, { TIFFTAG_PAGENAME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "PageName", NULL }, - { TIFFTAG_XPOSITION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_POSITION, 1, 0, "XPosition", NULL }, - { TIFFTAG_YPOSITION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_POSITION, 1, 0, "YPosition", NULL }, + { TIFFTAG_XPOSITION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_POSITION, 1, 0, "XPosition", NULL }, + { TIFFTAG_YPOSITION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_POSITION, 1, 0, "YPosition", NULL }, { TIFFTAG_FREEOFFSETS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 0, 0, "FreeOffsets", NULL }, { TIFFTAG_FREEBYTECOUNTS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 0, 0, "FreeByteCounts", NULL }, { TIFFTAG_GRAYRESPONSEUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 1, 0, "GrayResponseUnit", NULL }, @@ -95,7 +111,7 @@ tiffFields[] = { { TIFFTAG_TILELENGTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_TILEDIMENSIONS, 0, 0, "TileLength", NULL }, { TIFFTAG_TILEOFFSETS, -1, 1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_STRIPOFFSETS, 0, 0, "TileOffsets", NULL }, { TIFFTAG_TILEBYTECOUNTS, -1, 1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_STRIPBYTECOUNTS, 0, 0, "TileByteCounts", NULL }, - { TIFFTAG_SUBIFD, -1, -1, TIFF_IFD8, 0, TIFF_SETGET_C16_IFD8, TIFF_SETGET_UNDEFINED, FIELD_SUBIFD, 1, 1, "SubIFD", &tiffFieldArray }, + { TIFFTAG_SUBIFD, -1, -1, TIFF_IFD8, 0, TIFF_SETGET_C16_IFD8, TIFF_SETGET_UNDEFINED, FIELD_SUBIFD, 1, 1, "SubIFD", (TIFFFieldArray*) &tiffFieldArray }, { TIFFTAG_INKSET, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "InkSet", NULL }, { TIFFTAG_INKNAMES, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_C16_ASCII, TIFF_SETGET_UNDEFINED, FIELD_INKNAMES, 1, 1, "InkNames", NULL }, { TIFFTAG_NUMBEROFINKS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "NumberOfInks", NULL }, @@ -128,13 +144,19 @@ tiffFields[] = { { TIFFTAG_PIXAR_FOVCOT, 1, 1, TIFF_FLOAT, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FieldOfViewCotangent", NULL }, { TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN, 16, 16, TIFF_FLOAT, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MatrixWorldToScreen", NULL }, { TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA, 16, 16, TIFF_FLOAT, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MatrixWorldToCamera", NULL }, + { TIFFTAG_CFAREPEATPATTERNDIM, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CFARepeatPatternDim", NULL }, + { TIFFTAG_CFAPATTERN, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "CFAPattern" , NULL}, { TIFFTAG_COPYRIGHT, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Copyright", NULL }, /* end Pixar tags */ - { TIFFTAG_RICHTIFFIPTC, -3, -3, TIFF_LONG, 0, TIFF_SETGET_C32_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "RichTIFFIPTC", NULL }, + { TIFFTAG_RICHTIFFIPTC, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "RichTIFFIPTC", NULL }, { TIFFTAG_PHOTOSHOP, -3, -3, TIFF_BYTE, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "Photoshop", NULL }, - { TIFFTAG_EXIFIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "EXIFIFDOffset", &exifFieldArray }, + /*--: EXIFIFD and GPSIFD specified as TIFF_LONG by Aware-Systems and not TIFF_IFD8 as in original LibTiff. + * However, for IFD-like tags, libtiff uses the data type TIFF_IFD8 in tiffFields[]-tag definition combined with + * a special handling procedure in order to write either a 32-bit value and the TIFF_IFD type-id into ClassicTIFF files + * or a 64-bit value and the TIFF_IFD8 type-id into BigTIFF files. */ + { TIFFTAG_EXIFIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EXIFIFDOffset", (TIFFFieldArray*) &exifFieldArray }, { TIFFTAG_ICCPROFILE, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ICC Profile", NULL }, - { TIFFTAG_GPSIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "GPSIFDOffset", NULL }, + { TIFFTAG_GPSIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "GPSIFDOffset", (TIFFFieldArray*) &gpsFieldArray }, { TIFFTAG_FAXRECVPARAMS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UINT32, FIELD_CUSTOM, TRUE, FALSE, "FaxRecvParams", NULL }, { TIFFTAG_FAXSUBADDRESS, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_ASCII, FIELD_CUSTOM, TRUE, FALSE, "FaxSubAddress", NULL }, { TIFFTAG_FAXRECVTIME, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UINT32, FIELD_CUSTOM, TRUE, FALSE, "FaxRecvTime", NULL }, @@ -155,7 +177,7 @@ tiffFields[] = { { TIFFTAG_BLACKLEVELDELTAV, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "BlackLevelDeltaV", NULL }, { TIFFTAG_WHITELEVEL, -1, -1, TIFF_LONG, 0, TIFF_SETGET_C16_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "WhiteLevel", NULL }, { TIFFTAG_DEFAULTSCALE, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DefaultScale", NULL }, - { TIFFTAG_BESTQUALITYSCALE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BestQualityScale", NULL }, + { TIFFTAG_BESTQUALITYSCALE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BestQualityScale", NULL }, { TIFFTAG_DEFAULTCROPORIGIN, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DefaultCropOrigin", NULL }, { TIFFTAG_DEFAULTCROPSIZE, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DefaultCropSize", NULL }, { TIFFTAG_COLORMATRIX1, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ColorMatrix1", NULL }, @@ -167,16 +189,16 @@ tiffFields[] = { { TIFFTAG_ANALOGBALANCE, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "AnalogBalance", NULL }, { TIFFTAG_ASSHOTNEUTRAL, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "AsShotNeutral", NULL }, { TIFFTAG_ASSHOTWHITEXY, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "AsShotWhiteXY", NULL }, - { TIFFTAG_BASELINEEXPOSURE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BaselineExposure", NULL }, - { TIFFTAG_BASELINENOISE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BaselineNoise", NULL }, - { TIFFTAG_BASELINESHARPNESS, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BaselineSharpness", NULL }, + { TIFFTAG_BASELINEEXPOSURE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BaselineExposure", NULL }, + { TIFFTAG_BASELINENOISE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BaselineNoise", NULL }, + { TIFFTAG_BASELINESHARPNESS, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BaselineSharpness", NULL }, { TIFFTAG_BAYERGREENSPLIT, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BayerGreenSplit", NULL }, - { TIFFTAG_LINEARRESPONSELIMIT, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "LinearResponseLimit", NULL }, + { TIFFTAG_LINEARRESPONSELIMIT, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "LinearResponseLimit", NULL }, { TIFFTAG_CAMERASERIALNUMBER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CameraSerialNumber", NULL }, { TIFFTAG_LENSINFO, 4, 4, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "LensInfo", NULL }, - { TIFFTAG_CHROMABLURRADIUS, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ChromaBlurRadius", NULL }, - { TIFFTAG_ANTIALIASSTRENGTH, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "AntiAliasStrength", NULL }, - { TIFFTAG_SHADOWSCALE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ShadowScale", NULL }, + { TIFFTAG_CHROMABLURRADIUS, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ChromaBlurRadius", NULL }, + { TIFFTAG_ANTIALIASSTRENGTH, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "AntiAliasStrength", NULL }, + { TIFFTAG_SHADOWSCALE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ShadowScale", NULL }, { TIFFTAG_DNGPRIVATEDATA, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "DNGPrivateData", NULL }, { TIFFTAG_MAKERNOTESAFETY, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "MakerNoteSafety", NULL }, { TIFFTAG_CALIBRATIONILLUMINANT1, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CalibrationIlluminant1", NULL }, @@ -193,63 +215,84 @@ tiffFields[] = { { TIFFTAG_PERSAMPLE, 0, 0, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, TRUE, FALSE, "PerSample", NULL}, /* end DNG tags */ /* begin TIFF/FX tags */ - { TIFFTAG_INDEXED, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "Indexed" }, - { TIFFTAG_GLOBALPARAMETERSIFD, 1, 1, TIFF_IFD, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "GlobalParametersIFD", NULL }, - { TIFFTAG_PROFILETYPE, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ProfileType", NULL }, - { TIFFTAG_FAXPROFILE, 1, 1, TIFF_BYTE, 0, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "FaxProfile", NULL }, - { TIFFTAG_CODINGMETHODS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CodingMethods", NULL }, - { TIFFTAG_VERSIONYEAR, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "VersionYear", NULL }, - { TIFFTAG_MODENUMBER, 1, 1, TIFF_BYTE, 0, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ModeNumber", NULL }, - { TIFFTAG_DECODE, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "Decode", NULL }, - { TIFFTAG_IMAGEBASECOLOR, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ImageBaseColor", NULL }, - { TIFFTAG_T82OPTIONS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "T82Options", NULL }, - { TIFFTAG_STRIPROWCOUNTS, -1, -1, TIFF_LONG, 0, TIFF_SETGET_C16_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "StripRowCounts", NULL }, - { TIFFTAG_IMAGELAYER, 2, 2, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ImageLayer", NULL }, - /* end DNG tags */ + { TIFFTAG_INDEXED, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "Indexed", NULL }, + { TIFFTAG_GLOBALPARAMETERSIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "GlobalParametersIFD", NULL }, + { TIFFTAG_PROFILETYPE, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ProfileType", NULL }, + { TIFFTAG_FAXPROFILE, 1, 1, TIFF_BYTE, 0, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "FaxProfile", NULL }, + { TIFFTAG_CODINGMETHODS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CodingMethods", NULL }, + { TIFFTAG_VERSIONYEAR, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "VersionYear", NULL }, + { TIFFTAG_MODENUMBER, 1, 1, TIFF_BYTE, 0, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ModeNumber", NULL }, + { TIFFTAG_DECODE, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "Decode", NULL }, + { TIFFTAG_IMAGEBASECOLOR, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ImageBaseColor", NULL }, + { TIFFTAG_T82OPTIONS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "T82Options", NULL }, + { TIFFTAG_STRIPROWCOUNTS, -1, -1, TIFF_LONG, 0, TIFF_SETGET_C16_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "StripRowCounts", NULL }, + { TIFFTAG_IMAGELAYER, 2, 2, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ImageLayer", NULL }, + /* end TIFF/FX tags */ /* begin pseudo tags */ }; -static TIFFField +/* + * EXIF tags (Version 2.31, July 2016 plus version 2.32 May 2019) + */ +static const TIFFField exifFields[] = { - { EXIFTAG_EXPOSURETIME, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureTime", NULL }, - { EXIFTAG_FNUMBER, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FNumber", NULL }, + { EXIFTAG_EXPOSURETIME, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureTime", NULL }, + { EXIFTAG_FNUMBER, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FNumber", NULL }, { EXIFTAG_EXPOSUREPROGRAM, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureProgram", NULL }, { EXIFTAG_SPECTRALSENSITIVITY, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SpectralSensitivity", NULL }, { EXIFTAG_ISOSPEEDRATINGS, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ISOSpeedRatings", NULL }, { EXIFTAG_OECF, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "OptoelectricConversionFactor", NULL }, + { EXIFTAG_SENSITIVITYTYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SensitivityType", NULL }, + { EXIFTAG_STANDARDOUTPUTSENSITIVITY, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "StandardOutputSensitivity", NULL }, + { EXIFTAG_RECOMMENDEDEXPOSUREINDEX, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "RecommendedExposureIndex", NULL }, + { EXIFTAG_ISOSPEED, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ISOSpeed", NULL }, + { EXIFTAG_ISOSPEEDLATITUDEYYY, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ISOSpeedLatitudeyyy", NULL }, + { EXIFTAG_ISOSPEEDLATITUDEZZZ, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ISOSpeedLatitudezzz", NULL }, { EXIFTAG_EXIFVERSION, 4, 4, TIFF_UNDEFINED, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExifVersion", NULL }, { EXIFTAG_DATETIMEORIGINAL, 20, 20, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DateTimeOriginal", NULL }, { EXIFTAG_DATETIMEDIGITIZED, 20, 20, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DateTimeDigitized", NULL }, + { EXIFTAG_OFFSETTIME, 7, 7, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "OffsetTime", NULL }, + { EXIFTAG_OFFSETTIMEORIGINAL, 7, 7, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "OffsetTimeOriginal", NULL }, + { EXIFTAG_OFFSETTIMEDIGITIZED, 7, 7, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "OffsetTimeDigitized", NULL }, { EXIFTAG_COMPONENTSCONFIGURATION, 4, 4, TIFF_UNDEFINED, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ComponentsConfiguration", NULL }, - { EXIFTAG_COMPRESSEDBITSPERPIXEL, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CompressedBitsPerPixel", NULL }, - { EXIFTAG_SHUTTERSPEEDVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ShutterSpeedValue", NULL }, - { EXIFTAG_APERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ApertureValue", NULL }, - { EXIFTAG_BRIGHTNESSVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "BrightnessValue", NULL }, - { EXIFTAG_EXPOSUREBIASVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureBiasValue", NULL }, - { EXIFTAG_MAXAPERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MaxApertureValue", NULL }, - { EXIFTAG_SUBJECTDISTANCE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubjectDistance", NULL }, + { EXIFTAG_COMPRESSEDBITSPERPIXEL, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CompressedBitsPerPixel", NULL }, + { EXIFTAG_SHUTTERSPEEDVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ShutterSpeedValue", NULL }, + { EXIFTAG_APERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ApertureValue", NULL }, + { EXIFTAG_BRIGHTNESSVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "BrightnessValue", NULL }, + { EXIFTAG_EXPOSUREBIASVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureBiasValue", NULL }, + { EXIFTAG_MAXAPERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MaxApertureValue", NULL }, + /*--: EXIFTAG_SUBJECTDISTANCE: LibTiff returns value of "-1" if numerator equals 4294967295 (0xFFFFFFFF) to indicate infinite distance! + * However, there are two other EXIF tags where numerator indicates a special value and six other cases where the denominator indicates special values, + * which are not treated within LibTiff!! */ + { EXIFTAG_SUBJECTDISTANCE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubjectDistance", NULL }, { EXIFTAG_METERINGMODE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MeteringMode", NULL }, { EXIFTAG_LIGHTSOURCE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LightSource", NULL }, { EXIFTAG_FLASH, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Flash", NULL }, - { EXIFTAG_FOCALLENGTH, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalLength", NULL }, + { EXIFTAG_FOCALLENGTH, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalLength", NULL }, { EXIFTAG_SUBJECTAREA, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "SubjectArea", NULL }, { EXIFTAG_MAKERNOTE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "MakerNote", NULL }, { EXIFTAG_USERCOMMENT, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "UserComment", NULL }, { EXIFTAG_SUBSECTIME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubSecTime", NULL }, { EXIFTAG_SUBSECTIMEORIGINAL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubSecTimeOriginal", NULL }, { EXIFTAG_SUBSECTIMEDIGITIZED, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubSecTimeDigitized", NULL }, + { EXIFTAG_TEMPERATURE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Temperature", NULL }, + { EXIFTAG_HUMIDITY, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Humidity", NULL }, + { EXIFTAG_PRESSURE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Pressure", NULL }, + { EXIFTAG_WATERDEPTH, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "WaterDepth", NULL }, + { EXIFTAG_ACCELERATION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Acceleration", NULL }, + { EXIFTAG_CAMERAELEVATIONANGLE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CameraElevationAngle", NULL }, { EXIFTAG_FLASHPIXVERSION, 4, 4, TIFF_UNDEFINED, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FlashpixVersion", NULL }, { EXIFTAG_COLORSPACE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ColorSpace", NULL }, { EXIFTAG_PIXELXDIMENSION, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "PixelXDimension", NULL }, { EXIFTAG_PIXELYDIMENSION, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "PixelYDimension", NULL }, { EXIFTAG_RELATEDSOUNDFILE, 13, 13, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "RelatedSoundFile", NULL }, - { EXIFTAG_FLASHENERGY, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FlashEnergy", NULL }, + { EXIFTAG_FLASHENERGY, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FlashEnergy", NULL }, { EXIFTAG_SPATIALFREQUENCYRESPONSE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "SpatialFrequencyResponse", NULL }, - { EXIFTAG_FOCALPLANEXRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalPlaneXResolution", NULL }, - { EXIFTAG_FOCALPLANEYRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalPlaneYResolution", NULL }, + { EXIFTAG_FOCALPLANEXRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalPlaneXResolution", NULL }, + { EXIFTAG_FOCALPLANEYRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalPlaneYResolution", NULL }, { EXIFTAG_FOCALPLANERESOLUTIONUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalPlaneResolutionUnit", NULL }, { EXIFTAG_SUBJECTLOCATION, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubjectLocation", NULL }, - { EXIFTAG_EXPOSUREINDEX, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureIndex", NULL }, + { EXIFTAG_EXPOSUREINDEX, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureIndex", NULL }, { EXIFTAG_SENSINGMETHOD, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SensingMethod", NULL }, { EXIFTAG_FILESOURCE, 1, 1, TIFF_UNDEFINED, 0, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FileSource", NULL }, { EXIFTAG_SCENETYPE, 1, 1, TIFF_UNDEFINED, 0, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SceneType", NULL }, @@ -257,25 +300,82 @@ exifFields[] = { { EXIFTAG_CUSTOMRENDERED, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CustomRendered", NULL }, { EXIFTAG_EXPOSUREMODE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureMode", NULL }, { EXIFTAG_WHITEBALANCE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "WhiteBalance", NULL }, - { EXIFTAG_DIGITALZOOMRATIO, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DigitalZoomRatio", NULL }, + { EXIFTAG_DIGITALZOOMRATIO, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DigitalZoomRatio", NULL }, { EXIFTAG_FOCALLENGTHIN35MMFILM, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalLengthIn35mmFilm", NULL }, { EXIFTAG_SCENECAPTURETYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SceneCaptureType", NULL }, - { EXIFTAG_GAINCONTROL, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "GainControl", NULL }, + { EXIFTAG_GAINCONTROL, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "GainControl", NULL }, { EXIFTAG_CONTRAST, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Contrast", NULL }, { EXIFTAG_SATURATION, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Saturation", NULL }, { EXIFTAG_SHARPNESS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Sharpness", NULL }, { EXIFTAG_DEVICESETTINGDESCRIPTION, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "DeviceSettingDescription", NULL }, { EXIFTAG_SUBJECTDISTANCERANGE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubjectDistanceRange", NULL }, - { EXIFTAG_IMAGEUNIQUEID, 33, 33, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ImageUniqueID", NULL } + { EXIFTAG_IMAGEUNIQUEID, 33, 33, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ImageUniqueID", NULL }, + { EXIFTAG_CAMERAOWNERNAME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CameraOwnerName", NULL }, + { EXIFTAG_BODYSERIALNUMBER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "BodySerialNumber", NULL }, + { EXIFTAG_LENSSPECIFICATION, 4, 4, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LensSpecification", NULL }, + { EXIFTAG_LENSMAKE, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LensMake", NULL }, + { EXIFTAG_LENSMODEL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LensModel", NULL }, + { EXIFTAG_LENSSERIALNUMBER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LensSerialNumber", NULL }, + { EXIFTAG_GAMMA, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Gamma", NULL }, + { EXIFTAG_COMPOSITEIMAGE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CompositeImage", NULL }, + { EXIFTAG_SOURCEIMAGENUMBEROFCOMPOSITEIMAGE, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SourceImageNumberOfCompositeImage", NULL }, + { EXIFTAG_SOURCEEXPOSURETIMESOFCOMPOSITEIMAGE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "SourceExposureTimesOfCompositeImage", NULL } +}; +/* + * EXIF-GPS tags (Version 2.31, July 2016; nothing changed for version 2.32 May 2019) + */ + +static TIFFField +gpsFields[] = { + /* For the GPS tag definitions in gpsFields[] the standard definition for Rationals is TIFF_SETGET_DOUBLE and TIFF_SETGET_C0_FLOAT. + *-- ATTENTION: After the upgrade with Rational2Double, the GPSTAG values can now be written and also read in double precision! + * In order to achieve double precision for GPS tags: + * Standard definitions for GPSTAG is kept to TIFF_SETGET_DOUBLE + * and TIFF_SETGET_C0_FLOAT is changed to TIFF_SETGET_C0_DOUBLE. + */ + { GPSTAG_VERSIONID , 4, 4, TIFF_BYTE , 0, TIFF_SETGET_C0_UINT8 , TIFF_SETGET_UINT8 , FIELD_CUSTOM , 1, 0, "VersionID", NULL }, + { GPSTAG_LATITUDEREF , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "LatitudeRef", NULL }, + { GPSTAG_LATITUDE , 3, 3, TIFF_RATIONAL , 0, TIFF_SETGET_C0_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "Latitude", NULL }, + { GPSTAG_LONGITUDEREF , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "LongitudeRef", NULL }, + { GPSTAG_LONGITUDE , 3, 3, TIFF_RATIONAL , 0, TIFF_SETGET_C0_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "Longitude", NULL }, + { GPSTAG_ALTITUDEREF , 1, 1, TIFF_BYTE , 0, TIFF_SETGET_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "AltitudeRef", NULL }, + { GPSTAG_ALTITUDE , 1, 1, TIFF_RATIONAL , 0, TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "Altitude", NULL }, + { GPSTAG_TIMESTAMP , 3, 3, TIFF_RATIONAL , 0, TIFF_SETGET_C0_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "TimeStamp", NULL }, + { GPSTAG_SATELLITES , -1, -1, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "Satellites", NULL }, + { GPSTAG_STATUS , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "Status", NULL }, + { GPSTAG_MEASUREMODE , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "MeasureMode", NULL }, + { GPSTAG_DOP , 1, 1, TIFF_RATIONAL , 0, TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DOP", NULL }, + { GPSTAG_SPEEDREF , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "SpeedRef", NULL }, + { GPSTAG_SPEED , 1, 1, TIFF_RATIONAL , 0, TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "Speed", NULL }, + { GPSTAG_TRACKREF , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "TrackRef", NULL }, + { GPSTAG_TRACK , 1, 1, TIFF_RATIONAL , 0, TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "Track", NULL }, + { GPSTAG_IMGDIRECTIONREF , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "ImgDirectionRef", NULL }, + { GPSTAG_IMGDIRECTION , 1, 1, TIFF_RATIONAL , 0, TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "ImgDirection", NULL }, + { GPSTAG_MAPDATUM , -1, -1, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "MapDatum", NULL }, + { GPSTAG_DESTLATITUDEREF , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DestLatitudeRef", NULL }, + { GPSTAG_DESTLATITUDE , 3, 3, TIFF_RATIONAL , 0, TIFF_SETGET_C0_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DestLatitude", NULL }, + { GPSTAG_DESTLONGITUDEREF , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DestLongitudeRef", NULL }, + { GPSTAG_DESTLONGITUDE , 3, 3, TIFF_RATIONAL , 0, TIFF_SETGET_C0_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DestLongitude", NULL }, + { GPSTAG_DESTBEARINGREF , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DestBearingRef", NULL }, + { GPSTAG_DESTBEARING , 1, 1, TIFF_RATIONAL , 0, TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DestBearing", NULL }, + { GPSTAG_DESTDISTANCEREF , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DestDistanceRef", NULL }, + { GPSTAG_DESTDISTANCE , 1, 1, TIFF_RATIONAL , 0, TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DestDistance", NULL }, + { GPSTAG_PROCESSINGMETHOD , -1, -1, TIFF_UNDEFINED , 0, TIFF_SETGET_C16_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 1, "ProcessingMethod", NULL }, + { GPSTAG_AREAINFORMATION , -1, -1, TIFF_UNDEFINED , 0, TIFF_SETGET_C16_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 1, "AreaInformation", NULL }, + { GPSTAG_DATESTAMP , 11, 11, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DateStamp", NULL }, + { GPSTAG_DIFFERENTIAL , 1, 1, TIFF_SHORT , 0, TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "Differential", NULL }, + { GPSTAG_GPSHPOSITIONINGERROR , 1, 1, TIFF_RATIONAL , 0, TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "HorizontalPositioningError", NULL } }; -static TIFFFieldArray -tiffFieldArray = { tfiatImage, 0, TIFFArrayCount(tiffFields), tiffFields }; -static TIFFFieldArray -exifFieldArray = { tfiatExif, 0, TIFFArrayCount(exifFields), exifFields }; +static const TIFFFieldArray +tiffFieldArray = { tfiatImage, 0, TIFFArrayCount(tiffFields), (TIFFField*) tiffFields }; +static const TIFFFieldArray +exifFieldArray = { tfiatExif, 0, TIFFArrayCount(exifFields), (TIFFField*) exifFields }; +static const TIFFFieldArray +gpsFieldArray = { tfiatGps, 0, TIFFArrayCount(gpsFields), (TIFFField*) gpsFields }; /* - * We have our own local lfind() equivelent to avoid subtle differences + * We have our own local lfind() equivalent to avoid subtle differences * in types passed to lfind() on different systems. */ @@ -305,6 +405,12 @@ _TIFFGetExifFields(void) return(&exifFieldArray); } +const TIFFFieldArray* +_TIFFGetGpsFields(void) +{ + return(&gpsFieldArray); +} + void _TIFFSetupFields(TIFF* tif, const TIFFFieldArray* fieldarray) { @@ -494,6 +600,82 @@ _TIFFDataSize(TIFFDataType type) } } +/* + * Rational2Double: + * Return size of TIFFSetGetFieldType in bytes. + * + * XXX: TIFF_RATIONAL values for FIELD_CUSTOM are stored internally as 4-byte float. + * However, some of them should be stored internally as 8-byte double. + * This is now managed by the SetGetField of the tag-definition! + */ +int +_TIFFSetGetFieldSize(TIFFSetGetFieldType setgettype) +{ + switch (setgettype) + { + case TIFF_SETGET_UNDEFINED: + case TIFF_SETGET_ASCII: + case TIFF_SETGET_C0_ASCII: + case TIFF_SETGET_C16_ASCII: + case TIFF_SETGET_C32_ASCII: + case TIFF_SETGET_OTHER: + return 0; + case TIFF_SETGET_UINT8: + case TIFF_SETGET_SINT8: + case TIFF_SETGET_C0_UINT8: + case TIFF_SETGET_C0_SINT8: + case TIFF_SETGET_C16_UINT8: + case TIFF_SETGET_C16_SINT8: + case TIFF_SETGET_C32_UINT8: + case TIFF_SETGET_C32_SINT8: + return 1; + case TIFF_SETGET_UINT16: + case TIFF_SETGET_SINT16: + case TIFF_SETGET_C0_UINT16: + case TIFF_SETGET_C0_SINT16: + case TIFF_SETGET_C16_UINT16: + case TIFF_SETGET_C16_SINT16: + case TIFF_SETGET_C32_UINT16: + case TIFF_SETGET_C32_SINT16: + return 2; + case TIFF_SETGET_INT: + case TIFF_SETGET_UINT32: + case TIFF_SETGET_SINT32: + case TIFF_SETGET_FLOAT: + case TIFF_SETGET_UINT16_PAIR: + case TIFF_SETGET_C0_UINT32: + case TIFF_SETGET_C0_SINT32: + case TIFF_SETGET_C0_FLOAT: + case TIFF_SETGET_C16_UINT32: + case TIFF_SETGET_C16_SINT32: + case TIFF_SETGET_C16_FLOAT: + case TIFF_SETGET_C32_UINT32: + case TIFF_SETGET_C32_SINT32: + case TIFF_SETGET_C32_FLOAT: + return 4; + case TIFF_SETGET_UINT64: + case TIFF_SETGET_SINT64: + case TIFF_SETGET_DOUBLE: + case TIFF_SETGET_IFD8: + case TIFF_SETGET_C0_UINT64: + case TIFF_SETGET_C0_SINT64: + case TIFF_SETGET_C0_DOUBLE: + case TIFF_SETGET_C0_IFD8: + case TIFF_SETGET_C16_UINT64: + case TIFF_SETGET_C16_SINT64: + case TIFF_SETGET_C16_DOUBLE: + case TIFF_SETGET_C16_IFD8: + case TIFF_SETGET_C32_UINT64: + case TIFF_SETGET_C32_SINT64: + case TIFF_SETGET_C32_DOUBLE: + case TIFF_SETGET_C32_IFD8: + return 8; + default: + return 0; + } +} /*-- _TIFFSetGetFieldSize --- */ + + const TIFFField* TIFFFindField(TIFF* tif, uint32 tag, TIFFDataType dt) { @@ -519,7 +701,7 @@ TIFFFindField(TIFF* tif, uint32 tag, TIFFDataType dt) return tif->tif_foundfield = (ret ? *ret : NULL); } -const TIFFField* +static const TIFFField* _TIFFFindFieldByName(TIFF* tif, const char *field_name, TIFFDataType dt) { TIFFField key = {0, 0, 0, TIFF_NOTYPE, 0, 0, 0, 0, 0, 0, NULL, NULL}; @@ -711,7 +893,7 @@ _TIFFCreateAnonField(TIFF *tif, uint32 tag, TIFFDataType field_type) * note that this name is a special sign to TIFFClose() and * _TIFFSetupFields() to free the field */ - sprintf(fld->field_name, "Tag %d", (int) tag); + (void) snprintf(fld->field_name, 32, "Tag %d", (int) tag); return fld; } @@ -946,6 +1128,118 @@ TIFFMergeFieldInfo(TIFF* tif, const TIFFFieldInfo info[], uint32 n) return 0; } +int +_TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag) +{ + /* Filter out non-codec specific tags */ + switch (tag) { + /* Shared tags */ + case TIFFTAG_PREDICTOR: + /* JPEG tags */ + case TIFFTAG_JPEGTABLES: + /* OJPEG tags */ + case TIFFTAG_JPEGIFOFFSET: + case TIFFTAG_JPEGIFBYTECOUNT: + case TIFFTAG_JPEGQTABLES: + case TIFFTAG_JPEGDCTABLES: + case TIFFTAG_JPEGACTABLES: + case TIFFTAG_JPEGPROC: + case TIFFTAG_JPEGRESTARTINTERVAL: + /* CCITT* */ + case TIFFTAG_BADFAXLINES: + case TIFFTAG_CLEANFAXDATA: + case TIFFTAG_CONSECUTIVEBADFAXLINES: + case TIFFTAG_GROUP3OPTIONS: + case TIFFTAG_GROUP4OPTIONS: + /* LERC */ + case TIFFTAG_LERC_PARAMETERS: + break; + default: + return 1; + } + /* Check if codec specific tags are allowed for the current + * compression scheme (codec) */ + switch (tif->tif_dir.td_compression) { + case COMPRESSION_LZW: + if (tag == TIFFTAG_PREDICTOR) + return 1; + break; + case COMPRESSION_PACKBITS: + /* No codec-specific tags */ + break; + case COMPRESSION_THUNDERSCAN: + /* No codec-specific tags */ + break; + case COMPRESSION_NEXT: + /* No codec-specific tags */ + break; + case COMPRESSION_JPEG: + if (tag == TIFFTAG_JPEGTABLES) + return 1; + break; + case COMPRESSION_OJPEG: + switch (tag) { + case TIFFTAG_JPEGIFOFFSET: + case TIFFTAG_JPEGIFBYTECOUNT: + case TIFFTAG_JPEGQTABLES: + case TIFFTAG_JPEGDCTABLES: + case TIFFTAG_JPEGACTABLES: + case TIFFTAG_JPEGPROC: + case TIFFTAG_JPEGRESTARTINTERVAL: + return 1; + } + break; + case COMPRESSION_CCITTRLE: + case COMPRESSION_CCITTRLEW: + case COMPRESSION_CCITTFAX3: + case COMPRESSION_CCITTFAX4: + switch (tag) { + case TIFFTAG_BADFAXLINES: + case TIFFTAG_CLEANFAXDATA: + case TIFFTAG_CONSECUTIVEBADFAXLINES: + return 1; + case TIFFTAG_GROUP3OPTIONS: + if (tif->tif_dir.td_compression == COMPRESSION_CCITTFAX3) + return 1; + break; + case TIFFTAG_GROUP4OPTIONS: + if (tif->tif_dir.td_compression == COMPRESSION_CCITTFAX4) + return 1; + break; + } + break; + case COMPRESSION_JBIG: + /* No codec-specific tags */ + break; + case COMPRESSION_DEFLATE: + case COMPRESSION_ADOBE_DEFLATE: + if (tag == TIFFTAG_PREDICTOR) + return 1; + break; + case COMPRESSION_PIXARLOG: + if (tag == TIFFTAG_PREDICTOR) + return 1; + break; + case COMPRESSION_SGILOG: + case COMPRESSION_SGILOG24: + /* No codec-specific tags */ + break; + case COMPRESSION_LZMA: + if (tag == TIFFTAG_PREDICTOR) + return 1; + break; + case COMPRESSION_ZSTD: + if (tag == TIFFTAG_PREDICTOR) + return 1; + break; + case COMPRESSION_LERC: + if (tag == TIFFTAG_LERC_PARAMETERS) + return 1; + break; + } + return 0; +} + /* vim: set ts=8 sts=8 sw=8 noet: */ /* diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_dirread.c b/thirdparty/tiff-4.2.0/libtiff/tif_dirread.c similarity index 73% rename from thirdparty/tiff-4.0.3/libtiff/tif_dirread.c rename to thirdparty/tiff-4.2.0/libtiff/tif_dirread.c index 19a26e27..ba127ca9 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_dirread.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_dirread.c @@ -1,5 +1,3 @@ -/* $Id: tif_dirread.c,v 1.178 2012-08-19 16:56:34 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -31,19 +29,22 @@ */ /* Suggested pending improvements: - * - add a field 'ignore' to the TIFFDirEntry structure, to flag status, - * eliminating current use of the IGNORE value, and therefore eliminating - * current irrational behaviour on tags with tag id code 0 * - add a field 'field_info' to the TIFFDirEntry structure, and set that with * the pointer to the appropriate TIFFField structure early on in * TIFFReadDirectory, so as to eliminate current possibly repetitive lookup. */ #include "tiffiop.h" +#include +#include -#define IGNORE 0 /* tag placeholder used below */ #define FAILED_FII ((uint32) -1) +/* + * Largest 64-bit signed integer value. + */ +#define TIFF_INT64_MAX ((int64)(TIFF_UINT64_MAX >> 1)) + #ifdef HAVE_IEEEFP # define TIFFCvtIEEEFloatToNative(tif, n, fp) # define TIFFCvtIEEEDoubleToNative(tif, n, dp) @@ -164,7 +165,11 @@ static int TIFFFetchNormalTag(TIFF*, TIFFDirEntry*, int recover); static int TIFFFetchStripThing(TIFF* tif, TIFFDirEntry* dir, uint32 nstrips, uint64** lpp); static int TIFFFetchSubjectDistance(TIFF*, TIFFDirEntry*); static void ChopUpSingleUncompressedStrip(TIFF*); +static void TryChopUpUncompressedBigTiff(TIFF*); static uint64 TIFFReadUInt64(const uint8 *value); +static int _TIFFGetMaxColorChannels(uint16 photometric); + +static int _TIFFFillStrilesInternal( TIFF *tif, int loadStripByteCount ); typedef union _UInt64Aligned_t { @@ -202,6 +207,7 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryByte(TIFF* tif, TIFFDirEntry* di switch (direntry->tdir_type) { case TIFF_BYTE: + case TIFF_UNDEFINED: /* Support to read TIFF_UNDEFINED with field_readcount==1 */ TIFFReadDirEntryCheckedByte(tif,direntry,value); return(TIFFReadDirEntryErrOk); case TIFF_SBYTE: @@ -633,6 +639,8 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryFloat(TIFF* tif, TIFFDirEntry* d err=TIFFReadDirEntryCheckedDouble(tif,direntry,&m); if (err!=TIFFReadDirEntryErrOk) return(err); + if ((m > FLT_MAX) || (m < -FLT_MAX)) + return(TIFFReadDirEntryErrRange); *value=(float)m; return(TIFFReadDirEntryErrOk); } @@ -762,38 +770,125 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryIfd8(TIFF* tif, TIFFDirEntry* di } } -static enum TIFFReadDirEntryErr TIFFReadDirEntryArray(TIFF* tif, TIFFDirEntry* direntry, uint32* count, uint32 desttypesize, void** value) + +#define INITIAL_THRESHOLD (1024 * 1024) +#define THRESHOLD_MULTIPLIER 10 +#define MAX_THRESHOLD (THRESHOLD_MULTIPLIER * THRESHOLD_MULTIPLIER * THRESHOLD_MULTIPLIER * INITIAL_THRESHOLD) + +static enum TIFFReadDirEntryErr TIFFReadDirEntryDataAndRealloc( + TIFF* tif, uint64 offset, tmsize_t size, void** pdest) +{ +#if SIZEOF_SIZE_T == 8 + tmsize_t threshold = INITIAL_THRESHOLD; +#endif + tmsize_t already_read = 0; + + assert( !isMapped(tif) ); + + if (!SeekOK(tif,offset)) + return(TIFFReadDirEntryErrIo); + + /* On 64 bit processes, read first a maximum of 1 MB, then 10 MB, etc */ + /* so as to avoid allocating too much memory in case the file is too */ + /* short. We could ask for the file size, but this might be */ + /* expensive with some I/O layers (think of reading a gzipped file) */ + /* Restrict to 64 bit processes, so as to avoid reallocs() */ + /* on 32 bit processes where virtual memory is scarce. */ + while( already_read < size ) + { + void* new_dest; + tmsize_t bytes_read; + tmsize_t to_read = size - already_read; +#if SIZEOF_SIZE_T == 8 + if( to_read >= threshold && threshold < MAX_THRESHOLD ) + { + to_read = threshold; + threshold *= THRESHOLD_MULTIPLIER; + } +#endif + + new_dest = (uint8*) _TIFFrealloc( + *pdest, already_read + to_read); + if( new_dest == NULL ) + { + TIFFErrorExt(tif->tif_clientdata, tif->tif_name, + "Failed to allocate memory for %s " + "(%ld elements of %ld bytes each)", + "TIFFReadDirEntryArray", + (long) 1, (long) (already_read + to_read)); + return TIFFReadDirEntryErrAlloc; + } + *pdest = new_dest; + + bytes_read = TIFFReadFile(tif, + (char*)*pdest + already_read, to_read); + already_read += bytes_read; + if (bytes_read != to_read) { + return TIFFReadDirEntryErrIo; + } + } + return TIFFReadDirEntryErrOk; +} + +static enum TIFFReadDirEntryErr TIFFReadDirEntryArrayWithLimit( + TIFF* tif, TIFFDirEntry* direntry, uint32* count, uint32 desttypesize, + void** value, uint64 maxcount) { int typesize; uint32 datasize; void* data; + uint64 target_count64; + int original_datasize_clamped; typesize=TIFFDataWidth(direntry->tdir_type); - if ((direntry->tdir_count==0)||(typesize==0)) + + target_count64 = (direntry->tdir_count > maxcount) ? + maxcount : direntry->tdir_count; + + if ((target_count64==0)||(typesize==0)) { *value=0; return(TIFFReadDirEntryErrOk); } (void) desttypesize; + /* We just want to know if the original tag size is more than 4 bytes + * (classic TIFF) or 8 bytes (BigTIFF) + */ + original_datasize_clamped = + ((direntry->tdir_count > 10) ? 10 : (int)direntry->tdir_count) * typesize; + /* * As a sanity check, make sure we have no more than a 2GB tag array * in either the current data type or the dest data type. This also * avoids problems with overflow of tmsize_t on 32bit systems. */ - if ((uint64)(2147483647/typesize)tdir_count) + if ((uint64)(2147483647/typesize)tdir_count) + if ((uint64)(2147483647/desttypesize)tdir_count; + *count=(uint32)target_count64; datasize=(*count)*typesize; assert((tmsize_t)datasize>0); - data=_TIFFCheckMalloc(tif, *count, typesize, "ReadDirEntryArray"); - if (data==0) - return(TIFFReadDirEntryErrAlloc); + + if( isMapped(tif) && datasize > (uint64)tif->tif_size ) + return TIFFReadDirEntryErrIo; + + if( !isMapped(tif) && + (((tif->tif_flags&TIFF_BIGTIFF) && datasize > 8) || + (!(tif->tif_flags&TIFF_BIGTIFF) && datasize > 4)) ) + { + data = NULL; + } + else + { + data=_TIFFCheckMalloc(tif, *count, typesize, "ReadDirEntryArray"); + if (data==0) + return(TIFFReadDirEntryErrAlloc); + } if (!(tif->tif_flags&TIFF_BIGTIFF)) { - if (datasize<=4) + if (original_datasize_clamped<=4) _TIFFmemcpy(data,&direntry->tdir_offset,datasize); else { @@ -801,7 +896,10 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryArray(TIFF* tif, TIFFDirEntry* d uint32 offset = direntry->tdir_offset.toff_long; if (tif->tif_flags&TIFF_SWAB) TIFFSwabLong(&offset); - err=TIFFReadDirEntryData(tif,(uint64)offset,(tmsize_t)datasize,data); + if( isMapped(tif) ) + err=TIFFReadDirEntryData(tif,(uint64)offset,(tmsize_t)datasize,data); + else + err=TIFFReadDirEntryDataAndRealloc(tif,(uint64)offset,(tmsize_t)datasize,&data); if (err!=TIFFReadDirEntryErrOk) { _TIFFfree(data); @@ -811,7 +909,7 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryArray(TIFF* tif, TIFFDirEntry* d } else { - if (datasize<=8) + if (original_datasize_clamped<=8) _TIFFmemcpy(data,&direntry->tdir_offset,datasize); else { @@ -819,7 +917,10 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryArray(TIFF* tif, TIFFDirEntry* d uint64 offset = direntry->tdir_offset.toff_long8; if (tif->tif_flags&TIFF_SWAB) TIFFSwabLong8(&offset); - err=TIFFReadDirEntryData(tif,offset,(tmsize_t)datasize,data); + if( isMapped(tif) ) + err=TIFFReadDirEntryData(tif,(uint64)offset,(tmsize_t)datasize,data); + else + err=TIFFReadDirEntryDataAndRealloc(tif,(uint64)offset,(tmsize_t)datasize,&data); if (err!=TIFFReadDirEntryErrOk) { _TIFFfree(data); @@ -831,6 +932,12 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryArray(TIFF* tif, TIFFDirEntry* d return(TIFFReadDirEntryErrOk); } +static enum TIFFReadDirEntryErr TIFFReadDirEntryArray(TIFF* tif, TIFFDirEntry* direntry, uint32* count, uint32 desttypesize, void** value) +{ + return TIFFReadDirEntryArrayWithLimit(tif, direntry, count, + desttypesize, value, ~((uint64)0)); +} + static enum TIFFReadDirEntryErr TIFFReadDirEntryByteArray(TIFF* tif, TIFFDirEntry* direntry, uint8** value) { enum TIFFReadDirEntryErr err; @@ -1860,7 +1967,8 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntrySlongArray(TIFF* tif, TIFFDirEnt return(TIFFReadDirEntryErrOk); } -static enum TIFFReadDirEntryErr TIFFReadDirEntryLong8Array(TIFF* tif, TIFFDirEntry* direntry, uint64** value) +static enum TIFFReadDirEntryErr TIFFReadDirEntryLong8ArrayWithLimit( + TIFF* tif, TIFFDirEntry* direntry, uint64** value, uint64 maxcount) { enum TIFFReadDirEntryErr err; uint32 count; @@ -1880,7 +1988,7 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryLong8Array(TIFF* tif, TIFFDirEnt default: return(TIFFReadDirEntryErrType); } - err=TIFFReadDirEntryArray(tif,direntry,&count,8,&origdata); + err=TIFFReadDirEntryArrayWithLimit(tif,direntry,&count,8,&origdata,maxcount); if ((err!=TIFFReadDirEntryErrOk)||(origdata==0)) { *value=0; @@ -2026,6 +2134,11 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryLong8Array(TIFF* tif, TIFFDirEnt return(TIFFReadDirEntryErrOk); } +static enum TIFFReadDirEntryErr TIFFReadDirEntryLong8Array(TIFF* tif, TIFFDirEntry* direntry, uint64** value) +{ + return TIFFReadDirEntryLong8ArrayWithLimit(tif, direntry, value, ~((uint64)0)); +} + static enum TIFFReadDirEntryErr TIFFReadDirEntrySlong8Array(TIFF* tif, TIFFDirEntry* direntry, int64** value) { enum TIFFReadDirEntryErr err; @@ -2172,11 +2285,6 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntrySlong8Array(TIFF* tif, TIFFDirEn break; } _TIFFfree(origdata); - if (err!=TIFFReadDirEntryErrOk) - { - _TIFFfree(data); - return(err); - } *value=data; return(TIFFReadDirEntryErrOk); } @@ -2409,16 +2517,18 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryFloatArray(TIFF* tif, TIFFDirEnt ma=(double*)origdata; mb=data; for (n=0; n FLT_MAX ) + val = FLT_MAX; + else if( val < -FLT_MAX ) + val = -FLT_MAX; + *mb++=(float)val; + } } break; } _TIFFfree(origdata); - if (err!=TIFFReadDirEntryErrOk) - { - _TIFFfree(data); - return(err); - } *value=data; return(TIFFReadDirEntryErrOk); } @@ -2657,11 +2767,6 @@ TIFFReadDirEntryDoubleArray(TIFF* tif, TIFFDirEntry* direntry, double** value) break; } _TIFFfree(origdata); - if (err!=TIFFReadDirEntryErrOk) - { - _TIFFfree(data); - return(err); - } *value=data; return(TIFFReadDirEntryErrOk); } @@ -2723,11 +2828,6 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryIfd8Array(TIFF* tif, TIFFDirEntr break; } _TIFFfree(origdata); - if (err!=TIFFReadDirEntryErrOk) - { - _TIFFfree(data); - return(err); - } *value=data; return(TIFFReadDirEntryErrOk); } @@ -2741,7 +2841,7 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryPersampleShort(TIFF* tif, TIFFDi if (direntry->tdir_count<(uint64)tif->tif_dir.td_samplesperpixel) return(TIFFReadDirEntryErrCount); err=TIFFReadDirEntryShortArray(tif,direntry,&m); - if (err!=TIFFReadDirEntryErrOk) + if (err!=TIFFReadDirEntryErrOk || m == NULL) return(err); na=m; nb=tif->tif_dir.td_samplesperpixel; @@ -2890,7 +2990,10 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckedRational(TIFF* tif, TIFFD m.l = direntry->tdir_offset.toff_long8; if (tif->tif_flags&TIFF_SWAB) TIFFSwabArrayOfLong(m.i,2); - if (m.i[0]==0) + /* Not completely sure what we should do when m.i[1]==0, but some */ + /* sanitizers do not like division by 0.0: */ + /* http://bugzilla.maptools.org/show_bug.cgi?id=2644 */ + if (m.i[0]==0 || m.i[1]==0) *value=0.0; else *value=(double)m.i[0]/(double)m.i[1]; @@ -2918,7 +3021,10 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckedSrational(TIFF* tif, TIFF m.l=direntry->tdir_offset.toff_long8; if (tif->tif_flags&TIFF_SWAB) TIFFSwabArrayOfLong(m.i,2); - if ((int32)m.i[0]==0) + /* Not completely sure what we should do when m.i[1]==0, but some */ + /* sanitizers do not like division by 0.0: */ + /* http://bugzilla.maptools.org/show_bug.cgi?id=2644 */ + if ((int32)m.i[0]==0 || m.i[1]==0) *value=0.0; else *value=(double)((int32)m.i[0])/(double)m.i[1]; @@ -3191,15 +3297,6 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLongSlong(int32 value) return(TIFFReadDirEntryErrOk); } -/* - * Largest 32-bit unsigned integer value. - */ -#if defined(__WIN32__) && defined(_MSC_VER) -# define TIFF_UINT32_MAX 0xFFFFFFFFI64 -#else -# define TIFF_UINT32_MAX 0xFFFFFFFFLL -#endif - static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLongLong8(uint64 value) { @@ -3212,14 +3309,12 @@ TIFFReadDirEntryCheckRangeLongLong8(uint64 value) static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLongSlong8(int64 value) { - if ((value<0) || (value > TIFF_UINT32_MAX)) + if ((value < 0) || (value > (int64) TIFF_UINT32_MAX)) return(TIFFReadDirEntryErrRange); else return(TIFFReadDirEntryErrOk); } -#undef TIFF_UINT32_MAX - static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSlongLong(uint32 value) { @@ -3229,19 +3324,21 @@ TIFFReadDirEntryCheckRangeSlongLong(uint32 value) return(TIFFReadDirEntryErrOk); } +/* Check that the 8-byte unsigned value can fit in a 4-byte unsigned range */ static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSlongLong8(uint64 value) { - if (value > 0x7FFFFFFFUL) + if (value > 0x7FFFFFFF) return(TIFFReadDirEntryErrRange); else return(TIFFReadDirEntryErrOk); } +/* Check that the 8-byte signed value can fit in a 4-byte signed range */ static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSlongSlong8(int64 value) { - if ((value < 0L-0x80000000L) || (value > 0x7FFFFFFFL)) + if ((value < 0-((int64) 0x7FFFFFFF+1)) || (value > 0x7FFFFFFF)) return(TIFFReadDirEntryErrRange); else return(TIFFReadDirEntryErrOk); @@ -3283,15 +3380,6 @@ TIFFReadDirEntryCheckRangeLong8Slong8(int64 value) return(TIFFReadDirEntryErrOk); } -/* - * Largest 64-bit signed integer value. - */ -#if defined(__WIN32__) && defined(_MSC_VER) -# define TIFF_INT64_MAX 0x7FFFFFFFFFFFFFFFI64 -#else -# define TIFF_INT64_MAX 0x7FFFFFFFFFFFFFFFLL -#endif - static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSlong8Long8(uint64 value) { @@ -3301,8 +3389,6 @@ TIFFReadDirEntryCheckRangeSlong8Long8(uint64 value) return(TIFFReadDirEntryErrOk); } -#undef TIFF_INT64_MAX - static enum TIFFReadDirEntryErr TIFFReadDirEntryData(TIFF* tif, uint64 offset, tmsize_t size, void* dest) { @@ -3315,13 +3401,13 @@ TIFFReadDirEntryData(TIFF* tif, uint64 offset, tmsize_t size, void* dest) } else { size_t ma,mb; ma=(size_t)offset; + if( (uint64)ma!=offset || + ma > (~(size_t)0) - (size_t)size ) + { + return TIFFReadDirEntryErrIo; + } mb=ma+size; - if (((uint64)ma!=offset) - || (mb < ma) - || (mb - ma != (size_t) size) - || (mb < (size_t)size) - || (mb > (size_t)tif->tif_size) - ) + if (mb > (uint64)tif->tif_size) return(TIFFReadDirEntryErrIo); _TIFFmemcpy(dest,tif->tif_base+ma,size); } @@ -3374,7 +3460,7 @@ static void TIFFReadDirEntryOutputErr(TIFF* tif, enum TIFFReadDirEntryErr err, c } else { switch (err) { case TIFFReadDirEntryErrCount: - TIFFErrorExt(tif->tif_clientdata, module, + TIFFWarningExt(tif->tif_clientdata, module, "Incorrect count for \"%s\"; tag ignored", tagname); break; @@ -3415,6 +3501,78 @@ static void TIFFReadDirEntryOutputErr(TIFF* tif, enum TIFFReadDirEntryErr err, c } } +/* + * Return the maximum number of color channels specified for a given photometric + * type. 0 is returned if photometric type isn't supported or no default value + * is defined by the specification. + */ +static int _TIFFGetMaxColorChannels( uint16 photometric ) +{ + switch (photometric) { + case PHOTOMETRIC_PALETTE: + case PHOTOMETRIC_MINISWHITE: + case PHOTOMETRIC_MINISBLACK: + return 1; + case PHOTOMETRIC_YCBCR: + case PHOTOMETRIC_RGB: + case PHOTOMETRIC_CIELAB: + case PHOTOMETRIC_LOGLUV: + case PHOTOMETRIC_ITULAB: + case PHOTOMETRIC_ICCLAB: + return 3; + case PHOTOMETRIC_SEPARATED: + case PHOTOMETRIC_MASK: + return 4; + case PHOTOMETRIC_LOGL: + case PHOTOMETRIC_CFA: + default: + return 0; + } +} + +static int ByteCountLooksBad(TIFF* tif) +{ + /* + * Assume we have wrong StripByteCount value (in case + * of single strip) in following cases: + * - it is equal to zero along with StripOffset; + * - it is larger than file itself (in case of uncompressed + * image); + * - it is smaller than the size of the bytes per row + * multiplied on the number of rows. The last case should + * not be checked in the case of writing new image, + * because we may do not know the exact strip size + * until the whole image will be written and directory + * dumped out. + */ + uint64 bytecount = TIFFGetStrileByteCount(tif, 0); + uint64 offset = TIFFGetStrileOffset(tif, 0); + uint64 filesize; + + if( offset == 0 ) + return 0; + if (bytecount == 0) + return 1; + if ( tif->tif_dir.td_compression != COMPRESSION_NONE ) + return 0; + filesize = TIFFGetFileSize(tif); + if( offset <= filesize && bytecount > filesize - offset ) + return 1; + if( tif->tif_mode == O_RDONLY ) + { + uint64 scanlinesize = TIFFScanlineSize64(tif); + if( tif->tif_dir.td_imagelength > 0 && + scanlinesize > TIFF_UINT64_MAX / tif->tif_dir.td_imagelength ) + { + return 1; + } + if( bytecount < scanlinesize * tif->tif_dir.td_imagelength) + return 1; + } + return 0; +} + + /* * Read the next TIFF directory from a file and convert it to the internal * format. We read directories sequentially. @@ -3430,6 +3588,9 @@ TIFFReadDirectory(TIFF* tif) const TIFFField* fip; uint32 fii=FAILED_FII; toff_t nextdiroff; + int bitspersample_read = FALSE; + int color_channels; + tif->tif_diroff=tif->tif_nextdiroff; if (!TIFFCheckDirOffset(tif,tif->tif_nextdiroff)) return 0; /* last offset or bad offset (IFD looping) */ @@ -3458,14 +3619,17 @@ TIFFReadDirectory(TIFF* tif) uint16 nb; for (na=ma+1, nb=mb+1; nbtdir_tag==na->tdir_tag) - na->tdir_tag=IGNORE; + if (ma->tdir_tag == na->tdir_tag) { + na->tdir_ignore = TRUE; + } } } } tif->tif_flags &= ~TIFF_BEENWRITING; /* reset before new dir */ tif->tif_flags &= ~TIFF_BUF4WRITE; /* reset before new dir */ + tif->tif_flags &= ~TIFF_CHOPPEDUPARRAYS; + /* free any old stuff and reinit */ TIFFFreeDirectory(tif); TIFFDefaultDirectory(tif); @@ -3481,12 +3645,12 @@ TIFFReadDirectory(TIFF* tif) * the fields to check type and tag information, * and to extract info required to size data * structures. A second pass is made afterwards - * to read in everthing not taken in the first pass. + * to read in everything not taken in the first pass. * But we must process the Compression tag first * in order to merge in codec-private tag definitions (otherwise * we may get complaints about unknown tags). However, the * Compression tag may be dependent on the SamplesPerPixel - * tag value because older TIFF specs permited Compression + * tag value because older TIFF specs permitted Compression * to be written as a SamplesPerPixel-count tag entry. * Thus if we don't first figure out the correct SamplesPerPixel * tag value then we may end up ignoring the Compression tag @@ -3498,7 +3662,7 @@ TIFFReadDirectory(TIFF* tif) { if (!TIFFFetchNormalTag(tif,dp,0)) goto bad; - dp->tdir_tag=IGNORE; + dp->tdir_ignore = TRUE; } dp=TIFFReadDirectoryFindEntry(tif,dir,dircount,TIFFTAG_COMPRESSION); if (dp) @@ -3521,7 +3685,7 @@ TIFFReadDirectory(TIFF* tif) } if (!TIFFSetField(tif,TIFFTAG_COMPRESSION,value)) goto bad; - dp->tdir_tag=IGNORE; + dp->tdir_ignore = TRUE; } else { @@ -3533,7 +3697,7 @@ TIFFReadDirectory(TIFF* tif) */ for (di=0, dp=dir; ditdir_tag!=IGNORE) + if (!dp->tdir_ignore) { TIFFReadDirectoryFindFieldInfo(tif,dp->tdir_tag,&fii); if (fii == FAILED_FII) @@ -3541,8 +3705,8 @@ TIFFReadDirectory(TIFF* tif) TIFFWarningExt(tif->tif_clientdata, module, "Unknown field with tag %d (0x%x) encountered", dp->tdir_tag,dp->tdir_tag); - /* the following knowingly leaks the - anonymous field structure */ + /* the following knowingly leaks the + anonymous field structure */ if (!_TIFFMergeFields(tif, _TIFFCreateAnonField(tif, dp->tdir_tag, @@ -3553,18 +3717,18 @@ TIFFReadDirectory(TIFF* tif) "Registering anonymous field with tag %d (0x%x) failed", dp->tdir_tag, dp->tdir_tag); - dp->tdir_tag=IGNORE; + dp->tdir_ignore = TRUE; } else { TIFFReadDirectoryFindFieldInfo(tif,dp->tdir_tag,&fii); assert(fii != FAILED_FII); } } } - if (dp->tdir_tag!=IGNORE) + if (!dp->tdir_ignore) { fip=tif->tif_fields[fii]; if (fip->field_bit==FIELD_IGNORE) - dp->tdir_tag=IGNORE; + dp->tdir_ignore = TRUE; else { switch (dp->tdir_tag) @@ -3586,7 +3750,11 @@ TIFFReadDirectory(TIFF* tif) case TIFFTAG_EXTRASAMPLES: if (!TIFFFetchNormalTag(tif,dp,0)) goto bad; - dp->tdir_tag=IGNORE; + dp->tdir_ignore = TRUE; + break; + default: + if( !_TIFFCheckFieldIsValidForCodec(tif, dp->tdir_tag) ) + dp->tdir_ignore = TRUE; break; } } @@ -3603,8 +3771,8 @@ TIFFReadDirectory(TIFF* tif) if ((tif->tif_dir.td_compression==COMPRESSION_OJPEG)&& (tif->tif_dir.td_planarconfig==PLANARCONFIG_SEPARATE)) { - if (!_TIFFFillStriles(tif)) - goto bad; + if (!_TIFFFillStriles(tif)) + goto bad; dp=TIFFReadDirectoryFindEntry(tif,dir,dircount,TIFFTAG_STRIPOFFSETS); if ((dp!=0)&&(dp->tdir_count==1)) { @@ -3650,6 +3818,7 @@ TIFFReadDirectory(TIFF* tif) if (tif->tif_dir.td_planarconfig == PLANARCONFIG_SEPARATE) tif->tif_dir.td_stripsperimage /= tif->tif_dir.td_samplesperpixel; if (!TIFFFieldSet(tif, FIELD_STRIPOFFSETS)) { +#ifdef OJPEG_SUPPORT if ((tif->tif_dir.td_compression==COMPRESSION_OJPEG) && (isTiled(tif)==0) && (tif->tif_dir.td_nstrips==1)) { @@ -3662,7 +3831,9 @@ TIFFReadDirectory(TIFF* tif) * JpegInterchangeFormat stream. */ TIFFSetFieldBit(tif, FIELD_STRIPOFFSETS); - } else { + } else +#endif + { MissingRequired(tif, isTiled(tif) ? "TileOffsets" : "StripOffsets"); goto bad; @@ -3673,147 +3844,240 @@ TIFFReadDirectory(TIFF* tif) */ for (di=0, dp=dir; ditdir_tag) - { - case IGNORE: - break; - case TIFFTAG_MINSAMPLEVALUE: - case TIFFTAG_MAXSAMPLEVALUE: - case TIFFTAG_BITSPERSAMPLE: - case TIFFTAG_DATATYPE: - case TIFFTAG_SAMPLEFORMAT: - /* - * The MinSampleValue, MaxSampleValue, BitsPerSample - * DataType and SampleFormat tags are supposed to be - * written as one value/sample, but some vendors - * incorrectly write one value only -- so we accept - * that as well (yech). Other vendors write correct - * value for NumberOfSamples, but incorrect one for - * BitsPerSample and friends, and we will read this - * too. - */ - { - uint16 value; - enum TIFFReadDirEntryErr err; - err=TIFFReadDirEntryShort(tif,dp,&value); - if (err==TIFFReadDirEntryErrCount) - err=TIFFReadDirEntryPersampleShort(tif,dp,&value); - if (err!=TIFFReadDirEntryErrOk) + if (!dp->tdir_ignore) { + switch (dp->tdir_tag) + { + case TIFFTAG_MINSAMPLEVALUE: + case TIFFTAG_MAXSAMPLEVALUE: + case TIFFTAG_BITSPERSAMPLE: + case TIFFTAG_DATATYPE: + case TIFFTAG_SAMPLEFORMAT: + /* + * The MinSampleValue, MaxSampleValue, BitsPerSample + * DataType and SampleFormat tags are supposed to be + * written as one value/sample, but some vendors + * incorrectly write one value only -- so we accept + * that as well (yuck). Other vendors write correct + * value for NumberOfSamples, but incorrect one for + * BitsPerSample and friends, and we will read this + * too. + */ { - fip = TIFFFieldWithTag(tif,dp->tdir_tag); - TIFFReadDirEntryOutputErr(tif,err,module,fip ? fip->field_name : "unknown tagname",0); - goto bad; - } - if (!TIFFSetField(tif,dp->tdir_tag,value)) - goto bad; - } - break; - case TIFFTAG_SMINSAMPLEVALUE: - case TIFFTAG_SMAXSAMPLEVALUE: - { - - double *data; - enum TIFFReadDirEntryErr err; - uint32 saved_flags; - int m; - if (dp->tdir_count != (uint64)tif->tif_dir.td_samplesperpixel) - err = TIFFReadDirEntryErrCount; - else - err = TIFFReadDirEntryDoubleArray(tif, dp, &data); - if (err!=TIFFReadDirEntryErrOk) - { - fip = TIFFFieldWithTag(tif,dp->tdir_tag); - TIFFReadDirEntryOutputErr(tif,err,module,fip ? fip->field_name : "unknown tagname",0); - goto bad; - } - saved_flags = tif->tif_flags; - tif->tif_flags |= TIFF_PERSAMPLE; - m = TIFFSetField(tif,dp->tdir_tag,data); - tif->tif_flags = saved_flags; - _TIFFfree(data); - if (!m) - goto bad; - } - break; - case TIFFTAG_STRIPOFFSETS: - case TIFFTAG_TILEOFFSETS: -#if defined(DEFER_STRILE_LOAD) - _TIFFmemcpy( &(tif->tif_dir.td_stripoffset_entry), - dp, sizeof(TIFFDirEntry) ); -#else - if (!TIFFFetchStripThing(tif,dp,tif->tif_dir.td_nstrips,&tif->tif_dir.td_stripoffset)) - goto bad; -#endif - break; - case TIFFTAG_STRIPBYTECOUNTS: - case TIFFTAG_TILEBYTECOUNTS: -#if defined(DEFER_STRILE_LOAD) - _TIFFmemcpy( &(tif->tif_dir.td_stripbytecount_entry), - dp, sizeof(TIFFDirEntry) ); -#else - if (!TIFFFetchStripThing(tif,dp,tif->tif_dir.td_nstrips,&tif->tif_dir.td_stripbytecount)) - goto bad; -#endif - break; - case TIFFTAG_COLORMAP: - case TIFFTAG_TRANSFERFUNCTION: - { - enum TIFFReadDirEntryErr err; - uint32 countpersample; - uint32 countrequired; - uint32 incrementpersample; - uint16* value=NULL; - countpersample=(1L<tif_dir.td_bitspersample); - if ((dp->tdir_tag==TIFFTAG_TRANSFERFUNCTION)&&(dp->tdir_count==(uint64)countpersample)) - { - countrequired=countpersample; - incrementpersample=0; - } - else - { - countrequired=3*countpersample; - incrementpersample=countpersample; - } - if (dp->tdir_count!=(uint64)countrequired) - err=TIFFReadDirEntryErrCount; - else - err=TIFFReadDirEntryShortArray(tif,dp,&value); - if (err!=TIFFReadDirEntryErrOk) - { - fip = TIFFFieldWithTag(tif,dp->tdir_tag); - TIFFReadDirEntryOutputErr(tif,err,module,fip ? fip->field_name : "unknown tagname",1); - } - else - { - TIFFSetField(tif,dp->tdir_tag,value,value+incrementpersample,value+2*incrementpersample); - _TIFFfree(value); - } - } - break; -/* BEGIN REV 4.0 COMPATIBILITY */ - case TIFFTAG_OSUBFILETYPE: - { - uint16 valueo; - uint32 value; - if (TIFFReadDirEntryShort(tif,dp,&valueo)==TIFFReadDirEntryErrOk) - { - switch (valueo) + uint16 value; + enum TIFFReadDirEntryErr err; + err=TIFFReadDirEntryShort(tif,dp,&value); + if (err==TIFFReadDirEntryErrCount) + err=TIFFReadDirEntryPersampleShort(tif,dp,&value); + if (err!=TIFFReadDirEntryErrOk) { - case OFILETYPE_REDUCEDIMAGE: value=FILETYPE_REDUCEDIMAGE; break; - case OFILETYPE_PAGE: value=FILETYPE_PAGE; break; - default: value=0; break; + fip = TIFFFieldWithTag(tif,dp->tdir_tag); + TIFFReadDirEntryOutputErr(tif,err,module,fip ? fip->field_name : "unknown tagname",0); + goto bad; } - if (value!=0) - TIFFSetField(tif,TIFFTAG_SUBFILETYPE,value); + if (!TIFFSetField(tif,dp->tdir_tag,value)) + goto bad; + if( dp->tdir_tag == TIFFTAG_BITSPERSAMPLE ) + bitspersample_read = TRUE; } - } - break; + break; + case TIFFTAG_SMINSAMPLEVALUE: + case TIFFTAG_SMAXSAMPLEVALUE: + { + + double *data = NULL; + enum TIFFReadDirEntryErr err; + uint32 saved_flags; + int m; + if (dp->tdir_count != (uint64)tif->tif_dir.td_samplesperpixel) + err = TIFFReadDirEntryErrCount; + else + err = TIFFReadDirEntryDoubleArray(tif, dp, &data); + if (err!=TIFFReadDirEntryErrOk) + { + fip = TIFFFieldWithTag(tif,dp->tdir_tag); + TIFFReadDirEntryOutputErr(tif,err,module,fip ? fip->field_name : "unknown tagname",0); + goto bad; + } + saved_flags = tif->tif_flags; + tif->tif_flags |= TIFF_PERSAMPLE; + m = TIFFSetField(tif,dp->tdir_tag,data); + tif->tif_flags = saved_flags; + _TIFFfree(data); + if (!m) + goto bad; + } + break; + case TIFFTAG_STRIPOFFSETS: + case TIFFTAG_TILEOFFSETS: + switch( dp->tdir_type ) + { + case TIFF_SHORT: + case TIFF_LONG: + case TIFF_LONG8: + break; + default: + /* Warn except if directory typically created with TIFFDeferStrileArrayWriting() */ + if( !(tif->tif_mode == O_RDWR && + dp->tdir_count == 0 && + dp->tdir_type == 0 && + dp->tdir_offset.toff_long8 == 0) ) + { + fip = TIFFFieldWithTag(tif,dp->tdir_tag); + TIFFWarningExt(tif->tif_clientdata,module, + "Invalid data type for tag %s", + fip ? fip->field_name : "unknown tagname"); + } + break; + } + _TIFFmemcpy( &(tif->tif_dir.td_stripoffset_entry), + dp, sizeof(TIFFDirEntry) ); + break; + case TIFFTAG_STRIPBYTECOUNTS: + case TIFFTAG_TILEBYTECOUNTS: + switch( dp->tdir_type ) + { + case TIFF_SHORT: + case TIFF_LONG: + case TIFF_LONG8: + break; + default: + /* Warn except if directory typically created with TIFFDeferStrileArrayWriting() */ + if( !(tif->tif_mode == O_RDWR && + dp->tdir_count == 0 && + dp->tdir_type == 0 && + dp->tdir_offset.toff_long8 == 0) ) + { + fip = TIFFFieldWithTag(tif,dp->tdir_tag); + TIFFWarningExt(tif->tif_clientdata,module, + "Invalid data type for tag %s", + fip ? fip->field_name : "unknown tagname"); + } + break; + } + _TIFFmemcpy( &(tif->tif_dir.td_stripbytecount_entry), + dp, sizeof(TIFFDirEntry) ); + break; + case TIFFTAG_COLORMAP: + case TIFFTAG_TRANSFERFUNCTION: + { + enum TIFFReadDirEntryErr err; + uint32 countpersample; + uint32 countrequired; + uint32 incrementpersample; + uint16* value=NULL; + /* It would be dangerous to instantiate those tag values */ + /* since if td_bitspersample has not yet been read (due to */ + /* unordered tags), it could be read afterwards with a */ + /* values greater than the default one (1), which may cause */ + /* crashes in user code */ + if( !bitspersample_read ) + { + fip = TIFFFieldWithTag(tif,dp->tdir_tag); + TIFFWarningExt(tif->tif_clientdata,module, + "Ignoring %s since BitsPerSample tag not found", + fip ? fip->field_name : "unknown tagname"); + continue; + } + /* ColorMap or TransferFunction for high bit */ + /* depths do not make much sense and could be */ + /* used as a denial of service vector */ + if (tif->tif_dir.td_bitspersample > 24) + { + fip = TIFFFieldWithTag(tif,dp->tdir_tag); + TIFFWarningExt(tif->tif_clientdata,module, + "Ignoring %s because BitsPerSample=%d>24", + fip ? fip->field_name : "unknown tagname", + tif->tif_dir.td_bitspersample); + continue; + } + countpersample=(1U<tif_dir.td_bitspersample); + if ((dp->tdir_tag==TIFFTAG_TRANSFERFUNCTION)&&(dp->tdir_count==(uint64)countpersample)) + { + countrequired=countpersample; + incrementpersample=0; + } + else + { + countrequired=3*countpersample; + incrementpersample=countpersample; + } + if (dp->tdir_count!=(uint64)countrequired) + err=TIFFReadDirEntryErrCount; + else + err=TIFFReadDirEntryShortArray(tif,dp,&value); + if (err!=TIFFReadDirEntryErrOk) + { + fip = TIFFFieldWithTag(tif,dp->tdir_tag); + TIFFReadDirEntryOutputErr(tif,err,module,fip ? fip->field_name : "unknown tagname",1); + } + else + { + TIFFSetField(tif,dp->tdir_tag,value,value+incrementpersample,value+2*incrementpersample); + _TIFFfree(value); + } + } + break; +/* BEGIN REV 4.0 COMPATIBILITY */ + case TIFFTAG_OSUBFILETYPE: + { + uint16 valueo; + uint32 value; + if (TIFFReadDirEntryShort(tif,dp,&valueo)==TIFFReadDirEntryErrOk) + { + switch (valueo) + { + case OFILETYPE_REDUCEDIMAGE: value=FILETYPE_REDUCEDIMAGE; break; + case OFILETYPE_PAGE: value=FILETYPE_PAGE; break; + default: value=0; break; + } + if (value!=0) + TIFFSetField(tif,TIFFTAG_SUBFILETYPE,value); + } + } + break; /* END REV 4.0 COMPATIBILITY */ - default: - (void) TIFFFetchNormalTag(tif, dp, TRUE); - break; - } - } + default: + (void) TIFFFetchNormalTag(tif, dp, TRUE); + break; + } + } /* -- if (!dp->tdir_ignore) */ + } /* -- for-loop -- */ + + if( tif->tif_mode == O_RDWR && + tif->tif_dir.td_stripoffset_entry.tdir_tag != 0 && + tif->tif_dir.td_stripoffset_entry.tdir_count == 0 && + tif->tif_dir.td_stripoffset_entry.tdir_type == 0 && + tif->tif_dir.td_stripoffset_entry.tdir_offset.toff_long8 == 0 && + tif->tif_dir.td_stripbytecount_entry.tdir_tag != 0 && + tif->tif_dir.td_stripbytecount_entry.tdir_count == 0 && + tif->tif_dir.td_stripbytecount_entry.tdir_type == 0 && + tif->tif_dir.td_stripbytecount_entry.tdir_offset.toff_long8 == 0 ) + { + /* Directory typically created with TIFFDeferStrileArrayWriting() */ + TIFFSetupStrips(tif); + } + else if( !(tif->tif_flags&TIFF_DEFERSTRILELOAD) ) + { + if( tif->tif_dir.td_stripoffset_entry.tdir_tag != 0 ) + { + if (!TIFFFetchStripThing(tif,&(tif->tif_dir.td_stripoffset_entry), + tif->tif_dir.td_nstrips, + &tif->tif_dir.td_stripoffset_p)) + { + goto bad; + } + } + if( tif->tif_dir.td_stripbytecount_entry.tdir_tag != 0 ) + { + if (!TIFFFetchStripThing(tif,&(tif->tif_dir.td_stripbytecount_entry), + tif->tif_dir.td_nstrips, + &tif->tif_dir.td_stripbytecount_p)) + { + goto bad; + } + } + } + /* * OJPEG hack: * - If a) compression is OJPEG, and b) photometric tag is missing, @@ -3883,6 +4147,37 @@ TIFFReadDirectory(TIFF* tif) } } } + + /* + * Make sure all non-color channels are extrasamples. + * If it's not the case, define them as such. + */ + color_channels = _TIFFGetMaxColorChannels(tif->tif_dir.td_photometric); + if (color_channels && tif->tif_dir.td_samplesperpixel - tif->tif_dir.td_extrasamples > color_channels) { + uint16 old_extrasamples; + uint16 *new_sampleinfo; + + TIFFWarningExt(tif->tif_clientdata,module, "Sum of Photometric type-related " + "color channels and ExtraSamples doesn't match SamplesPerPixel. " + "Defining non-color channels as ExtraSamples."); + + old_extrasamples = tif->tif_dir.td_extrasamples; + tif->tif_dir.td_extrasamples = (uint16) (tif->tif_dir.td_samplesperpixel - color_channels); + + // sampleinfo should contain information relative to these new extra samples + new_sampleinfo = (uint16*) _TIFFcalloc(tif->tif_dir.td_extrasamples, sizeof(uint16)); + if (!new_sampleinfo) { + TIFFErrorExt(tif->tif_clientdata, module, "Failed to allocate memory for " + "temporary new sampleinfo array (%d 16 bit elements)", + tif->tif_dir.td_extrasamples); + goto bad; + } + + memcpy(new_sampleinfo, tif->tif_dir.td_sampleinfo, old_extrasamples * sizeof(uint16)); + _TIFFsetShortArray(&tif->tif_dir.td_sampleinfo, new_sampleinfo, tif->tif_dir.td_extrasamples); + _TIFFfree(new_sampleinfo); + } + /* * Verify Palette image has a Colormap. */ @@ -3925,31 +4220,10 @@ TIFFReadDirectory(TIFF* tif) "\"StripByteCounts\" field, calculating from imagelength"); if (EstimateStripByteCounts(tif, dir, dircount) < 0) goto bad; - /* - * Assume we have wrong StripByteCount value (in case - * of single strip) in following cases: - * - it is equal to zero along with StripOffset; - * - it is larger than file itself (in case of uncompressed - * image); - * - it is smaller than the size of the bytes per row - * multiplied on the number of rows. The last case should - * not be checked in the case of writing new image, - * because we may do not know the exact strip size - * until the whole image will be written and directory - * dumped out. - */ - #define BYTECOUNTLOOKSBAD \ - ( (tif->tif_dir.td_stripbytecount[0] == 0 && tif->tif_dir.td_stripoffset[0] != 0) || \ - (tif->tif_dir.td_compression == COMPRESSION_NONE && \ - tif->tif_dir.td_stripbytecount[0] > TIFFGetFileSize(tif) - tif->tif_dir.td_stripoffset[0]) || \ - (tif->tif_mode == O_RDONLY && \ - tif->tif_dir.td_compression == COMPRESSION_NONE && \ - tif->tif_dir.td_stripbytecount[0] < TIFFScanlineSize64(tif) * tif->tif_dir.td_imagelength) ) } else if (tif->tif_dir.td_nstrips == 1 - && _TIFFFillStriles(tif) - && tif->tif_dir.td_stripoffset[0] != 0 - && BYTECOUNTLOOKSBAD) { + && !(tif->tif_flags&TIFF_ISTILED) + && ByteCountLooksBad(tif)) { /* * XXX: Plexus (and others) sometimes give a value of * zero for a tag when they don't know what the @@ -3961,13 +4235,13 @@ TIFFReadDirectory(TIFF* tif) if(EstimateStripByteCounts(tif, dir, dircount) < 0) goto bad; -#if !defined(DEFER_STRILE_LOAD) - } else if (tif->tif_dir.td_planarconfig == PLANARCONFIG_CONTIG + } else if (!(tif->tif_flags&TIFF_DEFERSTRILELOAD) + && tif->tif_dir.td_planarconfig == PLANARCONFIG_CONTIG && tif->tif_dir.td_nstrips > 2 && tif->tif_dir.td_compression == COMPRESSION_NONE - && tif->tif_dir.td_stripbytecount[0] != tif->tif_dir.td_stripbytecount[1] - && tif->tif_dir.td_stripbytecount[0] != 0 - && tif->tif_dir.td_stripbytecount[1] != 0 ) { + && TIFFGetStrileByteCount(tif, 0) != TIFFGetStrileByteCount(tif, 1) + && TIFFGetStrileByteCount(tif, 0) != 0 + && TIFFGetStrileByteCount(tif, 1) != 0 ) { /* * XXX: Some vendors fill StripByteCount array with * absolutely wrong values (it can be equal to @@ -3982,7 +4256,6 @@ TIFFReadDirectory(TIFF* tif) "Wrong \"StripByteCounts\" field, ignoring and calculating from imagelength"); if (EstimateStripByteCounts(tif, dir, dircount) < 0) goto bad; -#endif /* !defined(DEFER_STRILE_LOAD) */ } } if (dir) @@ -3997,26 +4270,27 @@ TIFFReadDirectory(TIFF* tif) else tif->tif_dir.td_maxsamplevalue = (uint16)((1L<tif_dir.td_bitspersample)-1); } + +#ifdef STRIPBYTECOUNTSORTED_UNUSED /* * XXX: We can optimize checking for the strip bounds using the sorted * bytecounts array. See also comments for TIFFAppendToStrip() * function in tif_write.c. */ -#if !defined(DEFER_STRILE_LOAD) - if (tif->tif_dir.td_nstrips > 1) { + if (!(tif->tif_flags&TIFF_DEFERSTRILELOAD) && tif->tif_dir.td_nstrips > 1) { uint32 strip; tif->tif_dir.td_stripbytecountsorted = 1; for (strip = 1; strip < tif->tif_dir.td_nstrips; strip++) { - if (tif->tif_dir.td_stripoffset[strip - 1] > - tif->tif_dir.td_stripoffset[strip]) { + if (TIFFGetStrileOffset(tif, strip - 1) > + TIFFGetStrileOffset(tif, strip)) { tif->tif_dir.td_stripbytecountsorted = 0; break; } } } -#endif /* !defined(DEFER_STRILE_LOAD) */ - +#endif + /* * An opportunity for compression mode dependent tag fixup */ @@ -4035,11 +4309,20 @@ TIFFReadDirectory(TIFF* tif) (tif->tif_dir.td_nstrips==1)&& (tif->tif_dir.td_compression==COMPRESSION_NONE)&& ((tif->tif_flags&(TIFF_STRIPCHOP|TIFF_ISTILED))==TIFF_STRIPCHOP)) - { - if ( !_TIFFFillStriles(tif) || !tif->tif_dir.td_stripbytecount ) - return 0; - ChopUpSingleUncompressedStrip(tif); - } + { + ChopUpSingleUncompressedStrip(tif); + } + + /* There are also uncompressed striped files with strips larger than */ + /* 2 GB, which make them unfriendly with a lot of code. If possible, */ + /* try to expose smaller "virtual" strips. */ + if( tif->tif_dir.td_planarconfig == PLANARCONFIG_CONTIG && + tif->tif_dir.td_compression == COMPRESSION_NONE && + (tif->tif_flags&(TIFF_STRIPCHOP|TIFF_ISTILED)) == TIFF_STRIPCHOP && + TIFFStripSize64(tif) > 0x7FFFFFFFUL ) + { + TryChopUpUncompressedBigTiff(tif); + } /* * Clear the dirty directory flag. @@ -4151,7 +4434,7 @@ TIFFReadDirectoryFindFieldInfo(TIFF* tif, uint16 tagid, uint32* fii) } /* - * Read custom directory from the arbitarry offset. + * Read custom directory from the arbitrary offset. * The code is very similar to TIFFReadDirectory(). */ int @@ -4165,6 +4448,7 @@ TIFFReadCustomDirectory(TIFF* tif, toff_t diroff, uint16 di; const TIFFField* fip; uint32 fii; + (*tif->tif_cleanup)(tif); /* cleanup any previous compression state */ _TIFFSetupFields(tif, infoarray); dircount=TIFFFetchDirectory(tif,diroff,&dir,NULL); if (!dircount) @@ -4191,17 +4475,17 @@ TIFFReadCustomDirectory(TIFF* tif, toff_t diroff, TIFFWarningExt(tif->tif_clientdata, module, "Registering anonymous field with tag %d (0x%x) failed", dp->tdir_tag, dp->tdir_tag); - dp->tdir_tag=IGNORE; + dp->tdir_ignore = TRUE; } else { TIFFReadDirectoryFindFieldInfo(tif,dp->tdir_tag,&fii); assert( fii != FAILED_FII ); } } - if (dp->tdir_tag!=IGNORE) + if (!dp->tdir_ignore) { fip=tif->tif_fields[fii]; if (fip->field_bit==FIELD_IGNORE) - dp->tdir_tag=IGNORE; + dp->tdir_ignore = TRUE; else { /* check data type */ @@ -4221,7 +4505,7 @@ TIFFReadCustomDirectory(TIFF* tif, toff_t diroff, TIFFWarningExt(tif->tif_clientdata, module, "Wrong data type %d for \"%s\"; tag ignored", dp->tdir_type,fip->field_name); - dp->tdir_tag=IGNORE; + dp->tdir_ignore = TRUE; } else { @@ -4235,21 +4519,21 @@ TIFFReadCustomDirectory(TIFF* tif, toff_t diroff, else expected=(uint32)fip->field_readcount; if (!CheckDirCount(tif,dp,expected)) - dp->tdir_tag=IGNORE; + dp->tdir_ignore = TRUE; } } } - switch (dp->tdir_tag) - { - case IGNORE: - break; - case EXIFTAG_SUBJECTDISTANCE: - (void) TIFFFetchSubjectDistance(tif,dp); - break; - default: - (void) TIFFFetchNormalTag(tif, dp, TRUE); - break; - } + if (!dp->tdir_ignore) { + switch (dp->tdir_tag) + { + case EXIFTAG_SUBJECTDISTANCE: + (void)TIFFFetchSubjectDistance(tif, dp); + break; + default: + (void)TIFFFetchNormalTag(tif, dp, TRUE); + break; + } + } /*-- if (!dp->tdir_ignore) */ } } if (dir) @@ -4269,6 +4553,17 @@ TIFFReadEXIFDirectory(TIFF* tif, toff_t diroff) return TIFFReadCustomDirectory(tif, diroff, exifFieldArray); } +/* + *--: EXIF-GPS custom directory reading as another special case of custom IFD. + */ +int +TIFFReadGPSDirectory(TIFF* tif, toff_t diroff) +{ + const TIFFFieldArray* gpsFieldArray; + gpsFieldArray = _TIFFGetGpsFields(); + return TIFFReadCustomDirectory(tif, diroff, gpsFieldArray); +} + static int EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount) { @@ -4278,14 +4573,16 @@ EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount) TIFFDirectory *td = &tif->tif_dir; uint32 strip; - _TIFFFillStriles( tif ); + /* Do not try to load stripbytecount as we will compute it */ + if( !_TIFFFillStrilesInternal( tif, 0 ) ) + return -1; - if (td->td_stripbytecount) - _TIFFfree(td->td_stripbytecount); - td->td_stripbytecount = (uint64*) + if (td->td_stripbytecount_p) + _TIFFfree(td->td_stripbytecount_p); + td->td_stripbytecount_p = (uint64*) _TIFFCheckMalloc(tif, td->td_nstrips, sizeof (uint64), "for \"StripByteCounts\" array"); - if( td->td_stripbytecount == NULL ) + if( td->td_stripbytecount_p == NULL ) return -1; if (td->td_compression != COMPRESSION_NONE) { @@ -4300,7 +4597,7 @@ EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount) /* calculate amount of space used by indirect values */ for (dp = dir, n = dircount; n > 0; n--, dp++) { - uint32 typewidth = TIFFDataWidth((TIFFDataType) dp->tdir_type); + uint32 typewidth; uint64 datasize; typewidth = TIFFDataWidth((TIFFDataType) dp->tdir_type); if (typewidth == 0) { @@ -4309,6 +4606,8 @@ EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount) dp->tdir_type); return -1; } + if( dp->tdir_count > TIFF_UINT64_MAX / typewidth ) + return -1; datasize=(uint64)typewidth*dp->tdir_count; if (!(tif->tif_flags&TIFF_BIGTIFF)) { @@ -4320,13 +4619,19 @@ EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount) if (datasize<=8) datasize=0; } + if( space > TIFF_UINT64_MAX - datasize ) + return -1; space+=datasize; } - space = filesize - space; + if( filesize < space ) + /* we should perhaps return in error ? */ + space = filesize; + else + space = filesize - space; if (td->td_planarconfig == PLANARCONFIG_SEPARATE) space /= td->td_samplesperpixel; for (strip = 0; strip < td->td_nstrips; strip++) - td->td_stripbytecount[strip] = space; + td->td_stripbytecount_p[strip] = space; /* * This gross hack handles the case were the offset to * the last strip is past the place where we think the strip @@ -4335,18 +4640,30 @@ EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount) * of data in the strip and trim this number back accordingly. */ strip--; - if (td->td_stripoffset[strip]+td->td_stripbytecount[strip] > filesize) - td->td_stripbytecount[strip] = filesize - td->td_stripoffset[strip]; + if (td->td_stripoffset_p[strip] > TIFF_UINT64_MAX - td->td_stripbytecount_p[strip]) + return -1; + if (td->td_stripoffset_p[strip]+td->td_stripbytecount_p[strip] > filesize) { + if( td->td_stripoffset_p[strip] >= filesize ) { + /* Not sure what we should in that case... */ + td->td_stripbytecount_p[strip] = 0; + } else { + td->td_stripbytecount_p[strip] = filesize - td->td_stripoffset_p[strip]; + } + } } else if (isTiled(tif)) { uint64 bytespertile = TIFFTileSize64(tif); for (strip = 0; strip < td->td_nstrips; strip++) - td->td_stripbytecount[strip] = bytespertile; + td->td_stripbytecount_p[strip] = bytespertile; } else { uint64 rowbytes = TIFFScanlineSize64(tif); uint32 rowsperstrip = td->td_imagelength/td->td_stripsperimage; for (strip = 0; strip < td->td_nstrips; strip++) - td->td_stripbytecount[strip] = rowbytes * rowsperstrip; + { + if( rowbytes > 0 && rowsperstrip > TIFF_UINT64_MAX / rowbytes ) + return -1; + td->td_stripbytecount_p[strip] = rowbytes * rowsperstrip; + } } TIFFSetFieldBit(tif, FIELD_STRIPBYTECOUNTS); if (!TIFFFieldSet(tif, FIELD_ROWSPERSTRIP)) @@ -4377,6 +4694,11 @@ TIFFCheckDirOffset(TIFF* tif, uint64 diroff) if (diroff == 0) /* no more directories */ return 0; + if (tif->tif_dirnumber == 65535) { + TIFFErrorExt(tif->tif_clientdata, "TIFFCheckDirOffset", + "Cannot handle more than 65535 TIFF directories"); + return 0; + } for (n = 0; n < tif->tif_dirnumber && tif->tif_dirlist; n++) { if (tif->tif_dirlist[n] == diroff) @@ -4385,7 +4707,7 @@ TIFFCheckDirOffset(TIFF* tif, uint64 diroff) tif->tif_dirnumber++; - if (tif->tif_dirnumber > tif->tif_dirlistsize) { + if (tif->tif_dirlist == NULL || tif->tif_dirnumber > tif->tif_dirlistsize) { uint64* new_dirlist; /* @@ -4396,7 +4718,10 @@ TIFFCheckDirOffset(TIFF* tif, uint64 diroff) tif->tif_dirnumber, 2 * sizeof(uint64), "for IFD list"); if (!new_dirlist) return 0; - tif->tif_dirlistsize = 2 * tif->tif_dirnumber; + if( tif->tif_dirnumber >= 32768 ) + tif->tif_dirlistsize = 65535; + else + tif->tif_dirlistsize = 2 * tif->tif_dirnumber; tif->tif_dirlist = new_dirlist; } @@ -4532,12 +4857,13 @@ TIFFFetchDirectory(TIFF* tif, uint64 diroff, TIFFDirEntry** pdir, } } else { tmsize_t m; - tmsize_t off = (tmsize_t) tif->tif_diroff; - if ((uint64)off!=tif->tif_diroff) + tmsize_t off; + if (tif->tif_diroff > (uint64)TIFF_INT64_MAX) { TIFFErrorExt(tif->tif_clientdata,module,"Can not read TIFF directory count"); return(0); } + off = (tmsize_t) tif->tif_diroff; /* * Check for integer overflow when validating the dir_off, @@ -4572,7 +4898,6 @@ TIFFFetchDirectory(TIFF* tif, uint64 diroff, TIFFDirEntry** pdir, } else { - tmsize_t m; uint64 dircount64; m=off+sizeof(uint64); if ((mtif->tif_size)) { @@ -4656,6 +4981,7 @@ TIFFFetchDirectory(TIFF* tif, uint64 diroff, TIFFDirEntry** pdir, mb=dir; for (n=0; ntdir_ignore = FALSE; if (tif->tif_flags&TIFF_SWAB) TIFFSwabShort((uint16*)ma); mb->tdir_tag=*(uint16*)ma; @@ -4670,6 +4996,7 @@ TIFFFetchDirectory(TIFF* tif, uint64 diroff, TIFFDirEntry** pdir, TIFFSwabLong((uint32*)ma); mb->tdir_count=(uint64)(*(uint32*)ma); ma+=sizeof(uint32); + mb->tdir_offset.toff_long8=0; *(uint32*)(&mb->tdir_offset)=*(uint32*)ma; ma+=sizeof(uint32); } @@ -4708,6 +5035,7 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover) return 0; } fip=tif->tif_fields[fii]; + assert(fip != NULL); /* should not happen */ assert(fip->set_field_type!=TIFF_SETGET_OTHER); /* if so, we shouldn't arrive here but deal with this in specialized code */ assert(fip->set_field_type!=TIFF_SETGET_INT); /* if so, we shouldn't arrive here as this is only the case for pseudo-tags */ err=TIFFReadDirEntryErrOk; @@ -4722,17 +5050,18 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover) err=TIFFReadDirEntryByteArray(tif,dp,&data); if (err==TIFFReadDirEntryErrOk) { - uint8* ma; - uint32 mb; + uint32 mb = 0; int n; - ma=data; - mb=0; - while (mb<(uint32)dp->tdir_count) + if (data != NULL) { - if (*ma==0) - break; - ma++; - mb++; + uint8* ma = data; + while (mb<(uint32)dp->tdir_count) + { + if (*ma==0) + break; + ma++; + mb++; + } } if (mb+1<(uint32)dp->tdir_count) TIFFWarningExt(tif->tif_clientdata,module,"ASCII value for tag \"%s\" contains null byte in value; value incorrectly truncated during reading due to implementation limitations",fip->field_name); @@ -4870,6 +5199,7 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover) if (err==TIFFReadDirEntryErrOk) { int m; + assert(data); /* avoid CLang static Analyzer false positive */ m=TIFFSetField(tif,dp->tdir_tag,data[0],data[1]); _TIFFfree(data); if (!m) @@ -4953,7 +5283,7 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover) assert(fip->field_readcount>=1); assert(fip->field_passcount==0); if (dp->tdir_count!=(uint64)fip->field_readcount) - /* corrupt file */; + /* corrupt file */; else { err=TIFFReadDirEntryFloatArray(tif,dp,&data); @@ -4969,6 +5299,29 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover) } } break; + /*--: Rational2Double: Extend for Double Arrays and Rational-Arrays read into Double-Arrays. */ + case TIFF_SETGET_C0_DOUBLE: + { + double* data; + assert(fip->field_readcount>=1); + assert(fip->field_passcount==0); + if (dp->tdir_count!=(uint64)fip->field_readcount) + /* corrupt file */; + else + { + err=TIFFReadDirEntryDoubleArray(tif,dp,&data); + if (err==TIFFReadDirEntryErrOk) + { + int m; + m=TIFFSetField(tif,dp->tdir_tag,data); + if (data!=0) + _TIFFfree(data); + if (!m) + return(0); + } + } + } + break; case TIFF_SETGET_C16_ASCII: { uint8* data; @@ -4982,6 +5335,11 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover) if (err==TIFFReadDirEntryErrOk) { int m; + if( data != 0 && dp->tdir_count > 0 && data[dp->tdir_count-1] != '\0' ) + { + TIFFWarningExt(tif->tif_clientdata,module,"ASCII value for tag \"%s\" does not end in null byte. Forcing it to be null",fip->field_name); + data[dp->tdir_count-1] = '\0'; + } m=TIFFSetField(tif,dp->tdir_tag,(uint16)(dp->tdir_count),data); if (data!=0) _TIFFfree(data); @@ -5154,6 +5512,11 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover) if (err==TIFFReadDirEntryErrOk) { int m; + if( data != 0 && dp->tdir_count > 0 && data[dp->tdir_count-1] != '\0' ) + { + TIFFWarningExt(tif->tif_clientdata,module,"ASCII value for tag \"%s\" does not end in null byte. Forcing it to be null",fip->field_name); + data[dp->tdir_count-1] = '\0'; + } m=TIFFSetField(tif,dp->tdir_tag,(uint32)(dp->tdir_count),data); if (data!=0) _TIFFfree(data); @@ -5355,7 +5718,7 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover) } if (err!=TIFFReadDirEntryErrOk) { - TIFFReadDirEntryOutputErr(tif,err,module,fip ? fip->field_name : "unknown tagname",recover); + TIFFReadDirEntryOutputErr(tif,err,module,fip->field_name,recover); return(0); } return(1); @@ -5371,28 +5734,39 @@ TIFFFetchStripThing(TIFF* tif, TIFFDirEntry* dir, uint32 nstrips, uint64** lpp) static const char module[] = "TIFFFetchStripThing"; enum TIFFReadDirEntryErr err; uint64* data; - err=TIFFReadDirEntryLong8Array(tif,dir,&data); + err=TIFFReadDirEntryLong8ArrayWithLimit(tif,dir,&data,nstrips); if (err!=TIFFReadDirEntryErrOk) { const TIFFField* fip = TIFFFieldWithTag(tif,dir->tdir_tag); TIFFReadDirEntryOutputErr(tif,err,module,fip ? fip->field_name : "unknown tagname",0); return(0); } - if (dir->tdir_count!=(uint64)nstrips) + if (dir->tdir_count<(uint64)nstrips) { uint64* resizeddata; + const TIFFField* fip = TIFFFieldWithTag(tif,dir->tdir_tag); + const char* pszMax = getenv("LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT"); + uint32 max_nstrips = 1000000; + if( pszMax ) + max_nstrips = (uint32) atoi(pszMax); + TIFFReadDirEntryOutputErr(tif,TIFFReadDirEntryErrCount, + module, + fip ? fip->field_name : "unknown tagname", + ( nstrips <= max_nstrips ) ); + + if( nstrips > max_nstrips ) + { + _TIFFfree(data); + return(0); + } + resizeddata=(uint64*)_TIFFCheckMalloc(tif,nstrips,sizeof(uint64),"for strip array"); if (resizeddata==0) { _TIFFfree(data); return(0); } - if (dir->tdir_count<(uint64)nstrips) - { - _TIFFmemcpy(resizeddata,data,(uint32)dir->tdir_count*sizeof(uint64)); - _TIFFmemset(resizeddata+(uint32)dir->tdir_count,0,(nstrips-(uint32)dir->tdir_count)*sizeof(uint64)); - } - else - _TIFFmemcpy(resizeddata,data,nstrips*sizeof(uint64)); + _TIFFmemcpy(resizeddata,data,(uint32)dir->tdir_count*sizeof(uint64)); + _TIFFmemset(resizeddata+(uint32)dir->tdir_count,0,(nstrips-(uint32)dir->tdir_count)*sizeof(uint64)); _TIFFfree(data); data=resizeddata; } @@ -5440,7 +5814,7 @@ TIFFFetchSubjectDistance(TIFF* tif, TIFFDirEntry* dir) TIFFSwabArrayOfLong(m.i,2); if (m.i[0]==0) n=0.0; - else if (m.i[0]==0xFFFFFFFF) + else if (m.i[0]==0xFFFFFFFF || m.i[1]==0) /* * XXX: Numerator 0xFFFFFFFF means that we have infinite * distance. Indicate that with a negative floating point @@ -5458,6 +5832,75 @@ TIFFFetchSubjectDistance(TIFF* tif, TIFFDirEntry* dir) } } +static void allocChoppedUpStripArrays(TIFF* tif, uint32 nstrips, + uint64 stripbytes, uint32 rowsperstrip) +{ + TIFFDirectory *td = &tif->tif_dir; + uint64 bytecount; + uint64 offset; + uint64 last_offset; + uint64 last_bytecount; + uint32 i; + uint64 *newcounts; + uint64 *newoffsets; + + offset = TIFFGetStrileOffset(tif, 0); + last_offset = TIFFGetStrileOffset(tif, td->td_nstrips-1); + last_bytecount = TIFFGetStrileByteCount(tif, td->td_nstrips-1); + if( last_offset > TIFF_UINT64_MAX - last_bytecount || + last_offset + last_bytecount < offset ) + { + return; + } + bytecount = last_offset + last_bytecount - offset; + + newcounts = (uint64*) _TIFFCheckMalloc(tif, nstrips, sizeof (uint64), + "for chopped \"StripByteCounts\" array"); + newoffsets = (uint64*) _TIFFCheckMalloc(tif, nstrips, sizeof (uint64), + "for chopped \"StripOffsets\" array"); + if (newcounts == NULL || newoffsets == NULL) { + /* + * Unable to allocate new strip information, give up and use + * the original one strip information. + */ + if (newcounts != NULL) + _TIFFfree(newcounts); + if (newoffsets != NULL) + _TIFFfree(newoffsets); + return; + } + + /* + * Fill the strip information arrays with new bytecounts and offsets + * that reflect the broken-up format. + */ + for (i = 0; i < nstrips; i++) + { + if (stripbytes > bytecount) + stripbytes = bytecount; + newcounts[i] = stripbytes; + newoffsets[i] = stripbytes ? offset : 0; + offset += stripbytes; + bytecount -= stripbytes; + } + + /* + * Replace old single strip info with multi-strip info. + */ + td->td_stripsperimage = td->td_nstrips = nstrips; + TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip); + + _TIFFfree(td->td_stripbytecount_p); + _TIFFfree(td->td_stripoffset_p); + td->td_stripbytecount_p = newcounts; + td->td_stripoffset_p = newoffsets; +#ifdef STRIPBYTECOUNTSORTED_UNUSED + td->td_stripbytecountsorted = 1; +#endif + tif->tif_flags |= TIFF_CHOPPEDUPARRAYS; +} + + /* * Replace a single strip (tile) of uncompressed data by multiple strips * (tiles), each approximately STRIP_SIZE_DEFAULT bytes. This is useful for @@ -5473,15 +5916,16 @@ ChopUpSingleUncompressedStrip(TIFF* tif) uint32 rowblock; uint64 rowblockbytes; uint64 stripbytes; - uint32 strip; - uint64 nstrips64; - uint32 nstrips32; + uint32 nstrips; uint32 rowsperstrip; - uint64* newcounts; - uint64* newoffsets; - bytecount = td->td_stripbytecount[0]; - offset = td->td_stripoffset[0]; + bytecount = TIFFGetStrileByteCount(tif, 0); + /* On a newly created file, just re-opened to be filled, we */ + /* don't want strip chop to trigger as it is going to cause issues */ + /* later ( StripOffsets and StripByteCounts improperly filled) . */ + if( bytecount == 0 && tif->tif_mode != O_RDONLY ) + return; + offset = TIFFGetStrileByteCount(tif, 0); assert(td->td_planarconfig == PLANARCONFIG_CONTIG); if ((td->td_photometric == PHOTOMETRIC_YCBCR)&& (!isUpSampled(tif))) @@ -5506,100 +5950,538 @@ ChopUpSingleUncompressedStrip(TIFF* tif) return; /* - * never increase the number of strips in an image + * never increase the number of rows per strip */ if (rowsperstrip >= td->td_rowsperstrip) return; - nstrips64 = TIFFhowmany_64(bytecount, stripbytes); - if ((nstrips64==0)||(nstrips64>0xFFFFFFFF)) /* something is wonky, do nothing. */ - return; - nstrips32 = (uint32)nstrips64; + nstrips = TIFFhowmany_32(td->td_imagelength, rowsperstrip); + if( nstrips == 0 ) + return; - newcounts = (uint64*) _TIFFCheckMalloc(tif, nstrips32, sizeof (uint64), - "for chopped \"StripByteCounts\" array"); - newoffsets = (uint64*) _TIFFCheckMalloc(tif, nstrips32, sizeof (uint64), - "for chopped \"StripOffsets\" array"); - if (newcounts == NULL || newoffsets == NULL) { - /* - * Unable to allocate new strip information, give up and use - * the original one strip information. - */ - if (newcounts != NULL) - _TIFFfree(newcounts); - if (newoffsets != NULL) - _TIFFfree(newoffsets); - return; - } - /* - * Fill the strip information arrays with new bytecounts and offsets - * that reflect the broken-up format. - */ - for (strip = 0; strip < nstrips32; strip++) { - if (stripbytes > bytecount) - stripbytes = bytecount; - newcounts[strip] = stripbytes; - newoffsets[strip] = offset; - offset += stripbytes; - bytecount -= stripbytes; - } - /* - * Replace old single strip info with multi-strip info. - */ - td->td_stripsperimage = td->td_nstrips = nstrips32; - TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip); + /* If we are going to allocate a lot of memory, make sure that the */ + /* file is as big as needed */ + if( tif->tif_mode == O_RDONLY && + nstrips > 1000000 && + (offset >= TIFFGetFileSize(tif) || + stripbytes > (TIFFGetFileSize(tif) - offset) / (nstrips - 1)) ) + { + return; + } - _TIFFfree(td->td_stripbytecount); - _TIFFfree(td->td_stripoffset); - td->td_stripbytecount = newcounts; - td->td_stripoffset = newoffsets; - td->td_stripbytecountsorted = 1; + allocChoppedUpStripArrays(tif, nstrips, stripbytes, rowsperstrip); } + +/* + * Replace a file with contiguous strips > 2 GB of uncompressed data by + * multiple smaller strips. This is useful for + * dealing with large images or for dealing with machines with a limited + * amount memory. + */ +static void TryChopUpUncompressedBigTiff( TIFF* tif ) +{ + TIFFDirectory *td = &tif->tif_dir; + uint32 rowblock; + uint64 rowblockbytes; + uint32 i; + uint64 stripsize; + uint32 rowblocksperstrip; + uint32 rowsperstrip; + uint64 stripbytes; + uint32 nstrips; + + stripsize = TIFFStripSize64(tif); + + assert( tif->tif_dir.td_planarconfig == PLANARCONFIG_CONTIG ); + assert( tif->tif_dir.td_compression == COMPRESSION_NONE ); + assert( (tif->tif_flags&(TIFF_STRIPCHOP|TIFF_ISTILED)) == TIFF_STRIPCHOP ); + assert( stripsize > 0x7FFFFFFFUL ); + + /* On a newly created file, just re-opened to be filled, we */ + /* don't want strip chop to trigger as it is going to cause issues */ + /* later ( StripOffsets and StripByteCounts improperly filled) . */ + if( TIFFGetStrileByteCount(tif, 0) == 0 && tif->tif_mode != O_RDONLY ) + return; + + if ((td->td_photometric == PHOTOMETRIC_YCBCR)&& + (!isUpSampled(tif))) + rowblock = td->td_ycbcrsubsampling[1]; + else + rowblock = 1; + rowblockbytes = TIFFVStripSize64(tif, rowblock); + if( rowblockbytes == 0 || rowblockbytes > 0x7FFFFFFFUL ) + { + /* In case of file with gigantic width */ + return; + } + + /* Check that the strips are contiguous and of the expected size */ + for( i = 0; i < td->td_nstrips; i++ ) + { + if( i == td->td_nstrips - 1 ) + { + if( TIFFGetStrileByteCount(tif, i) < TIFFVStripSize64( + tif, td->td_imagelength - i * td->td_rowsperstrip ) ) + { + return; + } + } + else + { + if( TIFFGetStrileByteCount(tif, i) != stripsize ) + { + return; + } + if( i > 0 && TIFFGetStrileOffset(tif, i) != + TIFFGetStrileOffset(tif, i-1) + TIFFGetStrileByteCount(tif, i-1) ) + { + return; + } + } + } + + /* Aim for 512 MB strips (that will still be manageable by 32 bit builds */ + rowblocksperstrip = (uint32) (512 * 1024 * 1024 / rowblockbytes); + if( rowblocksperstrip == 0 ) + rowblocksperstrip = 1; + rowsperstrip = rowblocksperstrip * rowblock; + stripbytes = rowblocksperstrip * rowblockbytes; + assert( stripbytes <= 0x7FFFFFFFUL ); + + nstrips = TIFFhowmany_32(td->td_imagelength, rowsperstrip); + if( nstrips == 0 ) + return; + + /* If we are going to allocate a lot of memory, make sure that the */ + /* file is as big as needed */ + if( tif->tif_mode == O_RDONLY && + nstrips > 1000000 ) + { + uint64 last_offset = TIFFGetStrileOffset(tif, td->td_nstrips-1); + uint64 filesize = TIFFGetFileSize(tif); + uint64 last_bytecount = TIFFGetStrileByteCount(tif, td->td_nstrips-1); + if( last_offset > filesize || + last_bytecount > filesize - last_offset ) + { + return; + } + } + + allocChoppedUpStripArrays(tif, nstrips, stripbytes, rowsperstrip); +} + + +TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW +static uint64 _TIFFUnsanitizedAddUInt64AndInt(uint64 a, int b) +{ + return a + b; +} + +/* Read the value of [Strip|Tile]Offset or [Strip|Tile]ByteCount around + * strip/tile of number strile. Also fetch the neighbouring values using a + * 4096 byte page size. + */ +static +int _TIFFPartialReadStripArray( TIFF* tif, TIFFDirEntry* dirent, + int strile, uint64* panVals ) +{ + static const char module[] = "_TIFFPartialReadStripArray"; +#define IO_CACHE_PAGE_SIZE 4096 + + size_t sizeofval; + const int bSwab = (tif->tif_flags & TIFF_SWAB) != 0; + int sizeofvalint; + uint64 nBaseOffset; + uint64 nOffset; + uint64 nOffsetStartPage; + uint64 nOffsetEndPage; + tmsize_t nToRead; + tmsize_t nRead; + uint64 nLastStripOffset; + int iStartBefore; + int i; + const uint32 arraySize = tif->tif_dir.td_stripoffsetbyteallocsize; + unsigned char buffer[2 * IO_CACHE_PAGE_SIZE]; + + assert( dirent->tdir_count > 4 ); + + if( dirent->tdir_type == TIFF_SHORT ) + { + sizeofval = sizeof(uint16); + } + else if( dirent->tdir_type == TIFF_LONG ) + { + sizeofval = sizeof(uint32); + } + else if( dirent->tdir_type == TIFF_LONG8 ) + { + sizeofval = sizeof(uint64); + } + else if( dirent->tdir_type == TIFF_SLONG8 ) + { + /* Non conformant but used by some images as in */ + /* https://github.com/OSGeo/gdal/issues/2165 */ + sizeofval = sizeof(int64); + } + else + { + TIFFErrorExt(tif->tif_clientdata, module, + "Invalid type for [Strip|Tile][Offset/ByteCount] tag"); + panVals[strile] = 0; + return 0; + } + sizeofvalint = (int)(sizeofval); + + if( tif->tif_flags&TIFF_BIGTIFF ) + { + uint64 offset = dirent->tdir_offset.toff_long8; + if( bSwab ) + TIFFSwabLong8(&offset); + nBaseOffset = offset; + } + else + { + uint32 offset = dirent->tdir_offset.toff_long; + if( bSwab ) + TIFFSwabLong(&offset); + nBaseOffset = offset; + } + /* To avoid later unsigned integer overflows */ + if( nBaseOffset > (uint64)TIFF_INT64_MAX ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Cannot read offset/size for strile %d", strile); + panVals[strile] = 0; + return 0; + } + nOffset = nBaseOffset + sizeofval * strile; + nOffsetStartPage = + (nOffset / IO_CACHE_PAGE_SIZE) * IO_CACHE_PAGE_SIZE; + nOffsetEndPage = nOffsetStartPage + IO_CACHE_PAGE_SIZE; + + if( nOffset + sizeofval > nOffsetEndPage ) + nOffsetEndPage += IO_CACHE_PAGE_SIZE; +#undef IO_CACHE_PAGE_SIZE + + nLastStripOffset = nBaseOffset + arraySize * sizeofval; + if( nLastStripOffset < nOffsetEndPage ) + nOffsetEndPage = nLastStripOffset; + if( nOffsetStartPage >= nOffsetEndPage ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Cannot read offset/size for strile %d", strile); + panVals[strile] = 0; + return 0; + } + if (!SeekOK(tif,nOffsetStartPage)) + { + panVals[strile] = 0; + return 0; + } + + nToRead = (tmsize_t)(nOffsetEndPage - nOffsetStartPage); + nRead = TIFFReadFile(tif, buffer, nToRead); + if( nRead < nToRead ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Cannot read offset/size for strile around ~%d", strile); + return 0; + } + iStartBefore = -(int)((nOffset - nOffsetStartPage) / sizeofval); + if( strile + iStartBefore < 0 ) + iStartBefore = -strile; + for( i = iStartBefore; + (uint32)(strile + i) < arraySize && + _TIFFUnsanitizedAddUInt64AndInt(nOffset, (i + 1) * sizeofvalint) <= nOffsetEndPage; + ++i ) + { + if( dirent->tdir_type == TIFF_SHORT ) + { + uint16 val; + memcpy(&val, + buffer + (nOffset - nOffsetStartPage) + i * sizeofvalint, + sizeof(val)); + if( bSwab ) + TIFFSwabShort(&val); + panVals[strile + i] = val; + } + else if( dirent->tdir_type == TIFF_LONG ) + { + uint32 val; + memcpy(&val, + buffer + (nOffset - nOffsetStartPage) + i * sizeofvalint, + sizeof(val)); + if( bSwab ) + TIFFSwabLong(&val); + panVals[strile + i] = val; + } + else if( dirent->tdir_type == TIFF_LONG8 ) + { + uint64 val; + memcpy(&val, + buffer + (nOffset - nOffsetStartPage) + i * sizeofvalint, + sizeof(val)); + if( bSwab ) + TIFFSwabLong8(&val); + panVals[strile + i] = val; + } + else /* if( dirent->tdir_type == TIFF_SLONG8 ) */ + { + /* Non conformant data type */ + int64 val; + memcpy(&val, + buffer + (nOffset - nOffsetStartPage) + i * sizeofvalint, + sizeof(val)); + if( bSwab ) + TIFFSwabLong8((uint64*) &val); + panVals[strile + i] = (uint64) val; + } + } + return 1; +} + +static int _TIFFFetchStrileValue(TIFF* tif, + uint32 strile, + TIFFDirEntry* dirent, + uint64** parray) +{ + static const char module[] = "_TIFFFetchStrileValue"; + TIFFDirectory *td = &tif->tif_dir; + if( strile >= dirent->tdir_count ) + { + return 0; + } + if( strile >= td->td_stripoffsetbyteallocsize ) + { + uint32 nStripArrayAllocBefore = td->td_stripoffsetbyteallocsize; + uint32 nStripArrayAllocNew; + uint64 nArraySize64; + size_t nArraySize; + uint64* offsetArray; + uint64* bytecountArray; + + if( strile > 1000000 ) + { + uint64 filesize = TIFFGetFileSize(tif); + /* Avoid excessive memory allocation attempt */ + /* For such a big blockid we need at least a TIFF_LONG per strile */ + /* for the offset array. */ + if( strile > filesize / sizeof(uint32) ) + { + TIFFErrorExt(tif->tif_clientdata, module, "File too short"); + return 0; + } + } + + if( td->td_stripoffsetbyteallocsize == 0 && + td->td_nstrips < 1024 * 1024 ) + { + nStripArrayAllocNew = td->td_nstrips; + } + else + { +#define TIFF_MAX(a,b) (((a)>(b)) ? (a) : (b)) +#define TIFF_MIN(a,b) (((a)<(b)) ? (a) : (b)) + nStripArrayAllocNew = TIFF_MAX(strile + 1, 1024U * 512U ); + if( nStripArrayAllocNew < 0xFFFFFFFFU / 2 ) + nStripArrayAllocNew *= 2; + nStripArrayAllocNew = TIFF_MIN(nStripArrayAllocNew, td->td_nstrips); + } + assert( strile < nStripArrayAllocNew ); + nArraySize64 = (uint64)sizeof(uint64) * nStripArrayAllocNew; + nArraySize = (size_t)(nArraySize64); +#if SIZEOF_SIZE_T == 4 + if( nArraySize != nArraySize64 ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Cannot allocate strip offset and bytecount arrays"); + return 0; + } +#endif + offsetArray = (uint64*)( + _TIFFrealloc( td->td_stripoffset_p, nArraySize ) ); + bytecountArray = (uint64*)( + _TIFFrealloc( td->td_stripbytecount_p, nArraySize ) ); + if( offsetArray ) + td->td_stripoffset_p = offsetArray; + if( bytecountArray ) + td->td_stripbytecount_p = bytecountArray; + if( offsetArray && bytecountArray ) + { + td->td_stripoffsetbyteallocsize = nStripArrayAllocNew; + /* Initialize new entries to ~0 / -1 */ + memset(td->td_stripoffset_p + nStripArrayAllocBefore, + 0xFF, + (td->td_stripoffsetbyteallocsize - nStripArrayAllocBefore) * sizeof(uint64) ); + memset(td->td_stripbytecount_p + nStripArrayAllocBefore, + 0xFF, + (td->td_stripoffsetbyteallocsize - nStripArrayAllocBefore) * sizeof(uint64) ); + } + else + { + TIFFErrorExt(tif->tif_clientdata, module, + "Cannot allocate strip offset and bytecount arrays"); + _TIFFfree(td->td_stripoffset_p); + td->td_stripoffset_p = NULL; + _TIFFfree(td->td_stripbytecount_p); + td->td_stripbytecount_p = NULL; + td->td_stripoffsetbyteallocsize = 0; + } + } + if( *parray == NULL || strile >= td->td_stripoffsetbyteallocsize ) + return 0; + + if( ~((*parray)[strile]) == 0 ) + { + if( !_TIFFPartialReadStripArray( tif, dirent, strile, *parray ) ) + { + (*parray)[strile] = 0; + return 0; + } + } + + return 1; +} + +static uint64 _TIFFGetStrileOffsetOrByteCountValue(TIFF *tif, uint32 strile, + TIFFDirEntry* dirent, + uint64** parray, + int *pbErr) +{ + TIFFDirectory *td = &tif->tif_dir; + if( pbErr ) + *pbErr = 0; + if( (tif->tif_flags&TIFF_DEFERSTRILELOAD) && !(tif->tif_flags&TIFF_CHOPPEDUPARRAYS) ) + { + if( !(tif->tif_flags&TIFF_LAZYSTRILELOAD) || + /* If the values may fit in the toff_long/toff_long8 member */ + /* then use _TIFFFillStriles to simplify _TIFFFetchStrileValue */ + dirent->tdir_count <= 4 ) + { + if( !_TIFFFillStriles(tif) ) + { + if( pbErr ) + *pbErr = 1; + /* Do not return, as we want this function to always */ + /* return the same value if called several times with */ + /* the same arguments */ + } + } + else + { + if( !_TIFFFetchStrileValue(tif, strile, dirent, parray) ) + { + if( pbErr ) + *pbErr = 1; + return 0; + } + } + } + if( *parray == NULL || strile >= td->td_nstrips ) + { + if( pbErr ) + *pbErr = 1; + return 0; + } + return (*parray)[strile]; +} + +/* Return the value of the TileOffsets/StripOffsets array for the specified tile/strile */ +uint64 TIFFGetStrileOffset(TIFF *tif, uint32 strile) +{ + return TIFFGetStrileOffsetWithErr(tif, strile, NULL); +} + +/* Return the value of the TileOffsets/StripOffsets array for the specified tile/strile */ +uint64 TIFFGetStrileOffsetWithErr(TIFF *tif, uint32 strile, int *pbErr) +{ + TIFFDirectory *td = &tif->tif_dir; + return _TIFFGetStrileOffsetOrByteCountValue(tif, strile, + &(td->td_stripoffset_entry), + &(td->td_stripoffset_p), pbErr); +} + +/* Return the value of the TileByteCounts/StripByteCounts array for the specified tile/strile */ +uint64 TIFFGetStrileByteCount(TIFF *tif, uint32 strile) +{ + return TIFFGetStrileByteCountWithErr(tif, strile, NULL); +} + +/* Return the value of the TileByteCounts/StripByteCounts array for the specified tile/strile */ +uint64 TIFFGetStrileByteCountWithErr(TIFF *tif, uint32 strile, int *pbErr) +{ + TIFFDirectory *td = &tif->tif_dir; + return _TIFFGetStrileOffsetOrByteCountValue(tif, strile, + &(td->td_stripbytecount_entry), + &(td->td_stripbytecount_p), pbErr); +} + + int _TIFFFillStriles( TIFF *tif ) { -#if defined(DEFER_STRILE_LOAD) - register TIFFDirectory *td = &tif->tif_dir; - int return_value = 1; + return _TIFFFillStrilesInternal( tif, 1 ); +} - if( td->td_stripoffset != NULL ) - return 1; +static int _TIFFFillStrilesInternal( TIFF *tif, int loadStripByteCount ) +{ + register TIFFDirectory *td = &tif->tif_dir; + int return_value = 1; - if( td->td_stripoffset_entry.tdir_count == 0 ) - return 0; - - if (!TIFFFetchStripThing(tif,&(td->td_stripoffset_entry), - td->td_nstrips,&td->td_stripoffset)) - { - return_value = 0; - } - - if (!TIFFFetchStripThing(tif,&(td->td_stripbytecount_entry), - td->td_nstrips,&td->td_stripbytecount)) - { - return_value = 0; - } - - _TIFFmemset( &(td->td_stripoffset_entry), 0, sizeof(TIFFDirEntry)); - _TIFFmemset( &(td->td_stripbytecount_entry), 0, sizeof(TIFFDirEntry)); - - if (tif->tif_dir.td_nstrips > 1 && return_value == 1 ) { - uint32 strip; - - tif->tif_dir.td_stripbytecountsorted = 1; - for (strip = 1; strip < tif->tif_dir.td_nstrips; strip++) { - if (tif->tif_dir.td_stripoffset[strip - 1] > - tif->tif_dir.td_stripoffset[strip]) { - tif->tif_dir.td_stripbytecountsorted = 0; - break; - } - } - } - - return return_value; -#else /* !defined(DEFER_STRILE_LOAD) */ - (void) tif; + /* Do not do anything if TIFF_DEFERSTRILELOAD is not set */ + if( !(tif->tif_flags&TIFF_DEFERSTRILELOAD) || (tif->tif_flags&TIFF_CHOPPEDUPARRAYS) != 0 ) return 1; -#endif + + if( tif->tif_flags&TIFF_LAZYSTRILELOAD ) + { + /* In case of lazy loading, reload completely the arrays */ + _TIFFfree(td->td_stripoffset_p); + _TIFFfree(td->td_stripbytecount_p); + td->td_stripoffset_p = NULL; + td->td_stripbytecount_p = NULL; + td->td_stripoffsetbyteallocsize = 0; + tif->tif_flags &= ~TIFF_LAZYSTRILELOAD; + } + + /* If stripoffset array is already loaded, exit with success */ + if( td->td_stripoffset_p != NULL ) + return 1; + + /* If tdir_count was canceled, then we already got there, but in error */ + if( td->td_stripoffset_entry.tdir_count == 0 ) + return 0; + + if (!TIFFFetchStripThing(tif,&(td->td_stripoffset_entry), + td->td_nstrips,&td->td_stripoffset_p)) + { + return_value = 0; + } + + if (loadStripByteCount && + !TIFFFetchStripThing(tif,&(td->td_stripbytecount_entry), + td->td_nstrips,&td->td_stripbytecount_p)) + { + return_value = 0; + } + + _TIFFmemset( &(td->td_stripoffset_entry), 0, sizeof(TIFFDirEntry)); + _TIFFmemset( &(td->td_stripbytecount_entry), 0, sizeof(TIFFDirEntry)); + +#ifdef STRIPBYTECOUNTSORTED_UNUSED + if (tif->tif_dir.td_nstrips > 1 && return_value == 1 ) { + uint32 strip; + + tif->tif_dir.td_stripbytecountsorted = 1; + for (strip = 1; strip < tif->tif_dir.td_nstrips; strip++) { + if (tif->tif_dir.td_stripoffset_p[strip - 1] > + tif->tif_dir.td_stripoffset_p[strip]) { + tif->tif_dir.td_stripbytecountsorted = 0; + break; + } + } + } +#endif + + return return_value; } diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_dirwrite.c b/thirdparty/tiff-4.2.0/libtiff/tif_dirwrite.c similarity index 69% rename from thirdparty/tiff-4.0.3/libtiff/tif_dirwrite.c rename to thirdparty/tiff-4.2.0/libtiff/tif_dirwrite.c index fa20609e..f481250e 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_dirwrite.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_dirwrite.c @@ -1,5 +1,3 @@ -/* $Id: tif_dirwrite.c,v 1.77 2012-07-06 19:18:31 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -30,6 +28,8 @@ * Directory Write Support Routines. */ #include "tiffiop.h" +#include /*--: for Rational2Double */ +#include /*--: for Rational2Double */ #ifdef HAVE_IEEEFP #define TIFFCvtNativeToIEEEFloat(tif, n, fp) @@ -156,6 +156,19 @@ static int TIFFWriteDirectoryTagCheckedSlong8Array(TIFF* tif, uint32* ndir, TIFF static int TIFFWriteDirectoryTagCheckedRational(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, double value); static int TIFFWriteDirectoryTagCheckedRationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, float* value); static int TIFFWriteDirectoryTagCheckedSrationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, float* value); + +/*--: Rational2Double: New functions to support true double-precision for custom rational tag types. */ +static int TIFFWriteDirectoryTagRationalDoubleArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, double* value); +static int TIFFWriteDirectoryTagSrationalDoubleArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, double* value); +static int TIFFWriteDirectoryTagCheckedRationalDoubleArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, double* value); +static int TIFFWriteDirectoryTagCheckedSrationalDoubleArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, double* value); +static void DoubleToRational(double value, uint32 *num, uint32 *denom); +static void DoubleToSrational(double value, int32 *num, int32 *denom); +#if 0 +static void DoubleToRational_direct(double value, unsigned long *num, unsigned long *denom); +static void DoubleToSrational_direct(double value, long *num, long *denom); +#endif + #ifdef notdef static int TIFFWriteDirectoryTagCheckedFloat(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, float value); #endif @@ -183,6 +196,51 @@ TIFFWriteDirectory(TIFF* tif) return TIFFWriteDirectorySec(tif,TRUE,TRUE,NULL); } +/* + * This is an advanced writing function that must be used in a particular + * sequence, and generally together with TIFFForceStrileArrayWriting(), + * to make its intended effect. Its aim is to modify the location + * where the [Strip/Tile][Offsets/ByteCounts] arrays are located in the file. + * More precisely, when TIFFWriteCheck() will be called, the tag entries for + * those arrays will be written with type = count = offset = 0 as a temporary + * value. + * + * Its effect is only valid for the current directory, and before + * TIFFWriteDirectory() is first called, and will be reset when + * changing directory. + * + * The typical sequence of calls is: + * TIFFOpen() + * [ TIFFCreateDirectory(tif) ] + * Set fields with calls to TIFFSetField(tif, ...) + * TIFFDeferStrileArrayWriting(tif) + * TIFFWriteCheck(tif, ...) + * TIFFWriteDirectory(tif) + * ... potentially create other directories and come back to the above directory + * TIFFForceStrileArrayWriting(tif): emit the arrays at the end of file + * + * Returns 1 in case of success, 0 otherwise. + */ +int TIFFDeferStrileArrayWriting(TIFF* tif) +{ + static const char module[] = "TIFFDeferStrileArrayWriting"; + if (tif->tif_mode == O_RDONLY) + { + TIFFErrorExt(tif->tif_clientdata, tif->tif_name, + "File opened in read-only mode"); + return 0; + } + if( tif->tif_diroff != 0 ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Directory has already been written"); + return 0; + } + + tif->tif_dir.td_deferstrilearraywriting = TRUE; + return 1; +} + /* * Similar to TIFFWriteDirectory(), writes the directory out * but leaves all data structures in memory so that it can be @@ -194,7 +252,7 @@ TIFFCheckpointDirectory(TIFF* tif) { int rc; /* Setup the strips arrays, if they haven't already been. */ - if (tif->tif_dir.td_stripoffset == NULL) + if (tif->tif_dir.td_stripoffset_p == NULL) (void) TIFFSetupStrips(tif); rc = TIFFWriteDirectorySec(tif,TRUE,FALSE,NULL); (void) TIFFSetWriteOffset(tif, TIFFSeekFile(tif, 0, SEEK_END)); @@ -529,12 +587,12 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff) { if (!isTiled(tif)) { - if (!TIFFWriteDirectoryTagLongLong8Array(tif,&ndir,dir,TIFFTAG_STRIPBYTECOUNTS,tif->tif_dir.td_nstrips,tif->tif_dir.td_stripbytecount)) + if (!TIFFWriteDirectoryTagLongLong8Array(tif,&ndir,dir,TIFFTAG_STRIPBYTECOUNTS,tif->tif_dir.td_nstrips,tif->tif_dir.td_stripbytecount_p)) goto bad; } else { - if (!TIFFWriteDirectoryTagLongLong8Array(tif,&ndir,dir,TIFFTAG_TILEBYTECOUNTS,tif->tif_dir.td_nstrips,tif->tif_dir.td_stripbytecount)) + if (!TIFFWriteDirectoryTagLongLong8Array(tif,&ndir,dir,TIFFTAG_TILEBYTECOUNTS,tif->tif_dir.td_nstrips,tif->tif_dir.td_stripbytecount_p)) goto bad; } } @@ -542,12 +600,24 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff) { if (!isTiled(tif)) { - if (!TIFFWriteDirectoryTagLongLong8Array(tif,&ndir,dir,TIFFTAG_STRIPOFFSETS,tif->tif_dir.td_nstrips,tif->tif_dir.td_stripoffset)) - goto bad; + /* td_stripoffset_p might be NULL in an odd OJPEG case. See + * tif_dirread.c around line 3634. + * XXX: OJPEG hack. + * If a) compression is OJPEG, b) it's not a tiled TIFF, + * and c) the number of strips is 1, + * then we tolerate the absence of stripoffsets tag, + * because, presumably, all required data is in the + * JpegInterchangeFormat stream. + * We can get here when using tiffset on such a file. + * See http://bugzilla.maptools.org/show_bug.cgi?id=2500 + */ + if (tif->tif_dir.td_stripoffset_p != NULL && + !TIFFWriteDirectoryTagLongLong8Array(tif,&ndir,dir,TIFFTAG_STRIPOFFSETS,tif->tif_dir.td_nstrips,tif->tif_dir.td_stripoffset_p)) + goto bad; } else { - if (!TIFFWriteDirectoryTagLongLong8Array(tif,&ndir,dir,TIFFTAG_TILEOFFSETS,tif->tif_dir.td_nstrips,tif->tif_dir.td_stripoffset)) + if (!TIFFWriteDirectoryTagLongLong8Array(tif,&ndir,dir,TIFFTAG_TILEOFFSETS,tif->tif_dir.td_nstrips,tif->tif_dir.td_stripoffset_p)) goto bad; } } @@ -645,7 +715,7 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff) assert(o->field_passcount==0); TIFFGetField(tif,o->field_tag,&pb); pa=(uint32)(strlen(pb)); - if (!TIFFWriteDirectoryTagAscii(tif,&ndir,dir,o->field_tag,pa,pb)) + if (!TIFFWriteDirectoryTagAscii(tif,&ndir,dir,(uint16)o->field_tag,pa,pb)) goto bad; } break; @@ -656,7 +726,7 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff) assert(o->field_readcount==1); assert(o->field_passcount==0); TIFFGetField(tif,o->field_tag,&p); - if (!TIFFWriteDirectoryTagShort(tif,&ndir,dir,o->field_tag,p)) + if (!TIFFWriteDirectoryTagShort(tif,&ndir,dir,(uint16)o->field_tag,p)) goto bad; } break; @@ -667,7 +737,7 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff) assert(o->field_readcount==1); assert(o->field_passcount==0); TIFFGetField(tif,o->field_tag,&p); - if (!TIFFWriteDirectoryTagLong(tif,&ndir,dir,o->field_tag,p)) + if (!TIFFWriteDirectoryTagLong(tif,&ndir,dir,(uint16)o->field_tag,p)) goto bad; } break; @@ -679,13 +749,16 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff) assert(o->field_readcount==TIFF_VARIABLE2); assert(o->field_passcount==1); TIFFGetField(tif,o->field_tag,&pa,&pb); - if (!TIFFWriteDirectoryTagUndefinedArray(tif,&ndir,dir,o->field_tag,pa,pb)) + if (!TIFFWriteDirectoryTagUndefinedArray(tif,&ndir,dir,(uint16)o->field_tag,pa,pb)) goto bad; } break; default: - assert(0); /* we should never get here */ - break; + TIFFErrorExt(tif->tif_clientdata,module, + "Cannot write tag %d (%s)", + TIFFFieldTag(o), + o->field_name ? o->field_name : "unknown"); + goto bad; } } } @@ -693,70 +766,102 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff) } for (m=0; m<(uint32)(tif->tif_dir.td_customValueCount); m++) { + uint16 tag = (uint16)tif->tif_dir.td_customValues[m].info->field_tag; + uint32 count = tif->tif_dir.td_customValues[m].count; switch (tif->tif_dir.td_customValues[m].info->field_type) { case TIFF_ASCII: - if (!TIFFWriteDirectoryTagAscii(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value)) + if (!TIFFWriteDirectoryTagAscii(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) goto bad; break; case TIFF_UNDEFINED: - if (!TIFFWriteDirectoryTagUndefinedArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value)) + if (!TIFFWriteDirectoryTagUndefinedArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) goto bad; break; case TIFF_BYTE: - if (!TIFFWriteDirectoryTagByteArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value)) + if (!TIFFWriteDirectoryTagByteArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) goto bad; break; case TIFF_SBYTE: - if (!TIFFWriteDirectoryTagSbyteArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value)) + if (!TIFFWriteDirectoryTagSbyteArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) goto bad; break; case TIFF_SHORT: - if (!TIFFWriteDirectoryTagShortArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value)) + if (!TIFFWriteDirectoryTagShortArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) goto bad; break; case TIFF_SSHORT: - if (!TIFFWriteDirectoryTagSshortArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value)) + if (!TIFFWriteDirectoryTagSshortArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) goto bad; break; case TIFF_LONG: - if (!TIFFWriteDirectoryTagLongArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value)) + if (!TIFFWriteDirectoryTagLongArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) goto bad; break; case TIFF_SLONG: - if (!TIFFWriteDirectoryTagSlongArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value)) + if (!TIFFWriteDirectoryTagSlongArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) goto bad; break; case TIFF_LONG8: - if (!TIFFWriteDirectoryTagLong8Array(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value)) + if (!TIFFWriteDirectoryTagLong8Array(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) goto bad; break; case TIFF_SLONG8: - if (!TIFFWriteDirectoryTagSlong8Array(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value)) + if (!TIFFWriteDirectoryTagSlong8Array(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) goto bad; break; case TIFF_RATIONAL: - if (!TIFFWriteDirectoryTagRationalArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value)) - goto bad; + { + /*-- Rational2Double: For Rationals evaluate "set_field_type" to determine internal storage size. */ + int tv_size; + tv_size = _TIFFSetGetFieldSize(tif->tif_dir.td_customValues[m].info->set_field_type); + if (tv_size == 8) { + if (!TIFFWriteDirectoryTagRationalDoubleArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) + goto bad; + } else { + /*-- default should be tv_size == 4 */ + if (!TIFFWriteDirectoryTagRationalArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) + goto bad; + /*-- ToDo: After Testing, this should be removed and tv_size==4 should be set as default. */ + if (tv_size != 4) { + TIFFErrorExt(0,"TIFFLib: _TIFFWriteDirectorySec()", "Rational2Double: .set_field_type in not 4 but %d", tv_size); + } + } + } break; case TIFF_SRATIONAL: - if (!TIFFWriteDirectoryTagSrationalArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value)) - goto bad; + { + /*-- Rational2Double: For Rationals evaluate "set_field_type" to determine internal storage size. */ + int tv_size; + tv_size = _TIFFSetGetFieldSize(tif->tif_dir.td_customValues[m].info->set_field_type); + if (tv_size == 8) { + if (!TIFFWriteDirectoryTagSrationalDoubleArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) + goto bad; + } else { + /*-- default should be tv_size == 4 */ + if (!TIFFWriteDirectoryTagSrationalArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) + goto bad; + /*-- ToDo: After Testing, this should be removed and tv_size==4 should be set as default. */ + if (tv_size != 4) { + TIFFErrorExt(0,"TIFFLib: _TIFFWriteDirectorySec()", "Rational2Double: .set_field_type in not 4 but %d", tv_size); + } + } + } break; case TIFF_FLOAT: - if (!TIFFWriteDirectoryTagFloatArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value)) + if (!TIFFWriteDirectoryTagFloatArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) goto bad; break; case TIFF_DOUBLE: - if (!TIFFWriteDirectoryTagDoubleArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value)) + if (!TIFFWriteDirectoryTagDoubleArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) goto bad; break; case TIFF_IFD: - if (!TIFFWriteDirectoryTagIfdArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value)) + if (!TIFFWriteDirectoryTagIfdArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) goto bad; break; case TIFF_IFD8: - if (!TIFFWriteDirectoryTagIfdIfd8Array(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value)) + if (!TIFFWriteDirectoryTagIfdIfd8Array(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value)) goto bad; break; default: @@ -778,7 +883,7 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff) goto bad; } else - tif->tif_diroff=(TIFFSeekFile(tif,0,SEEK_END)+1)&(~1); + tif->tif_diroff=(TIFFSeekFile(tif,0,SEEK_END)+1)&(~((toff_t)1)); if (pdiroff!=NULL) *pdiroff=tif->tif_diroff; if (!(tif->tif_flags&TIFF_BIGTIFF)) @@ -806,7 +911,12 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff) TIFFDirEntry* nb; for (na=0, nb=dir; ; na++, nb++) { - assert(natif_clientdata,module, + "Cannot find SubIFD tag"); + goto bad; + } if (nb->tdir_tag==TIFFTAG_SUBIFD) break; } @@ -828,7 +938,7 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff) uint32 nTmp; TIFFDirEntry* o; n=dirmem; - *(uint16*)n=ndir; + *(uint16*)n=(uint16)ndir; if (tif->tif_flags&TIFF_SWAB) TIFFSwabShort((uint16*)n); n+=2; @@ -925,6 +1035,60 @@ bad: return(0); } +static int8 TIFFClampDoubleToInt8( double val ) +{ + if( val > 127 ) + return 127; + if( val < -128 || val != val ) + return -128; + return (int8)val; +} + +static int16 TIFFClampDoubleToInt16( double val ) +{ + if( val > 32767 ) + return 32767; + if( val < -32768 || val != val ) + return -32768; + return (int16)val; +} + +static int32 TIFFClampDoubleToInt32( double val ) +{ + if( val > 0x7FFFFFFF ) + return 0x7FFFFFFF; + if( val < -0x7FFFFFFF-1 || val != val ) + return -0x7FFFFFFF-1; + return (int32)val; +} + +static uint8 TIFFClampDoubleToUInt8( double val ) +{ + if( val < 0 ) + return 0; + if( val > 255 || val != val ) + return 255; + return (uint8)val; +} + +static uint16 TIFFClampDoubleToUInt16( double val ) +{ + if( val < 0 ) + return 0; + if( val > 65535 || val != val ) + return 65535; + return (uint16)val; +} + +static uint32 TIFFClampDoubleToUInt32( double val ) +{ + if( val < 0 ) + return 0; + if( val > 0xFFFFFFFFU || val != val ) + return 0xFFFFFFFFU; + return (uint32)val; +} + static int TIFFWriteDirectoryTagSampleformatArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, double* value) { @@ -945,7 +1109,7 @@ TIFFWriteDirectoryTagSampleformatArray(TIFF* tif, uint32* ndir, TIFFDirEntry* di if (tif->tif_dir.td_bitspersample<=32) { for (i = 0; i < count; ++i) - ((float*)conv)[i] = (float)value[i]; + ((float*)conv)[i] = _TIFFClampDoubleToFloat(value[i]); ok = TIFFWriteDirectoryTagFloatArray(tif,ndir,dir,tag,count,(float*)conv); } else @@ -957,19 +1121,19 @@ TIFFWriteDirectoryTagSampleformatArray(TIFF* tif, uint32* ndir, TIFFDirEntry* di if (tif->tif_dir.td_bitspersample<=8) { for (i = 0; i < count; ++i) - ((int8*)conv)[i] = (int8)value[i]; + ((int8*)conv)[i] = TIFFClampDoubleToInt8(value[i]); ok = TIFFWriteDirectoryTagSbyteArray(tif,ndir,dir,tag,count,(int8*)conv); } else if (tif->tif_dir.td_bitspersample<=16) { for (i = 0; i < count; ++i) - ((int16*)conv)[i] = (int16)value[i]; + ((int16*)conv)[i] = TIFFClampDoubleToInt16(value[i]); ok = TIFFWriteDirectoryTagSshortArray(tif,ndir,dir,tag,count,(int16*)conv); } else { for (i = 0; i < count; ++i) - ((int32*)conv)[i] = (int32)value[i]; + ((int32*)conv)[i] = TIFFClampDoubleToInt32(value[i]); ok = TIFFWriteDirectoryTagSlongArray(tif,ndir,dir,tag,count,(int32*)conv); } break; @@ -977,19 +1141,19 @@ TIFFWriteDirectoryTagSampleformatArray(TIFF* tif, uint32* ndir, TIFFDirEntry* di if (tif->tif_dir.td_bitspersample<=8) { for (i = 0; i < count; ++i) - ((uint8*)conv)[i] = (uint8)value[i]; + ((uint8*)conv)[i] = TIFFClampDoubleToUInt8(value[i]); ok = TIFFWriteDirectoryTagByteArray(tif,ndir,dir,tag,count,(uint8*)conv); } else if (tif->tif_dir.td_bitspersample<=16) { for (i = 0; i < count; ++i) - ((uint16*)conv)[i] = (uint16)value[i]; + ((uint16*)conv)[i] = TIFFClampDoubleToUInt16(value[i]); ok = TIFFWriteDirectoryTagShortArray(tif,ndir,dir,tag,count,(uint16*)conv); } else { for (i = 0; i < count; ++i) - ((uint32*)conv)[i] = (uint32)value[i]; + ((uint32*)conv)[i] = TIFFClampDoubleToUInt32(value[i]); ok = TIFFWriteDirectoryTagLongArray(tif,ndir,dir,tag,count,(uint32*)conv); } break; @@ -1441,6 +1605,29 @@ TIFFWriteDirectoryTagSrationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, return(TIFFWriteDirectoryTagCheckedSrationalArray(tif,ndir,dir,tag,count,value)); } +/*-- Rational2Double: additional write functions */ +static int +TIFFWriteDirectoryTagRationalDoubleArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, double* value) +{ + if (dir==NULL) + { + (*ndir)++; + return(1); + } + return(TIFFWriteDirectoryTagCheckedRationalDoubleArray(tif,ndir,dir,tag,count,value)); +} + +static int +TIFFWriteDirectoryTagSrationalDoubleArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, double* value) +{ + if (dir==NULL) + { + (*ndir)++; + return(1); + } + return(TIFFWriteDirectoryTagCheckedSrationalDoubleArray(tif,ndir,dir,tag,count,value)); +} + #ifdef notdef static int TIFFWriteDirectoryTagFloat(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, float value) { @@ -1577,22 +1764,52 @@ TIFFWriteDirectoryTagShortLong(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint1 return(TIFFWriteDirectoryTagCheckedLong(tif,ndir,dir,tag,value)); } +static int _WriteAsType(TIFF* tif, uint64 strile_size, uint64 uncompressed_threshold) +{ + const uint16 compression = tif->tif_dir.td_compression; + if ( compression == COMPRESSION_NONE ) + { + return strile_size > uncompressed_threshold; + } + else if ( compression == COMPRESSION_JPEG || + compression == COMPRESSION_LZW || + compression == COMPRESSION_ADOBE_DEFLATE || + compression == COMPRESSION_LZMA || + compression == COMPRESSION_LERC || + compression == COMPRESSION_ZSTD || + compression == COMPRESSION_WEBP ) + { + /* For a few select compression types, we assume that in the worst */ + /* case the compressed size will be 10 times the uncompressed size */ + /* This is overly pessismistic ! */ + return strile_size >= uncompressed_threshold / 10; + } + return 1; +} + +static int WriteAsLong8(TIFF* tif, uint64 strile_size) +{ + return _WriteAsType(tif, strile_size, 0xFFFFFFFFU); +} + +static int WriteAsLong4(TIFF* tif, uint64 strile_size) +{ + return _WriteAsType(tif, strile_size, 0xFFFFU); +} + /************************************************************************/ /* TIFFWriteDirectoryTagLongLong8Array() */ /* */ -/* Write out LONG8 array as LONG8 for BigTIFF or LONG for */ -/* Classic TIFF with some checking. */ +/* Write out LONG8 array and write a SHORT/LONG/LONG8 depending */ +/* on strile size and Classic/BigTIFF mode. */ /************************************************************************/ static int TIFFWriteDirectoryTagLongLong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint64* value) { static const char module[] = "TIFFWriteDirectoryTagLongLong8Array"; - uint64* ma; - uint32 mb; - uint32* p; - uint32* q; int o; + int write_aslong4; /* is this just a counting pass? */ if (dir==NULL) @@ -1601,37 +1818,105 @@ TIFFWriteDirectoryTagLongLong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, return(1); } - /* We always write LONG8 for BigTIFF, no checking needed. */ - if( tif->tif_flags&TIFF_BIGTIFF ) - return TIFFWriteDirectoryTagCheckedLong8Array(tif,ndir,dir, - tag,count,value); - - /* - ** For classic tiff we want to verify everything is in range for LONG - ** and convert to long format. - */ - - p = _TIFFmalloc(count*sizeof(uint32)); - if (p==NULL) + if( tif->tif_dir.td_deferstrilearraywriting ) { - TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); - return(0); + return TIFFWriteDirectoryTagData(tif, ndir, dir, tag, TIFF_NOTYPE, 0, 0, NULL); } - for (q=p, ma=value, mb=0; mbtif_flags&TIFF_BIGTIFF ) { - if (*ma>0xFFFFFFFF) + int write_aslong8 = 1; + /* In the case of ByteCounts array, we may be able to write them on */ + /* LONG if the strip/tilesize is not too big. */ + /* Also do that for count > 1 in the case someone would want to create */ + /* a single-strip file with a growing height, in which case using */ + /* LONG8 will be safer. */ + if( count > 1 && tag == TIFFTAG_STRIPBYTECOUNTS ) { - TIFFErrorExt(tif->tif_clientdata,module, - "Attempt to write value larger than 0xFFFFFFFF in Classic TIFF file."); - _TIFFfree(p); + write_aslong8 = WriteAsLong8(tif, TIFFStripSize64(tif)); + } + else if( count > 1 && tag == TIFFTAG_TILEBYTECOUNTS ) + { + write_aslong8 = WriteAsLong8(tif, TIFFTileSize64(tif)); + } + if( write_aslong8 ) + { + return TIFFWriteDirectoryTagCheckedLong8Array(tif,ndir,dir, + tag,count,value); + } + } + + write_aslong4 = 1; + if( count > 1 && tag == TIFFTAG_STRIPBYTECOUNTS ) + { + write_aslong4 = WriteAsLong4(tif, TIFFStripSize64(tif)); + } + else if( count > 1 && tag == TIFFTAG_TILEBYTECOUNTS ) + { + write_aslong4 = WriteAsLong4(tif, TIFFTileSize64(tif)); + } + if( write_aslong4 ) + { + /* + ** For classic tiff we want to verify everything is in range for LONG + ** and convert to long format. + */ + + uint32* p = _TIFFmalloc(count*sizeof(uint32)); + uint32* q; + uint64* ma; + uint32 mb; + + if (p==NULL) + { + TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); return(0); } - *q= (uint32)(*ma); - } - o=TIFFWriteDirectoryTagCheckedLongArray(tif,ndir,dir,tag,count,p); - _TIFFfree(p); + for (q=p, ma=value, mb=0; mb0xFFFFFFFF) + { + TIFFErrorExt(tif->tif_clientdata,module, + "Attempt to write value larger than 0xFFFFFFFF in LONG array."); + _TIFFfree(p); + return(0); + } + *q= (uint32)(*ma); + } + + o=TIFFWriteDirectoryTagCheckedLongArray(tif,ndir,dir,tag,count,p); + _TIFFfree(p); + } + else + { + uint16* p = _TIFFmalloc(count*sizeof(uint16)); + uint16* q; + uint64* ma; + uint32 mb; + + if (p==NULL) + { + TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); + return(0); + } + + for (q=p, ma=value, mb=0; mb0xFFFF) + { + /* Should not happen normally given the check we did before */ + TIFFErrorExt(tif->tif_clientdata,module, + "Attempt to write value larger than 0xFFFF in SHORT array."); + _TIFFfree(p); + return(0); + } + *q= (uint16)(*ma); + } + + o=TIFFWriteDirectoryTagCheckedShortArray(tif,ndir,dir,tag,count,p); + _TIFFfree(p); + } return(o); } @@ -1809,12 +2094,14 @@ TIFFWriteDirectoryTagTransferfunction(TIFF* tif, uint32* ndir, TIFFDirEntry* dir n=3; if (n==3) { - if (!_TIFFmemcmp(tif->tif_dir.td_transferfunction[0],tif->tif_dir.td_transferfunction[2],m*sizeof(uint16))) + if (tif->tif_dir.td_transferfunction[2] == NULL || + !_TIFFmemcmp(tif->tif_dir.td_transferfunction[0],tif->tif_dir.td_transferfunction[2],m*sizeof(uint16))) n=2; } if (n==2) { - if (!_TIFFmemcmp(tif->tif_dir.td_transferfunction[0],tif->tif_dir.td_transferfunction[1],m*sizeof(uint16))) + if (tif->tif_dir.td_transferfunction[1] == NULL || + !_TIFFmemcmp(tif->tif_dir.td_transferfunction[0],tif->tif_dir.td_transferfunction[1],m*sizeof(uint16))) n=1; } if (n==0) @@ -1866,7 +2153,14 @@ TIFFWriteDirectoryTagSubifd(TIFF* tif, uint32* ndir, TIFFDirEntry* dir) for (p=0; p < tif->tif_dir.td_nsubifd; p++) { assert(pa != 0); - assert(*pa <= 0xFFFFFFFFUL); + + /* Could happen if an classicTIFF has a SubIFD of type LONG8 (which is illegal) */ + if( *pa > 0xFFFFFFFFUL) + { + TIFFErrorExt(tif->tif_clientdata,module,"Illegal value for SubIFD tag"); + _TIFFfree(o); + return(0); + } *pb++=(uint32)(*pa++); } n=TIFFWriteDirectoryTagCheckedIfdArray(tif,ndir,dir,TIFFTAG_SUBIFD,tif->tif_dir.td_nsubifd,o); @@ -2033,7 +2327,10 @@ TIFFWriteDirectoryTagCheckedLong8(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, ui { uint64 m; assert(sizeof(uint64)==8); - assert(tif->tif_flags&TIFF_BIGTIFF); + if( !(tif->tif_flags&TIFF_BIGTIFF) ) { + TIFFErrorExt(tif->tif_clientdata,"TIFFWriteDirectoryTagCheckedLong8","LONG8 not allowed for ClassicTIFF"); + return(0); + } m=value; if (tif->tif_flags&TIFF_SWAB) TIFFSwabLong8(&m); @@ -2046,7 +2343,10 @@ TIFFWriteDirectoryTagCheckedLong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* di { assert(count<0x20000000); assert(sizeof(uint64)==8); - assert(tif->tif_flags&TIFF_BIGTIFF); + if( !(tif->tif_flags&TIFF_BIGTIFF) ) { + TIFFErrorExt(tif->tif_clientdata,"TIFFWriteDirectoryTagCheckedLong8Array","LONG8 not allowed for ClassicTIFF"); + return(0); + } if (tif->tif_flags&TIFF_SWAB) TIFFSwabArrayOfLong8(value,count); return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_LONG8,count,count*8,value)); @@ -2058,7 +2358,10 @@ TIFFWriteDirectoryTagCheckedSlong8(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, u { int64 m; assert(sizeof(int64)==8); - assert(tif->tif_flags&TIFF_BIGTIFF); + if( !(tif->tif_flags&TIFF_BIGTIFF) ) { + TIFFErrorExt(tif->tif_clientdata,"TIFFWriteDirectoryTagCheckedSlong8","SLONG8 not allowed for ClassicTIFF"); + return(0); + } m=value; if (tif->tif_flags&TIFF_SWAB) TIFFSwabLong8((uint64*)(&m)); @@ -2071,7 +2374,10 @@ TIFFWriteDirectoryTagCheckedSlong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* d { assert(count<0x20000000); assert(sizeof(int64)==8); - assert(tif->tif_flags&TIFF_BIGTIFF); + if( !(tif->tif_flags&TIFF_BIGTIFF) ) { + TIFFErrorExt(tif->tif_clientdata,"TIFFWriteDirectoryTagCheckedSlong8Array","SLONG8 not allowed for ClassicTIFF"); + return(0); + } if (tif->tif_flags&TIFF_SWAB) TIFFSwabArrayOfLong8((uint64*)value,count); return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_SLONG8,count,count*8,value)); @@ -2080,15 +2386,26 @@ TIFFWriteDirectoryTagCheckedSlong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* d static int TIFFWriteDirectoryTagCheckedRational(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, double value) { + static const char module[] = "TIFFWriteDirectoryTagCheckedRational"; uint32 m[2]; - assert(value>=0.0); assert(sizeof(uint32)==4); - if (value<=0.0) + if (value < 0) + { + TIFFErrorExt(tif->tif_clientdata, module, "Negative value is illegal"); + return 0; + } + else if (value != value) + { + TIFFErrorExt(tif->tif_clientdata, module, "Not-a-number value is illegal"); + return 0; + } +#ifdef not_def + else if (value==0.0) { m[0]=0; m[1]=1; } - else if (value==(double)(uint32)value) + else if (value <= 0xFFFFFFFFU && value==(double)(uint32)value) { m[0]=(uint32)value; m[1]=1; @@ -2103,6 +2420,15 @@ TIFFWriteDirectoryTagCheckedRational(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, m[0]=0xFFFFFFFF; m[1]=(uint32)(0xFFFFFFFF/value); } +#else + /*--Rational2Double: New function also used for non-custom rational tags. + * However, could be omitted here, because TIFFWriteDirectoryTagCheckedRational() is not used by code for custom tags, + * only by code for named-tiff-tags like FIELD_RESOLUTION and FIELD_POSITION */ + else { + DoubleToRational(value, &m[0], &m[1]); + } +#endif + if (tif->tif_flags&TIFF_SWAB) { TIFFSwabLong(&m[0]); @@ -2129,26 +2455,32 @@ TIFFWriteDirectoryTagCheckedRationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry* } for (na=value, nb=m, nc=0; nc= 0 && *na <= (float)0xFFFFFFFFU && + *na==(float)(uint32)(*na)) { nb[0]=(uint32)(*na); nb[1]=1; } else if (*na<1.0) { - nb[0]=(uint32)((*na)*0xFFFFFFFF); + nb[0]=(uint32)((double)(*na)*0xFFFFFFFF); nb[1]=0xFFFFFFFF; } else { nb[0]=0xFFFFFFFF; - nb[1]=(uint32)(0xFFFFFFFF/(*na)); + nb[1]=(uint32)((double)0xFFFFFFFF/(*na)); } +#else + /*-- Rational2Double: Also for float precision accuracy is sometimes enhanced --*/ + DoubleToRational(*na, &nb[0], &nb[1]); +#endif } if (tif->tif_flags&TIFF_SWAB) TIFFSwabArrayOfLong(m,count*2); @@ -2175,6 +2507,7 @@ TIFFWriteDirectoryTagCheckedSrationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry } for (na=value, nb=m, nc=0; nc-1.0) { - nb[0]=-(int32)((-*na)*0x7FFFFFFF); + nb[0]=-(int32)((double)(-*na)*0x7FFFFFFF); nb[1]=0x7FFFFFFF; } else { nb[0]=-0x7FFFFFFF; - nb[1]=(int32)(0x7FFFFFFF/(-*na)); + nb[1]=(int32)((double)0x7FFFFFFF/(-*na)); } } else @@ -2202,15 +2535,19 @@ TIFFWriteDirectoryTagCheckedSrationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry } else if (*na<1.0) { - nb[0]=(int32)((*na)*0x7FFFFFFF); + nb[0]=(int32)((double)(*na)*0x7FFFFFFF); nb[1]=0x7FFFFFFF; } else { nb[0]=0x7FFFFFFF; - nb[1]=(int32)(0x7FFFFFFF/(*na)); + nb[1]=(int32)((double)0x7FFFFFFF/(*na)); } } +#else + /*-- Rational2Double: Also for float precision accuracy is sometimes enhanced --*/ + DoubleToSrational(*na, &nb[0], &nb[1]); +#endif } if (tif->tif_flags&TIFF_SWAB) TIFFSwabArrayOfLong((uint32*)m,count*2); @@ -2219,6 +2556,400 @@ TIFFWriteDirectoryTagCheckedSrationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry return(o); } +/*-- Rational2Double: additional write functions for double arrays */ +static int +TIFFWriteDirectoryTagCheckedRationalDoubleArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, double* value) +{ + static const char module[] = "TIFFWriteDirectoryTagCheckedRationalDoubleArray"; + uint32* m; + double* na; + uint32* nb; + uint32 nc; + int o; + assert(sizeof(uint32)==4); + m=_TIFFmalloc(count*2*sizeof(uint32)); + if (m==NULL) + { + TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); + return(0); + } + for (na=value, nb=m, nc=0; nctif_flags&TIFF_SWAB) + TIFFSwabArrayOfLong(m,count*2); + o=TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_RATIONAL,count,count*8,&m[0]); + _TIFFfree(m); + return(o); +} /*-- TIFFWriteDirectoryTagCheckedRationalDoubleArray() ------- */ + +static int +TIFFWriteDirectoryTagCheckedSrationalDoubleArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, double* value) +{ + static const char module[] = "TIFFWriteDirectoryTagCheckedSrationalDoubleArray"; + int32* m; + double* na; + int32* nb; + uint32 nc; + int o; + assert(sizeof(int32)==4); + m=_TIFFmalloc(count*2*sizeof(int32)); + if (m==NULL) + { + TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); + return(0); + } + for (na=value, nb=m, nc=0; nctif_flags&TIFF_SWAB) + TIFFSwabArrayOfLong((uint32*)m,count*2); + o=TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_SRATIONAL,count,count*8,&m[0]); + _TIFFfree(m); + return(o); +} /*--- TIFFWriteDirectoryTagCheckedSrationalDoubleArray() -------- */ + +#if 0 +static +void DoubleToRational_direct(double value, unsigned long *num, unsigned long *denom) +{ + /*--- OLD Code for debugging and comparison ---- */ + /* code merged from TIFFWriteDirectoryTagCheckedRationalArray() and TIFFWriteDirectoryTagCheckedRational() */ + + /* First check for zero and also check for negative numbers (which are illegal for RATIONAL) + * and also check for "not-a-number". In each case just set this to zero to support also rational-arrays. + */ + if (value<=0.0 || value != value) + { + *num=0; + *denom=1; + } + else if (value <= 0xFFFFFFFFU && (value==(double)(uint32)(value))) /* check for integer values */ + { + *num=(uint32)(value); + *denom=1; + } + else if (value<1.0) + { + *num = (uint32)((value) * (double)0xFFFFFFFFU); + *denom=0xFFFFFFFFU; + } + else + { + *num=0xFFFFFFFFU; + *denom=(uint32)((double)0xFFFFFFFFU/(value)); + } +} /*-- DoubleToRational_direct() -------------- */ +#endif + +#if 0 +static +void DoubleToSrational_direct(double value, long *num, long *denom) +{ + /*--- OLD Code for debugging and comparison -- SIGNED-version ----*/ + /* code was amended from original TIFFWriteDirectoryTagCheckedSrationalArray() */ + + /* First check for zero and also check for negative numbers (which are illegal for RATIONAL) + * and also check for "not-a-number". In each case just set this to zero to support also rational-arrays. + */ + if (value<0.0) + { + if (value==(int32)(value)) + { + *num=(int32)(value); + *denom=1; + } + else if (value>-1.0) + { + *num=-(int32)((-value) * (double)0x7FFFFFFF); + *denom=0x7FFFFFFF; + } + else + { + *num=-0x7FFFFFFF; + *denom=(int32)((double)0x7FFFFFFF / (-value)); + } + } + else + { + if (value==(int32)(value)) + { + *num=(int32)(value); + *denom=1; + } + else if (value<1.0) + { + *num=(int32)((value) *(double)0x7FFFFFFF); + *denom=0x7FFFFFFF; + } + else + { + *num=0x7FFFFFFF; + *denom=(int32)((double)0x7FFFFFFF / (value)); + } + } +} /*-- DoubleToSrational_direct() --------------*/ +#endif + +//#define DOUBLE2RAT_DEBUGOUTPUT +/** ----- Rational2Double: Double To Rational Conversion ---------------------------------------------------------- +* There is a mathematical theorem to convert real numbers into a rational (integer fraction) number. +* This is called "continuous fraction" which uses the Euclidean algorithm to find the greatest common divisor (GCD). +* (ref. e.g. https://de.wikipedia.org/wiki/Kettenbruch or https://en.wikipedia.org/wiki/Continued_fraction +* https://en.wikipedia.org/wiki/Euclidean_algorithm) +* The following functions implement the +* - ToRationalEuclideanGCD() auxiliary function which mainly implements euclidean GCD +* - DoubleToRational() conversion function for un-signed rationals +* - DoubleToSrational() conversion function for signed rationals +------------------------------------------------------------------------------------------------------------------*/ + +/**---- ToRationalEuclideanGCD() ----------------------------------------- +* Calculates the rational fractional of a double input value +* using the Euclidean algorithm to find the greatest common divisor (GCD) +------------------------------------------------------------------------*/ +static +void ToRationalEuclideanGCD(double value, int blnUseSignedRange, int blnUseSmallRange, unsigned long long *ullNum, unsigned long long *ullDenom) +{ + /* Internally, the integer variables can be bigger than the external ones, + * as long as the result will fit into the external variable size. + */ + unsigned long long val, numSum[3] = { 0, 1, 0 }, denomSum[3] = { 1, 0, 0 }; + unsigned long long aux, bigNum, bigDenom; + unsigned long long returnLimit; + int i; + unsigned long long nMax; + double fMax; + unsigned long maxDenom; + /*-- nMax and fMax defines the initial accuracy of the starting fractional, + * or better, the highest used integer numbers used within the starting fractional (bigNum/bigDenom). + * There are two approaches, which can accidentally lead to different accuracies just depending on the value. + * Therefore, blnUseSmallRange steers this behavior. + * For long long nMax = ((9223372036854775807-1)/2); for long nMax = ((2147483647-1)/2); + */ + if (blnUseSmallRange) { + nMax = (unsigned long long)((2147483647 - 1) / 2); /* for ULONG range */ + } + else { + nMax = ((9223372036854775807 - 1) / 2); /* for ULLONG range */ + } + fMax = (double)nMax; + + /*-- For the Euclidean GCD define the denominator range, so that it stays within size of unsigned long variables. + * maxDenom should be LONG_MAX for negative values and ULONG_MAX for positive ones. + * Also the final returned value of ullNum and ullDenom is limited according to signed- or unsigned-range. + */ + if (blnUseSignedRange) { + maxDenom = 2147483647UL; /*LONG_MAX = 0x7FFFFFFFUL*/ + returnLimit = maxDenom; + } + else { + maxDenom = 0xFFFFFFFFUL; /*ULONG_MAX = 0xFFFFFFFFUL*/ + returnLimit = maxDenom; + } + + /*-- First generate a rational fraction (bigNum/bigDenom) which represents the value + * as a rational number with the highest accuracy. Therefore, unsigned long long (uint64) is needed. + * This rational fraction is then reduced using the Euclidean algorithm to find the greatest common divisor (GCD). + * bigNum = big numinator of value without fraction (or cut residual fraction) + * bigDenom = big denominator of value + *-- Break-criteria so that uint64 cast to "bigNum" introduces no error and bigDenom has no overflow, + * and stop with enlargement of fraction when the double-value of it reaches an integer number without fractional part. + */ + bigDenom = 1; + while ((value != floor(value)) && (value < fMax) && (bigDenom < nMax)) { + bigDenom <<= 1; + value *= 2; + } + bigNum = (unsigned long long)value; + + /*-- Start Euclidean algorithm to find the greatest common divisor (GCD) -- */ +#define MAX_ITERATIONS 64 + for (i = 0; i < MAX_ITERATIONS; i++) { + /* if bigDenom is not zero, calculate integer part of fraction. */ + if (bigDenom == 0) { + val = 0; + break; + } + else { + val = bigNum / bigDenom; + } + + /* Set bigDenom to reminder of bigNum/bigDenom and bigNum to previous denominator bigDenom. */ + aux = bigNum; + bigNum = bigDenom; + bigDenom = aux % bigDenom; + + /* calculate next denominator and check for its given maximum */ + aux = val; + if (denomSum[1] * val + denomSum[0] >= maxDenom) { + aux = (maxDenom - denomSum[0]) / denomSum[1]; + if (aux * 2 >= val || denomSum[1] >= maxDenom) + i = (MAX_ITERATIONS + 1); /* exit but execute rest of for-loop */ + else + break; + } + /* calculate next numerator to numSum2 and save previous one to numSum0; numSum1 just copy of numSum2. */ + numSum[2] = aux * numSum[1] + numSum[0]; + numSum[0] = numSum[1]; + numSum[1] = numSum[2]; + /* calculate next denominator to denomSum2 and save previous one to denomSum0; denomSum1 just copy of denomSum2. */ + denomSum[2] = aux * denomSum[1] + denomSum[0]; + denomSum[0] = denomSum[1]; + denomSum[1] = denomSum[2]; + } + + /*-- Check and adapt for final variable size and return values; reduces internal accuracy; denominator is kept in ULONG-range with maxDenom -- */ + while (numSum[1] > returnLimit || denomSum[1] > returnLimit) { + numSum[1] = numSum[1] / 2; + denomSum[1] = denomSum[1] / 2; + } + + /* return values */ + *ullNum = numSum[1]; + *ullDenom = denomSum[1]; + +} /*-- ToRationalEuclideanGCD() -------------- */ + + +/**---- DoubleToRational() ----------------------------------------------- +* Calculates the rational fractional of a double input value +* for UN-SIGNED rationals, +* using the Euclidean algorithm to find the greatest common divisor (GCD) +------------------------------------------------------------------------*/ +static +void DoubleToRational(double value, uint32 *num, uint32 *denom) +{ + /*---- UN-SIGNED RATIONAL ---- */ + double dblDiff, dblDiff2; + unsigned long long ullNum, ullDenom, ullNum2, ullDenom2; + + /*-- Check for negative values. If so it is an error. */ + /* Test written that way to catch NaN */ + if (!(value >= 0)) { + *num = *denom = 0; + TIFFErrorExt(0, "TIFFLib: DoubleToRational()", " Negative Value for Unsigned Rational given."); + return; + } + + /*-- Check for too big numbers (> ULONG_MAX) -- */ + if (value > 0xFFFFFFFFUL) { + *num = 0xFFFFFFFFU; + *denom = 0; + return; + } + /*-- Check for easy integer numbers -- */ + if (value == (uint32)(value)) { + *num = (uint32)value; + *denom = 1; + return; + } + /*-- Check for too small numbers for "unsigned long" type rationals -- */ + if (value < 1.0 / (double)0xFFFFFFFFUL) { + *num = 0; + *denom = 0xFFFFFFFFU; + return; + } + + /*-- There are two approaches using the Euclidean algorithm, + * which can accidentally lead to different accuracies just depending on the value. + * Try both and define which one was better. + */ + ToRationalEuclideanGCD(value, FALSE, FALSE, &ullNum, &ullDenom); + ToRationalEuclideanGCD(value, FALSE, TRUE, &ullNum2, &ullDenom2); + /*-- Double-Check, that returned values fit into ULONG :*/ + if (ullNum > 0xFFFFFFFFUL || ullDenom > 0xFFFFFFFFUL || ullNum2 > 0xFFFFFFFFUL || ullDenom2 > 0xFFFFFFFFUL) { +#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) + TIFFErrorExt(0, "TIFFLib: DoubleToRational()", " Num or Denom exceeds ULONG: val=%14.6f, num=%I64u, denom=%I64u | num2=%I64u, denom2=%I64u", value, ullNum, ullDenom, ullNum2, ullDenom2); +#else + TIFFErrorExt(0, "TIFFLib: DoubleToRational()", " Num or Denom exceeds ULONG: val=%14.6f, num=%12llu, denom=%12llu | num2=%12llu, denom2=%12llu", value, ullNum, ullDenom, ullNum2, ullDenom2); +#endif + assert(0); + } + + /* Check, which one has higher accuracy and take that. */ + dblDiff = fabs(value - ((double)ullNum / (double)ullDenom)); + dblDiff2 = fabs(value - ((double)ullNum2 / (double)ullDenom2)); + if (dblDiff < dblDiff2) { + *num = (uint32)ullNum; + *denom = (uint32)ullDenom; + } + else { + *num = (uint32)ullNum2; + *denom = (uint32)ullDenom2; + } +} /*-- DoubleToRational() -------------- */ + +/**---- DoubleToSrational() ----------------------------------------------- +* Calculates the rational fractional of a double input value +* for SIGNED rationals, +* using the Euclidean algorithm to find the greatest common divisor (GCD) +------------------------------------------------------------------------*/ +static +void DoubleToSrational(double value, int32 *num, int32 *denom) +{ + /*---- SIGNED RATIONAL ----*/ + int neg = 1; + double dblDiff, dblDiff2; + unsigned long long ullNum, ullDenom, ullNum2, ullDenom2; + + /*-- Check for negative values and use then the positive one for internal calculations, but take the sign into account before returning. */ + if (value < 0) { neg = -1; value = -value; } + + /*-- Check for too big numbers (> LONG_MAX) -- */ + if (value > 0x7FFFFFFFL) { + *num = 0x7FFFFFFFL; + *denom = 0; + return; + } + /*-- Check for easy numbers -- */ + if (value == (int32)(value)) { + *num = (int32)(neg * value); + *denom = 1; + return; + } + /*-- Check for too small numbers for "long" type rationals -- */ + if (value < 1.0 / (double)0x7FFFFFFFL) { + *num = 0; + *denom = 0x7FFFFFFFL; + return; + } + + /*-- There are two approaches using the Euclidean algorithm, + * which can accidentally lead to different accuracies just depending on the value. + * Try both and define which one was better. + * Furthermore, set behavior of ToRationalEuclideanGCD() to the range of signed-long. + */ + ToRationalEuclideanGCD(value, TRUE, FALSE, &ullNum, &ullDenom); + ToRationalEuclideanGCD(value, TRUE, TRUE, &ullNum2, &ullDenom2); + /*-- Double-Check, that returned values fit into LONG :*/ + if (ullNum > 0x7FFFFFFFL || ullDenom > 0x7FFFFFFFL || ullNum2 > 0x7FFFFFFFL || ullDenom2 > 0x7FFFFFFFL) { +#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) + TIFFErrorExt(0, "TIFFLib: DoubleToSrational()", " Num or Denom exceeds LONG: val=%14.6f, num=%I64u, denom=%I64u | num2=%I64u, denom2=%I64u", neg*value, ullNum, ullDenom, ullNum2, ullDenom2); +#else + TIFFErrorExt(0, "TIFFLib: DoubleToSrational()", " Num or Denom exceeds LONG: val=%14.6f, num=%12llu, denom=%12llu | num2=%12llu, denom2=%12llu", neg*value, ullNum, ullDenom, ullNum2, ullDenom2); +#endif + assert(0); + } + + /* Check, which one has higher accuracy and take that. */ + dblDiff = fabs(value - ((double)ullNum / (double)ullDenom)); + dblDiff2 = fabs(value - ((double)ullNum2 / (double)ullDenom2)); + if (dblDiff < dblDiff2) { + *num = (int32)(neg * (long)ullNum); + *denom = (int32)ullDenom; + } + else { + *num = (int32)(neg * (long)ullNum2); + *denom = (int32)ullDenom2; + } +} /*-- DoubleToSrational() --------------*/ + + + + + #ifdef notdef static int TIFFWriteDirectoryTagCheckedFloat(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, float value) @@ -2314,7 +3045,12 @@ TIFFWriteDirectoryTagData(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag dir[m].tdir_count=count; dir[m].tdir_offset.toff_long8 = 0; if (datalength<=((tif->tif_flags&TIFF_BIGTIFF)?0x8U:0x4U)) - _TIFFmemcpy(&dir[m].tdir_offset,data,datalength); + { + if( data && datalength ) + { + _TIFFmemcpy(&dir[m].tdir_offset,data,datalength); + } + } else { uint64 na,nb; @@ -2368,7 +3104,7 @@ TIFFLinkDirectory(TIFF* tif) { static const char module[] = "TIFFLinkDirectory"; - tif->tif_diroff = (TIFFSeekFile(tif,0,SEEK_END)+1) &~ 1; + tif->tif_diroff = (TIFFSeekFile(tif,0,SEEK_END)+1) & (~((toff_t)1)); /* * Handle SubIFDs @@ -2706,13 +3442,60 @@ _TIFFRewriteField(TIFF* tif, uint16 tag, TIFFDataType in_datatype, TIFFSwabLong8( &entry_offset ); } +/* -------------------------------------------------------------------- */ +/* When a dummy tag was written due to TIFFDeferStrileArrayWriting() */ +/* -------------------------------------------------------------------- */ + if( entry_offset == 0 && entry_count == 0 && entry_type == 0 ) + { + if( tag == TIFFTAG_TILEOFFSETS || tag == TIFFTAG_STRIPOFFSETS ) + { + entry_type = (tif->tif_flags&TIFF_BIGTIFF) ? TIFF_LONG8 : TIFF_LONG; + } + else + { + int write_aslong8 = 1; + if( count > 1 && tag == TIFFTAG_STRIPBYTECOUNTS ) + { + write_aslong8 = WriteAsLong8(tif, TIFFStripSize64(tif)); + } + else if( count > 1 && tag == TIFFTAG_TILEBYTECOUNTS ) + { + write_aslong8 = WriteAsLong8(tif, TIFFTileSize64(tif)); + } + if( write_aslong8 ) + { + entry_type = TIFF_LONG8; + } + else + { + int write_aslong4 = 1; + if( count > 1 && tag == TIFFTAG_STRIPBYTECOUNTS ) + { + write_aslong4 = WriteAsLong4(tif, TIFFStripSize64(tif)); + } + else if( count > 1 && tag == TIFFTAG_TILEBYTECOUNTS ) + { + write_aslong4 = WriteAsLong4(tif, TIFFTileSize64(tif)); + } + if( write_aslong4 ) + { + entry_type = TIFF_LONG; + } + else + { + entry_type = TIFF_SHORT; + } + } + } + } + /* -------------------------------------------------------------------- */ /* What data type do we want to write this as? */ /* -------------------------------------------------------------------- */ if( TIFFDataWidth(in_datatype) == 8 && !(tif->tif_flags&TIFF_BIGTIFF) ) { if( in_datatype == TIFF_LONG8 ) - datatype = TIFF_LONG; + datatype = entry_type == TIFF_SHORT ? TIFF_SHORT : TIFF_LONG; else if( in_datatype == TIFF_SLONG8 ) datatype = TIFF_SLONG; else if( in_datatype == TIFF_IFD8 ) @@ -2720,8 +3503,21 @@ _TIFFRewriteField(TIFF* tif, uint16 tag, TIFFDataType in_datatype, else datatype = in_datatype; } - else - datatype = in_datatype; + else + { + if( in_datatype == TIFF_LONG8 && + (entry_type == TIFF_SHORT || entry_type == TIFF_LONG || + entry_type == TIFF_LONG8 ) ) + datatype = entry_type; + else if( in_datatype == TIFF_SLONG8 && + (entry_type == TIFF_SLONG || entry_type == TIFF_SLONG8 ) ) + datatype = entry_type; + else if( in_datatype == TIFF_IFD8 && + (entry_type == TIFF_IFD || entry_type == TIFF_IFD8 ) ) + datatype = entry_type; + else + datatype = in_datatype; + } /* -------------------------------------------------------------------- */ /* Prepare buffer of actual data to write. This includes */ @@ -2770,6 +3566,29 @@ _TIFFRewriteField(TIFF* tif, uint16 tag, TIFFDataType in_datatype, } } } + else if( datatype == TIFF_SHORT && in_datatype == TIFF_LONG8 ) + { + tmsize_t i; + + for( i = 0; i < count; i++ ) + { + ((uint16 *) buf_to_write)[i] = + (uint16) ((uint64 *) data)[i]; + if( (uint64) ((uint16 *) buf_to_write)[i] != ((uint64 *) data)[i] ) + { + _TIFFfree( buf_to_write ); + TIFFErrorExt( tif->tif_clientdata, module, + "Value exceeds 16bit range of output type." ); + return 0; + } + } + } + else + { + TIFFErrorExt( tif->tif_clientdata, module, + "Unhandled type conversion." ); + return 0; + } if( TIFFDataWidth(datatype) > 1 && (tif->tif_flags&TIFF_SWAB) ) { @@ -2801,6 +3620,23 @@ _TIFFRewriteField(TIFF* tif, uint16 tag, TIFFDataType in_datatype, } } + if( (tag == TIFFTAG_TILEOFFSETS || tag == TIFFTAG_STRIPOFFSETS) && + tif->tif_dir.td_stripoffset_entry.tdir_count == 0 && + tif->tif_dir.td_stripoffset_entry.tdir_type == 0 && + tif->tif_dir.td_stripoffset_entry.tdir_offset.toff_long8 == 0 ) + { + tif->tif_dir.td_stripoffset_entry.tdir_type = datatype; + tif->tif_dir.td_stripoffset_entry.tdir_count = count; + } + else if( (tag == TIFFTAG_TILEBYTECOUNTS || tag == TIFFTAG_STRIPBYTECOUNTS) && + tif->tif_dir.td_stripbytecount_entry.tdir_count == 0 && + tif->tif_dir.td_stripbytecount_entry.tdir_type == 0 && + tif->tif_dir.td_stripbytecount_entry.tdir_offset.toff_long8 == 0 ) + { + tif->tif_dir.td_stripbytecount_entry.tdir_type = datatype; + tif->tif_dir.td_stripbytecount_entry.tdir_count = count; + } + /* -------------------------------------------------------------------- */ /* If the tag type, and count match, then we just write it out */ /* over the old values without altering the directory entry at */ @@ -2839,18 +3675,20 @@ _TIFFRewriteField(TIFF* tif, uint16 tag, TIFFDataType in_datatype, "Error writing directory link"); return (0); } - - _TIFFfree( buf_to_write ); } else { memcpy( &entry_offset, buf_to_write, count*TIFFDataWidth(datatype)); } + _TIFFfree( buf_to_write ); + buf_to_write = 0; + /* -------------------------------------------------------------------- */ /* Adjust the directory entry. */ /* -------------------------------------------------------------------- */ entry_type = datatype; + entry_count = (uint64)count; memcpy( direntry_raw + 2, &entry_type, sizeof(uint16) ); if (tif->tif_flags&TIFF_SWAB) TIFFSwabShort( (uint16 *) (direntry_raw + 2) ); diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_dumpmode.c b/thirdparty/tiff-4.2.0/libtiff/tif_dumpmode.c similarity index 96% rename from thirdparty/tiff-4.0.3/libtiff/tif_dumpmode.c rename to thirdparty/tiff-4.2.0/libtiff/tif_dumpmode.c index a94cf0b3..4a0b07f5 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_dumpmode.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_dumpmode.c @@ -1,5 +1,3 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dumpmode.c,v 1.14 2011-04-02 20:54:09 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -66,7 +64,7 @@ DumpModeEncode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s) cc -= n; if (tif->tif_rawcc >= tif->tif_rawdatasize && !TIFFFlushData1(tif)) - return (-1); + return (0); } return (1); } diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_error.c b/thirdparty/tiff-4.2.0/libtiff/tif_error.c similarity index 88% rename from thirdparty/tiff-4.0.3/libtiff/tif_error.c rename to thirdparty/tiff-4.2.0/libtiff/tif_error.c index 0bc8b878..651168f7 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_error.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_error.c @@ -1,5 +1,3 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_error.c,v 1.5 2010-03-10 18:56:48 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -51,24 +49,32 @@ void TIFFError(const char* module, const char* fmt, ...) { va_list ap; - va_start(ap, fmt); - if (_TIFFerrorHandler) + if (_TIFFerrorHandler) { + va_start(ap, fmt); (*_TIFFerrorHandler)(module, fmt, ap); - if (_TIFFerrorHandlerExt) + va_end(ap); + } + if (_TIFFerrorHandlerExt) { + va_start(ap, fmt); (*_TIFFerrorHandlerExt)(0, module, fmt, ap); - va_end(ap); + va_end(ap); + } } void TIFFErrorExt(thandle_t fd, const char* module, const char* fmt, ...) { va_list ap; - va_start(ap, fmt); - if (_TIFFerrorHandler) + if (_TIFFerrorHandler) { + va_start(ap, fmt); (*_TIFFerrorHandler)(module, fmt, ap); - if (_TIFFerrorHandlerExt) + va_end(ap); + } + if (_TIFFerrorHandlerExt) { + va_start(ap, fmt); (*_TIFFerrorHandlerExt)(fd, module, fmt, ap); - va_end(ap); + va_end(ap); + } } /* diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_extension.c b/thirdparty/tiff-4.2.0/libtiff/tif_extension.c similarity index 75% rename from thirdparty/tiff-4.0.3/libtiff/tif_extension.c rename to thirdparty/tiff-4.2.0/libtiff/tif_extension.c index 10afd416..87d3cfcb 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_extension.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_extension.c @@ -1,5 +1,3 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_extension.c,v 1.7 2010-03-10 18:56:48 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -66,13 +64,13 @@ TIFFTagMethods *TIFFAccessTagMethods( TIFF *tif ) void *TIFFGetClientInfo( TIFF *tif, const char *name ) { - TIFFClientInfoLink *link = tif->tif_clientinfo; + TIFFClientInfoLink *psLink = tif->tif_clientinfo; - while( link != NULL && strcmp(link->name,name) != 0 ) - link = link->next; + while( psLink != NULL && strcmp(psLink->name,name) != 0 ) + psLink = psLink->next; - if( link != NULL ) - return link->data; + if( psLink != NULL ) + return psLink->data; else return NULL; } @@ -80,18 +78,18 @@ void *TIFFGetClientInfo( TIFF *tif, const char *name ) void TIFFSetClientInfo( TIFF *tif, void *data, const char *name ) { - TIFFClientInfoLink *link = tif->tif_clientinfo; + TIFFClientInfoLink *psLink = tif->tif_clientinfo; /* ** Do we have an existing link with this name? If so, just ** set it. */ - while( link != NULL && strcmp(link->name,name) != 0 ) - link = link->next; + while( psLink != NULL && strcmp(psLink->name,name) != 0 ) + psLink = psLink->next; - if( link != NULL ) + if( psLink != NULL ) { - link->data = data; + psLink->data = data; return; } @@ -99,15 +97,15 @@ void TIFFSetClientInfo( TIFF *tif, void *data, const char *name ) ** Create a new link. */ - link = (TIFFClientInfoLink *) _TIFFmalloc(sizeof(TIFFClientInfoLink)); - assert (link != NULL); - link->next = tif->tif_clientinfo; - link->name = (char *) _TIFFmalloc((tmsize_t)(strlen(name)+1)); - assert (link->name != NULL); - strcpy(link->name, name); - link->data = data; + psLink = (TIFFClientInfoLink *) _TIFFmalloc(sizeof(TIFFClientInfoLink)); + assert (psLink != NULL); + psLink->next = tif->tif_clientinfo; + psLink->name = (char *) _TIFFmalloc((tmsize_t)(strlen(name)+1)); + assert (psLink->name != NULL); + strcpy(psLink->name, name); + psLink->data = data; - tif->tif_clientinfo = link; + tif->tif_clientinfo = psLink; } /* * Local Variables: diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_fax3.c b/thirdparty/tiff-4.2.0/libtiff/tif_fax3.c similarity index 86% rename from thirdparty/tiff-4.0.3/libtiff/tif_fax3.c rename to thirdparty/tiff-4.2.0/libtiff/tif_fax3.c index 2b2dccd0..9ab5b26a 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_fax3.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_fax3.c @@ -1,5 +1,3 @@ -/* $Id: tif_fax3.c,v 1.74 2012-06-21 02:01:31 fwarmerdam Exp $ */ - /* * Copyright (c) 1990-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -75,6 +73,7 @@ typedef struct { int EOLcnt; /* count of EOL codes recognized */ TIFFFaxFillFunc fill; /* fill routine */ uint32* runs; /* b&w runs for current/previous row */ + uint32 nruns; /* size of the refruns / curruns arrays */ uint32* refruns; /* runs for reference line */ uint32* curruns; /* runs for current line */ @@ -162,7 +161,9 @@ Fax3PreDecode(TIFF* tif, uint16 s) */ sp->bitmap = TIFFGetBitRevTable(tif->tif_dir.td_fillorder != FILLORDER_LSB2MSB); + sp->curruns = sp->runs; if (sp->refruns) { /* init reference line to white */ + sp->refruns = sp->runs + sp->nruns; sp->refruns[0] = (uint32) sp->b.rowpixels; sp->refruns[1] = 0; } @@ -220,8 +221,12 @@ Fax3PrematureEOF(const char* module, TIFF* tif, uint32 line, uint32 a0) #define Nop -/* +/** * Decode the requested amount of G3 1D-encoded data. + * @param buf destination buffer + * @param occ available bytes in destination buffer + * @param s number of planes (ignored) + * @returns 1 for success, -1 in case of error */ static int Fax3Decode1D(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) @@ -302,7 +307,9 @@ Fax3Decode2D(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) else EXPAND2D(EOF2Da); (*sp->fill)(buf, thisrun, pa, lastx); - SETVALUE(0); /* imaginary change for reference */ + if (pa < thisrun + sp->nruns) { + SETVALUE(0); /* imaginary change for reference */ + } SWAP(uint32*, sp->curruns, sp->refruns); buf += sp->b.rowbytes; occ -= sp->b.rowbytes; @@ -329,34 +336,64 @@ Fax3Decode2D(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) #if SIZEOF_UNSIGNED_LONG == 8 # define FILL(n, cp) \ switch (n) { \ - case 15:(cp)[14] = 0xff; case 14:(cp)[13] = 0xff; case 13: (cp)[12] = 0xff;\ - case 12:(cp)[11] = 0xff; case 11:(cp)[10] = 0xff; case 10: (cp)[9] = 0xff;\ - case 9: (cp)[8] = 0xff; case 8: (cp)[7] = 0xff; case 7: (cp)[6] = 0xff;\ - case 6: (cp)[5] = 0xff; case 5: (cp)[4] = 0xff; case 4: (cp)[3] = 0xff;\ - case 3: (cp)[2] = 0xff; case 2: (cp)[1] = 0xff; \ - case 1: (cp)[0] = 0xff; (cp) += (n); case 0: ; \ + case 15:(cp)[14] = 0xff; /*-fallthrough*/ \ + case 14:(cp)[13] = 0xff; /*-fallthrough*/ \ + case 13:(cp)[12] = 0xff; /*-fallthrough*/ \ + case 12:(cp)[11] = 0xff; /*-fallthrough*/ \ + case 11:(cp)[10] = 0xff; /*-fallthrough*/ \ + case 10: (cp)[9] = 0xff; /*-fallthrough*/ \ + case 9: (cp)[8] = 0xff; /*-fallthrough*/ \ + case 8: (cp)[7] = 0xff; /*-fallthrough*/ \ + case 7: (cp)[6] = 0xff; /*-fallthrough*/ \ + case 6: (cp)[5] = 0xff; /*-fallthrough*/ \ + case 5: (cp)[4] = 0xff; /*-fallthrough*/ \ + case 4: (cp)[3] = 0xff; /*-fallthrough*/ \ + case 3: (cp)[2] = 0xff; /*-fallthrough*/ \ + case 2: (cp)[1] = 0xff; /*-fallthrough*/ \ + case 1: (cp)[0] = 0xff; (cp) += (n); /*-fallthrough*/ \ + case 0: ; \ } # define ZERO(n, cp) \ switch (n) { \ - case 15:(cp)[14] = 0; case 14:(cp)[13] = 0; case 13: (cp)[12] = 0; \ - case 12:(cp)[11] = 0; case 11:(cp)[10] = 0; case 10: (cp)[9] = 0; \ - case 9: (cp)[8] = 0; case 8: (cp)[7] = 0; case 7: (cp)[6] = 0; \ - case 6: (cp)[5] = 0; case 5: (cp)[4] = 0; case 4: (cp)[3] = 0; \ - case 3: (cp)[2] = 0; case 2: (cp)[1] = 0; \ - case 1: (cp)[0] = 0; (cp) += (n); case 0: ; \ + case 15:(cp)[14] = 0; /*-fallthrough*/ \ + case 14:(cp)[13] = 0; /*-fallthrough*/ \ + case 13:(cp)[12] = 0; /*-fallthrough*/ \ + case 12:(cp)[11] = 0; /*-fallthrough*/ \ + case 11:(cp)[10] = 0; /*-fallthrough*/ \ + case 10: (cp)[9] = 0; /*-fallthrough*/ \ + case 9: (cp)[8] = 0; /*-fallthrough*/ \ + case 8: (cp)[7] = 0; /*-fallthrough*/ \ + case 7: (cp)[6] = 0; /*-fallthrough*/ \ + case 6: (cp)[5] = 0; /*-fallthrough*/ \ + case 5: (cp)[4] = 0; /*-fallthrough*/ \ + case 4: (cp)[3] = 0; /*-fallthrough*/ \ + case 3: (cp)[2] = 0; /*-fallthrough*/ \ + case 2: (cp)[1] = 0; /*-fallthrough*/ \ + case 1: (cp)[0] = 0; (cp) += (n); /*-fallthrough*/ \ + case 0: ; \ } #else # define FILL(n, cp) \ switch (n) { \ - case 7: (cp)[6] = 0xff; case 6: (cp)[5] = 0xff; case 5: (cp)[4] = 0xff; \ - case 4: (cp)[3] = 0xff; case 3: (cp)[2] = 0xff; case 2: (cp)[1] = 0xff; \ - case 1: (cp)[0] = 0xff; (cp) += (n); case 0: ; \ + case 7: (cp)[6] = 0xff; /*-fallthrough*/ \ + case 6: (cp)[5] = 0xff; /*-fallthrough*/ \ + case 5: (cp)[4] = 0xff; /*-fallthrough*/ \ + case 4: (cp)[3] = 0xff; /*-fallthrough*/ \ + case 3: (cp)[2] = 0xff; /*-fallthrough*/ \ + case 2: (cp)[1] = 0xff; /*-fallthrough*/ \ + case 1: (cp)[0] = 0xff; (cp) += (n); /*-fallthrough*/ \ + case 0: ; \ } # define ZERO(n, cp) \ switch (n) { \ - case 7: (cp)[6] = 0; case 6: (cp)[5] = 0; case 5: (cp)[4] = 0; \ - case 4: (cp)[3] = 0; case 3: (cp)[2] = 0; case 2: (cp)[1] = 0; \ - case 1: (cp)[0] = 0; (cp) += (n); case 0: ; \ + case 7: (cp)[6] = 0; /*-fallthrough*/ \ + case 6: (cp)[5] = 0; /*-fallthrough*/ \ + case 5: (cp)[4] = 0; /*-fallthrough*/ \ + case 4: (cp)[3] = 0; /*-fallthrough*/ \ + case 3: (cp)[2] = 0; /*-fallthrough*/ \ + case 2: (cp)[1] = 0; /*-fallthrough*/ \ + case 1: (cp)[0] = 0; (cp) += (n); /*-fallthrough*/ \ + case 0: ; \ } #endif @@ -442,8 +479,9 @@ _TIFFFax3fillruns(unsigned char* buf, uint32* runs, uint32* erun, uint32 lastx) FILL(n, cp); run &= 7; } + /* Explicit 0xff masking to make icc -check=conversions happy */ if (run) - cp[0] |= 0xff00 >> run; + cp[0] = (unsigned char)((cp[0] | (0xff00 >> run))&0xff); } else cp[0] |= _fillmasks[run]>>bx; x += runs[1]; @@ -477,7 +515,7 @@ Fax3SetupState(TIFF* tif) int needsRefLine; Fax3CodecState* dsp = (Fax3CodecState*) Fax3State(tif); tmsize_t rowbytes; - uint32 rowpixels, nruns; + uint32 rowpixels; if (td->td_bitspersample != 1) { TIFFErrorExt(tif->tif_clientdata, module, @@ -494,6 +532,13 @@ Fax3SetupState(TIFF* tif) rowbytes = TIFFScanlineSize(tif); rowpixels = td->td_imagewidth; } + if ((uint64)rowbytes < ((uint64)rowpixels + 7) / 8) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Inconsistent number of bytes per row : rowbytes=%lu rowpixels=%lu", + (unsigned long)(rowbytes), (unsigned long)(rowpixels)); + return (0); + } sp->rowbytes = rowbytes; sp->rowpixels = rowpixels; /* @@ -510,26 +555,26 @@ Fax3SetupState(TIFF* tif) TIFFroundup and TIFFSafeMultiply return zero on integer overflow */ dsp->runs=(uint32*) NULL; - nruns = TIFFroundup_32(rowpixels,32); + dsp->nruns = TIFFroundup_32(rowpixels,32); if (needsRefLine) { - nruns = TIFFSafeMultiply(uint32,nruns,2); + dsp->nruns = TIFFSafeMultiply(uint32,dsp->nruns,2); } - if ((nruns == 0) || (TIFFSafeMultiply(uint32,nruns,2) == 0)) { + if ((dsp->nruns == 0) || (TIFFSafeMultiply(uint32,dsp->nruns,2) == 0)) { TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Row pixels integer overflow (rowpixels %u)", rowpixels); return (0); } dsp->runs = (uint32*) _TIFFCheckMalloc(tif, - TIFFSafeMultiply(uint32,nruns,2), + TIFFSafeMultiply(uint32,dsp->nruns,2), sizeof (uint32), "for Group 3/4 run arrays"); if (dsp->runs == NULL) return (0); - memset( dsp->runs, 0, TIFFSafeMultiply(uint32,nruns,2)*sizeof(uint32)); + memset( dsp->runs, 0, TIFFSafeMultiply(uint32,dsp->nruns,2)*sizeof(uint32)); dsp->curruns = dsp->runs; if (needsRefLine) - dsp->refruns = dsp->runs + nruns; + dsp->refruns = dsp->runs + dsp->nruns; else dsp->refruns = NULL; if (td->td_compression == COMPRESSION_CCITTFAX3 @@ -565,15 +610,19 @@ Fax3SetupState(TIFF* tif) */ #define Fax3FlushBits(tif, sp) { \ - if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize) \ - (void) TIFFFlushData1(tif); \ + if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize) { \ + if( !TIFFFlushData1(tif) ) \ + return 0; \ + } \ *(tif)->tif_rawcp++ = (uint8) (sp)->data; \ (tif)->tif_rawcc++; \ (sp)->data = 0, (sp)->bit = 8; \ } #define _FlushBits(tif) { \ - if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize) \ - (void) TIFFFlushData1(tif); \ + if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize) { \ + if( !TIFFFlushData1(tif) ) \ + return 0; \ + } \ *(tif)->tif_rawcp++ = (uint8) data; \ (tif)->tif_rawcc++; \ data = 0, bit = 8; \ @@ -598,7 +647,7 @@ static const int _msbmask[9] = * the output stream. Values are * assumed to be at most 16 bits. */ -static void +static int Fax3PutBits(TIFF* tif, unsigned int bits, unsigned int length) { Fax3CodecState* sp = EncoderState(tif); @@ -609,6 +658,7 @@ Fax3PutBits(TIFF* tif, unsigned int bits, unsigned int length) sp->data = data; sp->bit = bit; + return 1; } /* @@ -633,7 +683,7 @@ Fax3PutBits(TIFF* tif, unsigned int bits, unsigned int length) * appropriate table that holds the make-up and * terminating codes is supplied. */ -static void +static int putspan(TIFF* tif, int32 span, const tableentry* tab) { Fax3CodecState* sp = EncoderState(tif); @@ -643,7 +693,8 @@ putspan(TIFF* tif, int32 span, const tableentry* tab) while (span >= 2624) { const tableentry* te = &tab[63 + (2560>>6)]; - code = te->code, length = te->length; + code = te->code; + length = te->length; #ifdef FAX3_DEBUG DEBUG_PRINT("MakeUp", te->runlen); #endif @@ -653,14 +704,16 @@ putspan(TIFF* tif, int32 span, const tableentry* tab) if (span >= 64) { const tableentry* te = &tab[63 + (span>>6)]; assert(te->runlen == 64*(span>>6)); - code = te->code, length = te->length; + code = te->code; + length = te->length; #ifdef FAX3_DEBUG DEBUG_PRINT("MakeUp", te->runlen); #endif _PutBits(tif, code, length); span -= te->runlen; } - code = tab[span].code, length = tab[span].length; + code = tab[span].code; + length = tab[span].length; #ifdef FAX3_DEBUG DEBUG_PRINT(" Term", tab[span].runlen); #endif @@ -668,6 +721,8 @@ putspan(TIFF* tif, int32 span, const tableentry* tab) sp->data = data; sp->bit = bit; + + return 1; } /* @@ -676,7 +731,7 @@ putspan(TIFF* tif, int32 span, const tableentry* tab) * here. We also handle writing the tag bit for the next * scanline when doing 2d encoding. */ -static void +static int Fax3PutEOL(TIFF* tif) { Fax3CodecState* sp = EncoderState(tif); @@ -696,18 +751,22 @@ Fax3PutEOL(TIFF* tif) align = sp->bit + (8 - align); else align = sp->bit - align; - code = 0; tparm=align; _PutBits(tif, 0, tparm); } } - code = EOL, length = 12; - if (is2DEncoding(sp)) - code = (code<<1) | (sp->tag == G3_1D), length++; + code = EOL; + length = 12; + if (is2DEncoding(sp)) { + code = (code<<1) | (sp->tag == G3_1D); + length++; + } _PutBits(tif, code, length); sp->data = data; sp->bit = bit; + + return 1; } /* @@ -814,7 +873,7 @@ find0span(unsigned char* bp, int32 bs, int32 be) /* * Check partial byte on lhs. */ - if (bits > 0 && (n = (bs & 7))) { + if (bits > 0 && (n = (bs & 7)) != 0) { span = zeroruns[(*bp << n) & 0xff]; if (span > 8-n) /* table value too generous */ span = 8-n; @@ -834,12 +893,14 @@ find0span(unsigned char* bp, int32 bs, int32 be) while (!isAligned(bp, long)) { if (*bp != 0x00) return (span + zeroruns[*bp]); - span += 8, bits -= 8; + span += 8; + bits -= 8; bp++; } lp = (long*) bp; while ((bits >= (int32)(8 * sizeof(long))) && (0 == *lp)) { - span += 8*sizeof (long), bits -= 8*sizeof (long); + span += 8*sizeof (long); + bits -= 8*sizeof (long); lp++; } bp = (unsigned char*) lp; @@ -850,7 +911,8 @@ find0span(unsigned char* bp, int32 bs, int32 be) while (bits >= 8) { if (*bp != 0x00) /* end of run */ return (span + zeroruns[*bp]); - span += 8, bits -= 8; + span += 8; + bits -= 8; bp++; } /* @@ -873,7 +935,7 @@ find1span(unsigned char* bp, int32 bs, int32 be) /* * Check partial byte on lhs. */ - if (bits > 0 && (n = (bs & 7))) { + if (bits > 0 && (n = (bs & 7)) != 0) { span = oneruns[(*bp << n) & 0xff]; if (span > 8-n) /* table value too generous */ span = 8-n; @@ -893,12 +955,14 @@ find1span(unsigned char* bp, int32 bs, int32 be) while (!isAligned(bp, long)) { if (*bp != 0xff) return (span + oneruns[*bp]); - span += 8, bits -= 8; + span += 8; + bits -= 8; bp++; } lp = (long*) bp; while ((bits >= (int32)(8 * sizeof(long))) && (~0 == *lp)) { - span += 8*sizeof (long), bits -= 8*sizeof (long); + span += 8*sizeof (long); + bits -= 8*sizeof (long); lp++; } bp = (unsigned char*) lp; @@ -909,7 +973,8 @@ find1span(unsigned char* bp, int32 bs, int32 be) while (bits >= 8) { if (*bp != 0xff) /* end of run */ return (span + oneruns[*bp]); - span += 8, bits -= 8; + span += 8; + bits -= 8; bp++; } /* @@ -951,12 +1016,14 @@ Fax3Encode1DRow(TIFF* tif, unsigned char* bp, uint32 bits) for (;;) { span = find0span(bp, bs, bits); /* white span */ - putspan(tif, span, TIFFFaxWhiteCodes); + if( !putspan(tif, span, TIFFFaxWhiteCodes) ) + return 0; bs += span; if (bs >= bits) break; span = find1span(bp, bs, bits); /* black span */ - putspan(tif, span, TIFFFaxBlackCodes); + if( !putspan(tif, span, TIFFFaxBlackCodes) ) + return 0; bs += span; if (bs >= bits) break; @@ -1001,24 +1068,35 @@ Fax3Encode2DRow(TIFF* tif, unsigned char* bp, unsigned char* rp, uint32 bits) for (;;) { b2 = finddiff2(rp, b1, bits, PIXEL(rp,b1)); if (b2 >= a1) { - int32 d = b1 - a1; + /* Naive computation triggers -fsanitize=undefined,unsigned-integer-overflow */ + /* although it is correct unless the difference between both is < 31 bit */ + /* int32 d = b1 - a1; */ + int32 d = (b1 >= a1 && b1 - a1 <= 3U) ? (int32)(b1 - a1): + (b1 < a1 && a1 - b1 <= 3U) ? -(int32)(a1 - b1) : 0x7FFFFFFF; if (!(-3 <= d && d <= 3)) { /* horizontal mode */ a2 = finddiff2(bp, a1, bits, PIXEL(bp,a1)); - putcode(tif, &horizcode); + if( !putcode(tif, &horizcode) ) + return 0; if (a0+a1 == 0 || PIXEL(bp, a0) == 0) { - putspan(tif, a1-a0, TIFFFaxWhiteCodes); - putspan(tif, a2-a1, TIFFFaxBlackCodes); + if( !putspan(tif, a1-a0, TIFFFaxWhiteCodes) ) + return 0; + if( !putspan(tif, a2-a1, TIFFFaxBlackCodes) ) + return 0; } else { - putspan(tif, a1-a0, TIFFFaxBlackCodes); - putspan(tif, a2-a1, TIFFFaxWhiteCodes); + if( !putspan(tif, a1-a0, TIFFFaxBlackCodes) ) + return 0; + if( !putspan(tif, a2-a1, TIFFFaxWhiteCodes) ) + return 0; } a0 = a2; } else { /* vertical mode */ - putcode(tif, &vcodes[d+3]); + if( !putcode(tif, &vcodes[d+3]) ) + return 0; a0 = a1; } } else { /* pass mode */ - putcode(tif, &passcode); + if( !putcode(tif, &passcode) ) + return 0; a0 = b2; } if (a0 >= bits) @@ -1047,7 +1125,10 @@ Fax3Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) } while (cc > 0) { if ((sp->b.mode & FAXMODE_NOEOL) == 0) - Fax3PutEOL(tif); + { + if( !Fax3PutEOL(tif) ) + return 0; + } if (is2DEncoding(sp)) { if (sp->tag == G3_1D) { if (!Fax3Encode1DRow(tif, bp, sp->b.rowpixels)) @@ -1084,21 +1165,30 @@ Fax3PostEncode(TIFF* tif) return (1); } -static void -Fax3Close(TIFF* tif) +static int +_Fax3Close(TIFF* tif) { - if ((Fax3State(tif)->mode & FAXMODE_NORTC) == 0) { + if ((Fax3State(tif)->mode & FAXMODE_NORTC) == 0 && tif->tif_rawcp) { Fax3CodecState* sp = EncoderState(tif); unsigned int code = EOL; unsigned int length = 12; int i; - if (is2DEncoding(sp)) - code = (code<<1) | (sp->tag == G3_1D), length++; + if (is2DEncoding(sp)) { + code = (code<<1) | (sp->tag == G3_1D); + length++; + } for (i = 0; i < 6; i++) Fax3PutBits(tif, code, length); Fax3FlushBits(tif, sp); } + return 1; +} + +static void +Fax3Close(TIFF* tif) +{ + _Fax3Close(tif); } static void @@ -1181,7 +1271,7 @@ Fax3VSetField(TIFF* tif, uint32 tag, va_list ap) return (*sp->vsetparent)(tif, tag, ap); } - if ((fip = TIFFFieldWithTag(tif, tag))) + if ((fip = TIFFFieldWithTag(tif, tag)) != NULL) TIFFSetFieldBit(tif, fip->field_bit); else return 0; @@ -1240,10 +1330,14 @@ Fax3PrintDir(TIFF* tif, FILE* fd, long flags) } else { fprintf(fd, " Group 3 Options:"); - if (sp->groupoptions & GROUP3OPT_2DENCODING) - fprintf(fd, "%s2-d encoding", sep), sep = "+"; - if (sp->groupoptions & GROUP3OPT_FILLBITS) - fprintf(fd, "%sEOL padding", sep), sep = "+"; + if (sp->groupoptions & GROUP3OPT_2DENCODING) { + fprintf(fd, "%s2-d encoding", sep); + sep = "+"; + } + if (sp->groupoptions & GROUP3OPT_FILLBITS) { + fprintf(fd, "%sEOL padding", sep); + sep = "+"; + } if (sp->groupoptions & GROUP3OPT_UNCOMPRESSED) fprintf(fd, "%suncompressed data", sep); } @@ -1303,6 +1397,7 @@ InitCCITTFax3(TIFF* tif) "No space for state block"); return (0); } + _TIFFmemset(tif->tif_data, 0, sizeof (Fax3CodecState)); sp = Fax3State(tif); sp->rw_mode = tif->tif_mode; @@ -1402,6 +1497,13 @@ Fax4Decode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) EXPAND2D(EOFG4); if (EOLcnt) goto EOFG4; + if (((lastx + 7) >> 3) > (int)occ) /* check for buffer overrun */ + { + TIFFErrorExt(tif->tif_clientdata, module, + "Buffer overrun detected : %d bytes available, %d bits needed", + (int)occ, lastx); + return -1; + } (*sp->fill)(buf, thisrun, pa, lastx); SETVALUE(0); /* imaginary change for reference */ SWAP(uint32*, sp->curruns, sp->refruns); @@ -1417,6 +1519,13 @@ Fax4Decode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) fputs( "Bad EOFB\n", stderr ); #endif ClrBits( 13 ); + if (((lastx + 7) >> 3) > (int)occ) /* check for buffer overrun */ + { + TIFFErrorExt(tif->tif_clientdata, module, + "Buffer overrun detected : %d bytes available, %d bits needed", + (int)occ, lastx); + return -1; + } (*sp->fill)(buf, thisrun, pa, lastx); UNCACHE_STATE(tif, sp); return ( sp->line ? 1 : -1); /* don't error on badly-terminated strips */ diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_fax3.h b/thirdparty/tiff-4.2.0/libtiff/tif_fax3.h similarity index 87% rename from thirdparty/tiff-4.0.3/libtiff/tif_fax3.h rename to thirdparty/tiff-4.2.0/libtiff/tif_fax3.h index b0f46c9a..701716cc 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_fax3.h +++ b/thirdparty/tiff-4.2.0/libtiff/tif_fax3.h @@ -1,5 +1,3 @@ -/* $Id: tif_fax3.h,v 1.9 2011-03-10 20:23:07 fwarmerdam Exp $ */ - /* * Copyright (c) 1990-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -39,7 +37,7 @@ /* * To override the default routine used to image decoded - * spans one can use the pseduo tag TIFFTAG_FAXFILLFUNC. + * spans one can use the pseudo tag TIFFTAG_FAXFILLFUNC. * The routine must have the type signature given below; * for example: * @@ -81,10 +79,12 @@ extern void _TIFFFax3fillruns(unsigned char*, uint32*, uint32*, uint32); #define S_MakeUp 11 #define S_EOL 12 +/* WARNING: do not change the layout of this structure as the HylaFAX software */ +/* really depends on it. See http://bugzilla.maptools.org/show_bug.cgi?id=2636 */ typedef struct { /* state table entry */ unsigned char State; /* see above */ unsigned char Width; /* width of code in bits */ - uint32 Param; /* unsigned 32-bit run length in bits */ + uint32 Param; /* unsigned 32-bit run length in bits (holds on 16 bit actually, but cannot be changed. See above warning) */ } TIFFFaxTabEnt; extern const TIFFFaxTabEnt TIFFFaxMainTable[]; @@ -240,6 +240,11 @@ static const char* StateNames[] = { * current row and reset decoding state. */ #define SETVALUE(x) do { \ + if (pa >= thisrun + sp->nruns) { \ + TIFFErrorExt(tif->tif_clientdata, module, "Buffer overflow at line %u of %s %u", \ + sp->line, isTiled(tif) ? "tile" : "strip", isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip); \ + return (-1); \ + } \ *pa++ = RunLength + (x); \ a0 += (x); \ RunLength = 0; \ @@ -377,6 +382,11 @@ done1d: \ */ #define CHECK_b1 do { \ if (pa != thisrun) while (b1 <= a0 && b1 < lastx) { \ + if( pb + 1 >= sp->refruns + sp->nruns) { \ + TIFFErrorExt(tif->tif_clientdata, module, "Buffer overflow at line %u of %s %u", \ + sp->line, isTiled(tif) ? "tile" : "strip", isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip); \ + return (-1); \ + } \ b1 += pb[0] + pb[1]; \ pb += 2; \ } \ @@ -387,10 +397,20 @@ done1d: \ */ #define EXPAND2D(eoflab) do { \ while (a0 < lastx) { \ + if (pa >= thisrun + sp->nruns) { \ + TIFFErrorExt(tif->tif_clientdata, module, "Buffer overflow at line %u of %s %u", \ + sp->line, isTiled(tif) ? "tile" : "strip", isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip); \ + return (-1); \ + } \ LOOKUP8(7, TIFFFaxMainTable, eof2d); \ switch (TabEnt->State) { \ case S_Pass: \ CHECK_b1; \ + if( pb + 1 >= sp->refruns + sp->nruns) { \ + TIFFErrorExt(tif->tif_clientdata, module, "Buffer overflow at line %u of %s %u", \ + sp->line, isTiled(tif) ? "tile" : "strip", isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip); \ + return (-1); \ + } \ b1 += *pb++; \ RunLength += b1 - a0; \ a0 = b1; \ @@ -469,20 +489,28 @@ done1d: \ case S_V0: \ CHECK_b1; \ SETVALUE(b1 - a0); \ + if( pb >= sp->refruns + sp->nruns) { \ + TIFFErrorExt(tif->tif_clientdata, module, "Buffer overflow at line %u of %s %u", \ + sp->line, isTiled(tif) ? "tile" : "strip", isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip); \ + return (-1); \ + } \ b1 += *pb++; \ break; \ case S_VR: \ CHECK_b1; \ SETVALUE(b1 - a0 + TabEnt->Param); \ + if( pb >= sp->refruns + sp->nruns) { \ + TIFFErrorExt(tif->tif_clientdata, module, "Buffer overflow at line %u of %s %u", \ + sp->line, isTiled(tif) ? "tile" : "strip", isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip); \ + return (-1); \ + } \ b1 += *pb++; \ break; \ case S_VL: \ CHECK_b1; \ - if (b1 <= (int) (a0 + TabEnt->Param)) { \ - if (b1 < (int) (a0 + TabEnt->Param) || pa != thisrun) { \ - unexpected("VL", a0); \ - goto eol2d; \ - } \ + if (b1 < (int) (a0 + TabEnt->Param)) { \ + unexpected("VL", a0); \ + goto eol2d; \ } \ SETVALUE(b1 - a0 - TabEnt->Param); \ b1 -= *--pb; \ @@ -529,6 +557,7 @@ eol2d: \ CLEANUP_RUNS(); \ } while (0) #endif /* _FAX3_ */ +/* vim: set ts=8 sts=4 sw=4 noet: */ /* * Local Variables: * mode: c diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_fax3sm.c b/thirdparty/tiff-4.2.0/libtiff/tif_fax3sm.c similarity index 99% rename from thirdparty/tiff-4.0.3/libtiff/tif_fax3sm.c rename to thirdparty/tiff-4.2.0/libtiff/tif_fax3sm.c index 822191ec..ba2fc532 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_fax3sm.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_fax3sm.c @@ -1,5 +1,6 @@ /* WARNING, this file was automatically generated by the mkg3states program */ +#include #include "tiff.h" #include "tif_fax3.h" const TIFFFaxTabEnt TIFFFaxMainTable[128] = { diff --git a/thirdparty/tiff-4.2.0/libtiff/tif_flush.c b/thirdparty/tiff-4.2.0/libtiff/tif_flush.c new file mode 100644 index 00000000..f7fa2072 --- /dev/null +++ b/thirdparty/tiff-4.2.0/libtiff/tif_flush.c @@ -0,0 +1,174 @@ +/* + * Copyright (c) 1988-1997 Sam Leffler + * Copyright (c) 1991-1997 Silicon Graphics, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that (i) the above copyright notices and this permission notice appear in + * all copies of the software and related documentation, and (ii) the names of + * Sam Leffler and Silicon Graphics may not be used in any advertising or + * publicity relating to the software without the specific, prior written + * permission of Sam Leffler and Silicon Graphics. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR + * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF + * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +/* + * TIFF Library. + */ +#include "tiffiop.h" + +int +TIFFFlush(TIFF* tif) +{ + if( tif->tif_mode == O_RDONLY ) + return 1; + + if (!TIFFFlushData(tif)) + return (0); + + /* In update (r+) mode we try to detect the case where + only the strip/tile map has been altered, and we try to + rewrite only that portion of the directory without + making any other changes */ + + if( (tif->tif_flags & TIFF_DIRTYSTRIP) + && !(tif->tif_flags & TIFF_DIRTYDIRECT) + && tif->tif_mode == O_RDWR ) + { + if( TIFFForceStrileArrayWriting(tif) ) + return 1; + } + + if ((tif->tif_flags & (TIFF_DIRTYDIRECT|TIFF_DIRTYSTRIP)) + && !TIFFRewriteDirectory(tif)) + return (0); + + return (1); +} + +/* + * This is an advanced writing function that must be used in a particular + * sequence, and together with TIFFDeferStrileArrayWriting(), + * to make its intended effect. Its aim is to force the writing of + * the [Strip/Tile][Offsets/ByteCounts] arrays at the end of the file, when + * they have not yet been rewritten. + * + * The typical sequence of calls is: + * TIFFOpen() + * [ TIFFCreateDirectory(tif) ] + * Set fields with calls to TIFFSetField(tif, ...) + * TIFFDeferStrileArrayWriting(tif) + * TIFFWriteCheck(tif, ...) + * TIFFWriteDirectory(tif) + * ... potentially create other directories and come back to the above directory + * TIFFForceStrileArrayWriting(tif) + * + * Returns 1 in case of success, 0 otherwise. + */ +int TIFFForceStrileArrayWriting(TIFF* tif) +{ + static const char module[] = "TIFFForceStrileArrayWriting"; + const int isTiled = TIFFIsTiled(tif); + + if (tif->tif_mode == O_RDONLY) + { + TIFFErrorExt(tif->tif_clientdata, tif->tif_name, + "File opened in read-only mode"); + return 0; + } + if( tif->tif_diroff == 0 ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Directory has not yet been written"); + return 0; + } + if( (tif->tif_flags & TIFF_DIRTYDIRECT) != 0 ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Directory has changes other than the strile arrays. " + "TIFFRewriteDirectory() should be called instead"); + return 0; + } + + if( !(tif->tif_flags & TIFF_DIRTYSTRIP) ) + { + if( !(tif->tif_dir.td_stripoffset_entry.tdir_tag != 0 && + tif->tif_dir.td_stripoffset_entry.tdir_count == 0 && + tif->tif_dir.td_stripoffset_entry.tdir_type == 0 && + tif->tif_dir.td_stripoffset_entry.tdir_offset.toff_long8 == 0 && + tif->tif_dir.td_stripbytecount_entry.tdir_tag != 0 && + tif->tif_dir.td_stripbytecount_entry.tdir_count == 0 && + tif->tif_dir.td_stripbytecount_entry.tdir_type == 0 && + tif->tif_dir.td_stripbytecount_entry.tdir_offset.toff_long8 == 0) ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Function not called together with " + "TIFFDeferStrileArrayWriting()"); + return 0; + } + + if (tif->tif_dir.td_stripoffset_p == NULL && !TIFFSetupStrips(tif)) + return 0; + } + + if( _TIFFRewriteField( tif, + isTiled ? TIFFTAG_TILEOFFSETS : + TIFFTAG_STRIPOFFSETS, + TIFF_LONG8, + tif->tif_dir.td_nstrips, + tif->tif_dir.td_stripoffset_p ) + && _TIFFRewriteField( tif, + isTiled ? TIFFTAG_TILEBYTECOUNTS : + TIFFTAG_STRIPBYTECOUNTS, + TIFF_LONG8, + tif->tif_dir.td_nstrips, + tif->tif_dir.td_stripbytecount_p ) ) + { + tif->tif_flags &= ~TIFF_DIRTYSTRIP; + tif->tif_flags &= ~TIFF_BEENWRITING; + return 1; + } + + return 0; +} + +/* + * Flush buffered data to the file. + * + * Frank Warmerdam'2000: I modified this to return 1 if TIFF_BEENWRITING + * is not set, so that TIFFFlush() will proceed to write out the directory. + * The documentation says returning 1 is an error indicator, but not having + * been writing isn't exactly a an error. Hopefully this doesn't cause + * problems for other people. + */ +int +TIFFFlushData(TIFF* tif) +{ + if ((tif->tif_flags & TIFF_BEENWRITING) == 0) + return (1); + if (tif->tif_flags & TIFF_POSTENCODE) { + tif->tif_flags &= ~TIFF_POSTENCODE; + if (!(*tif->tif_postencode)(tif)) + return (0); + } + return (TIFFFlushData1(tif)); +} + +/* vim: set ts=8 sts=8 sw=8 noet: */ +/* + * Local Variables: + * mode: c + * c-basic-offset: 8 + * fill-column: 78 + * End: + */ diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_getimage.c b/thirdparty/tiff-4.2.0/libtiff/tif_getimage.c similarity index 81% rename from thirdparty/tiff-4.0.3/libtiff/tif_getimage.c rename to thirdparty/tiff-4.2.0/libtiff/tif_getimage.c index a85273cc..3460af74 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_getimage.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_getimage.c @@ -1,5 +1,3 @@ -/* $Id: tif_getimage.c,v 1.82 2012-06-06 00:17:49 fwarmerdam Exp $ */ - /* * Copyright (c) 1991-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -31,6 +29,7 @@ */ #include "tiffiop.h" #include +#include static int gtTileContig(TIFFRGBAImage*, uint32*, uint32, uint32); static int gtTileSeparate(TIFFRGBAImage*, uint32*, uint32, uint32); @@ -95,6 +94,10 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[1024]) td->td_bitspersample); return (0); } + if (td->td_sampleformat == SAMPLEFORMAT_IEEEFP) { + sprintf(emsg, "Sorry, can not handle images with IEEE floating-point samples"); + return (0); + } colorchannels = td->td_samplesperpixel - td->td_extrasamples; if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric)) { switch (colorchannels) { @@ -134,7 +137,7 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[1024]) /* * TODO: if at all meaningful and useful, make more complete * support check here, or better still, refactor to let supporting - * code decide whether there is support and what meaningfull + * code decide whether there is support and what meaningful * error to return */ break; @@ -182,10 +185,25 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[1024]) "Planarconfiguration", td->td_planarconfig); return (0); } + if ( td->td_samplesperpixel != 3 || colorchannels != 3 ) { + sprintf(emsg, + "Sorry, can not handle image with %s=%d, %s=%d", + "Samples/pixel", td->td_samplesperpixel, + "colorchannels", colorchannels); + return 0; + } break; case PHOTOMETRIC_CIELAB: + if ( td->td_samplesperpixel != 3 || colorchannels != 3 || td->td_bitspersample != 8 ) { + sprintf(emsg, + "Sorry, can not handle image with %s=%d, %s=%d and %s=%d", + "Samples/pixel", td->td_samplesperpixel, + "colorchannels", colorchannels, + "Bits/sample", td->td_bitspersample); + return 0; + } break; - default: + default: sprintf(emsg, "Sorry, can not handle image with %s=%d", photoTag, photometric); return (0); @@ -196,20 +214,34 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[1024]) void TIFFRGBAImageEnd(TIFFRGBAImage* img) { - if (img->Map) - _TIFFfree(img->Map), img->Map = NULL; - if (img->BWmap) - _TIFFfree(img->BWmap), img->BWmap = NULL; - if (img->PALmap) - _TIFFfree(img->PALmap), img->PALmap = NULL; - if (img->ycbcr) - _TIFFfree(img->ycbcr), img->ycbcr = NULL; - if (img->cielab) - _TIFFfree(img->cielab), img->cielab = NULL; - if (img->UaToAa) - _TIFFfree(img->UaToAa), img->UaToAa = NULL; - if (img->Bitdepth16To8) - _TIFFfree(img->Bitdepth16To8), img->Bitdepth16To8 = NULL; + if (img->Map) { + _TIFFfree(img->Map); + img->Map = NULL; + } + if (img->BWmap) { + _TIFFfree(img->BWmap); + img->BWmap = NULL; + } + if (img->PALmap) { + _TIFFfree(img->PALmap); + img->PALmap = NULL; + } + if (img->ycbcr) { + _TIFFfree(img->ycbcr); + img->ycbcr = NULL; + } + if (img->cielab) { + _TIFFfree(img->cielab); + img->cielab = NULL; + } + if (img->UaToAa) { + _TIFFfree(img->UaToAa); + img->UaToAa = NULL; + } + if (img->Bitdepth16To8) { + _TIFFfree(img->Bitdepth16To8); + img->Bitdepth16To8 = NULL; + } if( img->redcmap ) { _TIFFfree( img->redcmap ); @@ -240,6 +272,9 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024]) int colorchannels; uint16 *red_orig, *green_orig, *blue_orig; int n_color; + + if( !TIFFRGBAImageOK(tif, emsg) ) + return 0; /* Initialize to normal values */ img->row_offset = 0; @@ -247,6 +282,13 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024]) img->redcmap = NULL; img->greencmap = NULL; img->bluecmap = NULL; + img->Map = NULL; + img->BWmap = NULL; + img->PALmap = NULL; + img->ycbcr = NULL; + img->cielab = NULL; + img->UaToAa = NULL; + img->Bitdepth16To8 = NULL; img->req_orientation = ORIENTATION_BOTLEFT; /* It is the default */ img->tif = tif; @@ -323,7 +365,7 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024]) } /* copy the colormaps so we can modify them */ - n_color = (1L << img->bitspersample); + n_color = (1U << img->bitspersample); img->redcmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color); img->greencmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color); img->bluecmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color); @@ -336,7 +378,7 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024]) _TIFFmemcpy( img->greencmap, green_orig, n_color * 2 ); _TIFFmemcpy( img->bluecmap, blue_orig, n_color * 2 ); - /* fall thru... */ + /* fall through... */ case PHOTOMETRIC_MINISWHITE: case PHOTOMETRIC_MINISBLACK: if (planarconfig == PLANARCONFIG_CONTIG @@ -373,7 +415,7 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024]) /* * TODO: if at all meaningful and useful, make more complete * support check here, or better still, refactor to let supporting - * code decide whether there is support and what meaningfull + * code decide whether there is support and what meaningful * error to return */ break; @@ -432,13 +474,6 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024]) photoTag, img->photometric); goto fail_return; } - img->Map = NULL; - img->BWmap = NULL; - img->PALmap = NULL; - img->ycbcr = NULL; - img->cielab = NULL; - img->UaToAa = NULL; - img->Bitdepth16To8 = NULL; TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &img->width); TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &img->height); TIFFGetFieldDefaulted(tif, TIFFTAG_ORIENTATION, &img->orientation); @@ -458,10 +493,7 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024]) return 1; fail_return: - _TIFFfree( img->redcmap ); - _TIFFfree( img->greencmap ); - _TIFFfree( img->bluecmap ); - img->redcmap = img->greencmap = img->bluecmap = NULL; + TIFFRGBAImageEnd( img ); return 0; } @@ -494,7 +526,7 @@ TIFFReadRGBAImageOriented(TIFF* tif, int ok; if (TIFFRGBAImageOK(tif, emsg) && TIFFRGBAImageBegin(&img, tif, stop, emsg)) { - img.req_orientation = orientation; + img.req_orientation = (uint16)orientation; /* XXX verify rwidth and rheight against width and height */ ok = TIFFRGBAImageGet(&img, raster+(rheight-img.height)*rwidth, rwidth, img.height); @@ -593,63 +625,90 @@ gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) uint32 col, row, y, rowstoread; tmsize_t pos; uint32 tw, th; - unsigned char* buf; + unsigned char* buf = NULL; int32 fromskew, toskew; uint32 nrow; int ret = 1, flip; + uint32 this_tw, tocol; + int32 this_toskew, leftmost_toskew; + int32 leftmost_fromskew; + uint32 leftmost_tw; + tmsize_t bufsize; - buf = (unsigned char*) _TIFFmalloc(TIFFTileSize(tif)); - if (buf == 0) { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "No space for tile buffer"); - return (0); + bufsize = TIFFTileSize(tif); + if (bufsize == 0) { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "No space for tile buffer"); + return (0); } - _TIFFmemset(buf, 0, TIFFTileSize(tif)); + TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw); TIFFGetField(tif, TIFFTAG_TILELENGTH, &th); flip = setorientation(img); if (flip & FLIP_VERTICALLY) { - y = h - 1; - toskew = -(int32)(tw + w); + if ((tw + w) > INT_MAX) { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "unsupported tile size (too wide)"); + return (0); + } + y = h - 1; + toskew = -(int32)(tw + w); } else { - y = 0; - toskew = -(int32)(tw - w); + if (tw > (INT_MAX + w)) { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "unsupported tile size (too wide)"); + return (0); + } + y = 0; + toskew = -(int32)(tw - w); } - for (row = 0; row < h; row += nrow) + /* + * Leftmost tile is clipped on left side if col_offset > 0. + */ + leftmost_fromskew = img->col_offset % tw; + leftmost_tw = tw - leftmost_fromskew; + leftmost_toskew = toskew + leftmost_fromskew; + for (row = 0; ret != 0 && row < h; row += nrow) { rowstoread = th - (row + img->row_offset) % th; nrow = (row + rowstoread > h ? h - row : rowstoread); - for (col = 0; col < w; col += tw) + fromskew = leftmost_fromskew; + this_tw = leftmost_tw; + this_toskew = leftmost_toskew; + tocol = 0; + col = img->col_offset; + while (tocol < w) { - if (TIFFReadTile(tif, buf, col+img->col_offset, - row+img->row_offset, 0, 0)==(tmsize_t)(-1) && img->stoponerr) + if (_TIFFReadTileAndAllocBuffer(tif, (void**) &buf, bufsize, col, + row+img->row_offset, 0, 0)==(tmsize_t)(-1) && + (buf == NULL || img->stoponerr)) { ret = 0; break; } - - pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif); + pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif) + \ + ((tmsize_t) fromskew * img->samplesperpixel); + if (tocol + this_tw > w) + { + /* + * Rightmost tile is clipped on right side. + */ + fromskew = tw - (w - tocol); + this_tw = tw - fromskew; + this_toskew = toskew + fromskew; + } + (*put)(img, raster+y*w+tocol, tocol, y, this_tw, nrow, fromskew, this_toskew, buf + pos); + tocol += this_tw; + col += this_tw; + /* + * After the leftmost tile, tiles are no longer clipped on left side. + */ + fromskew = 0; + this_tw = tw; + this_toskew = toskew; + } - if (col + tw > w) - { - /* - * Tile is clipped horizontally. Calculate - * visible portion and skewing factors. - */ - uint32 npix = w - col; - fromskew = tw - npix; - (*put)(img, raster+y*w+col, col, y, - npix, nrow, fromskew, toskew + fromskew, buf + pos); - } - else - { - (*put)(img, raster+y*w+col, col, y, tw, nrow, 0, toskew, buf + pos); - } - } - - y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow); + y += ((flip & FLIP_VERTICALLY) ? -(int32) nrow : (int32) nrow); } _TIFFfree(buf); @@ -664,7 +723,8 @@ gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) uint32 temp = *left; *left = *right; *right = temp; - left++, right--; + left++; + right--; } } } @@ -686,44 +746,46 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) uint32 col, row, y, rowstoread; tmsize_t pos; uint32 tw, th; - unsigned char* buf; - unsigned char* p0; - unsigned char* p1; - unsigned char* p2; - unsigned char* pa; + unsigned char* buf = NULL; + unsigned char* p0 = NULL; + unsigned char* p1 = NULL; + unsigned char* p2 = NULL; + unsigned char* pa = NULL; tmsize_t tilesize; tmsize_t bufsize; int32 fromskew, toskew; int alpha = img->alpha; uint32 nrow; int ret = 1, flip; - int colorchannels; + uint16 colorchannels; + uint32 this_tw, tocol; + int32 this_toskew, leftmost_toskew; + int32 leftmost_fromskew; + uint32 leftmost_tw; tilesize = TIFFTileSize(tif); - bufsize = TIFFSafeMultiply(tmsize_t,alpha?4:3,tilesize); + bufsize = _TIFFMultiplySSize(tif, alpha?4:3,tilesize, "gtTileSeparate"); if (bufsize == 0) { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in %s", "gtTileSeparate"); return (0); } - buf = (unsigned char*) _TIFFmalloc(bufsize); - if (buf == 0) { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "No space for tile buffer"); - return (0); - } - _TIFFmemset(buf, 0, bufsize); - p0 = buf; - p1 = p0 + tilesize; - p2 = p1 + tilesize; - pa = (alpha?(p2+tilesize):NULL); + TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw); TIFFGetField(tif, TIFFTAG_TILELENGTH, &th); flip = setorientation(img); if (flip & FLIP_VERTICALLY) { + if ((tw + w) > INT_MAX) { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "unsupported tile size (too wide)"); + return (0); + } y = h - 1; toskew = -(int32)(tw + w); } else { + if (tw > (INT_MAX + w)) { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "unsupported tile size (too wide)"); + return (0); + } y = 0; toskew = -(int32)(tw - w); } @@ -734,7 +796,6 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) case PHOTOMETRIC_MINISBLACK: case PHOTOMETRIC_PALETTE: colorchannels = 1; - p2 = p1 = p0; break; default: @@ -742,20 +803,54 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) break; } - for (row = 0; row < h; row += nrow) + /* + * Leftmost tile is clipped on left side if col_offset > 0. + */ + leftmost_fromskew = img->col_offset % tw; + leftmost_tw = tw - leftmost_fromskew; + leftmost_toskew = toskew + leftmost_fromskew; + for (row = 0; ret != 0 && row < h; row += nrow) { rowstoread = th - (row + img->row_offset) % th; nrow = (row + rowstoread > h ? h - row : rowstoread); - for (col = 0; col < w; col += tw) + fromskew = leftmost_fromskew; + this_tw = leftmost_tw; + this_toskew = leftmost_toskew; + tocol = 0; + col = img->col_offset; + while (tocol < w) { - if (TIFFReadTile(tif, p0, col+img->col_offset, + if( buf == NULL ) + { + if (_TIFFReadTileAndAllocBuffer( + tif, (void**) &buf, bufsize, col, + row+img->row_offset,0,0)==(tmsize_t)(-1) + && (buf == NULL || img->stoponerr)) + { + ret = 0; + break; + } + p0 = buf; + if( colorchannels == 1 ) + { + p2 = p1 = p0; + pa = (alpha?(p0+3*tilesize):NULL); + } + else + { + p1 = p0 + tilesize; + p2 = p1 + tilesize; + pa = (alpha?(p2+tilesize):NULL); + } + } + else if (TIFFReadTile(tif, p0, col, row+img->row_offset,0,0)==(tmsize_t)(-1) && img->stoponerr) { ret = 0; break; } if (colorchannels > 1 - && TIFFReadTile(tif, p1, col+img->col_offset, + && TIFFReadTile(tif, p1, col, row+img->row_offset,0,1) == (tmsize_t)(-1) && img->stoponerr) { @@ -763,7 +858,7 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) break; } if (colorchannels > 1 - && TIFFReadTile(tif, p2, col+img->col_offset, + && TIFFReadTile(tif, p2, col, row+img->row_offset,0,2) == (tmsize_t)(-1) && img->stoponerr) { @@ -771,7 +866,7 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) break; } if (alpha - && TIFFReadTile(tif,pa,col+img->col_offset, + && TIFFReadTile(tif,pa,col, row+img->row_offset,0,colorchannels) == (tmsize_t)(-1) && img->stoponerr) { @@ -779,26 +874,30 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) break; } - pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif); - - if (col + tw > w) + pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif) + \ + ((tmsize_t) fromskew * img->samplesperpixel); + if (tocol + this_tw > w) { /* - * Tile is clipped horizontally. Calculate - * visible portion and skewing factors. + * Rightmost tile is clipped on right side. */ - uint32 npix = w - col; - fromskew = tw - npix; - (*put)(img, raster+y*w+col, col, y, - npix, nrow, fromskew, toskew + fromskew, - p0 + pos, p1 + pos, p2 + pos, (alpha?(pa+pos):NULL)); - } else { - (*put)(img, raster+y*w+col, col, y, - tw, nrow, 0, toskew, p0 + pos, p1 + pos, p2 + pos, (alpha?(pa+pos):NULL)); + fromskew = tw - (w - tocol); + this_tw = tw - fromskew; + this_toskew = toskew + fromskew; } + (*put)(img, raster+y*w+tocol, tocol, y, this_tw, nrow, fromskew, this_toskew, \ + p0 + pos, p1 + pos, p2 + pos, (alpha?(pa+pos):NULL)); + tocol += this_tw; + col += this_tw; + /* + * After the leftmost tile, tiles are no longer clipped on left side. + */ + fromskew = 0; + this_tw = tw; + this_toskew = toskew; } - y += (flip & FLIP_VERTICALLY ?-(int32) nrow : (int32) nrow); + y += ((flip & FLIP_VERTICALLY) ?-(int32) nrow : (int32) nrow); } if (flip & FLIP_HORIZONTALLY) { @@ -812,7 +911,8 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) uint32 temp = *left; *left = *right; *right = temp; - left++, right--; + left++; + right--; } } } @@ -834,23 +934,29 @@ gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) tileContigRoutine put = img->put.contig; uint32 row, y, nrow, nrowsub, rowstoread; tmsize_t pos; - unsigned char* buf; + unsigned char* buf = NULL; uint32 rowsperstrip; uint16 subsamplinghor,subsamplingver; uint32 imagewidth = img->width; tmsize_t scanline; int32 fromskew, toskew; int ret = 1, flip; + tmsize_t maxstripsize; - buf = (unsigned char*) _TIFFmalloc(TIFFStripSize(tif)); - if (buf == 0) { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "No space for strip buffer"); + TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRSUBSAMPLING, &subsamplinghor, &subsamplingver); + if( subsamplingver == 0 ) { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Invalid vertical YCbCr subsampling"); return (0); } - _TIFFmemset(buf, 0, TIFFStripSize(tif)); + + maxstripsize = TIFFStripSize(tif); flip = setorientation(img); if (flip & FLIP_VERTICALLY) { + if ( w > INT_MAX ) { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Width overflow"); + return (0); + } y = h - 1; toskew = -(int32)(w + w); } else { @@ -859,29 +965,38 @@ gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) } TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRSUBSAMPLING, &subsamplinghor, &subsamplingver); + scanline = TIFFScanlineSize(tif); fromskew = (w < imagewidth ? imagewidth - w : 0); for (row = 0; row < h; row += nrow) { + uint32 temp; rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip; nrow = (row + rowstoread > h ? h - row : rowstoread); nrowsub = nrow; if ((nrowsub%subsamplingver)!=0) nrowsub+=subsamplingver-nrowsub%subsamplingver; - if (TIFFReadEncodedStrip(tif, + temp = (row + img->row_offset)%rowsperstrip + nrowsub; + if( scanline > 0 && temp > (size_t)(TIFF_TMSIZE_T_MAX / scanline) ) + { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in gtStripContig"); + return 0; + } + if (_TIFFReadEncodedStripAndAllocBuffer(tif, TIFFComputeStrip(tif,row+img->row_offset, 0), - buf, - ((row + img->row_offset)%rowsperstrip + nrowsub) * scanline)==(tmsize_t)(-1) - && img->stoponerr) + (void**)(&buf), + maxstripsize, + temp * scanline)==(tmsize_t)(-1) + && (buf == NULL || img->stoponerr)) { ret = 0; break; } - pos = ((row + img->row_offset) % rowsperstrip) * scanline; + pos = ((row + img->row_offset) % rowsperstrip) * scanline + \ + ((tmsize_t) img->col_offset * img->samplesperpixel); (*put)(img, raster+y*w, 0, y, w, nrow, fromskew, toskew, buf + pos); - y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow); + y += ((flip & FLIP_VERTICALLY) ? -(int32) nrow : (int32) nrow); } if (flip & FLIP_HORIZONTALLY) { @@ -895,7 +1010,8 @@ gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) uint32 temp = *left; *left = *right; *right = temp; - left++, right--; + left++; + right--; } } } @@ -915,8 +1031,8 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) { TIFF* tif = img->tif; tileSeparateRoutine put = img->put.separate; - unsigned char *buf; - unsigned char *p0, *p1, *p2, *pa; + unsigned char *buf = NULL; + unsigned char *p0 = NULL, *p1 = NULL, *p2 = NULL, *pa = NULL; uint32 row, y, nrow, rowstoread; tmsize_t pos; tmsize_t scanline; @@ -926,26 +1042,21 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) tmsize_t bufsize; int32 fromskew, toskew; int alpha = img->alpha; - int ret = 1, flip, colorchannels; + int ret = 1, flip; + uint16 colorchannels; stripsize = TIFFStripSize(tif); - bufsize = TIFFSafeMultiply(tmsize_t,alpha?4:3,stripsize); + bufsize = _TIFFMultiplySSize(tif,alpha?4:3,stripsize, "gtStripSeparate"); if (bufsize == 0) { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in %s", "gtStripSeparate"); return (0); } - p0 = buf = (unsigned char *)_TIFFmalloc(bufsize); - if (buf == 0) { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "No space for tile buffer"); - return (0); - } - _TIFFmemset(buf, 0, bufsize); - p1 = p0 + stripsize; - p2 = p1 + stripsize; - pa = (alpha?(p2+stripsize):NULL); flip = setorientation(img); if (flip & FLIP_VERTICALLY) { + if ( w > INT_MAX ) { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Width overflow"); + return (0); + } y = h - 1; toskew = -(int32)(w + w); } @@ -960,7 +1071,6 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) case PHOTOMETRIC_MINISBLACK: case PHOTOMETRIC_PALETTE: colorchannels = 1; - p2 = p1 = p0; break; default: @@ -973,11 +1083,42 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) fromskew = (w < imagewidth ? imagewidth - w : 0); for (row = 0; row < h; row += nrow) { + uint32 temp; rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip; nrow = (row + rowstoread > h ? h - row : rowstoread); offset_row = row + img->row_offset; - if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 0), - p0, ((row + img->row_offset)%rowsperstrip + nrow) * scanline)==(tmsize_t)(-1) + temp = (row + img->row_offset)%rowsperstrip + nrow; + if( scanline > 0 && temp > (size_t)(TIFF_TMSIZE_T_MAX / scanline) ) + { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in gtStripSeparate"); + return 0; + } + if( buf == NULL ) + { + if (_TIFFReadEncodedStripAndAllocBuffer( + tif, TIFFComputeStrip(tif, offset_row, 0), + (void**) &buf, bufsize, + temp * scanline)==(tmsize_t)(-1) + && (buf == NULL || img->stoponerr)) + { + ret = 0; + break; + } + p0 = buf; + if( colorchannels == 1 ) + { + p2 = p1 = p0; + pa = (alpha?(p0+3*stripsize):NULL); + } + else + { + p1 = p0 + stripsize; + p2 = p1 + stripsize; + pa = (alpha?(p2+stripsize):NULL); + } + } + else if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 0), + p0, temp * scanline)==(tmsize_t)(-1) && img->stoponerr) { ret = 0; @@ -985,7 +1126,7 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) } if (colorchannels > 1 && TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 1), - p1, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) == (tmsize_t)(-1) + p1, temp * scanline) == (tmsize_t)(-1) && img->stoponerr) { ret = 0; @@ -993,7 +1134,7 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) } if (colorchannels > 1 && TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 2), - p2, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) == (tmsize_t)(-1) + p2, temp * scanline) == (tmsize_t)(-1) && img->stoponerr) { ret = 0; @@ -1002,7 +1143,7 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) if (alpha) { if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, colorchannels), - pa, ((row + img->row_offset)%rowsperstrip + nrow) * scanline)==(tmsize_t)(-1) + pa, temp * scanline)==(tmsize_t)(-1) && img->stoponerr) { ret = 0; @@ -1010,10 +1151,11 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) } } - pos = ((row + img->row_offset) % rowsperstrip) * scanline; + pos = ((row + img->row_offset) % rowsperstrip) * scanline + \ + ((tmsize_t) img->col_offset * img->samplesperpixel); (*put)(img, raster+y*w, 0, y, w, nrow, fromskew, toskew, p0 + pos, p1 + pos, p2 + pos, (alpha?(pa+pos):NULL)); - y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow); + y += ((flip & FLIP_VERTICALLY) ? -(int32) nrow : (int32) nrow); } if (flip & FLIP_HORIZONTALLY) { @@ -1027,7 +1169,8 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) uint32 temp = *left; *left = *right; *right = temp; - left++, right--; + left++; + right--; } } } @@ -1051,11 +1194,15 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) #define REPEAT2(op) op; op #define CASE8(x,op) \ switch (x) { \ - case 7: op; case 6: op; case 5: op; \ - case 4: op; case 3: op; case 2: op; \ + case 7: op; /*-fallthrough*/ \ + case 6: op; /*-fallthrough*/ \ + case 5: op; /*-fallthrough*/ \ + case 4: op; /*-fallthrough*/ \ + case 3: op; /*-fallthrough*/ \ + case 2: op; /*-fallthrough*/ \ case 1: op; \ } -#define CASE4(x,op) switch (x) { case 3: op; case 2: op; case 1: op; } +#define CASE4(x,op) switch (x) { case 3: op; /*-fallthrough*/ case 2: op; /*-fallthrough*/ case 1: op; } #define NOP #define UNROLL8(w, op1, op2) { \ @@ -1126,8 +1273,8 @@ DECLAREContigPutFunc(put8bitcmaptile) int samplesperpixel = img->samplesperpixel; (void) y; - while (h-- > 0) { - for (x = w; x-- > 0;) + for( ; h > 0; --h) { + for (x = w; x > 0; --x) { *cp++ = PALmap[*pp][0]; pp += samplesperpixel; @@ -1146,7 +1293,7 @@ DECLAREContigPutFunc(put4bitcmaptile) (void) x; (void) y; fromskew /= 2; - while (h-- > 0) { + for( ; h > 0; --h) { uint32* bw; UNROLL2(w, bw = PALmap[*pp++], *cp++ = *bw++); cp += toskew; @@ -1163,7 +1310,7 @@ DECLAREContigPutFunc(put2bitcmaptile) (void) x; (void) y; fromskew /= 4; - while (h-- > 0) { + for( ; h > 0; --h) { uint32* bw; UNROLL4(w, bw = PALmap[*pp++], *cp++ = *bw++); cp += toskew; @@ -1180,7 +1327,7 @@ DECLAREContigPutFunc(put1bitcmaptile) (void) x; (void) y; fromskew /= 8; - while (h-- > 0) { + for( ; h > 0; --h) { uint32* bw; UNROLL8(w, bw = PALmap[*pp++], *cp++ = *bw++); cp += toskew; @@ -1197,8 +1344,8 @@ DECLAREContigPutFunc(putgreytile) uint32** BWmap = img->BWmap; (void) y; - while (h-- > 0) { - for (x = w; x-- > 0;) + for( ; h > 0; --h) { + for (x = w; x > 0; --x) { *cp++ = BWmap[*pp][0]; pp += samplesperpixel; @@ -1217,10 +1364,10 @@ DECLAREContigPutFunc(putagreytile) uint32** BWmap = img->BWmap; (void) y; - while (h-- > 0) { - for (x = w; x-- > 0;) + for( ; h > 0; --h) { + for (x = w; x > 0; --x) { - *cp++ = BWmap[*pp][0] & (*(pp+1) << 24 | ~A1); + *cp++ = BWmap[*pp][0] & ((uint32)*(pp+1) << 24 | ~A1); pp += samplesperpixel; } cp += toskew; @@ -1237,10 +1384,10 @@ DECLAREContigPutFunc(put16bitbwtile) uint32** BWmap = img->BWmap; (void) y; - while (h-- > 0) { + for( ; h > 0; --h) { uint16 *wp = (uint16 *) pp; - for (x = w; x-- > 0;) + for (x = w; x > 0; --x) { /* use high order byte of 16bit value */ @@ -1262,7 +1409,7 @@ DECLAREContigPutFunc(put1bitbwtile) (void) x; (void) y; fromskew /= 8; - while (h-- > 0) { + for( ; h > 0; --h) { uint32* bw; UNROLL8(w, bw = BWmap[*pp++], *cp++ = *bw++); cp += toskew; @@ -1279,7 +1426,7 @@ DECLAREContigPutFunc(put2bitbwtile) (void) x; (void) y; fromskew /= 4; - while (h-- > 0) { + for( ; h > 0; --h) { uint32* bw; UNROLL4(w, bw = BWmap[*pp++], *cp++ = *bw++); cp += toskew; @@ -1296,7 +1443,7 @@ DECLAREContigPutFunc(put4bitbwtile) (void) x; (void) y; fromskew /= 2; - while (h-- > 0) { + for( ; h > 0; --h) { uint32* bw; UNROLL2(w, bw = BWmap[*pp++], *cp++ = *bw++); cp += toskew; @@ -1313,7 +1460,7 @@ DECLAREContigPutFunc(putRGBcontig8bittile) (void) x; (void) y; fromskew *= samplesperpixel; - while (h-- > 0) { + for( ; h > 0; --h) { UNROLL8(w, NOP, *cp++ = PACK(pp[0], pp[1], pp[2]); pp += samplesperpixel); @@ -1332,7 +1479,7 @@ DECLAREContigPutFunc(putRGBAAcontig8bittile) (void) x; (void) y; fromskew *= samplesperpixel; - while (h-- > 0) { + for( ; h > 0; --h) { UNROLL8(w, NOP, *cp++ = PACK4(pp[0], pp[1], pp[2], pp[3]); pp += samplesperpixel); @@ -1350,12 +1497,12 @@ DECLAREContigPutFunc(putRGBUAcontig8bittile) int samplesperpixel = img->samplesperpixel; (void) y; fromskew *= samplesperpixel; - while (h-- > 0) { + for( ; h > 0; --h) { uint32 r, g, b, a; uint8* m; - for (x = w; x-- > 0;) { + for (x = w; x > 0; --x) { a = pp[3]; - m = img->UaToAa+(a<<8); + m = img->UaToAa+((size_t) a<<8); r = m[pp[0]]; g = m[pp[1]]; b = m[pp[2]]; @@ -1376,8 +1523,8 @@ DECLAREContigPutFunc(putRGBcontig16bittile) uint16 *wp = (uint16 *)pp; (void) y; fromskew *= samplesperpixel; - while (h-- > 0) { - for (x = w; x-- > 0;) { + for( ; h > 0; --h) { + for (x = w; x > 0; --x) { *cp++ = PACK(img->Bitdepth16To8[wp[0]], img->Bitdepth16To8[wp[1]], img->Bitdepth16To8[wp[2]]); @@ -1398,8 +1545,8 @@ DECLAREContigPutFunc(putRGBAAcontig16bittile) uint16 *wp = (uint16 *)pp; (void) y; fromskew *= samplesperpixel; - while (h-- > 0) { - for (x = w; x-- > 0;) { + for( ; h > 0; --h) { + for (x = w; x > 0; --x) { *cp++ = PACK4(img->Bitdepth16To8[wp[0]], img->Bitdepth16To8[wp[1]], img->Bitdepth16To8[wp[2]], @@ -1421,12 +1568,12 @@ DECLAREContigPutFunc(putRGBUAcontig16bittile) uint16 *wp = (uint16 *)pp; (void) y; fromskew *= samplesperpixel; - while (h-- > 0) { + for( ; h > 0; --h) { uint32 r,g,b,a; uint8* m; - for (x = w; x-- > 0;) { + for (x = w; x > 0; --x) { a = img->Bitdepth16To8[wp[3]]; - m = img->UaToAa+(a<<8); + m = img->UaToAa+((size_t) a<<8); r = m[img->Bitdepth16To8[wp[0]]]; g = m[img->Bitdepth16To8[wp[1]]]; b = m[img->Bitdepth16To8[wp[2]]]; @@ -1450,7 +1597,7 @@ DECLAREContigPutFunc(putRGBcontig8bitCMYKtile) (void) x; (void) y; fromskew *= samplesperpixel; - while (h-- > 0) { + for( ; h > 0; --h) { UNROLL8(w, NOP, k = 255 - pp[3]; r = (k*(255-pp[0]))/255; @@ -1476,8 +1623,8 @@ DECLAREContigPutFunc(putRGBcontig8bitCMYKMaptile) (void) y; fromskew *= samplesperpixel; - while (h-- > 0) { - for (x = w; x-- > 0;) { + for( ; h > 0; --h) { + for (x = w; x > 0; --x) { k = 255 - pp[3]; r = (k*(255-pp[0]))/255; g = (k*(255-pp[1]))/255; @@ -1506,7 +1653,7 @@ static void name(\ DECLARESepPutFunc(putRGBseparate8bittile) { (void) img; (void) x; (void) y; (void) a; - while (h-- > 0) { + for( ; h > 0; --h) { UNROLL8(w, NOP, *cp++ = PACK(*r++, *g++, *b++)); SKEW(r, g, b, fromskew); cp += toskew; @@ -1519,7 +1666,7 @@ DECLARESepPutFunc(putRGBseparate8bittile) DECLARESepPutFunc(putRGBAAseparate8bittile) { (void) img; (void) x; (void) y; - while (h-- > 0) { + for( ; h > 0; --h) { UNROLL8(w, NOP, *cp++ = PACK4(*r++, *g++, *b++, *a++)); SKEW4(r, g, b, a, fromskew); cp += toskew; @@ -1532,9 +1679,9 @@ DECLARESepPutFunc(putRGBAAseparate8bittile) DECLARESepPutFunc(putCMYKseparate8bittile) { (void) img; (void) y; - while (h-- > 0) { + for( ; h > 0; --h) { uint32 rv, gv, bv, kv; - for (x = w; x-- > 0;) { + for (x = w; x > 0; --x) { kv = 255 - *a++; rv = (kv*(255-*r++))/255; gv = (kv*(255-*g++))/255; @@ -1552,12 +1699,12 @@ DECLARESepPutFunc(putCMYKseparate8bittile) DECLARESepPutFunc(putRGBUAseparate8bittile) { (void) img; (void) y; - while (h-- > 0) { + for( ; h > 0; --h) { uint32 rv, gv, bv, av; uint8* m; - for (x = w; x-- > 0;) { + for (x = w; x > 0; --x) { av = *a++; - m = img->UaToAa+(av<<8); + m = img->UaToAa+((size_t) av<<8); rv = m[*r++]; gv = m[*g++]; bv = m[*b++]; @@ -1577,7 +1724,7 @@ DECLARESepPutFunc(putRGBseparate16bittile) uint16 *wg = (uint16*) g; uint16 *wb = (uint16*) b; (void) img; (void) y; (void) a; - while (h-- > 0) { + for( ; h > 0; --h) { for (x = 0; x < w; x++) *cp++ = PACK(img->Bitdepth16To8[*wr++], img->Bitdepth16To8[*wg++], @@ -1597,7 +1744,7 @@ DECLARESepPutFunc(putRGBAAseparate16bittile) uint16 *wb = (uint16*) b; uint16 *wa = (uint16*) a; (void) img; (void) y; - while (h-- > 0) { + for( ; h > 0; --h) { for (x = 0; x < w; x++) *cp++ = PACK4(img->Bitdepth16To8[*wr++], img->Bitdepth16To8[*wg++], @@ -1618,16 +1765,16 @@ DECLARESepPutFunc(putRGBUAseparate16bittile) uint16 *wb = (uint16*) b; uint16 *wa = (uint16*) a; (void) img; (void) y; - while (h-- > 0) { - uint32 r,g,b,a; + for( ; h > 0; --h) { + uint32 r2,g2,b2,a2; uint8* m; - for (x = w; x-- > 0;) { - a = img->Bitdepth16To8[*wa++]; - m = img->UaToAa+(a<<8); - r = m[img->Bitdepth16To8[*wr++]]; - g = m[img->Bitdepth16To8[*wg++]]; - b = m[img->Bitdepth16To8[*wb++]]; - *cp++ = PACK4(r,g,b,a); + for (x = w; x > 0; --x) { + a2 = img->Bitdepth16To8[*wa++]; + m = img->UaToAa+((size_t) a2<<8); + r2 = m[img->Bitdepth16To8[*wr++]]; + g2 = m[img->Bitdepth16To8[*wg++]]; + b2 = m[img->Bitdepth16To8[*wb++]]; + *cp++ = PACK4(r2,g2,b2,a2); } SKEW4(wr, wg, wb, wa, fromskew); cp += toskew; @@ -1643,8 +1790,8 @@ DECLAREContigPutFunc(putcontig8bitCIELab) uint32 r, g, b; (void) y; fromskew *= 3; - while (h-- > 0) { - for (x = w; x-- > 0;) { + for( ; h > 0; --h) { + for (x = w; x > 0; --x) { TIFFCIELabToXYZ(img->cielab, (unsigned char)pp[0], (signed char)pp[1], @@ -1757,7 +1904,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr44tile) (void) y; /* adjust fromskew */ - fromskew = (fromskew * 18) / 4; + fromskew = (fromskew / 4) * (4*2+2); if ((h & 3) == 0 && (w & 3) == 0) { for (; h >= 4; h -= 4) { x = w>>2; @@ -1782,10 +1929,16 @@ DECLAREContigPutFunc(putcontig8bitYCbCr44tile) YCbCrtoRGB(cp3[2], pp[14]); YCbCrtoRGB(cp3[3], pp[15]); - cp += 4, cp1 += 4, cp2 += 4, cp3 += 4; + cp += 4; + cp1 += 4; + cp2 += 4; + cp3 += 4; pp += 18; } while (--x); - cp += incr, cp1 += incr, cp2 += incr, cp3 += incr; + cp += incr; + cp1 += incr; + cp2 += incr; + cp3 += incr; pp += fromskew; } } else { @@ -1836,7 +1989,10 @@ DECLAREContigPutFunc(putcontig8bitYCbCr44tile) if (h <= 4) break; h -= 4; - cp += incr, cp1 += incr, cp2 += incr, cp3 += incr; + cp += incr; + cp1 += incr; + cp2 += incr; + cp3 += incr; pp += fromskew; } } @@ -1851,8 +2007,8 @@ DECLAREContigPutFunc(putcontig8bitYCbCr42tile) int32 incr = 2*toskew+w; (void) y; - fromskew = (fromskew * 10) / 4; - if ((h & 3) == 0 && (w & 1) == 0) { + fromskew = (fromskew / 4) * (4*2+2); + if ((w & 3) == 0 && (h & 1) == 0) { for (; h >= 2; h -= 2) { x = w>>2; do { @@ -1868,10 +2024,12 @@ DECLAREContigPutFunc(putcontig8bitYCbCr42tile) YCbCrtoRGB(cp1[2], pp[6]); YCbCrtoRGB(cp1[3], pp[7]); - cp += 4, cp1 += 4; + cp += 4; + cp1 += 4; pp += 10; } while (--x); - cp += incr, cp1 += incr; + cp += incr; + cp1 += incr; pp += fromskew; } } else { @@ -1914,7 +2072,8 @@ DECLAREContigPutFunc(putcontig8bitYCbCr42tile) if (h <= 2) break; h -= 2; - cp += incr, cp1 += incr; + cp += incr; + cp1 += incr; pp += fromskew; } } @@ -1926,10 +2085,10 @@ DECLAREContigPutFunc(putcontig8bitYCbCr42tile) DECLAREContigPutFunc(putcontig8bitYCbCr41tile) { (void) y; - /* XXX adjust fromskew */ + fromskew = (fromskew / 4) * (4*1+2); do { x = w>>2; - do { + while(x>0) { int32 Cb = pp[4]; int32 Cr = pp[5]; @@ -1940,7 +2099,8 @@ DECLAREContigPutFunc(putcontig8bitYCbCr41tile) cp += 4; pp += 6; - } while (--x); + x--; + } if( (w&3) != 0 ) { @@ -1948,9 +2108,9 @@ DECLAREContigPutFunc(putcontig8bitYCbCr41tile) int32 Cr = pp[5]; switch( (w&3) ) { - case 3: YCbCrtoRGB(cp [2], pp[2]); - case 2: YCbCrtoRGB(cp [1], pp[1]); - case 1: YCbCrtoRGB(cp [0], pp[0]); + case 3: YCbCrtoRGB(cp [2], pp[2]); /*-fallthrough*/ + case 2: YCbCrtoRGB(cp [1], pp[1]); /*-fallthrough*/ + case 1: YCbCrtoRGB(cp [0], pp[0]); /*-fallthrough*/ case 0: break; } @@ -1972,7 +2132,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr22tile) uint32* cp2; int32 incr = 2*toskew+w; (void) y; - fromskew = (fromskew / 2) * 6; + fromskew = (fromskew / 2) * (2*2+2); cp2 = cp+w+toskew; while (h>=2) { x = w; @@ -2028,10 +2188,10 @@ DECLAREContigPutFunc(putcontig8bitYCbCr22tile) DECLAREContigPutFunc(putcontig8bitYCbCr21tile) { (void) y; - fromskew = (fromskew * 4) / 2; + fromskew = (fromskew / 2) * (2*1+2); do { x = w>>1; - do { + while(x>0) { int32 Cb = pp[2]; int32 Cr = pp[3]; @@ -2040,7 +2200,8 @@ DECLAREContigPutFunc(putcontig8bitYCbCr21tile) cp += 2; pp += 4; - } while (--x); + x --; + } if( (w&1) != 0 ) { @@ -2066,7 +2227,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr12tile) uint32* cp2; int32 incr = 2*toskew+w; (void) y; - fromskew = (fromskew / 2) * 4; + fromskew = (fromskew / 1) * (1 * 2 + 2); cp2 = cp+w+toskew; while (h>=2) { x = w; @@ -2102,7 +2263,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr12tile) DECLAREContigPutFunc(putcontig8bitYCbCr11tile) { (void) y; - fromskew *= 3; + fromskew = (fromskew / 1) * (1 * 1 + 2); do { x = w; /* was x = w>>1; patched 2000/09/25 warmerda@home.com */ do { @@ -2126,7 +2287,7 @@ DECLARESepPutFunc(putseparate8bitYCbCr11tile) (void) y; (void) a; /* TODO: naming of input vars is still off, change obfuscating declaration inside define, or resolve obfuscation */ - while (h-- > 0) { + for( ; h > 0; --h) { x = w; do { uint32 dr, dg, db; @@ -2139,6 +2300,11 @@ DECLARESepPutFunc(putseparate8bitYCbCr11tile) } #undef YCbCrtoRGB +static int isInRefBlackWhiteRange(float f) +{ + return f > (float)(-0x7FFFFFFF + 128) && f < (float)0x7FFFFFFF; +} + static int initYCbCrConversion(TIFFRGBAImage* img) { @@ -2163,6 +2329,31 @@ initYCbCrConversion(TIFFRGBAImage* img) TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRCOEFFICIENTS, &luma); TIFFGetFieldDefaulted(img->tif, TIFFTAG_REFERENCEBLACKWHITE, &refBlackWhite); + + /* Do some validation to avoid later issues. Detect NaN for now */ + /* and also if lumaGreen is zero since we divide by it later */ + if( luma[0] != luma[0] || + luma[1] != luma[1] || + luma[1] == 0.0 || + luma[2] != luma[2] ) + { + TIFFErrorExt(img->tif->tif_clientdata, module, + "Invalid values for YCbCrCoefficients tag"); + return (0); + } + + if( !isInRefBlackWhiteRange(refBlackWhite[0]) || + !isInRefBlackWhiteRange(refBlackWhite[1]) || + !isInRefBlackWhiteRange(refBlackWhite[2]) || + !isInRefBlackWhiteRange(refBlackWhite[3]) || + !isInRefBlackWhiteRange(refBlackWhite[4]) || + !isInRefBlackWhiteRange(refBlackWhite[5]) ) + { + TIFFErrorExt(img->tif->tif_clientdata, module, + "Invalid values for ReferenceBlackWhite tag"); + return (0); + } + if (TIFFYCbCrToRGBInit(img->ycbcr, luma, refBlackWhite) < 0) return(0); return (1); @@ -2176,6 +2367,13 @@ initCIELabConversion(TIFFRGBAImage* img) float *whitePoint; float refWhite[3]; + TIFFGetFieldDefaulted(img->tif, TIFFTAG_WHITEPOINT, &whitePoint); + if (whitePoint[1] == 0.0f ) { + TIFFErrorExt(img->tif->tif_clientdata, module, + "Invalid value for WhitePoint tag."); + return NULL; + } + if (!img->cielab) { img->cielab = (TIFFCIELabToRGB *) _TIFFmalloc(sizeof(TIFFCIELabToRGB)); @@ -2186,7 +2384,6 @@ initCIELabConversion(TIFFRGBAImage* img) } } - TIFFGetFieldDefaulted(img->tif, TIFFTAG_WHITEPOINT, &whitePoint); refWhite[1] = 100.0F; refWhite[0] = whitePoint[0] / whitePoint[1] * refWhite[1]; refWhite[2] = (1.0F - whitePoint[0] - whitePoint[1]) @@ -2301,7 +2498,8 @@ setupMap(TIFFRGBAImage* img) if (!makebwmap(img)) return (0); /* no longer need Map, free it */ - _TIFFfree(img->Map), img->Map = NULL; + _TIFFfree(img->Map); + img->Map = NULL; } return (1); } @@ -2409,7 +2607,7 @@ buildMap(TIFFRGBAImage* img) case PHOTOMETRIC_SEPARATED: if (img->bitspersample == 8) break; - /* fall thru... */ + /* fall through... */ case PHOTOMETRIC_MINISBLACK: case PHOTOMETRIC_MINISWHITE: if (!setupMap(img)) @@ -2447,29 +2645,33 @@ PickContigCase(TIFFRGBAImage* img) case PHOTOMETRIC_RGB: switch (img->bitspersample) { case 8: - if (img->alpha == EXTRASAMPLE_ASSOCALPHA) + if (img->alpha == EXTRASAMPLE_ASSOCALPHA && + img->samplesperpixel >= 4) img->put.contig = putRGBAAcontig8bittile; - else if (img->alpha == EXTRASAMPLE_UNASSALPHA) + else if (img->alpha == EXTRASAMPLE_UNASSALPHA && + img->samplesperpixel >= 4) { if (BuildMapUaToAa(img)) img->put.contig = putRGBUAcontig8bittile; } - else + else if( img->samplesperpixel >= 3 ) img->put.contig = putRGBcontig8bittile; break; case 16: - if (img->alpha == EXTRASAMPLE_ASSOCALPHA) + if (img->alpha == EXTRASAMPLE_ASSOCALPHA && + img->samplesperpixel >=4 ) { if (BuildMapBitdepth16To8(img)) img->put.contig = putRGBAAcontig16bittile; } - else if (img->alpha == EXTRASAMPLE_UNASSALPHA) + else if (img->alpha == EXTRASAMPLE_UNASSALPHA && + img->samplesperpixel >=4 ) { if (BuildMapBitdepth16To8(img) && BuildMapUaToAa(img)) img->put.contig = putRGBUAcontig16bittile; } - else + else if( img->samplesperpixel >=3 ) { if (BuildMapBitdepth16To8(img)) img->put.contig = putRGBcontig16bittile; @@ -2478,7 +2680,7 @@ PickContigCase(TIFFRGBAImage* img) } break; case PHOTOMETRIC_SEPARATED: - if (buildMap(img)) { + if (img->samplesperpixel >=4 && buildMap(img)) { if (img->bitspersample == 8) { if (!img->Map) img->put.contig = putRGBcontig8bitCMYKtile; @@ -2541,7 +2743,7 @@ PickContigCase(TIFFRGBAImage* img) * must always be <= horizontal subsampling; so * there are only a few possibilities and we just * enumerate the cases. - * Joris: added support for the [1,2] case, nonetheless, to accomodate + * Joris: added support for the [1,2] case, nonetheless, to accommodate * some OJPEG files */ uint16 SubsamplingHor; @@ -2574,7 +2776,7 @@ PickContigCase(TIFFRGBAImage* img) } break; case PHOTOMETRIC_CIELAB: - if (buildMap(img)) { + if (img->samplesperpixel == 3 && buildMap(img)) { if (img->bitspersample == 8) img->put.contig = initCIELabConversion(img); break; @@ -2675,7 +2877,7 @@ BuildMapUaToAa(TIFFRGBAImage* img) for (na=0; na<256; na++) { for (nv=0; nv<256; nv++) - *m++=(nv*na+127)/255; + *m++=(uint8)((nv*na+127)/255); } return(1); } @@ -2695,7 +2897,7 @@ BuildMapBitdepth16To8(TIFFRGBAImage* img) } m=img->Bitdepth16To8; for (n=0; n<65536; n++) - *m++=(n+128)/257; + *m++=(uint8)((n+128)/257); return(1); } @@ -2711,6 +2913,13 @@ BuildMapBitdepth16To8(TIFFRGBAImage* img) int TIFFReadRGBAStrip(TIFF* tif, uint32 row, uint32 * raster ) +{ + return TIFFReadRGBAStripExt(tif, row, raster, 0 ); +} + +int +TIFFReadRGBAStripExt(TIFF* tif, uint32 row, uint32 * raster, int stop_on_error) + { char emsg[1024] = ""; TIFFRGBAImage img; @@ -2732,7 +2941,7 @@ TIFFReadRGBAStrip(TIFF* tif, uint32 row, uint32 * raster ) return (0); } - if (TIFFRGBAImageOK(tif, emsg) && TIFFRGBAImageBegin(&img, tif, 0, emsg)) { + if (TIFFRGBAImageOK(tif, emsg) && TIFFRGBAImageBegin(&img, tif, stop_on_error, emsg)) { img.row_offset = row; img.col_offset = 0; @@ -2762,6 +2971,13 @@ TIFFReadRGBAStrip(TIFF* tif, uint32 row, uint32 * raster ) int TIFFReadRGBATile(TIFF* tif, uint32 col, uint32 row, uint32 * raster) +{ + return TIFFReadRGBATileExt(tif, col, row, raster, 0 ); +} + + +int +TIFFReadRGBATileExt(TIFF* tif, uint32 col, uint32 row, uint32 * raster, int stop_on_error ) { char emsg[1024] = ""; TIFFRGBAImage img; @@ -2778,7 +2994,7 @@ TIFFReadRGBATile(TIFF* tif, uint32 col, uint32 row, uint32 * raster) if( !TIFFIsTiled( tif ) ) { TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), - "Can't use TIFFReadRGBATile() with stripped file."); + "Can't use TIFFReadRGBATile() with striped file."); return (0); } @@ -2797,7 +3013,7 @@ TIFFReadRGBATile(TIFF* tif, uint32 col, uint32 row, uint32 * raster) */ if (!TIFFRGBAImageOK(tif, emsg) - || !TIFFRGBAImageBegin(&img, tif, 0, emsg)) { + || !TIFFRGBAImageBegin(&img, tif, stop_on_error, emsg)) { TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", emsg); return( 0 ); } diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_getimage_64.c b/thirdparty/tiff-4.2.0/libtiff/tif_getimage_64.c similarity index 81% rename from thirdparty/tiff-4.0.3/libtiff/tif_getimage_64.c rename to thirdparty/tiff-4.2.0/libtiff/tif_getimage_64.c index 1ed89119..a166f613 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_getimage_64.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_getimage_64.c @@ -3,8 +3,6 @@ */ -/* $Id: tif_getimage.c,v 1.82 2012-06-06 00:17:49 fwarmerdam Exp $ */ - /* * Copyright (c) 1991-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -36,7 +34,7 @@ */ #include "tiffiop.h" #include - +#include typedef int (*gtFunc_32)(TIFFRGBAImage*, uint32*, uint32, uint32); typedef int (*gtFunc_64)(TIFFRGBAImage*, uint64*, uint32, uint32); @@ -82,7 +80,6 @@ static const TIFFDisplay display_sRGB = { 2.4F, 2.4F, 2.4F, /* Gamma values for the three guns */ }; - static int isCCITTCompression(TIFF* tif) { @@ -104,6 +101,9 @@ TIFFRGBAImageBegin_64(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024]) int colorchannels; uint16 *red_orig, *green_orig, *blue_orig; int n_color; + + if( !TIFFRGBAImageOK(tif, emsg) ) + return 0; /* Initialize to normal values */ img->row_offset = 0; @@ -111,6 +111,13 @@ TIFFRGBAImageBegin_64(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024]) img->redcmap = NULL; img->greencmap = NULL; img->bluecmap = NULL; + img->Map = NULL; + img->BWmap = NULL; + img->PALmap = NULL; + img->ycbcr = NULL; + img->cielab = NULL; + img->UaToAa = NULL; + img->Bitdepth16To8 = NULL; img->req_orientation = ORIENTATION_BOTLEFT; /* It is the default */ img->tif = tif; @@ -187,7 +194,7 @@ TIFFRGBAImageBegin_64(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024]) } /* copy the colormaps so we can modify them */ - n_color = (1L << img->bitspersample); + n_color = (1U << img->bitspersample); img->redcmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color); img->greencmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color); img->bluecmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color); @@ -200,7 +207,7 @@ TIFFRGBAImageBegin_64(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024]) _TIFFmemcpy( img->greencmap, green_orig, n_color * 2 ); _TIFFmemcpy( img->bluecmap, blue_orig, n_color * 2 ); - /* fall thru... */ + /* fall through... */ case PHOTOMETRIC_MINISWHITE: case PHOTOMETRIC_MINISBLACK: if (planarconfig == PLANARCONFIG_CONTIG @@ -237,7 +244,7 @@ TIFFRGBAImageBegin_64(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024]) /* * TODO: if at all meaningful and useful, make more complete * support check here, or better still, refactor to let supporting - * code decide whether there is support and what meaningfull + * code decide whether there is support and what meaningful * error to return */ break; @@ -296,13 +303,6 @@ TIFFRGBAImageBegin_64(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024]) photoTag, img->photometric); goto fail_return; } - img->Map = NULL; - img->BWmap = NULL; - img->PALmap = NULL; - img->ycbcr = NULL; - img->cielab = NULL; - img->UaToAa = NULL; - img->Bitdepth16To8 = NULL; TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &img->width); TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &img->height); TIFFGetFieldDefaulted(tif, TIFFTAG_ORIENTATION, &img->orientation); @@ -322,14 +322,10 @@ TIFFRGBAImageBegin_64(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024]) return 1; fail_return: - _TIFFfree( img->redcmap ); - _TIFFfree( img->greencmap ); - _TIFFfree( img->bluecmap ); - img->redcmap = img->greencmap = img->bluecmap = NULL; + TIFFRGBAImageEnd( img ); return 0; } - int TIFFRGBAImageGet_64(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) { @@ -427,63 +423,90 @@ gtTileContig(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) uint32 col, row, y, rowstoread; tmsize_t pos; uint32 tw, th; - unsigned char* buf; + unsigned char* buf = NULL; int32 fromskew, toskew; uint32 nrow; int ret = 1, flip; + uint32 this_tw, tocol; + int32 this_toskew, leftmost_toskew; + int32 leftmost_fromskew; + uint32 leftmost_tw; + tmsize_t bufsize; - buf = (unsigned char*) _TIFFmalloc(TIFFTileSize(tif)); - if (buf == 0) { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "No space for tile buffer"); - return (0); + bufsize = TIFFTileSize(tif); + if (bufsize == 0) { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "No space for tile buffer"); + return (0); } - _TIFFmemset(buf, 0, TIFFTileSize(tif)); + TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw); TIFFGetField(tif, TIFFTAG_TILELENGTH, &th); flip = setorientation(img); if (flip & FLIP_VERTICALLY) { - y = h - 1; - toskew = -(int32)(tw + w); + if ((tw + w) > INT_MAX) { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "unsupported tile size (too wide)"); + return (0); + } + y = h - 1; + toskew = -(int32)(tw + w); } else { - y = 0; - toskew = -(int32)(tw - w); + if (tw > (INT_MAX + w)) { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "unsupported tile size (too wide)"); + return (0); + } + y = 0; + toskew = -(int32)(tw - w); } - for (row = 0; row < h; row += nrow) + /* + * Leftmost tile is clipped on left side if col_offset > 0. + */ + leftmost_fromskew = img->col_offset % tw; + leftmost_tw = tw - leftmost_fromskew; + leftmost_toskew = toskew + leftmost_fromskew; + for (row = 0; ret != 0 && row < h; row += nrow) { rowstoread = th - (row + img->row_offset) % th; nrow = (row + rowstoread > h ? h - row : rowstoread); - for (col = 0; col < w; col += tw) + fromskew = leftmost_fromskew; + this_tw = leftmost_tw; + this_toskew = leftmost_toskew; + tocol = 0; + col = img->col_offset; + while (tocol < w) { - if (TIFFReadTile(tif, buf, col+img->col_offset, - row+img->row_offset, 0, 0)==(tmsize_t)(-1) && img->stoponerr) + if (_TIFFReadTileAndAllocBuffer(tif, (void**) &buf, bufsize, col, + row+img->row_offset, 0, 0)==(tmsize_t)(-1) && + (buf == NULL || img->stoponerr)) { ret = 0; break; } - - pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif); + pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif) + \ + ((tmsize_t) fromskew * img->samplesperpixel); + if (tocol + this_tw > w) + { + /* + * Rightmost tile is clipped on right side. + */ + fromskew = tw - (w - tocol); + this_tw = tw - fromskew; + this_toskew = toskew + fromskew; + } + (*put)(img, raster+y*w+tocol, tocol, y, this_tw, nrow, fromskew, this_toskew, buf + pos); + tocol += this_tw; + col += this_tw; + /* + * After the leftmost tile, tiles are no longer clipped on left side. + */ + fromskew = 0; + this_tw = tw; + this_toskew = toskew; + } - if (col + tw > w) - { - /* - * Tile is clipped horizontally. Calculate - * visible portion and skewing factors. - */ - uint32 npix = w - col; - fromskew = tw - npix; - (*put)(img, raster+y*w+col, col, y, - npix, nrow, fromskew, toskew + fromskew, buf + pos); - } - else - { - (*put)(img, raster+y*w+col, col, y, tw, nrow, 0, toskew, buf + pos); - } - } - - y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow); + y += ((flip & FLIP_VERTICALLY) ? -(int32) nrow : (int32) nrow); } _TIFFfree(buf); @@ -498,7 +521,8 @@ gtTileContig(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) uint64 temp = *left; *left = *right; *right = temp; - left++, right--; + left++; + right--; } } } @@ -520,44 +544,46 @@ gtTileSeparate(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) uint32 col, row, y, rowstoread; tmsize_t pos; uint32 tw, th; - unsigned char* buf; - unsigned char* p0; - unsigned char* p1; - unsigned char* p2; - unsigned char* pa; + unsigned char* buf = NULL; + unsigned char* p0 = NULL; + unsigned char* p1 = NULL; + unsigned char* p2 = NULL; + unsigned char* pa = NULL; tmsize_t tilesize; tmsize_t bufsize; int32 fromskew, toskew; int alpha = img->alpha; uint32 nrow; int ret = 1, flip; - int colorchannels; + uint16 colorchannels; + uint32 this_tw, tocol; + int32 this_toskew, leftmost_toskew; + int32 leftmost_fromskew; + uint32 leftmost_tw; tilesize = TIFFTileSize(tif); - bufsize = TIFFSafeMultiply(tmsize_t,alpha?4:3,tilesize); + bufsize = _TIFFMultiplySSize(tif, alpha?4:3,tilesize, "gtTileSeparate"); if (bufsize == 0) { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in %s", "gtTileSeparate"); return (0); } - buf = (unsigned char*) _TIFFmalloc(bufsize); - if (buf == 0) { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "No space for tile buffer"); - return (0); - } - _TIFFmemset(buf, 0, bufsize); - p0 = buf; - p1 = p0 + tilesize; - p2 = p1 + tilesize; - pa = (alpha?(p2+tilesize):NULL); + TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw); TIFFGetField(tif, TIFFTAG_TILELENGTH, &th); flip = setorientation(img); if (flip & FLIP_VERTICALLY) { + if ((tw + w) > INT_MAX) { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "unsupported tile size (too wide)"); + return (0); + } y = h - 1; toskew = -(int32)(tw + w); } else { + if (tw > (INT_MAX + w)) { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "unsupported tile size (too wide)"); + return (0); + } y = 0; toskew = -(int32)(tw - w); } @@ -568,7 +594,6 @@ gtTileSeparate(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) case PHOTOMETRIC_MINISBLACK: case PHOTOMETRIC_PALETTE: colorchannels = 1; - p2 = p1 = p0; break; default: @@ -576,20 +601,54 @@ gtTileSeparate(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) break; } - for (row = 0; row < h; row += nrow) + /* + * Leftmost tile is clipped on left side if col_offset > 0. + */ + leftmost_fromskew = img->col_offset % tw; + leftmost_tw = tw - leftmost_fromskew; + leftmost_toskew = toskew + leftmost_fromskew; + for (row = 0; ret != 0 && row < h; row += nrow) { rowstoread = th - (row + img->row_offset) % th; nrow = (row + rowstoread > h ? h - row : rowstoread); - for (col = 0; col < w; col += tw) + fromskew = leftmost_fromskew; + this_tw = leftmost_tw; + this_toskew = leftmost_toskew; + tocol = 0; + col = img->col_offset; + while (tocol < w) { - if (TIFFReadTile(tif, p0, col+img->col_offset, + if( buf == NULL ) + { + if (_TIFFReadTileAndAllocBuffer( + tif, (void**) &buf, bufsize, col, + row+img->row_offset,0,0)==(tmsize_t)(-1) + && (buf == NULL || img->stoponerr)) + { + ret = 0; + break; + } + p0 = buf; + if( colorchannels == 1 ) + { + p2 = p1 = p0; + pa = (alpha?(p0+3*tilesize):NULL); + } + else + { + p1 = p0 + tilesize; + p2 = p1 + tilesize; + pa = (alpha?(p2+tilesize):NULL); + } + } + else if (TIFFReadTile(tif, p0, col, row+img->row_offset,0,0)==(tmsize_t)(-1) && img->stoponerr) { ret = 0; break; } if (colorchannels > 1 - && TIFFReadTile(tif, p1, col+img->col_offset, + && TIFFReadTile(tif, p1, col, row+img->row_offset,0,1) == (tmsize_t)(-1) && img->stoponerr) { @@ -597,7 +656,7 @@ gtTileSeparate(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) break; } if (colorchannels > 1 - && TIFFReadTile(tif, p2, col+img->col_offset, + && TIFFReadTile(tif, p2, col, row+img->row_offset,0,2) == (tmsize_t)(-1) && img->stoponerr) { @@ -605,7 +664,7 @@ gtTileSeparate(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) break; } if (alpha - && TIFFReadTile(tif,pa,col+img->col_offset, + && TIFFReadTile(tif,pa,col, row+img->row_offset,0,colorchannels) == (tmsize_t)(-1) && img->stoponerr) { @@ -613,31 +672,35 @@ gtTileSeparate(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) break; } - pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif); - - if (col + tw > w) + pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif) + \ + ((tmsize_t) fromskew * img->samplesperpixel); + if (tocol + this_tw > w) { /* - * Tile is clipped horizontally. Calculate - * visible portion and skewing factors. + * Rightmost tile is clipped on right side. */ - uint32 npix = w - col; - fromskew = tw - npix; - (*put)(img, raster+y*w+col, col, y, - npix, nrow, fromskew, toskew + fromskew, - p0 + pos, p1 + pos, p2 + pos, (alpha?(pa+pos):NULL)); - } else { - (*put)(img, raster+y*w+col, col, y, - tw, nrow, 0, toskew, p0 + pos, p1 + pos, p2 + pos, (alpha?(pa+pos):NULL)); + fromskew = tw - (w - tocol); + this_tw = tw - fromskew; + this_toskew = toskew + fromskew; } + (*put)(img, raster+y*w+tocol, tocol, y, this_tw, nrow, fromskew, this_toskew, \ + p0 + pos, p1 + pos, p2 + pos, (alpha?(pa+pos):NULL)); + tocol += this_tw; + col += this_tw; + /* + * After the leftmost tile, tiles are no longer clipped on left side. + */ + fromskew = 0; + this_tw = tw; + this_toskew = toskew; } - y += (flip & FLIP_VERTICALLY ?-(int32) nrow : (int32) nrow); + y += ((flip & FLIP_VERTICALLY) ?-(int32) nrow : (int32) nrow); } if (flip & FLIP_HORIZONTALLY) { uint32 line; - + for (line = 0; line < h; line++) { uint64 *left = raster + (line * w); uint64 *right = left + w - 1; @@ -646,7 +709,8 @@ gtTileSeparate(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) uint64 temp = *left; *left = *right; *right = temp; - left++, right--; + left++; + right--; } } } @@ -668,23 +732,29 @@ gtStripContig(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) tileContigRoutine_64 put = (tileContigRoutine_64) img->put.contig; uint32 row, y, nrow, nrowsub, rowstoread; tmsize_t pos; - unsigned char* buf; + unsigned char* buf = NULL; uint32 rowsperstrip; uint16 subsamplinghor,subsamplingver; uint32 imagewidth = img->width; tmsize_t scanline; int32 fromskew, toskew; int ret = 1, flip; + tmsize_t maxstripsize; - buf = (unsigned char*) _TIFFmalloc(TIFFStripSize(tif)); - if (buf == 0) { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "No space for strip buffer"); + TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRSUBSAMPLING, &subsamplinghor, &subsamplingver); + if( subsamplingver == 0 ) { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Invalid vertical YCbCr subsampling"); return (0); } - _TIFFmemset(buf, 0, TIFFStripSize(tif)); + + maxstripsize = TIFFStripSize(tif); flip = setorientation(img); if (flip & FLIP_VERTICALLY) { + if ( w > INT_MAX ) { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Width overflow"); + return (0); + } y = h - 1; toskew = -(int32)(w + w); } else { @@ -693,29 +763,38 @@ gtStripContig(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) } TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRSUBSAMPLING, &subsamplinghor, &subsamplingver); + scanline = TIFFScanlineSize(tif); fromskew = (w < imagewidth ? imagewidth - w : 0); for (row = 0; row < h; row += nrow) { + uint32 temp; rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip; nrow = (row + rowstoread > h ? h - row : rowstoread); nrowsub = nrow; if ((nrowsub%subsamplingver)!=0) nrowsub+=subsamplingver-nrowsub%subsamplingver; - if (TIFFReadEncodedStrip(tif, + temp = (row + img->row_offset)%rowsperstrip + nrowsub; + if( scanline > 0 && temp > (size_t)(TIFF_TMSIZE_T_MAX / scanline) ) + { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in gtStripContig"); + return 0; + } + if (_TIFFReadEncodedStripAndAllocBuffer(tif, TIFFComputeStrip(tif,row+img->row_offset, 0), - buf, - ((row + img->row_offset)%rowsperstrip + nrowsub) * scanline)==(tmsize_t)(-1) - && img->stoponerr) + (void**)(&buf), + maxstripsize, + temp * scanline)==(tmsize_t)(-1) + && (buf == NULL || img->stoponerr)) { ret = 0; break; } - pos = ((row + img->row_offset) % rowsperstrip) * scanline; + pos = ((row + img->row_offset) % rowsperstrip) * scanline + \ + ((tmsize_t) img->col_offset * img->samplesperpixel); (*put)(img, raster+y*w, 0, y, w, nrow, fromskew, toskew, buf + pos); - y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow); + y += ((flip & FLIP_VERTICALLY) ? -(int32) nrow : (int32) nrow); } if (flip & FLIP_HORIZONTALLY) { @@ -729,7 +808,8 @@ gtStripContig(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) uint64 temp = *left; *left = *right; *right = temp; - left++, right--; + left++; + right--; } } } @@ -749,8 +829,8 @@ gtStripSeparate(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) { TIFF* tif = img->tif; tileSeparateRoutine_64 put = (tileSeparateRoutine_64) img->put.separate; - unsigned char *buf; - unsigned char *p0, *p1, *p2, *pa; + unsigned char *buf = NULL; + unsigned char *p0 = NULL, *p1 = NULL, *p2 = NULL, *pa = NULL; uint32 row, y, nrow, rowstoread; tmsize_t pos; tmsize_t scanline; @@ -760,26 +840,21 @@ gtStripSeparate(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) tmsize_t bufsize; int32 fromskew, toskew; int alpha = img->alpha; - int ret = 1, flip, colorchannels; + int ret = 1, flip; + uint16 colorchannels; stripsize = TIFFStripSize(tif); - bufsize = TIFFSafeMultiply(tmsize_t,alpha?4:3,stripsize); + bufsize = _TIFFMultiplySSize(tif,alpha?4:3,stripsize, "gtStripSeparate"); if (bufsize == 0) { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in %s", "gtStripSeparate"); return (0); } - p0 = buf = (unsigned char *)_TIFFmalloc(bufsize); - if (buf == 0) { - TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "No space for tile buffer"); - return (0); - } - _TIFFmemset(buf, 0, bufsize); - p1 = p0 + stripsize; - p2 = p1 + stripsize; - pa = (alpha?(p2+stripsize):NULL); flip = setorientation(img); if (flip & FLIP_VERTICALLY) { + if ( w > INT_MAX ) { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Width overflow"); + return (0); + } y = h - 1; toskew = -(int32)(w + w); } @@ -794,7 +869,6 @@ gtStripSeparate(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) case PHOTOMETRIC_MINISBLACK: case PHOTOMETRIC_PALETTE: colorchannels = 1; - p2 = p1 = p0; break; default: @@ -807,11 +881,42 @@ gtStripSeparate(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) fromskew = (w < imagewidth ? imagewidth - w : 0); for (row = 0; row < h; row += nrow) { + uint32 temp; rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip; nrow = (row + rowstoread > h ? h - row : rowstoread); offset_row = row + img->row_offset; - if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 0), - p0, ((row + img->row_offset)%rowsperstrip + nrow) * scanline)==(tmsize_t)(-1) + temp = (row + img->row_offset)%rowsperstrip + nrow; + if( scanline > 0 && temp > (size_t)(TIFF_TMSIZE_T_MAX / scanline) ) + { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in gtStripSeparate"); + return 0; + } + if( buf == NULL ) + { + if (_TIFFReadEncodedStripAndAllocBuffer( + tif, TIFFComputeStrip(tif, offset_row, 0), + (void**) &buf, bufsize, + temp * scanline)==(tmsize_t)(-1) + && (buf == NULL || img->stoponerr)) + { + ret = 0; + break; + } + p0 = buf; + if( colorchannels == 1 ) + { + p2 = p1 = p0; + pa = (alpha?(p0+3*stripsize):NULL); + } + else + { + p1 = p0 + stripsize; + p2 = p1 + stripsize; + pa = (alpha?(p2+stripsize):NULL); + } + } + else if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 0), + p0, temp * scanline)==(tmsize_t)(-1) && img->stoponerr) { ret = 0; @@ -819,7 +924,7 @@ gtStripSeparate(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) } if (colorchannels > 1 && TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 1), - p1, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) == (tmsize_t)(-1) + p1, temp * scanline) == (tmsize_t)(-1) && img->stoponerr) { ret = 0; @@ -827,7 +932,7 @@ gtStripSeparate(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) } if (colorchannels > 1 && TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 2), - p2, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) == (tmsize_t)(-1) + p2, temp * scanline) == (tmsize_t)(-1) && img->stoponerr) { ret = 0; @@ -836,7 +941,7 @@ gtStripSeparate(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) if (alpha) { if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, colorchannels), - pa, ((row + img->row_offset)%rowsperstrip + nrow) * scanline)==(tmsize_t)(-1) + pa, temp * scanline)==(tmsize_t)(-1) && img->stoponerr) { ret = 0; @@ -844,10 +949,11 @@ gtStripSeparate(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) } } - pos = ((row + img->row_offset) % rowsperstrip) * scanline; + pos = ((row + img->row_offset) % rowsperstrip) * scanline + \ + ((tmsize_t) img->col_offset * img->samplesperpixel); (*put)(img, raster+y*w, 0, y, w, nrow, fromskew, toskew, p0 + pos, p1 + pos, p2 + pos, (alpha?(pa+pos):NULL)); - y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow); + y += ((flip & FLIP_VERTICALLY) ? -(int32) nrow : (int32) nrow); } if (flip & FLIP_HORIZONTALLY) { @@ -861,7 +967,8 @@ gtStripSeparate(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) uint64 temp = *left; *left = *right; *right = temp; - left++, right--; + left++; + right--; } } } @@ -885,11 +992,15 @@ gtStripSeparate(TIFFRGBAImage* img, uint64* raster, uint32 w, uint32 h) #define REPEAT2(op) op; op #define CASE8(x,op) \ switch (x) { \ - case 7: op; case 6: op; case 5: op; \ - case 4: op; case 3: op; case 2: op; \ + case 7: op; /*-fallthrough*/ \ + case 6: op; /*-fallthrough*/ \ + case 5: op; /*-fallthrough*/ \ + case 4: op; /*-fallthrough*/ \ + case 3: op; /*-fallthrough*/ \ + case 2: op; /*-fallthrough*/ \ case 1: op; \ } -#define CASE4(x,op) switch (x) { case 3: op; case 2: op; case 1: op; } +#define CASE4(x,op) switch (x) { case 3: op; /*-fallthrough*/ case 2: op; /*-fallthrough*/ case 1: op; } #define NOP #define UNROLL8(w, op1, op2) { \ @@ -962,8 +1073,8 @@ DECLAREContigPutFunc(putgreytile) uint64** BWmap = (uint64**) img->BWmap; (void) y; - while (h-- > 0) { - for (x = w; x-- > 0;) + for( ; h > 0; --h) { + for (x = w; x > 0; --x) { *cp++ = BWmap[*pp][0]; pp += samplesperpixel; @@ -982,8 +1093,8 @@ DECLAREContigPutFunc(putagreytile) uint64** BWmap = (uint64**) img->BWmap; (void) y; - while (h-- > 0) { - for (x = w; x-- > 0;) + for( ; h > 0; --h) { + for (x = w; x > 0; --x) { *cp++ = BWmap[*pp][0] & ((uint64)*(pp+1) << 48 | ~A1); pp += samplesperpixel; @@ -1002,10 +1113,10 @@ DECLAREContigPutFunc(put16bitbwtile) uint64** BWmap = (uint64**) img->BWmap; (void) y; - while (h-- > 0) { + for( ; h > 0; --h) { uint16 *wp = (uint16 *) pp; - for (x = w; x-- > 0;) + for (x = w; x > 0; --x) { /* use high order byte of 16bit value */ @@ -1027,7 +1138,7 @@ DECLAREContigPutFunc(put1bitbwtile) (void) x; (void) y; fromskew /= 8; - while (h-- > 0) { + for( ; h > 0; --h) { uint64* bw; UNROLL8(w, bw = BWmap[*pp++], *cp++ = *bw++); cp += toskew; @@ -1044,7 +1155,7 @@ DECLAREContigPutFunc(put2bitbwtile) (void) x; (void) y; fromskew /= 4; - while (h-- > 0) { + for( ; h > 0; --h) { uint64* bw; UNROLL4(w, bw = BWmap[*pp++], *cp++ = *bw++); cp += toskew; @@ -1061,7 +1172,7 @@ DECLAREContigPutFunc(put4bitbwtile) (void) x; (void) y; fromskew /= 2; - while (h-- > 0) { + for( ; h > 0; --h) { uint64* bw; UNROLL2(w, bw = BWmap[*pp++], *cp++ = *bw++); cp += toskew; @@ -1078,7 +1189,7 @@ DECLAREContigPutFunc(putRGBcontig8bittile) (void) x; (void) y; fromskew *= samplesperpixel; - while (h-- > 0) { + for( ; h > 0; --h) { UNROLL8(w, NOP, *cp++ = PACK(pp[0] << 8, pp[1] << 8, pp[2] << 8); pp += samplesperpixel); @@ -1097,7 +1208,7 @@ DECLAREContigPutFunc(putRGBAAcontig8bittile) (void) x; (void) y; fromskew *= samplesperpixel; - while (h-- > 0) { + for( ; h > 0; --h) { UNROLL8(w, NOP, *cp++ = PACK4(pp[0] << 8, pp[1] << 8, pp[2] << 8, pp[3] << 8); pp += samplesperpixel); @@ -1115,8 +1226,8 @@ DECLAREContigPutFunc(putRGBcontig16bittile) uint16 *wp = (uint16 *)pp; (void) y; fromskew *= samplesperpixel; - while (h-- > 0) { - for (x = w; x-- > 0;) { + for( ; h > 0; --h) { + for (x = w; x > 0; --x) { *cp++ = PACK(wp[0], wp[1], wp[2]); wp += samplesperpixel; } @@ -1135,8 +1246,8 @@ DECLAREContigPutFunc(putRGBAAcontig16bittile) uint16 *wp = (uint16 *)pp; (void) y; fromskew *= samplesperpixel; - while (h-- > 0) { - for (x = w; x-- > 0;) { + for( ; h > 0; --h) { + for (x = w; x > 0; --x) { *cp++ = PACK4(wp[0], wp[1], wp[2], wp[3]); wp += samplesperpixel; } @@ -1157,7 +1268,7 @@ DECLAREContigPutFunc(putRGBcontig8bitCMYKtile) (void) x; (void) y; fromskew *= samplesperpixel; - while (h-- > 0) { + for( ; h > 0; --h) { UNROLL8(w, NOP, k = 255 - pp[3]; r = (k*(255-pp[0])); @@ -1183,8 +1294,8 @@ DECLAREContigPutFunc(putRGBcontig8bitCMYKMaptile) (void) y; fromskew *= samplesperpixel; - while (h-- > 0) { - for (x = w; x-- > 0;) { + for( ; h > 0; --h) { + for (x = w; x > 0; --x) { k = 255 - pp[3]; r = (k*(255-pp[0]))/255; g = (k*(255-pp[1]))/255; @@ -1213,7 +1324,7 @@ static void name(\ DECLARESepPutFunc(putRGBseparate8bittile) { (void) img; (void) x; (void) y; (void) a; - while (h-- > 0) { + for( ; h > 0; --h) { UNROLL8(w, NOP, *cp++ = PACK(*r++ << 8, *g++ << 8, *b++ << 8)); SKEW(r, g, b, fromskew); cp += toskew; @@ -1226,7 +1337,7 @@ DECLARESepPutFunc(putRGBseparate8bittile) DECLARESepPutFunc(putRGBAAseparate8bittile) { (void) img; (void) x; (void) y; - while (h-- > 0) { + for( ; h > 0; --h) { UNROLL8(w, NOP, *cp++ = PACK4(*r++ << 8, *g++ << 8, *b++ << 8, *a++ << 8)); SKEW4(r, g, b, a, fromskew); cp += toskew; @@ -1239,9 +1350,9 @@ DECLARESepPutFunc(putRGBAAseparate8bittile) DECLARESepPutFunc(putCMYKseparate8bittile) { (void) img; (void) y; - while (h-- > 0) { + for( ; h > 0; --h) { uint32 rv, gv, bv, kv; - for (x = w; x-- > 0;) { + for (x = w; x > 0; --x) { kv = 255 - *a++; rv = (kv*(255-*r++)); gv = (kv*(255-*g++)); @@ -1262,7 +1373,7 @@ DECLARESepPutFunc(putRGBseparate16bittile) uint16 *wg = (uint16*) g; uint16 *wb = (uint16*) b; (void) img; (void) y; (void) a; - while (h-- > 0) { + for( ; h > 0; --h) { for (x = 0; x < w; x++) *cp++ = PACK(*wr++, *wg++, *wb++); SKEW(wr, wg, wb, fromskew); @@ -1280,7 +1391,7 @@ DECLARESepPutFunc(putRGBAAseparate16bittile) uint16 *wb = (uint16*) b; uint16 *wa = (uint16*) a; (void) img; (void) y; - while (h-- > 0) { + for( ; h > 0; --h) { for (x = 0; x < w; x++) *cp++ = PACK4(*wr++, *wg++, *wb++, *wa++); SKEW4(wr, wg, wb, wa, fromskew); @@ -1297,8 +1408,8 @@ DECLAREContigPutFunc(putcontig8bitCIELab) uint32 r, g, b; (void) y; fromskew *= 3; - while (h-- > 0) { - for (x = w; x-- > 0;) { + for( ; h > 0; --h) { + for (x = w; x > 0; --x) { TIFFCIELabToXYZ(img->cielab, (unsigned char)pp[0], (signed char)pp[1], @@ -1335,7 +1446,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr44tile) (void) y; /* adjust fromskew */ - fromskew = (fromskew * 18) / 4; + fromskew = (fromskew / 4) * (4*2+2); if ((h & 3) == 0 && (w & 3) == 0) { for (; h >= 4; h -= 4) { x = w>>2; @@ -1360,10 +1471,16 @@ DECLAREContigPutFunc(putcontig8bitYCbCr44tile) YCbCrtoRGB(cp3[2], pp[14]); YCbCrtoRGB(cp3[3], pp[15]); - cp += 4, cp1 += 4, cp2 += 4, cp3 += 4; + cp += 4; + cp1 += 4; + cp2 += 4; + cp3 += 4; pp += 18; } while (--x); - cp += incr, cp1 += incr, cp2 += incr, cp3 += incr; + cp += incr; + cp1 += incr; + cp2 += incr; + cp3 += incr; pp += fromskew; } } else { @@ -1414,7 +1531,10 @@ DECLAREContigPutFunc(putcontig8bitYCbCr44tile) if (h <= 4) break; h -= 4; - cp += incr, cp1 += incr, cp2 += incr, cp3 += incr; + cp += incr; + cp1 += incr; + cp2 += incr; + cp3 += incr; pp += fromskew; } } @@ -1429,8 +1549,8 @@ DECLAREContigPutFunc(putcontig8bitYCbCr42tile) int32 incr = 2*toskew+w; (void) y; - fromskew = (fromskew * 10) / 4; - if ((h & 3) == 0 && (w & 1) == 0) { + fromskew = (fromskew / 4) * (4*2+2); + if ((w & 3) == 0 && (h & 1) == 0) { for (; h >= 2; h -= 2) { x = w>>2; do { @@ -1446,10 +1566,12 @@ DECLAREContigPutFunc(putcontig8bitYCbCr42tile) YCbCrtoRGB(cp1[2], pp[6]); YCbCrtoRGB(cp1[3], pp[7]); - cp += 4, cp1 += 4; + cp += 4; + cp1 += 4; pp += 10; } while (--x); - cp += incr, cp1 += incr; + cp += incr; + cp1 += incr; pp += fromskew; } } else { @@ -1492,7 +1614,8 @@ DECLAREContigPutFunc(putcontig8bitYCbCr42tile) if (h <= 2) break; h -= 2; - cp += incr, cp1 += incr; + cp += incr; + cp1 += incr; pp += fromskew; } } @@ -1504,10 +1627,10 @@ DECLAREContigPutFunc(putcontig8bitYCbCr42tile) DECLAREContigPutFunc(putcontig8bitYCbCr41tile) { (void) y; - /* XXX adjust fromskew */ + fromskew = (fromskew / 4) * (4*1+2); do { x = w>>2; - do { + while(x>0) { int32 Cb = pp[4]; int32 Cr = pp[5]; @@ -1518,7 +1641,8 @@ DECLAREContigPutFunc(putcontig8bitYCbCr41tile) cp += 4; pp += 6; - } while (--x); + x--; + } if( (w&3) != 0 ) { @@ -1526,9 +1650,9 @@ DECLAREContigPutFunc(putcontig8bitYCbCr41tile) int32 Cr = pp[5]; switch( (w&3) ) { - case 3: YCbCrtoRGB(cp [2], pp[2]); - case 2: YCbCrtoRGB(cp [1], pp[1]); - case 1: YCbCrtoRGB(cp [0], pp[0]); + case 3: YCbCrtoRGB(cp [2], pp[2]); /*-fallthrough*/ + case 2: YCbCrtoRGB(cp [1], pp[1]); /*-fallthrough*/ + case 1: YCbCrtoRGB(cp [0], pp[0]); /*-fallthrough*/ case 0: break; } @@ -1550,7 +1674,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr22tile) uint64* cp2; int32 incr = 2*toskew+w; (void) y; - fromskew = (fromskew / 2) * 6; + fromskew = (fromskew / 2) * (2*2+2); cp2 = cp+w+toskew; while (h>=2) { x = w; @@ -1606,10 +1730,10 @@ DECLAREContigPutFunc(putcontig8bitYCbCr22tile) DECLAREContigPutFunc(putcontig8bitYCbCr21tile) { (void) y; - fromskew = (fromskew * 4) / 2; + fromskew = (fromskew / 2) * (2*1+2); do { x = w>>1; - do { + while(x>0) { int32 Cb = pp[2]; int32 Cr = pp[3]; @@ -1618,7 +1742,8 @@ DECLAREContigPutFunc(putcontig8bitYCbCr21tile) cp += 2; pp += 4; - } while (--x); + x --; + } if( (w&1) != 0 ) { @@ -1644,7 +1769,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr12tile) uint64* cp2; int32 incr = 2*toskew+w; (void) y; - fromskew = (fromskew / 2) * 4; + fromskew = (fromskew / 1) * (1 * 2 + 2); cp2 = cp+w+toskew; while (h>=2) { x = w; @@ -1680,7 +1805,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr12tile) DECLAREContigPutFunc(putcontig8bitYCbCr11tile) { (void) y; - fromskew *= 3; + fromskew = (fromskew / 1) * (1 * 1 + 2); do { x = w; /* was x = w>>1; patched 2000/09/25 warmerda@home.com */ do { @@ -1704,7 +1829,7 @@ DECLARESepPutFunc(putseparate8bitYCbCr11tile) (void) y; (void) a; /* TODO: naming of input vars is still off, change obfuscating declaration inside define, or resolve obfuscation */ - while (h-- > 0) { + for( ; h > 0; --h) { x = w; do { uint32 dr, dg, db; @@ -1717,6 +1842,11 @@ DECLARESepPutFunc(putseparate8bitYCbCr11tile) } #undef YCbCrtoRGB +static int isInRefBlackWhiteRange(float f) +{ + return f > (float)(-0x7FFFFFFF + 128) && f < (float)0x7FFFFFFF; +} + static int initYCbCrConversion(TIFFRGBAImage* img) { @@ -1741,6 +1871,31 @@ initYCbCrConversion(TIFFRGBAImage* img) TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRCOEFFICIENTS, &luma); TIFFGetFieldDefaulted(img->tif, TIFFTAG_REFERENCEBLACKWHITE, &refBlackWhite); + + /* Do some validation to avoid later issues. Detect NaN for now */ + /* and also if lumaGreen is zero since we divide by it later */ + if( luma[0] != luma[0] || + luma[1] != luma[1] || + luma[1] == 0.0 || + luma[2] != luma[2] ) + { + TIFFErrorExt(img->tif->tif_clientdata, module, + "Invalid values for YCbCrCoefficients tag"); + return (0); + } + + if( !isInRefBlackWhiteRange(refBlackWhite[0]) || + !isInRefBlackWhiteRange(refBlackWhite[1]) || + !isInRefBlackWhiteRange(refBlackWhite[2]) || + !isInRefBlackWhiteRange(refBlackWhite[3]) || + !isInRefBlackWhiteRange(refBlackWhite[4]) || + !isInRefBlackWhiteRange(refBlackWhite[5]) ) + { + TIFFErrorExt(img->tif->tif_clientdata, module, + "Invalid values for ReferenceBlackWhite tag"); + return (0); + } + if (TIFFYCbCrToRGBInit(img->ycbcr, luma, refBlackWhite) < 0) return(0); return (1); @@ -1754,6 +1909,13 @@ initCIELabConversion(TIFFRGBAImage* img) float *whitePoint; float refWhite[3]; + TIFFGetFieldDefaulted(img->tif, TIFFTAG_WHITEPOINT, &whitePoint); + if (whitePoint[1] == 0.0f ) { + TIFFErrorExt(img->tif->tif_clientdata, module, + "Invalid value for WhitePoint tag."); + return NULL; + } + if (!img->cielab) { img->cielab = (TIFFCIELabToRGB *) _TIFFmalloc(sizeof(TIFFCIELabToRGB)); @@ -1764,7 +1926,6 @@ initCIELabConversion(TIFFRGBAImage* img) } } - TIFFGetFieldDefaulted(img->tif, TIFFTAG_WHITEPOINT, &whitePoint); refWhite[1] = 100.0F; refWhite[0] = whitePoint[0] / whitePoint[1] * refWhite[1]; refWhite[2] = (1.0F - whitePoint[0] - whitePoint[1]) @@ -1879,7 +2040,8 @@ setupMap(TIFFRGBAImage* img) if (!makebwmap(img)) return (0); /* no longer need Map, free it */ - _TIFFfree(img->Map), img->Map = NULL; + _TIFFfree(img->Map); + img->Map = NULL; } return (1); } @@ -1987,7 +2149,7 @@ buildMap(TIFFRGBAImage* img) case PHOTOMETRIC_SEPARATED: if (img->bitspersample == 8) break; - /* fall thru... */ + /* fall through... */ case PHOTOMETRIC_MINISBLACK: case PHOTOMETRIC_MINISWHITE: if (!setupMap(img)) @@ -2019,21 +2181,23 @@ buildMap(TIFFRGBAImage* img) static int PickContigCase(TIFFRGBAImage* img) { - img->get = (gtFunc_32) (TIFFIsTiled(img->tif) ? gtTileContig : gtStripContig); + img->get = (gtFunc_32) (TIFFIsTiled(img->tif) ? gtTileContig : gtStripContig); img->put.contig = NULL; switch (img->photometric) { case PHOTOMETRIC_RGB: switch (img->bitspersample) { case 8: - if (img->alpha != EXTRASAMPLE_UNSPECIFIED) + if (img->alpha != EXTRASAMPLE_UNSPECIFIED && + img->samplesperpixel >= 4) img->put.contig = (tileContigRoutine) putRGBAAcontig8bittile; - else + else if( img->samplesperpixel >= 3 ) img->put.contig = (tileContigRoutine) putRGBcontig8bittile; break; case 16: - if (img->alpha != EXTRASAMPLE_UNSPECIFIED) + if (img->alpha != EXTRASAMPLE_UNSPECIFIED && + img->samplesperpixel >=4 ) img->put.contig = (tileContigRoutine) putRGBAAcontig16bittile; - else + else if( img->samplesperpixel >=3 ) { if (BuildMapBitdepth16To8(img)) img->put.contig = (tileContigRoutine) putRGBcontig16bittile; @@ -2042,7 +2206,7 @@ PickContigCase(TIFFRGBAImage* img) } break; case PHOTOMETRIC_SEPARATED: - if (buildMap(img)) { + if (img->samplesperpixel >=4 && buildMap(img)) { if (img->bitspersample == 8) { if (!img->Map) img->put.contig = (tileContigRoutine) putRGBcontig8bitCMYKtile; @@ -2088,7 +2252,7 @@ PickContigCase(TIFFRGBAImage* img) * must always be <= horizontal subsampling; so * there are only a few possibilities and we just * enumerate the cases. - * Joris: added support for the [1,2] case, nonetheless, to accomodate + * Joris: added support for the [1,2] case, nonetheless, to accommodate * some OJPEG files */ uint16 SubsamplingHor; @@ -2121,7 +2285,7 @@ PickContigCase(TIFFRGBAImage* img) } break; case PHOTOMETRIC_CIELAB: - if (buildMap(img)) { + if (img->samplesperpixel == 3 && buildMap(img)) { if (img->bitspersample == 8) img->put.contig = (tileContigRoutine) initCIELabConversion(img); break; @@ -2209,7 +2373,7 @@ BuildMapBitdepth16To8(TIFFRGBAImage* img) } m=img->Bitdepth16To8; for (n=0; n<65536; n++) - *m++=(n+128)/257; + *m++=(uint8)((n+128)/257); return(1); } @@ -2225,6 +2389,13 @@ BuildMapBitdepth16To8(TIFFRGBAImage* img) int TIFFReadRGBAStrip_64(TIFF* tif, uint32 row, uint64 * raster ) +{ + return TIFFReadRGBAStripExt_64(tif, row, raster, 0 ); +} + +int +TIFFReadRGBAStripExt_64(TIFF* tif, uint32 row, uint64 * raster, int stop_on_error) + { char emsg[1024] = ""; TIFFRGBAImage img; @@ -2246,7 +2417,7 @@ TIFFReadRGBAStrip_64(TIFF* tif, uint32 row, uint64 * raster ) return (0); } - if (TIFFRGBAImageOK(tif, emsg) && TIFFRGBAImageBegin_64(&img, tif, 0, emsg)) { + if (TIFFRGBAImageOK(tif, emsg) && TIFFRGBAImageBegin_64(&img, tif, stop_on_error, emsg)) { img.row_offset = row; img.col_offset = 0; @@ -2276,6 +2447,13 @@ TIFFReadRGBAStrip_64(TIFF* tif, uint32 row, uint64 * raster ) int TIFFReadRGBATile_64(TIFF* tif, uint32 col, uint32 row, uint64 * raster) +{ + return TIFFReadRGBATileExt_64(tif, col, row, raster, 0 ); +} + + +int +TIFFReadRGBATileExt_64(TIFF* tif, uint32 col, uint32 row, uint64 * raster, int stop_on_error ) { char emsg[1024] = ""; TIFFRGBAImage img; @@ -2292,7 +2470,7 @@ TIFFReadRGBATile_64(TIFF* tif, uint32 col, uint32 row, uint64 * raster) if( !TIFFIsTiled( tif ) ) { TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), - "Can't use TIFFReadRGBATile() with stripped file."); + "Can't use TIFFReadRGBATile() with striped file."); return (0); } @@ -2311,7 +2489,7 @@ TIFFReadRGBATile_64(TIFF* tif, uint32 col, uint32 row, uint64 * raster) */ if (!TIFFRGBAImageOK(tif, emsg) - || !TIFFRGBAImageBegin_64(&img, tif, 0, emsg)) { + || !TIFFRGBAImageBegin_64(&img, tif, stop_on_error, emsg)) { TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", emsg); return( 0 ); } diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_jbig.c b/thirdparty/tiff-4.2.0/libtiff/tif_jbig.c similarity index 85% rename from thirdparty/tiff-4.0.3/libtiff/tif_jbig.c rename to thirdparty/tiff-4.2.0/libtiff/tif_jbig.c index 37878f6e..a3500e0b 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_jbig.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_jbig.c @@ -1,5 +1,3 @@ -/* $Id: tif_jbig.c,v 1.15 2010-03-10 18:56:48 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -53,17 +51,18 @@ static int JBIGDecode(TIFF* tif, uint8* buffer, tmsize_t size, uint16 s) struct jbg_dec_state decoder; int decodeStatus = 0; unsigned char* pImage = NULL; - (void) size, (void) s; + unsigned long decodedSize; + (void) s; if (isFillOrder(tif, tif->tif_dir.td_fillorder)) { - TIFFReverseBits(tif->tif_rawdata, tif->tif_rawdatasize); + TIFFReverseBits(tif->tif_rawcp, tif->tif_rawcc); } jbg_dec_init(&decoder); #if defined(HAVE_JBG_NEWLEN) - jbg_newlen(tif->tif_rawdata, (size_t)tif->tif_rawdatasize); + jbg_newlen(tif->tif_rawcp, (size_t)tif->tif_rawcc); /* * I do not check the return status of jbg_newlen because even if this * function fails it does not necessarily mean that decoding the image @@ -76,8 +75,8 @@ static int JBIGDecode(TIFF* tif, uint8* buffer, tmsize_t size, uint16 s) */ #endif /* HAVE_JBG_NEWLEN */ - decodeStatus = jbg_dec_in(&decoder, (unsigned char*)tif->tif_rawdata, - (size_t)tif->tif_rawdatasize, NULL); + decodeStatus = jbg_dec_in(&decoder, (unsigned char*)tif->tif_rawcp, + (size_t)tif->tif_rawcc, NULL); if (JBG_EOK != decodeStatus) { /* @@ -94,12 +93,32 @@ static int JBIGDecode(TIFF* tif, uint8* buffer, tmsize_t size, uint16 s) jbg_strerror(decodeStatus) #endif ); + jbg_dec_free(&decoder); return 0; } + decodedSize = jbg_dec_getsize(&decoder); + if( (tmsize_t)decodedSize < size ) + { + TIFFWarningExt(tif->tif_clientdata, "JBIG", + "Only decoded %lu bytes, whereas %lu requested", + decodedSize, (unsigned long)size); + } + else if( (tmsize_t)decodedSize > size ) + { + TIFFErrorExt(tif->tif_clientdata, "JBIG", + "Decoded %lu bytes, whereas %lu were requested", + decodedSize, (unsigned long)size); + jbg_dec_free(&decoder); + return 0; + } pImage = jbg_dec_getimage(&decoder, 0); - _TIFFmemcpy(buffer, pImage, jbg_dec_getsize(&decoder)); + _TIFFmemcpy(buffer, pImage, decodedSize); jbg_dec_free(&decoder); + + tif->tif_rawcp += tif->tif_rawcc; + tif->tif_rawcc = 0; + return 1; } @@ -180,6 +199,7 @@ static int JBIGEncode(TIFF* tif, uint8* buffer, tmsize_t size, uint16 s) int TIFFInitJBIG(TIFF* tif, int scheme) { + (void)scheme; assert(scheme == COMPRESSION_JBIG); /* diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_jpeg.c b/thirdparty/tiff-4.2.0/libtiff/tif_jpeg.c similarity index 78% rename from thirdparty/tiff-4.0.3/libtiff/tif_jpeg.c rename to thirdparty/tiff-4.2.0/libtiff/tif_jpeg.c index b61b91b0..6711137a 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_jpeg.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_jpeg.c @@ -1,5 +1,3 @@ -/* $Id: tif_jpeg.c,v 1.111 2012-07-06 18:48:04 bfriesen Exp $ */ - /* * Copyright (c) 1994-1997 Sam Leffler * Copyright (c) 1994-1997 Silicon Graphics, Inc. @@ -28,6 +26,8 @@ #define VC_EXTRALEAN #include "tiffiop.h" +#include + #ifdef JPEG_SUPPORT /* @@ -47,6 +47,7 @@ int TIFFFillStrip(TIFF* tif, uint32 strip); int TIFFFillTile(TIFF* tif, uint32 tile); int TIFFReInitJPEG_12( TIFF *tif, int scheme, int is_encode ); +int TIFFJPEGIsFullStripRequired_12(TIFF* tif); /* We undefine FAR to avoid conflict with JPEG definition */ @@ -58,7 +59,7 @@ int TIFFReInitJPEG_12( TIFF *tif, int scheme, int is_encode ); Libjpeg's jmorecfg.h defines INT16 and INT32, but only if XMD_H is not defined. Unfortunately, the MinGW and Borland compilers include a typedef for INT32, which causes a conflict. MSVC does not include - a conficting typedef given the headers which are included. + a conflicting typedef given the headers which are included. */ #if defined(__BORLANDC__) || defined(__MINGW32__) # define XMD_H 1 @@ -73,7 +74,7 @@ int TIFFReInitJPEG_12( TIFF *tif, int scheme, int is_encode ); "JPEGLib: JPEG parameter struct mismatch: library thinks size is 432, caller expects 464" - For such users we wil fix the problem here. See install.doc file from + For such users we will fix the problem here. See install.doc file from the JPEG library distribution for details. */ @@ -145,6 +146,8 @@ typedef struct { jpeg_error_mgr err; /* libjpeg error manager */ JMP_BUF exit_jmpbuf; /* for catching libjpeg failures */ + + struct jpeg_progress_mgr progress; /* * The following two members could be a union, but * they're small enough that it's not worth the effort. @@ -175,6 +178,7 @@ typedef struct { int jpegtablesmode; /* What to put in JPEGTables */ int ycbcrsampling_fetched; + int max_allowed_scan_number; } JPEGState; #define JState(tif) ((JPEGState*)(tif)->tif_data) @@ -235,6 +239,33 @@ TIFFjpeg_output_message(j_common_ptr cinfo) TIFFWarningExt(((JPEGState *) cinfo)->tif->tif_clientdata, "JPEGLib", "%s", buffer); } +/* Avoid the risk of denial-of-service on crafted JPEGs with an insane */ +/* number of scans. */ +/* See http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf */ +static void +TIFFjpeg_progress_monitor(j_common_ptr cinfo) +{ + JPEGState *sp = (JPEGState *) cinfo; /* NB: cinfo assumed first */ + if (cinfo->is_decompressor) + { + const int scan_no = + ((j_decompress_ptr)cinfo)->input_scan_number; + if (scan_no >= sp->max_allowed_scan_number) + { + TIFFErrorExt(((JPEGState *) cinfo)->tif->tif_clientdata, + "TIFFjpeg_progress_monitor", + "Scan number %d exceeds maximum scans (%d). This limit " + "can be raised through the LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER " + "environment variable.", + scan_no, sp->max_allowed_scan_number); + + jpeg_abort(cinfo); /* clean up libjpeg state */ + LONGJMP(sp->exit_jmpbuf, 1); /* return to libtiff caller */ + } + } +} + + /* * Interface routines. This layer of routines exists * primarily to limit side-effects from using setjmp. @@ -252,6 +283,9 @@ TIFFjpeg_create_compress(JPEGState* sp) sp->err.error_exit = TIFFjpeg_error_exit; sp->err.output_message = TIFFjpeg_output_message; + /* set client_data to avoid UMR warning from tools like Purify */ + sp->cinfo.c.client_data = NULL; + return CALLVJPEG(sp, jpeg_create_compress(&sp->cinfo.c)); } @@ -263,6 +297,9 @@ TIFFjpeg_create_decompress(JPEGState* sp) sp->err.error_exit = TIFFjpeg_error_exit; sp->err.output_message = TIFFjpeg_output_message; + /* set client_data to avoid UMR warning from tools like Purify */ + sp->cinfo.d.client_data = NULL; + return CALLVJPEG(sp, jpeg_create_decompress(&sp->cinfo.d)); } @@ -330,9 +367,24 @@ TIFFjpeg_read_header(JPEGState* sp, boolean require_image) return CALLJPEG(sp, -1, jpeg_read_header(&sp->cinfo.d, require_image)); } +static int +TIFFjpeg_has_multiple_scans(JPEGState* sp) +{ + return CALLJPEG(sp, 0, jpeg_has_multiple_scans(&sp->cinfo.d)); +} + static int TIFFjpeg_start_decompress(JPEGState* sp) { + const char* sz_max_allowed_scan_number; + /* progress monitor */ + sp->cinfo.d.progress = &sp->progress; + sp->progress.progress_monitor = TIFFjpeg_progress_monitor; + sp->max_allowed_scan_number = 100; + sz_max_allowed_scan_number = getenv("LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER"); + if( sz_max_allowed_scan_number ) + sp->max_allowed_scan_number = atoi(sz_max_allowed_scan_number); + return CALLVJPEG(sp, jpeg_start_decompress(&sp->cinfo.d)); } @@ -414,7 +466,8 @@ std_empty_output_buffer(j_compress_ptr cinfo) } #endif - TIFFFlushData1(tif); + if( !TIFFFlushData1(tif) ) + return FALSE; sp->dest.next_output_byte = (JOCTET*) tif->tif_rawdata; sp->dest.free_in_buffer = (size_t) tif->tif_rawdatasize; @@ -583,9 +636,8 @@ std_term_source(j_decompress_ptr cinfo) } static void -TIFFjpeg_data_src(JPEGState* sp, TIFF* tif) +TIFFjpeg_data_src(JPEGState* sp) { - (void) tif; sp->cinfo.d.src = &sp->src; sp->src.init_source = std_init_source; sp->src.fill_input_buffer = std_fill_input_buffer; @@ -611,9 +663,9 @@ tables_init_source(j_decompress_ptr cinfo) } static void -TIFFjpeg_tables_src(JPEGState* sp, TIFF* tif) +TIFFjpeg_tables_src(JPEGState* sp) { - TIFFjpeg_data_src(sp, tif); + TIFFjpeg_data_src(sp); sp->src.init_source = tables_init_source; } @@ -658,7 +710,9 @@ alloc_downsampled_buffers(TIFF* tif, jpeg_component_info* comp_info, #define JPEG_MARKER_SOF0 0xC0 #define JPEG_MARKER_SOF1 0xC1 -#define JPEG_MARKER_SOF3 0xC3 +#define JPEG_MARKER_SOF2 0xC2 +#define JPEG_MARKER_SOF9 0xC9 +#define JPEG_MARKER_SOF10 0xCA #define JPEG_MARKER_DHT 0xC4 #define JPEG_MARKER_SOI 0xD8 #define JPEG_MARKER_SOS 0xDA @@ -689,9 +743,11 @@ static int JPEGFixupTags(TIFF* tif) { #ifdef CHECK_JPEG_YCBCR_SUBSAMPLING + JPEGState* sp = JState(tif); if ((tif->tif_dir.td_photometric==PHOTOMETRIC_YCBCR)&& (tif->tif_dir.td_planarconfig==PLANARCONFIG_CONTIG)&& - (tif->tif_dir.td_samplesperpixel==3)) + (tif->tif_dir.td_samplesperpixel==3) && + !sp->ycbcrsampling_fetched) JPEGFixupTagsSubsampling(tif); #endif @@ -725,11 +781,9 @@ JPEGFixupTagsSubsampling(TIFF* tif) */ static const char module[] = "JPEGFixupTagsSubsampling"; struct JPEGFixupTagsSubsamplingData m; + uint64 fileoffset = TIFFGetStrileOffset(tif, 0); - _TIFFFillStriles( tif ); - - if( tif->tif_dir.td_stripbytecount == NULL - || tif->tif_dir.td_stripbytecount[0] == 0 ) + if( fileoffset == 0 ) { /* Do not even try to check if the first strip/tile does not yet exist, as occurs when GDAL has created a new NULL file @@ -748,9 +802,9 @@ JPEGFixupTagsSubsampling(TIFF* tif) } m.buffercurrentbyte=NULL; m.bufferbytesleft=0; - m.fileoffset=tif->tif_dir.td_stripoffset[0]; + m.fileoffset=fileoffset; m.filepositioned=0; - m.filebytesleft=tif->tif_dir.td_stripbytecount[0]; + m.filebytesleft=TIFFGetStrileByteCount(tif, 0); if (!JPEGFixupTagsSubsamplingSec(&m)) TIFFWarningExt(tif->tif_clientdata,module, "Unable to auto-correct subsampling values, likely corrupt JPEG compressed data in first strip/tile; auto-correcting skipped"); @@ -816,8 +870,11 @@ JPEGFixupTagsSubsamplingSec(struct JPEGFixupTagsSubsamplingData* data) JPEGFixupTagsSubsamplingSkip(data,n); } break; - case JPEG_MARKER_SOF0: - case JPEG_MARKER_SOF1: + case JPEG_MARKER_SOF0: /* Baseline sequential Huffman */ + case JPEG_MARKER_SOF1: /* Extended sequential Huffman */ + case JPEG_MARKER_SOF2: /* Progressive Huffman: normally not allowed by TechNote, but that doesn't hurt supporting it */ + case JPEG_MARKER_SOF9: /* Extended sequential arithmetic */ + case JPEG_MARKER_SOF10: /* Progressive arithmetic: normally not allowed by TechNote, but that doesn't hurt supporting it */ /* this marker contains the subsampling factors we're scanning for */ { uint16 n; @@ -881,7 +938,10 @@ JPEGFixupTagsSubsamplingReadByte(struct JPEGFixupTagsSubsamplingData* data, uint return(0); if (!data->filepositioned) { - TIFFSeekFile(data->tif,data->fileoffset,SEEK_SET); + if (TIFFSeekFile(data->tif,data->fileoffset,SEEK_SET) == (toff_t)-1) + { + return 0; + } data->filepositioned=1; } m=data->buffersize; @@ -925,7 +985,7 @@ JPEGFixupTagsSubsamplingSkip(struct JPEGFixupTagsSubsamplingData* data, uint16 s else { uint16 m; - m=skiplength-data->bufferbytesleft; + m=(uint16)(skiplength-data->bufferbytesleft); if (m<=data->filebytesleft) { data->bufferbytesleft=0; @@ -962,7 +1022,7 @@ JPEGSetupDecode(TIFF* tif) /* Read JPEGTables if it is present */ if (TIFFFieldSet(tif,FIELD_JPEGTABLES)) { - TIFFjpeg_tables_src(sp, tif); + TIFFjpeg_tables_src(sp); if(TIFFjpeg_read_header(sp,FALSE) != JPEG_HEADER_TABLES_ONLY) { TIFFErrorExt(tif->tif_clientdata, "JPEGSetupDecode", "Bogus JPEGTables field"); return (0); @@ -984,15 +1044,51 @@ JPEGSetupDecode(TIFF* tif) } /* Set up for reading normal data */ - TIFFjpeg_data_src(sp, tif); + TIFFjpeg_data_src(sp); tif->tif_postdecode = _TIFFNoPostDecode; /* override byte swapping */ return (1); } +/* Returns 1 if the full strip should be read, even when doing scanline per */ +/* scanline decoding. This happens when the JPEG stream uses multiple scans. */ +/* Currently only called in CHUNKY_STRIP_READ_SUPPORT mode through */ +/* scanline interface. */ +/* Only reads tif->tif_dir.td_bitspersample, tif->tif_rawdata and */ +/* tif->tif_rawcc members. */ +/* Can be called independently of the usual setup/predecode/decode states */ +int TIFFJPEGIsFullStripRequired(TIFF* tif) +{ + int ret; + JPEGState state; + +#if defined(JPEG_DUAL_MODE_8_12) && !defined(TIFFJPEGIsFullStripRequired) + if( tif->tif_dir.td_bitspersample == 12 ) + return TIFFJPEGIsFullStripRequired_12( tif ); +#endif + + memset(&state, 0, sizeof(JPEGState)); + state.tif = tif; + + TIFFjpeg_create_decompress(&state); + + TIFFjpeg_data_src(&state); + + if (TIFFjpeg_read_header(&state, TRUE) != JPEG_HEADER_OK) + { + TIFFjpeg_destroy(&state); + return (0); + } + ret = TIFFjpeg_has_multiple_scans(&state); + + TIFFjpeg_destroy(&state); + + return ret; +} + /* * Set up for decoding a strip or tile. */ -static int +/*ARGSUSED*/ static int JPEGPreDecode(TIFF* tif, uint16 s) { JPEGState *sp = JState(tif); @@ -1029,13 +1125,13 @@ JPEGPreDecode(TIFF* tif, uint16 s) /* * Check image parameters and set decompression parameters. */ - segment_width = td->td_imagewidth; - segment_height = td->td_imagelength - tif->tif_row; if (isTiled(tif)) { segment_width = td->td_tilewidth; segment_height = td->td_tilelength; sp->bytesperline = TIFFTileRowSize(tif); } else { + segment_width = td->td_imagewidth; + segment_height = td->td_imagelength - tif->tif_row; if (segment_height > td->td_rowsperstrip) segment_height = td->td_rowsperstrip; sp->bytesperline = TIFFScanlineSize(tif); @@ -1056,9 +1152,23 @@ JPEGPreDecode(TIFF* tif, uint16 s) segment_width, segment_height, sp->cinfo.d.image_width, sp->cinfo.d.image_height); - } - if (sp->cinfo.d.image_width > segment_width || - sp->cinfo.d.image_height > segment_height) { + } + if( sp->cinfo.d.image_width == segment_width && + sp->cinfo.d.image_height > segment_height && + tif->tif_row + segment_height == td->td_imagelength && + !isTiled(tif) ) { + /* Some files have a last strip, that should be truncated, */ + /* but their JPEG codestream has still the maximum strip */ + /* height. Warn about this as this is non compliant, but */ + /* we can safely recover from that. */ + TIFFWarningExt(tif->tif_clientdata, module, + "JPEG strip size exceeds expected dimensions," + " expected %dx%d, got %dx%d", + segment_width, segment_height, + sp->cinfo.d.image_width, sp->cinfo.d.image_height); + } + else if (sp->cinfo.d.image_width > segment_width || + sp->cinfo.d.image_height > segment_height) { /* * This case could be dangerous, if the strip or tile size has * been reported as less than the amount of data jpeg will @@ -1091,6 +1201,49 @@ JPEGPreDecode(TIFF* tif, uint16 s) return (0); } #endif + + /* In some cases, libjpeg needs to allocate a lot of memory */ + /* http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf */ + if( TIFFjpeg_has_multiple_scans(sp) ) + { + /* In this case libjpeg will need to allocate memory or backing */ + /* store for all coefficients */ + /* See call to jinit_d_coef_controller() from master_selection() */ + /* in libjpeg */ + + /* 1 MB for regular libjpeg usage */ + toff_t nRequiredMemory = 1024 * 1024; + + for (ci = 0; ci < sp->cinfo.d.num_components; ci++) { + const jpeg_component_info *compptr = &(sp->cinfo.d.comp_info[ci]); + if( compptr->h_samp_factor > 0 && compptr->v_samp_factor > 0 ) + { + nRequiredMemory += (toff_t)( + ((compptr->width_in_blocks + compptr->h_samp_factor - 1) / compptr->h_samp_factor)) * + ((compptr->height_in_blocks + compptr->v_samp_factor - 1) / compptr->v_samp_factor) * + sizeof(JBLOCK); + } + } + + if( sp->cinfo.d.mem->max_memory_to_use > 0 && + nRequiredMemory > (toff_t)(sp->cinfo.d.mem->max_memory_to_use) && + getenv("LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC") == NULL ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Reading this image would require libjpeg to allocate " + "at least %u bytes. " + "This is disabled since above the %u threshold. " + "You may override this restriction by defining the " + "LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC environment variable, " + "or setting the JPEGMEM environment variable to a value greater " + "or equal to '%uM'", + (unsigned)(nRequiredMemory), + (unsigned)(sp->cinfo.d.mem->max_memory_to_use), + (unsigned)((nRequiredMemory + 1000000 - 1) / 1000000)); + return 0; + } + } + if (td->td_planarconfig == PLANARCONFIG_CONTIG) { /* Component 0 should have expected sampling factors */ if (sp->cinfo.d.comp_info[0].h_samp_factor != sp->h_sampling || @@ -1168,6 +1321,63 @@ JPEGPreDecode(TIFF* tif, uint16 s) * Decode a chunk of pixels. * "Standard" case: returned data is not downsampled. */ +#if !JPEG_LIB_MK1_OR_12BIT +static int +JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) +{ + JPEGState *sp = JState(tif); + tmsize_t nrows; + (void) s; + + /* + ** Update available information, buffer may have been refilled + ** between decode requests + */ + sp->src.next_input_byte = (const JOCTET*) tif->tif_rawcp; + sp->src.bytes_in_buffer = (size_t) tif->tif_rawcc; + + if( sp->bytesperline == 0 ) + return 0; + + nrows = cc / sp->bytesperline; + if (cc % sp->bytesperline) + TIFFWarningExt(tif->tif_clientdata, tif->tif_name, + "fractional scanline not read"); + + if( nrows > (tmsize_t) sp->cinfo.d.image_height ) + nrows = sp->cinfo.d.image_height; + + /* data is expected to be read in multiples of a scanline */ + if (nrows) + { + do + { + /* + * In the libjpeg6b-9a 8bit case. We read directly into + * the TIFF buffer. + */ + JSAMPROW bufptr = (JSAMPROW)buf; + + if (TIFFjpeg_read_scanlines(sp, &bufptr, 1) != 1) + return (0); + + ++tif->tif_row; + buf += sp->bytesperline; + cc -= sp->bytesperline; + } while (--nrows > 0); + } + + /* Update information on consumed data */ + tif->tif_rawcp = (uint8*) sp->src.next_input_byte; + tif->tif_rawcc = sp->src.bytes_in_buffer; + + /* Close down the decompressor if we've finished the strip or tile. */ + return sp->cinfo.d.output_scanline < sp->cinfo.d.output_height + || TIFFjpeg_finish_decompress(sp); +} +#endif /* !JPEG_LIB_MK1_OR_12BIT */ + +#if JPEG_LIB_MK1_OR_12BIT /*ARGSUSED*/ static int JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) { @@ -1187,91 +1397,81 @@ JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) nrows = cc / sp->bytesperline; if (cc % sp->bytesperline) - TIFFWarningExt(tif->tif_clientdata, tif->tif_name, "fractional scanline not read"); + TIFFWarningExt(tif->tif_clientdata, tif->tif_name, + "fractional scanline not read"); if( nrows > (tmsize_t) sp->cinfo.d.image_height ) nrows = sp->cinfo.d.image_height; /* data is expected to be read in multiples of a scanline */ if (nrows) - { - JSAMPROW line_work_buf = NULL; + { + JSAMPROW line_work_buf = NULL; - /* - * For 6B, only use temporary buffer for 12 bit imagery. - * For Mk1 always use it. - */ -#if !defined(JPEG_LIB_MK1) - if( sp->cinfo.d.data_precision == 12 ) -#endif - { - line_work_buf = (JSAMPROW) - _TIFFmalloc(sizeof(short) * sp->cinfo.d.output_width - * sp->cinfo.d.num_components ); - } + /* + * For 6B, only use temporary buffer for 12 bit imagery. + * For Mk1 always use it. + */ + if( sp->cinfo.d.data_precision == 12 ) + { + line_work_buf = (JSAMPROW) + _TIFFmalloc(sizeof(short) * sp->cinfo.d.output_width + * sp->cinfo.d.num_components ); + } - do { - if( line_work_buf != NULL ) - { - /* - * In the MK1 case, we aways read into a 16bit buffer, and then - * pack down to 12bit or 8bit. In 6B case we only read into 16 - * bit buffer for 12bit data, which we need to repack. - */ - if (TIFFjpeg_read_scanlines(sp, &line_work_buf, 1) != 1) - return (0); + do + { + if( line_work_buf != NULL ) + { + /* + * In the MK1 case, we always read into a 16bit + * buffer, and then pack down to 12bit or 8bit. + * In 6B case we only read into 16 bit buffer + * for 12bit data, which we need to repack. + */ + if (TIFFjpeg_read_scanlines(sp, &line_work_buf, 1) != 1) + return (0); - if( sp->cinfo.d.data_precision == 12 ) - { - int value_pairs = (sp->cinfo.d.output_width - * sp->cinfo.d.num_components) / 2; - int iPair; + if( sp->cinfo.d.data_precision == 12 ) + { + int value_pairs = (sp->cinfo.d.output_width + * sp->cinfo.d.num_components) / 2; + int iPair; - for( iPair = 0; iPair < value_pairs; iPair++ ) - { - unsigned char *out_ptr = - ((unsigned char *) buf) + iPair * 3; - JSAMPLE *in_ptr = line_work_buf + iPair * 2; + for( iPair = 0; iPair < value_pairs; iPair++ ) + { + unsigned char *out_ptr = + ((unsigned char *) buf) + iPair * 3; + JSAMPLE *in_ptr = line_work_buf + iPair * 2; - out_ptr[0] = (in_ptr[0] & 0xff0) >> 4; - out_ptr[1] = ((in_ptr[0] & 0xf) << 4) - | ((in_ptr[1] & 0xf00) >> 8); - out_ptr[2] = ((in_ptr[1] & 0xff) >> 0); - } - } - else if( sp->cinfo.d.data_precision == 8 ) - { - int value_count = (sp->cinfo.d.output_width - * sp->cinfo.d.num_components); - int iValue; + out_ptr[0] = (unsigned char)((in_ptr[0] & 0xff0) >> 4); + out_ptr[1] = (unsigned char)(((in_ptr[0] & 0xf) << 4) + | ((in_ptr[1] & 0xf00) >> 8)); + out_ptr[2] = (unsigned char)(((in_ptr[1] & 0xff) >> 0)); + } + } + else if( sp->cinfo.d.data_precision == 8 ) + { + int value_count = (sp->cinfo.d.output_width + * sp->cinfo.d.num_components); + int iValue; - for( iValue = 0; iValue < value_count; iValue++ ) - { - ((unsigned char *) buf)[iValue] = - line_work_buf[iValue] & 0xff; - } - } - } - else - { - /* - * In the libjpeg6b 8bit case. We read directly into the - * TIFF buffer. - */ - JSAMPROW bufptr = (JSAMPROW)buf; + for( iValue = 0; iValue < value_count; iValue++ ) + { + ((unsigned char *) buf)[iValue] = + line_work_buf[iValue] & 0xff; + } + } + } - if (TIFFjpeg_read_scanlines(sp, &bufptr, 1) != 1) - return (0); - } + ++tif->tif_row; + buf += sp->bytesperline; + cc -= sp->bytesperline; + } while (--nrows > 0); - ++tif->tif_row; - buf += sp->bytesperline; - cc -= sp->bytesperline; - } while (--nrows > 0); - - if( line_work_buf != NULL ) - _TIFFfree( line_work_buf ); - } + if( line_work_buf != NULL ) + _TIFFfree( line_work_buf ); + } /* Update information on consumed data */ tif->tif_rawcp = (uint8*) sp->src.next_input_byte; @@ -1279,8 +1479,9 @@ JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) /* Close down the decompressor if we've finished the strip or tile. */ return sp->cinfo.d.output_scanline < sp->cinfo.d.output_height - || TIFFjpeg_finish_decompress(sp); + || TIFFjpeg_finish_decompress(sp); } +#endif /* JPEG_LIB_MK1_OR_12BIT */ /*ARGSUSED*/ static int DecodeRowError(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) @@ -1304,10 +1505,18 @@ JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) { JPEGState *sp = JState(tif); tmsize_t nrows; + TIFFDirectory *td = &tif->tif_dir; (void) s; + nrows = sp->cinfo.d.image_height; + /* For last strip, limit number of rows to its truncated height */ + /* even if the codestream height is larger (which is not compliant, */ + /* but that we tolerate) */ + if( (uint32)nrows > td->td_imagelength - tif->tif_row && !isTiled(tif) ) + nrows = td->td_imagelength - tif->tif_row; + /* data is expected to be read in multiples of a scanline */ - if ( (nrows = sp->cinfo.d.image_height) ) { + if ( nrows != 0 ) { /* Cb,Cr both have sampling factors 1, so this is correct */ JDIMENSION clumps_per_line = sp->cinfo.d.comp_info[1].downsampled_width; @@ -1360,7 +1569,7 @@ JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) JSAMPLE *outptr = (JSAMPLE*)tmpbuf + clumpoffset; #else JSAMPLE *outptr = (JSAMPLE*)buf + clumpoffset; - if (cc < (tmsize_t) (clumpoffset + samples_per_clump*(clumps_per_line-1) + hsamp)) { + if (cc < (tmsize_t)(clumpoffset + (tmsize_t)samples_per_clump*(clumps_per_line-1) + hsamp)) { TIFFErrorExt(tif->tif_clientdata, "JPEGDecodeRaw", "application buffer not large enough for all data, possible subsampling issue"); return 0; @@ -1407,10 +1616,10 @@ JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) { unsigned char *out_ptr = ((unsigned char *) buf) + iPair * 3; JSAMPLE *in_ptr = (JSAMPLE *) (tmpbuf + iPair * 2); - out_ptr[0] = (in_ptr[0] & 0xff0) >> 4; - out_ptr[1] = ((in_ptr[0] & 0xf) << 4) - | ((in_ptr[1] & 0xf00) >> 8); - out_ptr[2] = ((in_ptr[1] & 0xff) >> 0); + out_ptr[0] = (unsigned char)((in_ptr[0] & 0xff0) >> 4); + out_ptr[1] = (unsigned char)(((in_ptr[0] & 0xf) << 4) + | ((in_ptr[1] & 0xf00) >> 8)); + out_ptr[2] = (unsigned char)(((in_ptr[1] & 0xff) >> 0)); } } } @@ -1450,6 +1659,15 @@ unsuppress_quant_table (JPEGState* sp, int tblno) qtbl->sent_table = FALSE; } +static void +suppress_quant_table (JPEGState* sp, int tblno) +{ + JQUANT_TBL* qtbl; + + if ((qtbl = sp->cinfo.c.quant_tbl_ptrs[tblno]) != NULL) + qtbl->sent_table = TRUE; +} + static void unsuppress_huff_table (JPEGState* sp, int tblno) { @@ -1461,6 +1679,17 @@ unsuppress_huff_table (JPEGState* sp, int tblno) htbl->sent_table = FALSE; } +static void +suppress_huff_table (JPEGState* sp, int tblno) +{ + JHUFF_TBL* htbl; + + if ((htbl = sp->cinfo.c.dc_huff_tbl_ptrs[tblno]) != NULL) + htbl->sent_table = TRUE; + if ((htbl = sp->cinfo.c.ac_huff_tbl_ptrs[tblno]) != NULL) + htbl->sent_table = TRUE; +} + static int prepare_JPEGTables(TIFF* tif) { @@ -1510,21 +1739,56 @@ JPEGSetupEncode(TIFF* tif) assert(sp != NULL); assert(!sp->cinfo.comm.is_decompressor); + sp->photometric = td->td_photometric; + /* * Initialize all JPEG parameters to default values. * Note that jpeg_set_defaults needs legal values for * in_color_space and input_components. */ - sp->cinfo.c.in_color_space = JCS_UNKNOWN; - sp->cinfo.c.input_components = 1; + if (td->td_planarconfig == PLANARCONFIG_CONTIG) { + sp->cinfo.c.input_components = td->td_samplesperpixel; + if (sp->photometric == PHOTOMETRIC_YCBCR) { + if (sp->jpegcolormode == JPEGCOLORMODE_RGB) { + sp->cinfo.c.in_color_space = JCS_RGB; + } else { + sp->cinfo.c.in_color_space = JCS_YCbCr; + } + } else { + if ((td->td_photometric == PHOTOMETRIC_MINISWHITE || td->td_photometric == PHOTOMETRIC_MINISBLACK) && td->td_samplesperpixel == 1) + sp->cinfo.c.in_color_space = JCS_GRAYSCALE; + else if (td->td_photometric == PHOTOMETRIC_RGB && td->td_samplesperpixel == 3) + sp->cinfo.c.in_color_space = JCS_RGB; + else if (td->td_photometric == PHOTOMETRIC_SEPARATED && td->td_samplesperpixel == 4) + sp->cinfo.c.in_color_space = JCS_CMYK; + else + sp->cinfo.c.in_color_space = JCS_UNKNOWN; + } + } else { + sp->cinfo.c.input_components = 1; + sp->cinfo.c.in_color_space = JCS_UNKNOWN; + } if (!TIFFjpeg_set_defaults(sp)) return (0); /* Set per-file parameters */ - sp->photometric = td->td_photometric; switch (sp->photometric) { case PHOTOMETRIC_YCBCR: sp->h_sampling = td->td_ycbcrsubsampling[0]; sp->v_sampling = td->td_ycbcrsubsampling[1]; + if( sp->h_sampling == 0 || sp->v_sampling == 0 ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Invalig horizontal/vertical sampling value"); + return (0); + } + if( td->td_bitspersample > 16 ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "BitsPerSample %d not allowed for JPEG", + td->td_bitspersample); + return (0); + } + /* * A ReferenceBlackWhite field *must* be present since the * default value is inappropriate for YCbCr. Fill in the @@ -1680,10 +1944,7 @@ JPEGPreEncode(TIFF* tif, uint16 s) if (td->td_planarconfig == PLANARCONFIG_CONTIG) { sp->cinfo.c.input_components = td->td_samplesperpixel; if (sp->photometric == PHOTOMETRIC_YCBCR) { - if (sp->jpegcolormode == JPEGCOLORMODE_RGB) { - sp->cinfo.c.in_color_space = JCS_RGB; - } else { - sp->cinfo.c.in_color_space = JCS_YCbCr; + if (sp->jpegcolormode != JPEGCOLORMODE_RGB) { if (sp->h_sampling != 1 || sp->v_sampling != 1) downsampled_input = TRUE; } @@ -1696,21 +1957,11 @@ JPEGPreEncode(TIFF* tif, uint16 s) sp->cinfo.c.comp_info[0].h_samp_factor = sp->h_sampling; sp->cinfo.c.comp_info[0].v_samp_factor = sp->v_sampling; } else { - if ((td->td_photometric == PHOTOMETRIC_MINISWHITE || td->td_photometric == PHOTOMETRIC_MINISBLACK) && td->td_samplesperpixel == 1) - sp->cinfo.c.in_color_space = JCS_GRAYSCALE; - else if (td->td_photometric == PHOTOMETRIC_RGB && td->td_samplesperpixel == 3) - sp->cinfo.c.in_color_space = JCS_RGB; - else if (td->td_photometric == PHOTOMETRIC_SEPARATED && td->td_samplesperpixel == 4) - sp->cinfo.c.in_color_space = JCS_CMYK; - else - sp->cinfo.c.in_color_space = JCS_UNKNOWN; if (!TIFFjpeg_set_colorspace(sp, sp->cinfo.c.in_color_space)) return (0); /* jpeg_set_colorspace set all sampling factors to 1 */ } } else { - sp->cinfo.c.input_components = 1; - sp->cinfo.c.in_color_space = JCS_UNKNOWN; if (!TIFFjpeg_set_colorspace(sp, JCS_UNKNOWN)) return (0); sp->cinfo.c.comp_info[0].component_id = s; @@ -1725,14 +1976,30 @@ JPEGPreEncode(TIFF* tif, uint16 s) sp->cinfo.c.write_JFIF_header = FALSE; sp->cinfo.c.write_Adobe_marker = FALSE; /* set up table handling correctly */ - if (!TIFFjpeg_set_quality(sp, sp->jpegquality, FALSE)) + /* calling TIFFjpeg_set_quality() causes quantization tables to be flagged */ + /* as being to be emitted, which we don't want in the JPEGTABLESMODE_QUANT */ + /* mode, so we must manually suppress them. However TIFFjpeg_set_quality() */ + /* should really be called when dealing with files with directories with */ + /* mixed qualities. see http://trac.osgeo.org/gdal/ticket/3539 */ + if (!TIFFjpeg_set_quality(sp, sp->jpegquality, FALSE)) return (0); - if (! (sp->jpegtablesmode & JPEGTABLESMODE_QUANT)) { + if (sp->jpegtablesmode & JPEGTABLESMODE_QUANT) { + suppress_quant_table(sp, 0); + suppress_quant_table(sp, 1); + } + else { unsuppress_quant_table(sp, 0); unsuppress_quant_table(sp, 1); } if (sp->jpegtablesmode & JPEGTABLESMODE_HUFF) + { + /* Explicit suppression is only needed if we did not go through the */ + /* prepare_JPEGTables() code path, which may be the case if updating */ + /* an existing file */ + suppress_huff_table(sp, 0); + suppress_huff_table(sp, 1); sp->cinfo.c.optimize_coding = FALSE; + } else sp->cinfo.c.optimize_coding = TRUE; if (downsampled_input) { @@ -1789,9 +2056,16 @@ JPEGEncode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) if( sp->cinfo.c.data_precision == 12 ) { - line16_count = (sp->bytesperline * 2) / 3; + line16_count = (int)((sp->bytesperline * 2) / 3); line16 = (short *) _TIFFmalloc(sizeof(short) * line16_count); - // FIXME: undiagnosed malloc failure + if (!line16) + { + TIFFErrorExt(tif->tif_clientdata, + "JPEGEncode", + "Failed to allocate memory"); + + return 0; + } } while (nrows-- > 0) { @@ -1855,8 +2129,8 @@ JPEGEncodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) /* data is expected to be supplied in multiples of a clumpline */ /* a clumpline is equivalent to v_sampling desubsampled scanlines */ /* TODO: the following calculation of bytesperclumpline, should substitute calculation of sp->bytesperline, except that it is per v_sampling lines */ - bytesperclumpline = (((sp->cinfo.c.image_width+sp->h_sampling-1)/sp->h_sampling) - *(sp->h_sampling*sp->v_sampling+2)*sp->cinfo.c.data_precision+7) + bytesperclumpline = ((((tmsize_t)sp->cinfo.c.image_width+sp->h_sampling-1)/sp->h_sampling) + *((tmsize_t)sp->h_sampling*sp->v_sampling+2)*sp->cinfo.c.data_precision+7) /8; nrows = ( cc / bytesperclumpline ) * sp->v_sampling; @@ -1966,13 +2240,10 @@ JPEGCleanup(TIFF* tif) tif->tif_tagmethods.vgetfield = sp->vgetparent; tif->tif_tagmethods.vsetfield = sp->vsetparent; tif->tif_tagmethods.printdir = sp->printdir; - - if( sp != NULL ) { - if( sp->cinfo_initialized ) - TIFFjpeg_destroy(sp); /* release libjpeg resources */ - if (sp->jpegtables) /* tag value */ - _TIFFfree(sp->jpegtables); - } + if( sp->cinfo_initialized ) + TIFFjpeg_destroy(sp); /* release libjpeg resources */ + if (sp->jpegtables) /* tag value */ + _TIFFfree(sp->jpegtables); _TIFFfree(tif->tif_data); /* release local state */ tif->tif_data = NULL; @@ -2030,8 +2301,7 @@ JPEGVSetField(TIFF* tif, uint32 tag, va_list ap) /* XXX */ return (0); } - _TIFFsetByteArray(&sp->jpegtables, va_arg(ap, void*), - (long) v32); + _TIFFsetByteArray(&sp->jpegtables, va_arg(ap, void*), v32); sp->jpegtables_length = v32; TIFFSetFieldBit(tif, FIELD_JPEGTABLES); break; @@ -2060,7 +2330,7 @@ JPEGVSetField(TIFF* tif, uint32 tag, va_list ap) return (*sp->vsetparent)(tif, tag, ap); } - if ((fip = TIFFFieldWithTag(tif, tag))) { + if ((fip = TIFFFieldWithTag(tif, tag)) != NULL) { TIFFSetFieldBit(tif, fip->field_bit); } else { return (0); @@ -2080,7 +2350,7 @@ JPEGVGetField(TIFF* tif, uint32 tag, va_list ap) switch (tag) { case TIFFTAG_JPEGTABLES: *va_arg(ap, uint32*) = sp->jpegtables_length; - *va_arg(ap, void**) = sp->jpegtables; + *va_arg(ap, const void**) = sp->jpegtables; break; case TIFFTAG_JPEGQUALITY: *va_arg(ap, int*) = sp->jpegquality; @@ -2184,6 +2454,25 @@ static int JPEGInitializeLibJPEG( TIFF * tif, int decompress ) } else { if (!TIFFjpeg_create_compress(sp)) return (0); +#ifndef TIFF_JPEG_MAX_MEMORY_TO_USE +#define TIFF_JPEG_MAX_MEMORY_TO_USE (10 * 1024 * 1024) +#endif + /* libjpeg turbo 1.5.2 honours max_memory_to_use, but has no backing */ + /* store implementation, so better not set max_memory_to_use ourselves. */ + /* See https://github.com/libjpeg-turbo/libjpeg-turbo/issues/162 */ + if( sp->cinfo.c.mem->max_memory_to_use > 0 ) + { + /* This is to address bug related in ticket GDAL #1795. */ + if (getenv("JPEGMEM") == NULL) + { + /* Increase the max memory usable. This helps when creating files */ + /* with "big" tile, without using libjpeg temporary files. */ + /* For example a 512x512 tile with 3 bands */ + /* requires 1.5 MB which is above libjpeg 1MB default */ + if( sp->cinfo.c.mem->max_memory_to_use < TIFF_JPEG_MAX_MEMORY_TO_USE ) + sp->cinfo.c.mem->max_memory_to_use = TIFF_JPEG_MAX_MEMORY_TO_USE; + } + } } sp->cinfo_initialized = TRUE; @@ -2196,6 +2485,7 @@ TIFFInitJPEG(TIFF* tif, int scheme) { JPEGState* sp; + (void)scheme; assert(scheme == COMPRESSION_JPEG); /* @@ -2284,8 +2574,17 @@ here hopefully is harmless. */ sp->jpegtables_length = SIZE_OF_JPEGTABLES; sp->jpegtables = (void *) _TIFFmalloc(sp->jpegtables_length); - // FIXME: NULL-deref after malloc failure - _TIFFmemset(sp->jpegtables, 0, SIZE_OF_JPEGTABLES); + if (sp->jpegtables) + { + _TIFFmemset(sp->jpegtables, 0, SIZE_OF_JPEGTABLES); + } + else + { + TIFFErrorExt(tif->tif_clientdata, + "TIFFInitJPEG", + "Failed to allocate memory for JPEG tables"); + return 0; + } #undef SIZE_OF_JPEGTABLES } diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_jpeg_12.c b/thirdparty/tiff-4.2.0/libtiff/tif_jpeg_12.c similarity index 93% rename from thirdparty/tiff-4.0.3/libtiff/tif_jpeg_12.c rename to thirdparty/tiff-4.2.0/libtiff/tif_jpeg_12.c index 87aaa19e..b458c258 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_jpeg_12.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_jpeg_12.c @@ -4,6 +4,10 @@ #if defined(JPEG_DUAL_MODE_8_12) # define TIFFInitJPEG TIFFInitJPEG_12 +# define TIFFJPEGIsFullStripRequired TIFFJPEGIsFullStripRequired_12 + +int +TIFFInitJPEG_12(TIFF* tif, int scheme); # include LIBJPEG_12_PATH diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_luv.c b/thirdparty/tiff-4.2.0/libtiff/tif_luv.c similarity index 90% rename from thirdparty/tiff-4.0.3/libtiff/tif_luv.c rename to thirdparty/tiff-4.2.0/libtiff/tif_luv.c index eba6c08e..3bd02e88 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_luv.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_luv.c @@ -1,5 +1,3 @@ -/* $Id: tif_luv.c,v 1.35 2011-04-02 20:54:09 bfriesen Exp $ */ - /* * Copyright (c) 1997 Greg Ward Larson * Copyright (c) 1997 Silicon Graphics, Inc. @@ -158,6 +156,7 @@ typedef struct logLuvState LogLuvState; struct logLuvState { + int encoder_state; /* 1 if encoder correctly initialized */ int user_datafmt; /* user data format */ int encode_meth; /* encoding method */ int pixel_size; /* bytes per pixel */ @@ -194,6 +193,7 @@ LogL16Decode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) tmsize_t cc; int rc; + (void)s; assert(s == 0); assert(sp != NULL); @@ -202,7 +202,11 @@ LogL16Decode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) if (sp->user_datafmt == SGILOGDATAFMT_16BIT) tp = (int16*) op; else { - assert(sp->tbuflen >= npixels); + if(sp->tbuflen < npixels) { + TIFFErrorExt(tif->tif_clientdata, module, + "Translation buffer too short"); + return (0); + } tp = (int16*) sp->tbuf; } _TIFFmemset((void*) tp, 0, npixels*sizeof (tp[0])); @@ -210,10 +214,12 @@ LogL16Decode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) bp = (unsigned char*) tif->tif_rawcp; cc = tif->tif_rawcc; /* get each byte string */ - for (shft = 2*8; (shft -= 8) >= 0; ) { - for (i = 0; i < npixels && cc > 0; ) + for (shft = 8; shft >= 0; shft -=8) { + for (i = 0; i < npixels && cc > 0; ) { if (*bp >= 128) { /* run */ - rc = *bp++ + (2-128); /* TODO: potential input buffer overrun when decoding corrupt or truncated data */ + if( cc < 2 ) + break; + rc = *bp++ + (2-128); b = (int16)(*bp++ << shft); cc -= 2; while (rc-- && i < npixels) @@ -223,6 +229,7 @@ LogL16Decode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) while (--cc && rc-- && i < npixels) tp[i++] |= (int16)*bp++ << shft; } + } if (i != npixels) { #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) TIFFErrorExt(tif->tif_clientdata, module, @@ -260,6 +267,7 @@ LogLuvDecode24(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) unsigned char* bp; uint32* tp; + (void)s; assert(s == 0); assert(sp != NULL); @@ -268,13 +276,17 @@ LogLuvDecode24(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) if (sp->user_datafmt == SGILOGDATAFMT_RAW) tp = (uint32 *)op; else { - assert(sp->tbuflen >= npixels); + if(sp->tbuflen < npixels) { + TIFFErrorExt(tif->tif_clientdata, module, + "Translation buffer too short"); + return (0); + } tp = (uint32 *) sp->tbuf; } /* copy to array of uint32 */ bp = (unsigned char*) tif->tif_rawcp; cc = tif->tif_rawcc; - for (i = 0; i < npixels && cc > 0; i++) { + for (i = 0; i < npixels && cc >= 3; i++) { tp[i] = bp[0] << 16 | bp[1] << 8 | bp[2]; bp += 3; cc -= 3; @@ -316,6 +328,7 @@ LogLuvDecode32(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) tmsize_t cc; int rc; + (void)s; assert(s == 0); sp = DecoderState(tif); assert(sp != NULL); @@ -325,7 +338,11 @@ LogLuvDecode32(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) if (sp->user_datafmt == SGILOGDATAFMT_RAW) tp = (uint32*) op; else { - assert(sp->tbuflen >= npixels); + if(sp->tbuflen < npixels) { + TIFFErrorExt(tif->tif_clientdata, module, + "Translation buffer too short"); + return (0); + } tp = (uint32*) sp->tbuf; } _TIFFmemset((void*) tp, 0, npixels*sizeof (tp[0])); @@ -333,12 +350,14 @@ LogLuvDecode32(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) bp = (unsigned char*) tif->tif_rawcp; cc = tif->tif_rawcc; /* get each byte string */ - for (shft = 4*8; (shft -= 8) >= 0; ) { - for (i = 0; i < npixels && cc > 0; ) + for (shft = 24; shft >= 0; shft -=8) { + for (i = 0; i < npixels && cc > 0; ) { if (*bp >= 128) { /* run */ + if( cc < 2 ) + break; rc = *bp++ + (2-128); b = (uint32)*bp++ << shft; - cc -= 2; /* TODO: potential input buffer overrun when decoding corrupt or truncated data */ + cc -= 2; while (rc-- && i < npixels) tp[i++] |= b; } else { /* non-run */ @@ -346,6 +365,7 @@ LogLuvDecode32(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) while (--cc && rc-- && i < npixels) tp[i++] |= (uint32)*bp++ << shft; } + } if (i != npixels) { #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) TIFFErrorExt(tif->tif_clientdata, module, @@ -379,9 +399,14 @@ LogLuvDecodeStrip(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) { tmsize_t rowlen = TIFFScanlineSize(tif); + if (rowlen == 0) + return 0; + assert(cc%rowlen == 0); - while (cc && (*tif->tif_decoderow)(tif, bp, rowlen, s)) - bp += rowlen, cc -= rowlen; + while (cc && (*tif->tif_decoderow)(tif, bp, rowlen, s)) { + bp += rowlen; + cc -= rowlen; + } return (cc == 0); } @@ -395,9 +420,14 @@ LogLuvDecodeTile(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) { tmsize_t rowlen = TIFFTileRowSize(tif); + if (rowlen == 0) + return 0; + assert(cc%rowlen == 0); - while (cc && (*tif->tif_decoderow)(tif, bp, rowlen, s)) - bp += rowlen, cc -= rowlen; + while (cc && (*tif->tif_decoderow)(tif, bp, rowlen, s)) { + bp += rowlen; + cc -= rowlen; + } return (cc == 0); } @@ -407,6 +437,7 @@ LogLuvDecodeTile(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) static int LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) { + static const char module[] = "LogL16Encode"; LogLuvState* sp = EncoderState(tif); int shft; tmsize_t i; @@ -419,6 +450,7 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) int rc=0, mask; tmsize_t beg; + (void)s; assert(s == 0); assert(sp != NULL); npixels = cc / sp->pixel_size; @@ -427,19 +459,23 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) tp = (int16*) bp; else { tp = (int16*) sp->tbuf; - assert(sp->tbuflen >= npixels); + if(sp->tbuflen < npixels) { + TIFFErrorExt(tif->tif_clientdata, module, + "Translation buffer too short"); + return (0); + } (*sp->tfunc)(sp, bp, npixels); } /* compress each byte string */ op = tif->tif_rawcp; occ = tif->tif_rawdatasize - tif->tif_rawcc; - for (shft = 2*8; (shft -= 8) >= 0; ) + for (shft = 8; shft >= 0; shft -=8) { for (i = 0; i < npixels; i += rc) { if (occ < 4) { tif->tif_rawcp = op; tif->tif_rawcc = tif->tif_rawdatasize - occ; if (!TIFFFlushData1(tif)) - return (-1); + return (0); op = tif->tif_rawcp; occ = tif->tif_rawdatasize - tif->tif_rawcc; } @@ -471,7 +507,7 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) tif->tif_rawcp = op; tif->tif_rawcc = tif->tif_rawdatasize - occ; if (!TIFFFlushData1(tif)) - return (-1); + return (0); op = tif->tif_rawcp; occ = tif->tif_rawdatasize - tif->tif_rawcc; } @@ -488,6 +524,7 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) } else rc = 0; } + } tif->tif_rawcp = op; tif->tif_rawcc = tif->tif_rawdatasize - occ; @@ -500,6 +537,7 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) static int LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) { + static const char module[] = "LogLuvEncode24"; LogLuvState* sp = EncoderState(tif); tmsize_t i; tmsize_t npixels; @@ -507,6 +545,7 @@ LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) uint8* op; uint32* tp; + (void)s; assert(s == 0); assert(sp != NULL); npixels = cc / sp->pixel_size; @@ -515,7 +554,11 @@ LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) tp = (uint32*) bp; else { tp = (uint32*) sp->tbuf; - assert(sp->tbuflen >= npixels); + if(sp->tbuflen < npixels) { + TIFFErrorExt(tif->tif_clientdata, module, + "Translation buffer too short"); + return (0); + } (*sp->tfunc)(sp, bp, npixels); } /* write out encoded pixels */ @@ -526,7 +569,7 @@ LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) tif->tif_rawcp = op; tif->tif_rawcc = tif->tif_rawdatasize - occ; if (!TIFFFlushData1(tif)) - return (-1); + return (0); op = tif->tif_rawcp; occ = tif->tif_rawdatasize - tif->tif_rawcc; } @@ -547,6 +590,7 @@ LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) static int LogLuvEncode32(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) { + static const char module[] = "LogLuvEncode32"; LogLuvState* sp = EncoderState(tif); int shft; tmsize_t i; @@ -559,6 +603,7 @@ LogLuvEncode32(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) int rc=0, mask; tmsize_t beg; + (void)s; assert(s == 0); assert(sp != NULL); @@ -568,19 +613,23 @@ LogLuvEncode32(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) tp = (uint32*) bp; else { tp = (uint32*) sp->tbuf; - assert(sp->tbuflen >= npixels); + if(sp->tbuflen < npixels) { + TIFFErrorExt(tif->tif_clientdata, module, + "Translation buffer too short"); + return (0); + } (*sp->tfunc)(sp, bp, npixels); } /* compress each byte string */ op = tif->tif_rawcp; occ = tif->tif_rawdatasize - tif->tif_rawcc; - for (shft = 4*8; (shft -= 8) >= 0; ) + for (shft = 24; shft >= 0; shft -=8) { for (i = 0; i < npixels; i += rc) { if (occ < 4) { tif->tif_rawcp = op; tif->tif_rawcc = tif->tif_rawdatasize - occ; if (!TIFFFlushData1(tif)) - return (-1); + return (0); op = tif->tif_rawcp; occ = tif->tif_rawdatasize - tif->tif_rawcc; } @@ -612,7 +661,7 @@ LogLuvEncode32(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) tif->tif_rawcp = op; tif->tif_rawcc = tif->tif_rawdatasize - occ; if (!TIFFFlushData1(tif)) - return (-1); + return (0); op = tif->tif_rawcp; occ = tif->tif_rawdatasize - tif->tif_rawcc; } @@ -629,6 +678,7 @@ LogLuvEncode32(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) } else rc = 0; } + } tif->tif_rawcp = op; tif->tif_rawcc = tif->tif_rawdatasize - occ; @@ -644,9 +694,14 @@ LogLuvEncodeStrip(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) { tmsize_t rowlen = TIFFScanlineSize(tif); + if (rowlen == 0) + return 0; + assert(cc%rowlen == 0); - while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 1) - bp += rowlen, cc -= rowlen; + while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 1) { + bp += rowlen; + cc -= rowlen; + } return (cc == 0); } @@ -659,9 +714,14 @@ LogLuvEncodeTile(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) { tmsize_t rowlen = TIFFTileRowSize(tif); + if (rowlen == 0) + return 0; + assert(cc%rowlen == 0); - while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 1) - bp += rowlen, cc -= rowlen; + while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 1) { + bp += rowlen; + cc -= rowlen; + } return (cc == 0); } @@ -683,12 +743,19 @@ LogLuvEncodeTile(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) #ifndef M_PI #define M_PI 3.14159265358979323846 #endif +#undef log2 /* Conflict with C'99 function */ #define log2(x) ((1./M_LN2)*log(x)) +#undef exp2 /* Conflict with C'99 function */ #define exp2(x) exp(M_LN2*(x)) -#define itrunc(x,m) ((m)==SGILOGENCODE_NODITHER ? \ - (int)(x) : \ - (int)((x) + rand()*(1./RAND_MAX) - .5)) +static int tiff_itrunc(double x, int m) +{ + if( m == SGILOGENCODE_NODITHER ) + return (int)x; + /* Silence CoverityScan warning about bad crypto function */ + /* coverity[dont_call] */ + return (int)(x + rand()*(1./RAND_MAX) - .5); +} #if !LOGLUV_PUBLIC static @@ -716,9 +783,9 @@ LogL16fromY(double Y, int em) /* get 16-bit LogL from Y */ if (Y <= -1.8371976e19) return (0xffff); if (Y > 5.4136769e-20) - return itrunc(256.*(log2(Y) + 64.), em); + return tiff_itrunc(256.*(log2(Y) + 64.), em); if (Y < -5.4136769e-20) - return (~0x7fff | itrunc(256.*(log2(-Y) + 64.), em)); + return (~0x7fff | tiff_itrunc(256.*(log2(-Y) + 64.), em)); return (0); } @@ -794,7 +861,7 @@ LogL10fromY(double Y, int em) /* get 10-bit LogL from Y */ else if (Y <= .00024283) return (0); else - return itrunc(64.*(log2(Y) + 12.), em); + return tiff_itrunc(64.*(log2(Y) + 12.), em); } #define NANGLES 100 @@ -864,12 +931,12 @@ uv_encode(double u, double v, int em) /* encode (u',v') coordinates */ if (v < UV_VSTART) return oog_encode(u, v); - vi = itrunc((v - UV_VSTART)*(1./UV_SQSIZ), em); + vi = tiff_itrunc((v - UV_VSTART)*(1./UV_SQSIZ), em); if (vi >= UV_NVS) return oog_encode(u, v); if (u < uv_row[vi].ustart) return oog_encode(u, v); - ui = itrunc((u - uv_row[vi].ustart)*(1./UV_SQSIZ), em); + ui = tiff_itrunc((u - uv_row[vi].ustart)*(1./UV_SQSIZ), em); if (ui >= uv_row[vi].nus) return oog_encode(u, v); @@ -1038,7 +1105,7 @@ Luv24fromLuv48(LogLuvState* sp, uint8* op, tmsize_t n) else if (sp->encode_meth == SGILOGENCODE_NODITHER) Le = (luv3[0]-3314) >> 2; else - Le = itrunc(.25*(luv3[0]-3314.), sp->encode_meth); + Le = tiff_itrunc(.25*(luv3[0]-3314.), sp->encode_meth); Ce = uv_encode((luv3[1]+.5)/(1<<15), (luv3[2]+.5)/(1<<15), sp->encode_meth); @@ -1094,10 +1161,10 @@ LogLuv32fromXYZ(float XYZ[3], int em) v = 9.*XYZ[1] / s; } if (u <= 0.) ue = 0; - else ue = itrunc(UVSCALE*u, em); + else ue = tiff_itrunc(UVSCALE*u, em); if (ue > 255) ue = 255; if (v <= 0.) ve = 0; - else ve = itrunc(UVSCALE*v, em); + else ve = tiff_itrunc(UVSCALE*v, em); if (ve > 255) ve = 255; /* combine encodings */ return (Le << 16 | ue << 8 | ve); @@ -1177,8 +1244,8 @@ Luv32fromLuv48(LogLuvState* sp, uint8* op, tmsize_t n) } while (n-- > 0) { *luv++ = (uint32)luv3[0] << 16 | - (itrunc(luv3[1]*(UVSCALE/(1<<15)), sp->encode_meth) << 8 & 0xff00) | - (itrunc(luv3[2]*(UVSCALE/(1<<15)), sp->encode_meth) & 0xff); + (tiff_itrunc(luv3[1]*(UVSCALE/(1<<15)), sp->encode_meth) << 8 & 0xff00) | + (tiff_itrunc(luv3[2]*(UVSCALE/(1<<15)), sp->encode_meth) & 0xff); luv3 += 3; } } @@ -1211,12 +1278,7 @@ LogL16GuessDataFmt(TIFFDirectory *td) static tmsize_t multiply_ms(tmsize_t m1, tmsize_t m2) { - tmsize_t bytes = m1 * m2; - - if (m1 && bytes / m1 != m2) - bytes = 0; - - return bytes; + return _TIFFMultiplySSize(NULL, m1, m2, NULL); } static int @@ -1229,6 +1291,14 @@ LogL16InitState(TIFF* tif) assert(sp != NULL); assert(td->td_photometric == PHOTOMETRIC_LOGL); + if( td->td_samplesperpixel != 1 ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Sorry, can not handle LogL image with %s=%d", + "Samples/pixel", td->td_samplesperpixel); + return 0; + } + /* for some reason, we can't do this in TIFFInitLogL16 */ if (sp->user_datafmt == SGILOGDATAFMT_UNKNOWN) sp->user_datafmt = LogL16GuessDataFmt(td); @@ -1249,8 +1319,10 @@ LogL16InitState(TIFF* tif) } if( isTiled(tif) ) sp->tbuflen = multiply_ms(td->td_tilewidth, td->td_tilelength); - else + else if( td->td_rowsperstrip < td->td_imagelength ) sp->tbuflen = multiply_ms(td->td_imagewidth, td->td_rowsperstrip); + else + sp->tbuflen = multiply_ms(td->td_imagewidth, td->td_imagelength); if (multiply_ms(sp->tbuflen, sizeof (int16)) == 0 || (sp->tbuf = (uint8*) _TIFFmalloc(sp->tbuflen * sizeof (int16))) == NULL) { TIFFErrorExt(tif->tif_clientdata, module, "No space for SGILog translation buffer"); @@ -1349,8 +1421,10 @@ LogLuvInitState(TIFF* tif) } if( isTiled(tif) ) sp->tbuflen = multiply_ms(td->td_tilewidth, td->td_tilelength); - else + else if( td->td_rowsperstrip < td->td_imagelength ) sp->tbuflen = multiply_ms(td->td_imagewidth, td->td_rowsperstrip); + else + sp->tbuflen = multiply_ms(td->td_imagewidth, td->td_imagelength); if (multiply_ms(sp->tbuflen, sizeof (uint32)) == 0 || (sp->tbuf = (uint8*) _TIFFmalloc(sp->tbuflen * sizeof (uint32))) == NULL) { TIFFErrorExt(tif->tif_clientdata, module, "No space for SGILog translation buffer"); @@ -1438,7 +1512,7 @@ LogLuvSetupEncode(TIFF* tif) switch (td->td_photometric) { case PHOTOMETRIC_LOGLUV: if (!LogLuvInitState(tif)) - break; + return (0); if (td->td_compression == COMPRESSION_SGILOG24) { tif->tif_encoderow = LogLuvEncode24; switch (sp->user_datafmt) { @@ -1471,7 +1545,7 @@ LogLuvSetupEncode(TIFF* tif) break; case PHOTOMETRIC_LOGL: if (!LogL16InitState(tif)) - break; + return (0); tif->tif_encoderow = LogL16Encode; switch (sp->user_datafmt) { case SGILOGDATAFMT_FLOAT: @@ -1487,8 +1561,9 @@ LogLuvSetupEncode(TIFF* tif) TIFFErrorExt(tif->tif_clientdata, module, "Inappropriate photometric interpretation %d for SGILog compression; %s", td->td_photometric, "must be either LogLUV or LogL"); - break; + return (0); } + sp->encoder_state = 1; return (1); notsupported: TIFFErrorExt(tif->tif_clientdata, module, @@ -1500,19 +1575,27 @@ notsupported: static void LogLuvClose(TIFF* tif) { + LogLuvState* sp = (LogLuvState*) tif->tif_data; TIFFDirectory *td = &tif->tif_dir; + assert(sp != 0); /* * For consistency, we always want to write out the same * bitspersample and sampleformat for our TIFF file, * regardless of the data format being used by the application. * Since this routine is called after tags have been set but * before they have been recorded in the file, we reset them here. + * Note: this is really a nasty approach. See PixarLogClose */ - td->td_samplesperpixel = - (td->td_photometric == PHOTOMETRIC_LOGL) ? 1 : 3; - td->td_bitspersample = 16; - td->td_sampleformat = SAMPLEFORMAT_INT; + if( sp->encoder_state ) + { + /* See PixarLogClose. Might avoid issues with tags whose size depends + * on those below, but not completely sure this is enough. */ + td->td_samplesperpixel = + (td->td_photometric == PHOTOMETRIC_LOGL) ? 1 : 3; + td->td_bitspersample = 16; + td->td_sampleformat = SAMPLEFORMAT_INT; + } } static void @@ -1551,17 +1634,21 @@ LogLuvVSetField(TIFF* tif, uint32 tag, va_list ap) */ switch (sp->user_datafmt) { case SGILOGDATAFMT_FLOAT: - bps = 32, fmt = SAMPLEFORMAT_IEEEFP; + bps = 32; + fmt = SAMPLEFORMAT_IEEEFP; break; case SGILOGDATAFMT_16BIT: - bps = 16, fmt = SAMPLEFORMAT_INT; + bps = 16; + fmt = SAMPLEFORMAT_INT; break; case SGILOGDATAFMT_RAW: - bps = 32, fmt = SAMPLEFORMAT_UINT; + bps = 32; + fmt = SAMPLEFORMAT_UINT; TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1); break; case SGILOGDATAFMT_8BIT: - bps = 8, fmt = SAMPLEFORMAT_UINT; + bps = 8; + fmt = SAMPLEFORMAT_UINT; break; default: TIFFErrorExt(tif->tif_clientdata, tif->tif_name, diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_lzma.c b/thirdparty/tiff-4.2.0/libtiff/tif_lzma.c similarity index 96% rename from thirdparty/tiff-4.0.3/libtiff/tif_lzma.c rename to thirdparty/tiff-4.2.0/libtiff/tif_lzma.c index dedf1d94..e150bd63 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_lzma.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_lzma.c @@ -1,5 +1,3 @@ -/* $Id: tif_lzma.c,v 1.4 2011-12-22 00:29:29 bfriesen Exp $ */ - /* * Copyright (c) 2010, Andrey Kiselev * @@ -95,7 +93,7 @@ LZMAStrerror(lzma_ret ret) case LZMA_PROG_ERROR: return "programming error"; default: - return "unindentified liblzma error"; + return "unidentified liblzma error"; } } @@ -249,6 +247,7 @@ LZMAPreEncode(TIFF* tif, uint16 s) { static const char module[] = "LZMAPreEncode"; LZMAState *sp = EncoderState(tif); + lzma_ret ret; (void) s; assert(sp != NULL); @@ -262,7 +261,13 @@ LZMAPreEncode(TIFF* tif, uint16 s) "Liblzma cannot deal with buffers this size"); return 0; } - return (lzma_stream_encoder(&sp->stream, sp->filters, sp->check) == LZMA_OK); + ret = lzma_stream_encoder(&sp->stream, sp->filters, sp->check); + if (ret != LZMA_OK) { + TIFFErrorExt(tif->tif_clientdata, module, + "Error in lzma_stream_encoder(): %s", LZMAStrerror(ret)); + return 0; + } + return 1; } /* @@ -295,7 +300,8 @@ LZMAEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) } if (sp->stream.avail_out == 0) { tif->tif_rawcc = tif->tif_rawdatasize; - TIFFFlushData1(tif); + if (!TIFFFlushData1(tif)) + return 0; sp->stream.next_out = tif->tif_rawdata; sp->stream.avail_out = (size_t)tif->tif_rawdatasize; /* this is a safe typecast, as check is made already in LZMAPreEncode */ } @@ -323,7 +329,8 @@ LZMAPostEncode(TIFF* tif) if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) { tif->tif_rawcc = tif->tif_rawdatasize - sp->stream.avail_out; - TIFFFlushData1(tif); + if (!TIFFFlushData1(tif)) + return 0; sp->stream.next_out = tif->tif_rawdata; sp->stream.avail_out = (size_t)tif->tif_rawdatasize; /* this is a safe typecast, as check is made already in ZIPPreEncode */ } @@ -413,6 +420,7 @@ TIFFInitLZMA(TIFF* tif, int scheme) LZMAState* sp; lzma_stream tmp_stream = LZMA_STREAM_INIT; + (void)scheme; assert( scheme == COMPRESSION_LZMA ); /* @@ -490,6 +498,6 @@ bad: "No space for LZMA2 state block"); return 0; } -#endif /* LZMA_SUPORT */ +#endif /* LZMA_SUPPORT */ /* vim: set ts=8 sts=8 sw=8 noet: */ diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_lzw.c b/thirdparty/tiff-4.2.0/libtiff/tif_lzw.c similarity index 87% rename from thirdparty/tiff-4.0.3/libtiff/tif_lzw.c rename to thirdparty/tiff-4.2.0/libtiff/tif_lzw.c index fd9c7a0a..d92d0fd3 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_lzw.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_lzw.c @@ -1,5 +1,3 @@ -/* $Id: tif_lzw.c,v 1.45 2011-04-02 20:54:09 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -94,7 +92,7 @@ typedef struct { unsigned short nbits; /* # of bits/code */ unsigned short maxcode; /* maximum code for lzw_nbits */ unsigned short free_ent; /* next free entry in hash table */ - long nextdata; /* next bits of i/o */ + unsigned long nextdata; /* next bits of i/o */ long nextbits; /* # of valid bits in lzw_nextdata */ int rw_mode; /* preserve rw_mode from init */ @@ -135,6 +133,7 @@ typedef struct { long dec_restart; /* restart count */ #ifdef LZW_CHECKEOS uint64 dec_bitsleft; /* available bits in raw data */ + tmsize_t old_tif_rawcc; /* value of tif_rawcc at the end of the previous TIFLZWDecode() call */ #endif decodeFunc dec_decode; /* regular or backwards compatible */ code_t* dec_codep; /* current recognized code */ @@ -215,19 +214,16 @@ LZWSetupDecode(TIFF* tif) return (0); } - DecoderState(tif)->dec_codetab = NULL; - DecoderState(tif)->dec_decode = NULL; + sp = DecoderState(tif); + sp->dec_codetab = NULL; + sp->dec_decode = NULL; /* * Setup predictor setup. */ (void) TIFFPredictorInit(tif); - - sp = DecoderState(tif); } - assert(sp != NULL); - if (sp->dec_codetab == NULL) { sp->dec_codetab = (code_t*)_TIFFmalloc(CSIZE*sizeof (code_t)); if (sp->dec_codetab == NULL) { @@ -240,14 +236,16 @@ LZWSetupDecode(TIFF* tif) */ code = 255; do { - sp->dec_codetab[code].value = code; - sp->dec_codetab[code].firstchar = code; + sp->dec_codetab[code].value = (unsigned char)code; + sp->dec_codetab[code].firstchar = (unsigned char)code; sp->dec_codetab[code].length = 1; sp->dec_codetab[code].next = NULL; } while (code--); /* * Zero-out the unused entries */ + /* Silence false positive */ + /* coverity[overrun-buffer-arg] */ _TIFFmemset(&sp->dec_codetab[CODE_CLEAR], 0, (CODE_FIRST - CODE_CLEAR) * sizeof (code_t)); } @@ -268,12 +266,15 @@ LZWPreDecode(TIFF* tif, uint16 s) if( sp->dec_codetab == NULL ) { tif->tif_setupdecode( tif ); + if( sp->dec_codetab == NULL ) + return (0); } /* * Check for old bit-reversed codes. */ - if (tif->tif_rawdata[0] == 0 && (tif->tif_rawdata[1] & 0x1)) { + if (tif->tif_rawcc >= 2 && + tif->tif_rawdata[0] == 0 && (tif->tif_rawdata[1] & 0x1)) { #ifdef LZW_COMPAT if (!sp->dec_decode) { TIFFWarningExt(tif->tif_clientdata, module, @@ -316,7 +317,8 @@ LZWPreDecode(TIFF* tif, uint16 s) sp->dec_restart = 0; sp->dec_nbitsmask = MAXCODE(BITS_MIN); #ifdef LZW_CHECKEOS - sp->dec_bitsleft = ((uint64)tif->tif_rawcc) << 3; + sp->dec_bitsleft = 0; + sp->old_tif_rawcc = 0; #endif sp->dec_free_entp = sp->dec_codetab + CODE_FIRST; /* @@ -365,7 +367,8 @@ LZWDecode(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) unsigned char *bp; hcode_t code; int len; - long nbits, nextbits, nextdata, nbitsmask; + long nbits, nextbits, nbitsmask; + unsigned long nextdata; code_t *codep, *free_entp, *maxcodep, *oldcodep; (void) s; @@ -408,19 +411,23 @@ LZWDecode(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) /* * Residue satisfies only part of the decode request. */ - op += residue, occ -= residue; + op += residue; + occ -= residue; tp = op; do { int t; --tp; t = codep->value; codep = codep->next; - *tp = t; + *tp = (char)t; } while (--residue && codep); sp->dec_restart = 0; } bp = (unsigned char *)tif->tif_rawcp; +#ifdef LZW_CHECKEOS + sp->dec_bitsleft += (((uint64)tif->tif_rawcc - sp->old_tif_rawcc) << 3); +#endif nbits = sp->lzw_nbits; nextdata = sp->lzw_nextdata; nextbits = sp->lzw_nextbits; @@ -434,22 +441,25 @@ LZWDecode(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) if (code == CODE_EOI) break; if (code == CODE_CLEAR) { - free_entp = sp->dec_codetab + CODE_FIRST; - _TIFFmemset(free_entp, 0, - (CSIZE - CODE_FIRST) * sizeof (code_t)); - nbits = BITS_MIN; - nbitsmask = MAXCODE(BITS_MIN); - maxcodep = sp->dec_codetab + nbitsmask-1; - NextCode(tif, sp, bp, code, GetNextCode); + do { + free_entp = sp->dec_codetab + CODE_FIRST; + _TIFFmemset(free_entp, 0, + (CSIZE - CODE_FIRST) * sizeof (code_t)); + nbits = BITS_MIN; + nbitsmask = MAXCODE(BITS_MIN); + maxcodep = sp->dec_codetab + nbitsmask-1; + NextCode(tif, sp, bp, code, GetNextCode); + } while (code == CODE_CLEAR); /* consecutive CODE_CLEAR codes */ if (code == CODE_EOI) break; - if (code >= CODE_CLEAR) { + if (code > CODE_CLEAR) { TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "LZWDecode: Corrupted LZW table at scanline %d", tif->tif_row); return (0); } - *op++ = (char)code, occ--; + *op++ = (char)code; + occ--; oldcodep = sp->dec_codetab + code; continue; } @@ -527,19 +537,26 @@ LZWDecode(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) --tp; t = codep->value; codep = codep->next; - *tp = t; + *tp = (char)t; } while (codep && tp > op); if (codep) { codeLoop(tif, module); break; } assert(occ >= len); - op += len, occ -= len; - } else - *op++ = (char)code, occ--; + op += len; + occ -= len; + } else { + *op++ = (char)code; + occ--; + } } + tif->tif_rawcc -= (tmsize_t)( (uint8*) bp - tif->tif_rawcp ); tif->tif_rawcp = (uint8*) bp; +#ifdef LZW_CHECKEOS + sp->old_tif_rawcc = tif->tif_rawcc; +#endif sp->lzw_nbits = (unsigned short) nbits; sp->lzw_nextdata = nextdata; sp->lzw_nextbits = nextbits; @@ -589,6 +606,7 @@ LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) char *tp; unsigned char *bp; int code, nbits; + int len; long nextbits, nextdata, nbitsmask; code_t *codep, *free_entp, *maxcodep, *oldcodep; @@ -630,7 +648,8 @@ LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) /* * Residue satisfies only part of the decode request. */ - op += residue, occ -= residue; + op += residue; + occ -= residue; tp = op; do { *--tp = codep->value; @@ -640,6 +659,9 @@ LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) } bp = (unsigned char *)tif->tif_rawcp; +#ifdef LZW_CHECKEOS + sp->dec_bitsleft += (((uint64)tif->tif_rawcc - sp->old_tif_rawcc) << 3); +#endif nbits = sp->lzw_nbits; nextdata = sp->lzw_nextdata; nextbits = sp->lzw_nextbits; @@ -653,22 +675,25 @@ LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) if (code == CODE_EOI) break; if (code == CODE_CLEAR) { - free_entp = sp->dec_codetab + CODE_FIRST; - _TIFFmemset(free_entp, 0, - (CSIZE - CODE_FIRST) * sizeof (code_t)); - nbits = BITS_MIN; - nbitsmask = MAXCODE(BITS_MIN); - maxcodep = sp->dec_codetab + nbitsmask; - NextCode(tif, sp, bp, code, GetNextCodeCompat); + do { + free_entp = sp->dec_codetab + CODE_FIRST; + _TIFFmemset(free_entp, 0, + (CSIZE - CODE_FIRST) * sizeof (code_t)); + nbits = BITS_MIN; + nbitsmask = MAXCODE(BITS_MIN); + maxcodep = sp->dec_codetab + nbitsmask; + NextCode(tif, sp, bp, code, GetNextCodeCompat); + } while (code == CODE_CLEAR); /* consecutive CODE_CLEAR codes */ if (code == CODE_EOI) break; - if (code >= CODE_CLEAR) { + if (code > CODE_CLEAR) { TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "LZWDecode: Corrupted LZW table at scanline %d", tif->tif_row); return (0); } - *op++ = code, occ--; + *op++ = (char)code; + occ--; oldcodep = sp->dec_codetab + code; continue; } @@ -733,18 +758,30 @@ LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) } while (--occ); break; } - assert(occ >= codep->length); - op += codep->length, occ -= codep->length; - tp = op; + len = codep->length; + tp = op + len; do { - *--tp = codep->value; - } while( (codep = codep->next) != NULL ); - } else - *op++ = code, occ--; + int t; + --tp; + t = codep->value; + codep = codep->next; + *tp = (char)t; + } while (codep && tp > op); + assert(occ >= len); + op += len; + occ -= len; + } else { + *op++ = (char)code; + occ--; + } } + tif->tif_rawcc -= (tmsize_t)( (uint8*) bp - tif->tif_rawcp ); tif->tif_rawcp = (uint8*) bp; - sp->lzw_nbits = nbits; +#ifdef LZW_CHECKEOS + sp->old_tif_rawcc = tif->tif_rawcc; +#endif + sp->lzw_nbits = (unsigned short)nbits; sp->lzw_nextdata = nextdata; sp->lzw_nextbits = nextbits; sp->dec_nbitsmask = nbitsmask; @@ -830,13 +867,15 @@ LZWPreEncode(TIFF* tif, uint16 s) } else \ rat = (incount<<8) / outcount; \ } + +/* Explicit 0xff masking to make icc -check=conversions happy */ #define PutNextCode(op, c) { \ nextdata = (nextdata << nbits) | c; \ nextbits += nbits; \ - *op++ = (unsigned char)(nextdata >> (nextbits-8)); \ + *op++ = (unsigned char)((nextdata >> (nextbits-8))&0xff); \ nextbits -= 8; \ if (nextbits >= 8) { \ - *op++ = (unsigned char)(nextdata >> (nextbits-8)); \ + *op++ = (unsigned char)((nextdata >> (nextbits-8))&0xff); \ nextbits -= 8; \ } \ outcount += nbits; \ @@ -866,7 +905,8 @@ LZWEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) hcode_t ent; long disp; long incount, outcount, checkpoint; - long nextdata, nextbits; + unsigned long nextdata; + long nextbits; int free_ent, maxcode, nbits; uint8* op; uint8* limit; @@ -890,7 +930,7 @@ LZWEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) nbits = sp->lzw_nbits; op = tif->tif_rawcp; limit = sp->enc_rawlimit; - ent = sp->enc_oldcode; + ent = (hcode_t)sp->enc_oldcode; if (ent == (hcode_t) -1 && cc > 0) { /* @@ -926,7 +966,7 @@ LZWEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) disp = 1; do { /* - * Avoid pointer arithmetic 'cuz of + * Avoid pointer arithmetic because of * wraparound problems with segments. */ if ((h -= disp) < 0) @@ -949,12 +989,13 @@ LZWEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) */ if (op > limit) { tif->tif_rawcc = (tmsize_t)(op - tif->tif_rawdata); - TIFFFlushData1(tif); + if( !TIFFFlushData1(tif) ) + return 0; op = tif->tif_rawdata; } PutNextCode(op, ent); - ent = c; - hp->code = free_ent++; + ent = (hcode_t)c; + hp->code = (hcode_t)(free_ent++); hp->hash = fcode; if (free_ent == CODE_MAX-1) { /* table is full, emit clear code and reset */ @@ -1011,9 +1052,9 @@ LZWEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) sp->enc_oldcode = ent; sp->lzw_nextdata = nextdata; sp->lzw_nextbits = nextbits; - sp->lzw_free_ent = free_ent; - sp->lzw_maxcode = maxcode; - sp->lzw_nbits = nbits; + sp->lzw_free_ent = (unsigned short)free_ent; + sp->lzw_maxcode = (unsigned short)maxcode; + sp->lzw_nbits = (unsigned short)nbits; tif->tif_rawcp = op; return (1); } @@ -1028,22 +1069,43 @@ LZWPostEncode(TIFF* tif) register LZWCodecState *sp = EncoderState(tif); uint8* op = tif->tif_rawcp; long nextbits = sp->lzw_nextbits; - long nextdata = sp->lzw_nextdata; + unsigned long nextdata = sp->lzw_nextdata; long outcount = sp->enc_outcount; int nbits = sp->lzw_nbits; if (op > sp->enc_rawlimit) { tif->tif_rawcc = (tmsize_t)(op - tif->tif_rawdata); - TIFFFlushData1(tif); + if( !TIFFFlushData1(tif) ) + return 0; op = tif->tif_rawdata; } if (sp->enc_oldcode != (hcode_t) -1) { + int free_ent = sp->lzw_free_ent; + PutNextCode(op, sp->enc_oldcode); sp->enc_oldcode = (hcode_t) -1; + free_ent ++; + + if (free_ent == CODE_MAX-1) { + /* table is full, emit clear code and reset */ + outcount = 0; + PutNextCode(op, CODE_CLEAR); + nbits = BITS_MIN; + } else { + /* + * If the next entry is going to be too big for + * the code size, then increase it, if possible. + */ + if (free_ent > sp->lzw_maxcode) { + nbits++; + assert(nbits <= BITS_MAX); + } + } } PutNextCode(op, CODE_EOI); + /* Explicit 0xff masking to make icc -check=conversions happy */ if (nextbits > 0) - *op++ = (unsigned char)(nextdata << (8-nextbits)); + *op++ = (unsigned char)((nextdata << (8-nextbits))&0xff); tif->tif_rawcc = (tmsize_t)(op - tif->tif_rawdata); return (1); } @@ -1096,6 +1158,7 @@ int TIFFInitLZW(TIFF* tif, int scheme) { static const char module[] = "TIFFInitLZW"; + (void)scheme; assert(scheme == COMPRESSION_LZW); /* * Allocate state block so tag methods have storage to record values. @@ -1153,7 +1216,7 @@ bad: * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ #endif /* LZW_SUPPORT */ diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_next.c b/thirdparty/tiff-4.2.0/libtiff/tif_next.c similarity index 80% rename from thirdparty/tiff-4.0.3/libtiff/tif_next.c rename to thirdparty/tiff-4.2.0/libtiff/tif_next.c index 524e127c..0ba61aed 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_next.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_next.c @@ -1,5 +1,3 @@ -/* $Id: tif_next.c,v 1.13 2010-03-10 18:56:48 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -37,7 +35,7 @@ case 0: op[0] = (unsigned char) ((v) << 6); break; \ case 1: op[0] |= (v) << 4; break; \ case 2: op[0] |= (v) << 2; break; \ - case 3: *op++ |= (v); break; \ + case 3: *op++ |= (v); op_offset++; break; \ } \ } @@ -71,8 +69,9 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) TIFFErrorExt(tif->tif_clientdata, module, "Fractional scanlines cannot be read"); return (0); } - for (row = buf; occ > 0; occ -= scanline, row += scanline) { - n = *bp++, cc--; + for (row = buf; cc > 0 && occ > 0; occ -= scanline, row += scanline) { + n = *bp++; + cc--; switch (n) { case LITERALROW: /* @@ -90,6 +89,8 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) * The scanline has a literal span that begins at some * offset. */ + if( cc < 4 ) + goto bad; off = (bp[0] * 256) + bp[1]; n = (bp[2] * 256) + bp[3]; if (cc < 4+n || off+n > scanline) @@ -101,7 +102,10 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) } default: { uint32 npixels = 0, grey; + tmsize_t op_offset = 0; uint32 imagewidth = tif->tif_dir.td_imagewidth; + if( isTiled(tif) ) + imagewidth = tif->tif_dir.td_tilewidth; /* * The scanline is composed of a sequence of constant @@ -118,13 +122,19 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) * bounds, potentially resulting in a security * issue. */ - while (n-- > 0 && npixels < imagewidth) + while (n-- > 0 && npixels < imagewidth && op_offset < scanline) SETPIXEL(op, grey); if (npixels >= imagewidth) break; + if (op_offset >= scanline ) { + TIFFErrorExt(tif->tif_clientdata, module, "Invalid data for scanline %ld", + (long) tif->tif_row); + return (0); + } if (cc == 0) goto bad; - n = *bp++, cc--; + n = *bp++; + cc--; } break; } @@ -139,10 +149,27 @@ bad: return (0); } +static int +NeXTPreDecode(TIFF* tif, uint16 s) +{ + static const char module[] = "NeXTPreDecode"; + TIFFDirectory *td = &tif->tif_dir; + (void)s; + + if( td->td_bitspersample != 2 ) + { + TIFFErrorExt(tif->tif_clientdata, module, "Unsupported BitsPerSample = %d", + td->td_bitspersample); + return (0); + } + return (1); +} + int TIFFInitNeXT(TIFF* tif, int scheme) { (void) scheme; + tif->tif_predecode = NeXTPreDecode; tif->tif_decoderow = NeXTDecode; tif->tif_decodestrip = NeXTDecode; tif->tif_decodetile = NeXTDecode; diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_ojpeg.c b/thirdparty/tiff-4.2.0/libtiff/tif_ojpeg.c similarity index 91% rename from thirdparty/tiff-4.0.3/libtiff/tif_ojpeg.c rename to thirdparty/tiff-4.2.0/libtiff/tif_ojpeg.c index 6ea3c38b..133d1f1c 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_ojpeg.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_ojpeg.c @@ -1,5 +1,3 @@ -/* $Id: tif_ojpeg.c,v 1.56 2012-05-24 03:15:18 fwarmerdam Exp $ */ - /* WARNING: The type of JPEG encapsulation defined by the TIFF Version 6.0 specification is now totally obsolete and deprecated for new applications and images. This file was was created solely in order to read unconverted images @@ -39,7 +37,7 @@ OF THIS SOFTWARE. Joris Van Damme and/or AWare Systems may be available for custom - developement. If you like what you see, and need anything similar or related, + development. If you like what you see, and need anything similar or related, contact . */ @@ -75,8 +73,8 @@ OJPEGSubsamplingCorrect, making no note of any other data, reporting no warnings or errors, up to the point where either these values are read, or it's clear they aren't there. This means that some of the data is read twice, but we feel speed - in correcting these values is important enough to warrant this sacrifice. Allthough - there is currently no define or other configuration mechanism to disable this behaviour, + in correcting these values is important enough to warrant this sacrifice. Although + there is currently no define or other configuration mechanism to disable this behavior, the actual header scanning is build to robustly respond with error report if it should encounter an uncorrected mismatch of subsampling values. See OJPEGReadHeaderInfoSecStreamSof. @@ -84,7 +82,7 @@ The restart interval and restart markers are the most tricky part... The restart interval can be specified in a tag. It can also be set inside the input JPEG stream. It can be used inside the input JPEG stream. If reading from strile data, we've - consistenly discovered the need to insert restart markers in between the different + consistently discovered the need to insert restart markers in between the different striles, as is also probably the most likely interpretation of the original TIFF 6.0 specification. With all this setting of interval, and actual use of markers that is not predictable at the time of valid JPEG header assembly, the restart thing may turn @@ -113,7 +111,7 @@ planarconfig is not separate (vast majority). We may one day use that to build converters to JPEG, and/or to new-style JPEG compression inside TIFF. - A dissadvantage is the lack of random access to the individual striles. This is the + A disadvantage is the lack of random access to the individual striles. This is the reason for much of the complicated restart-and-position stuff inside OJPEGPreDecode. Applications would do well accessing all striles in order, as this will result in a single sequential scan of the input stream, and no restarting of LibJpeg decoding @@ -135,13 +133,13 @@ * The default mode, without JPEG_ENCAP_EXTERNAL, implements the call encapsulators * here, internally, with normal longjump. * SETJMP, LONGJMP, JMP_BUF: On some machines/environments a longjump equivalent is - * conviniently available, but still it may be worthwhile to use _setjmp or sigsetjmp + * conveniently available, but still it may be worthwhile to use _setjmp or sigsetjmp * in place of plain setjmp. These macros will make it easier. It is useless * to fiddle with these if you define JPEG_ENCAP_EXTERNAL. * OJPEG_BUFFER: Define the size of the desired buffer here. Should be small enough so as to guarantee * instant processing, optimal streaming and optimal use of processor cache, but also big * enough so as to not result in significant call overhead. It should be at least a few - * bytes to accomodate some structures (this is verified in asserts), but it would not be + * bytes to accommodate some structures (this is verified in asserts), but it would not be * sensible to make it this small anyway, and it should be at most 64K since it is indexed * with uint16. We recommend 2K. * EGYPTIANWALK: You could also define EGYPTIANWALK here, but it is not used anywhere and has @@ -200,7 +198,7 @@ static const TIFFField ojpegFields[] = { Libjpeg's jmorecfg.h defines INT16 and INT32, but only if XMD_H is not defined. Unfortunately, the MinGW and Borland compilers include a typedef for INT32, which causes a conflict. MSVC does not include - a conficting typedef given the headers which are included. + a conflicting typedef given the headers which are included. */ #if defined(__BORLANDC__) || defined(__MINGW32__) # define XMD_H 1 @@ -244,6 +242,8 @@ typedef enum { typedef struct { TIFF* tif; + int decoder_ok; + int error_in_raw_data_decoding; #ifndef LIBJPEG_ENCAP_EXTERNAL JMP_BUF exit_jmpbuf; #endif @@ -421,6 +421,7 @@ TIFFInitOJPEG(TIFF* tif, int scheme) static const char module[]="TIFFInitOJPEG"; OJPEGState* sp; + (void)scheme; assert(scheme==COMPRESSION_OJPEG); /* @@ -498,15 +499,15 @@ OJPEGVGetField(TIFF* tif, uint32 tag, va_list ap) break; case TIFFTAG_JPEGQTABLES: *va_arg(ap,uint32*)=(uint32)sp->qtable_offset_count; - *va_arg(ap,void**)=(void*)sp->qtable_offset; + *va_arg(ap,const void**)=(const void*)sp->qtable_offset; break; case TIFFTAG_JPEGDCTABLES: *va_arg(ap,uint32*)=(uint32)sp->dctable_offset_count; - *va_arg(ap,void**)=(void*)sp->dctable_offset; + *va_arg(ap,const void**)=(const void*)sp->dctable_offset; break; case TIFFTAG_JPEGACTABLES: *va_arg(ap,uint32*)=(uint32)sp->actable_offset_count; - *va_arg(ap,void**)=(void*)sp->actable_offset; + *va_arg(ap,const void**)=(const void*)sp->actable_offset; break; case TIFFTAG_JPEGPROC: *va_arg(ap,uint16*)=(uint16)sp->jpeg_proc; @@ -528,6 +529,8 @@ OJPEGVSetField(TIFF* tif, uint32 tag, va_list ap) uint32 ma; uint64* mb; uint32 n; + const TIFFField* fip; + switch(tag) { case TIFFTAG_JPEGIFOFFSET: @@ -597,7 +600,10 @@ OJPEGVSetField(TIFF* tif, uint32 tag, va_list ap) default: return (*sp->vsetparent)(tif,tag,ap); } - TIFFSetFieldBit(tif,TIFFFieldWithTag(tif,tag)->field_bit); + fip = TIFFFieldWithTag(tif,tag); + if( fip == NULL ) /* shouldn't happen */ + return(0); + TIFFSetFieldBit(tif,fip->field_bit); tif->tif_flags|=TIFF_DIRTYDIRECT; return(1); } @@ -653,7 +659,7 @@ static int OJPEGSetupDecode(TIFF* tif) { static const char module[]="OJPEGSetupDecode"; - TIFFWarningExt(tif->tif_clientdata,module,"Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software"); + TIFFWarningExt(tif->tif_clientdata,module,"Deprecated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software"); return(1); } @@ -674,7 +680,7 @@ OJPEGPreDecode(TIFF* tif, uint16 s) if (OJPEGReadSecondarySos(tif,s)==0) return(0); } - if isTiled(tif) + if (isTiled(tif)) m=tif->tif_curtile; else m=tif->tif_curstrip; @@ -717,6 +723,7 @@ OJPEGPreDecode(TIFF* tif, uint16 s) } sp->write_curstrile++; } + sp->decoder_ok = 1; return(1); } @@ -737,6 +744,7 @@ OJPEGPreDecodeSkipRaw(TIFF* tif) } m-=sp->subsampling_convert_clines-sp->subsampling_convert_state; sp->subsampling_convert_state=0; + sp->error_in_raw_data_decoding=0; } while (m>=sp->subsampling_convert_clines) { @@ -779,8 +787,18 @@ OJPEGPreDecodeSkipScanlines(TIFF* tif) static int OJPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) { + static const char module[]="OJPEGDecode"; OJPEGState* sp=(OJPEGState*)tif->tif_data; (void)s; + if( !sp->decoder_ok ) + { + TIFFErrorExt(tif->tif_clientdata,module,"Cannot decode: decoder not correctly initialized"); + return 0; + } + if( sp->error_in_raw_data_decoding ) + { + return 0; + } if (sp->libjpeg_jpeg_query_style==0) { if (OJPEGDecodeRaw(tif,buf,cc)==0) @@ -821,7 +839,10 @@ OJPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc) if (sp->subsampling_convert_state==0) { if (jpeg_read_raw_data_encap(sp,&(sp->libjpeg_jpeg_decompress_struct),sp->subsampling_convert_ycbcrimage,sp->subsampling_ver*8)==0) + { + sp->error_in_raw_data_decoding = 1; return(0); + } } oy=sp->subsampling_convert_ybuf+sp->subsampling_convert_state*sp->subsampling_ver*sp->subsampling_convert_ylinelen; ocb=sp->subsampling_convert_cbbuf+sp->subsampling_convert_state*sp->subsampling_convert_clinelen; @@ -979,7 +1000,6 @@ OJPEGSubsamplingCorrect(TIFF* tif) OJPEGState* sp=(OJPEGState*)tif->tif_data; uint8 mh; uint8 mv; - _TIFFFillStriles( tif ); assert(sp->subsamplingcorrect_done==0); if ((tif->tif_dir.td_samplesperpixel!=3) || ((tif->tif_dir.td_photometric!=PHOTOMETRIC_YCBCR) && @@ -1035,7 +1055,7 @@ OJPEGReadHeaderInfo(TIFF* tif) assert(sp->readheader_done==0); sp->image_width=tif->tif_dir.td_imagewidth; sp->image_length=tif->tif_dir.td_imagelength; - if isTiled(tif) + if (isTiled(tif)) { sp->strile_width=tif->tif_dir.td_tilewidth; sp->strile_length=tif->tif_dir.td_tilelength; @@ -1045,6 +1065,8 @@ OJPEGReadHeaderInfo(TIFF* tif) { sp->strile_width=sp->image_width; sp->strile_length=tif->tif_dir.td_rowsperstrip; + if( sp->strile_length == (uint32)-1 ) + sp->strile_length = sp->image_length; sp->strile_length_total=sp->image_length; } if (tif->tif_dir.td_samplesperpixel==1) @@ -1071,12 +1093,18 @@ OJPEGReadHeaderInfo(TIFF* tif) } if (sp->strile_lengthimage_length) { + if (((sp->subsampling_hor!=1) && (sp->subsampling_hor!=2) && (sp->subsampling_hor!=4)) || + ((sp->subsampling_ver!=1) && (sp->subsampling_ver!=2) && (sp->subsampling_ver!=4))) + { + TIFFErrorExt(tif->tif_clientdata,module,"Invalid subsampling values"); + return(0); + } if (sp->strile_length%(sp->subsampling_ver*8)!=0) { TIFFErrorExt(tif->tif_clientdata,module,"Incompatible vertical subsampling and image strip/tile length"); return(0); } - sp->restart_interval=((sp->strile_width+sp->subsampling_hor*8-1)/(sp->subsampling_hor*8))*(sp->strile_length/(sp->subsampling_ver*8)); + sp->restart_interval=(uint16)(((sp->strile_width+sp->subsampling_hor*8-1)/(sp->subsampling_hor*8))*(sp->strile_length/(sp->subsampling_ver*8))); } if (OJPEGReadHeaderInfoSec(tif)==0) return(0); @@ -1098,7 +1126,7 @@ OJPEGReadSecondarySos(TIFF* tif, uint16 s) assert(s<3); assert(sp->sos_end[0].log!=0); assert(sp->sos_end[s].log==0); - sp->plane_sample_offset=s-1; + sp->plane_sample_offset=(uint8)(s-1); while(sp->sos_end[sp->plane_sample_offset].log==0) sp->plane_sample_offset--; sp->in_buffer_source=sp->sos_end[sp->plane_sample_offset].in_buffer_source; @@ -1186,7 +1214,13 @@ OJPEGWriteHeaderInfo(TIFF* tif) sp->subsampling_convert_ybuflen=sp->subsampling_convert_ylinelen*sp->subsampling_convert_ylines; sp->subsampling_convert_cbuflen=sp->subsampling_convert_clinelen*sp->subsampling_convert_clines; sp->subsampling_convert_ycbcrbuflen=sp->subsampling_convert_ybuflen+2*sp->subsampling_convert_cbuflen; - sp->subsampling_convert_ycbcrbuf=_TIFFmalloc(sp->subsampling_convert_ycbcrbuflen); + /* The calloc is not normally necessary, except in some edge/broken cases */ + /* for example for a tiled image of height 1 with a tile height of 1 and subsampling_hor=subsampling_ver=2 */ + /* In that case, libjpeg will only fill the 8 first lines of the 16 lines */ + /* See https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16844 */ + /* Even if this case is allowed (?), its handling is broken because OJPEGPreDecode() should also likely */ + /* reset subsampling_convert_state to 0 when changing tile. */ + sp->subsampling_convert_ycbcrbuf=_TIFFcalloc(1, sp->subsampling_convert_ycbcrbuflen); if (sp->subsampling_convert_ycbcrbuf==0) { TIFFErrorExt(tif->tif_clientdata,module,"Out of memory"); @@ -1212,10 +1246,11 @@ OJPEGWriteHeaderInfo(TIFF* tif) *m++=sp->subsampling_convert_cbbuf+n*sp->subsampling_convert_clinelen; for (n=0; nsubsampling_convert_clines; n++) *m++=sp->subsampling_convert_crbuf+n*sp->subsampling_convert_clinelen; - sp->subsampling_convert_clinelenout=((sp->strile_width+sp->subsampling_hor-1)/sp->subsampling_hor); + sp->subsampling_convert_clinelenout=sp->strile_width/sp->subsampling_hor + ((sp->strile_width % sp->subsampling_hor) != 0 ? 1 : 0); sp->subsampling_convert_state=0; + sp->error_in_raw_data_decoding=0; sp->bytes_per_line=sp->subsampling_convert_clinelenout*(sp->subsampling_ver*sp->subsampling_hor+2); - sp->lines_per_strile=((sp->strile_length+sp->subsampling_ver-1)/sp->subsampling_ver); + sp->lines_per_strile=sp->strile_length/sp->subsampling_ver + ((sp->strile_length % sp->subsampling_ver) != 0 ? 1 : 0); sp->subsampling_convert_log=1; } } @@ -1229,6 +1264,26 @@ OJPEGWriteHeaderInfo(TIFF* tif) } if (jpeg_start_decompress_encap(sp,&(sp->libjpeg_jpeg_decompress_struct))==0) return(0); + if(sp->libjpeg_jpeg_decompress_struct.image_width != sp->strile_width ) { + TIFFErrorExt(tif->tif_clientdata,module, + "jpeg_start_decompress() returned image_width = %d, " + "expected %d", + sp->libjpeg_jpeg_decompress_struct.image_width, + sp->strile_width); + return 0; + } + if(sp->libjpeg_jpeg_decompress_struct.max_h_samp_factor != sp->subsampling_hor || + sp->libjpeg_jpeg_decompress_struct.max_v_samp_factor != sp->subsampling_ver) { + TIFFErrorExt(tif->tif_clientdata,module, + "jpeg_start_decompress() returned max_h_samp_factor = %d " + "and max_v_samp_factor = %d, expected %d and %d", + sp->libjpeg_jpeg_decompress_struct.max_h_samp_factor, + sp->libjpeg_jpeg_decompress_struct.max_v_samp_factor, + sp->subsampling_hor, + sp->subsampling_ver); + return 0; + } + sp->writeheader_done=1; return(1); } @@ -1261,7 +1316,9 @@ OJPEGReadHeaderInfoSec(TIFF* tif) } else { - if ((sp->jpeg_interchange_format_length==0) || (sp->jpeg_interchange_format+sp->jpeg_interchange_format_length>sp->file_size)) + if ((sp->jpeg_interchange_format_length==0) || + (sp->jpeg_interchange_format > TIFF_UINT64_MAX - sp->jpeg_interchange_format_length) || + (sp->jpeg_interchange_format+sp->jpeg_interchange_format_length>sp->file_size)) sp->jpeg_interchange_format_length=sp->file_size-sp->jpeg_interchange_format; } } @@ -1376,7 +1433,8 @@ OJPEGReadHeaderInfoSec(TIFF* tif) static int OJPEGReadHeaderInfoSecStreamDri(TIFF* tif) { - /* this could easilly cause trouble in some cases... but no such cases have occured sofar */ + /* This could easily cause trouble in some cases... but no such cases have + occurred so far */ static const char module[]="OJPEGReadHeaderInfoSecStreamDri"; OJPEGState* sp=(OJPEGState*)tif->tif_data; uint16 m; @@ -1492,14 +1550,17 @@ OJPEGReadHeaderInfoSecStreamDht(TIFF* tif) nb[sizeof(uint32)+1]=JPEG_MARKER_DHT; nb[sizeof(uint32)+2]=(m>>8); nb[sizeof(uint32)+3]=(m&255); - if (OJPEGReadBlock(sp,m-2,&nb[sizeof(uint32)+4])==0) + if (OJPEGReadBlock(sp,m-2,&nb[sizeof(uint32)+4])==0) { + _TIFFfree(nb); return(0); + } o=nb[sizeof(uint32)+4]; if ((o&240)==0) { if (3tif_clientdata,module,"Corrupt DHT marker in JPEG data"); + _TIFFfree(nb); return(0); } if (sp->dctable[o]!=0) @@ -1511,12 +1572,14 @@ OJPEGReadHeaderInfoSecStreamDht(TIFF* tif) if ((o&240)!=16) { TIFFErrorExt(tif->tif_clientdata,module,"Corrupt DHT marker in JPEG data"); + _TIFFfree(nb); return(0); } o&=15; if (3tif_clientdata,module,"Corrupt DHT marker in JPEG data"); + _TIFFfree(nb); return(0); } if (sp->actable[o]!=0) @@ -1769,9 +1832,14 @@ OJPEGReadHeaderInfoSecTablesQTable(TIFF* tif) ob[sizeof(uint32)+3]=67; ob[sizeof(uint32)+4]=m; TIFFSeekFile(tif,sp->qtable_offset[m],SEEK_SET); - p=TIFFReadFile(tif,&ob[sizeof(uint32)+5],64); + p=(uint32)TIFFReadFile(tif,&ob[sizeof(uint32)+5],64); if (p!=64) + { + _TIFFfree(ob); return(0); + } + if (sp->qtable[m]!=0) + _TIFFfree(sp->qtable[m]); sp->qtable[m]=ob; sp->sof_tq[m]=m; } @@ -1812,7 +1880,7 @@ OJPEGReadHeaderInfoSecTablesDcTable(TIFF* tif) } } TIFFSeekFile(tif,sp->dctable_offset[m],SEEK_SET); - p=TIFFReadFile(tif,o,16); + p=(uint32)TIFFReadFile(tif,o,16); if (p!=16) return(0); q=0; @@ -1828,14 +1896,19 @@ OJPEGReadHeaderInfoSecTablesDcTable(TIFF* tif) *(uint32*)rb=ra; rb[sizeof(uint32)]=255; rb[sizeof(uint32)+1]=JPEG_MARKER_DHT; - rb[sizeof(uint32)+2]=((19+q)>>8); + rb[sizeof(uint32)+2]=(uint8)((19+q)>>8); rb[sizeof(uint32)+3]=((19+q)&255); rb[sizeof(uint32)+4]=m; for (n=0; n<16; n++) rb[sizeof(uint32)+5+n]=o[n]; - p=TIFFReadFile(tif,&(rb[sizeof(uint32)+21]),q); + p=(uint32)TIFFReadFile(tif,&(rb[sizeof(uint32)+21]),q); if (p!=q) + { + _TIFFfree(rb); return(0); + } + if (sp->dctable[m]!=0) + _TIFFfree(sp->dctable[m]); sp->dctable[m]=rb; sp->sos_tda[m]=(m<<4); } @@ -1876,7 +1949,7 @@ OJPEGReadHeaderInfoSecTablesAcTable(TIFF* tif) } } TIFFSeekFile(tif,sp->actable_offset[m],SEEK_SET); - p=TIFFReadFile(tif,o,16); + p=(uint32)TIFFReadFile(tif,o,16); if (p!=16) return(0); q=0; @@ -1892,14 +1965,19 @@ OJPEGReadHeaderInfoSecTablesAcTable(TIFF* tif) *(uint32*)rb=ra; rb[sizeof(uint32)]=255; rb[sizeof(uint32)+1]=JPEG_MARKER_DHT; - rb[sizeof(uint32)+2]=((19+q)>>8); + rb[sizeof(uint32)+2]=(uint8)((19+q)>>8); rb[sizeof(uint32)+3]=((19+q)&255); rb[sizeof(uint32)+4]=(16|m); for (n=0; n<16; n++) rb[sizeof(uint32)+5+n]=o[n]; - p=TIFFReadFile(tif,&(rb[sizeof(uint32)+21]),q); + p=(uint32)TIFFReadFile(tif,&(rb[sizeof(uint32)+21]),q); if (p!=q) + { + _TIFFfree(rb); return(0); + } + if (sp->actable[m]!=0) + _TIFFfree(sp->actable[m]); sp->actable[m]=rb; sp->sos_tda[m]=(sp->sos_tda[m]|m); } @@ -1955,33 +2033,32 @@ OJPEGReadBufferFill(OJPEGState* sp) break; case osibsJpegInterchangeFormat: sp->in_buffer_source=osibsStrile; + break; case osibsStrile: - if (!_TIFFFillStriles( sp->tif ) - || sp->tif->tif_dir.td_stripoffset == NULL - || sp->tif->tif_dir.td_stripbytecount == NULL) - return 0; - if (sp->in_buffer_next_strile==sp->in_buffer_strile_count) sp->in_buffer_source=osibsEof; else { - sp->in_buffer_file_pos=sp->tif->tif_dir.td_stripoffset[sp->in_buffer_next_strile]; + int err = 0; + sp->in_buffer_file_pos=TIFFGetStrileOffsetWithErr(sp->tif, sp->in_buffer_next_strile, &err); + if( err ) + return 0; if (sp->in_buffer_file_pos!=0) { + uint64 bytecount = TIFFGetStrileByteCountWithErr(sp->tif, sp->in_buffer_next_strile, &err); + if( err ) + return 0; if (sp->in_buffer_file_pos>=sp->file_size) sp->in_buffer_file_pos=0; - else if (sp->tif->tif_dir.td_stripbytecount==NULL) + else if (bytecount==0) sp->in_buffer_file_togo=sp->file_size-sp->in_buffer_file_pos; else { - if (sp->tif->tif_dir.td_stripbytecount == 0) { - TIFFErrorExt(sp->tif->tif_clientdata,sp->tif->tif_name,"Strip byte counts are missing"); - return(0); - } - sp->in_buffer_file_togo=sp->tif->tif_dir.td_stripbytecount[sp->in_buffer_next_strile]; + sp->in_buffer_file_togo=bytecount; if (sp->in_buffer_file_togo==0) sp->in_buffer_file_pos=0; - else if (sp->in_buffer_file_pos+sp->in_buffer_file_togo>sp->file_size) + else if (sp->in_buffer_file_pos > TIFF_UINT64_MAX - sp->in_buffer_file_togo || + sp->in_buffer_file_pos+sp->in_buffer_file_togo>sp->file_size) sp->in_buffer_file_togo=sp->file_size-sp->in_buffer_file_pos; } } @@ -2258,10 +2335,10 @@ OJPEGWriteStreamSof(TIFF* tif, void** mem, uint32* len) /* P */ sp->out_buffer[4]=8; /* Y */ - sp->out_buffer[5]=(sp->sof_y>>8); + sp->out_buffer[5]=(uint8)(sp->sof_y>>8); sp->out_buffer[6]=(sp->sof_y&255); /* X */ - sp->out_buffer[7]=(sp->sof_x>>8); + sp->out_buffer[7]=(uint8)(sp->sof_x>>8); sp->out_buffer[8]=(sp->sof_x&255); /* Nf */ sp->out_buffer[9]=sp->samples_per_pixel_per_plane; @@ -2374,7 +2451,12 @@ OJPEGWriteStreamEoi(TIFF* tif, void** mem, uint32* len) static int jpeg_create_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo) { - return(SETJMP(sp->exit_jmpbuf)?0:(jpeg_create_decompress(cinfo),1)); + if( SETJMP(sp->exit_jmpbuf) ) + return 0; + else { + jpeg_create_decompress(cinfo); + return 1; + } } #endif @@ -2382,7 +2464,12 @@ jpeg_create_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo) static int jpeg_read_header_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, uint8 require_image) { - return(SETJMP(sp->exit_jmpbuf)?0:(jpeg_read_header(cinfo,require_image),1)); + if( SETJMP(sp->exit_jmpbuf) ) + return 0; + else { + jpeg_read_header(cinfo,require_image); + return 1; + } } #endif @@ -2390,7 +2477,12 @@ jpeg_read_header_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, uint8 requ static int jpeg_start_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo) { - return(SETJMP(sp->exit_jmpbuf)?0:(jpeg_start_decompress(cinfo),1)); + if( SETJMP(sp->exit_jmpbuf) ) + return 0; + else { + jpeg_start_decompress(cinfo); + return 1; + } } #endif @@ -2398,7 +2490,12 @@ jpeg_start_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo) static int jpeg_read_scanlines_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, void* scanlines, uint32 max_lines) { - return(SETJMP(sp->exit_jmpbuf)?0:(jpeg_read_scanlines(cinfo,scanlines,max_lines),1)); + if( SETJMP(sp->exit_jmpbuf) ) + return 0; + else { + jpeg_read_scanlines(cinfo,scanlines,max_lines); + return 1; + } } #endif @@ -2406,7 +2503,12 @@ jpeg_read_scanlines_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, void* s static int jpeg_read_raw_data_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, void* data, uint32 max_lines) { - return(SETJMP(sp->exit_jmpbuf)?0:(jpeg_read_raw_data(cinfo,data,max_lines),1)); + if( SETJMP(sp->exit_jmpbuf) ) + return 0; + else { + jpeg_read_raw_data(cinfo,data,max_lines); + return 1; + } } #endif @@ -2468,6 +2570,10 @@ OJPEGLibjpegJpegSourceMgrSkipInputData(jpeg_decompress_struct* cinfo, long num_b jpeg_encap_unwind(tif); } +#ifdef _MSC_VER +#pragma warning( push ) +#pragma warning( disable : 4702 ) /* unreachable code */ +#endif static boolean OJPEGLibjpegJpegSourceMgrResyncToRestart(jpeg_decompress_struct* cinfo, int desired) { @@ -2477,6 +2583,9 @@ OJPEGLibjpegJpegSourceMgrResyncToRestart(jpeg_decompress_struct* cinfo, int desi jpeg_encap_unwind(tif); return(0); } +#ifdef _MSC_VER +#pragma warning( pop ) +#endif static void OJPEGLibjpegJpegSourceMgrTermSource(jpeg_decompress_struct* cinfo) diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_open.c b/thirdparty/tiff-4.2.0/libtiff/tif_open.c similarity index 93% rename from thirdparty/tiff-4.0.3/libtiff/tif_open.c rename to thirdparty/tiff-4.2.0/libtiff/tif_open.c index 8c88328c..a0e31583 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_open.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_open.c @@ -1,5 +1,3 @@ -/* $Id: tif_open.c,v 1.46 2010-12-06 16:54:54 faxguy Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -106,6 +104,7 @@ TIFFClientOpen( } n; n.a8[0]=1; n.a8[1]=0; + (void)n; #ifdef WORDS_BIGENDIAN assert(n.a16==256); #else @@ -133,6 +132,7 @@ TIFFClientOpen( if (!readproc || !writeproc || !seekproc || !closeproc || !sizeproc) { TIFFErrorExt(clientdata, module, "One of the client procedures is NULL pointer."); + _TIFFfree(tif); goto bad2; } tif->tif_readproc = readproc; @@ -166,9 +166,9 @@ TIFFClientOpen( /* * Process library-specific flags in the open mode string. * The following flags may be used to control intrinsic library - * behaviour that may or may not be desirable (usually for + * behavior that may or may not be desirable (usually for * compatibility with some application that claims to support - * TIFF but only supports some braindead idea of what the + * TIFF but only supports some brain dead idea of what the * vendor thinks TIFF is): * * 'l' use little-endian byte order for creating a file @@ -183,6 +183,8 @@ TIFFClientOpen( * 'h' read TIFF header only, do not load the first IFD * '4' ClassicTIFF for creating a file (default) * '8' BigTIFF for creating a file + * 'D' enable use of deferred strip/tile offset/bytecount array loading. + * 'O' on-demand loading of values instead of whole array loading (implies D) * * The use of the 'l' and 'b' flags is strongly discouraged. * These flags are provided solely because numerous vendors, @@ -198,14 +200,14 @@ TIFFClientOpen( * The 'L', 'B', and 'H' flags are intended for applications * that can optimize operations on data by using a particular * bit order. By default the library returns data in MSB2LSB - * bit order for compatibiltiy with older versions of this - * library. Returning data in the bit order of the native cpu + * bit order for compatibility with older versions of this + * library. Returning data in the bit order of the native CPU * makes the most sense but also requires applications to check * the value of the FillOrder tag; something they probably do * not do right now. * * The 'M' and 'm' flags are provided because some virtual memory - * systems exhibit poor behaviour when large images are mapped. + * systems exhibit poor behavior when large images are mapped. * These options permit clients to control the use of memory-mapped * files on a per-file basis. * @@ -264,7 +266,22 @@ TIFFClientOpen( if (m&O_CREAT) tif->tif_flags |= TIFF_BIGTIFF; break; + case 'D': + tif->tif_flags |= TIFF_DEFERSTRILELOAD; + break; + case 'O': + if( m == O_RDONLY ) + tif->tif_flags |= (TIFF_LAZYSTRILELOAD | TIFF_DEFERSTRILELOAD); + break; } + +#ifdef DEFER_STRILE_LOAD + /* Compatibility with old DEFER_STRILE_LOAD compilation flag */ + /* Probably unneeded, since to the best of my knowledge (E. Rouault) */ + /* GDAL was the only user of this, and will now use the new 'D' flag */ + tif->tif_flags |= TIFF_DEFERSTRILELOAD; +#endif + /* * Read in TIFF header. */ @@ -279,10 +296,10 @@ TIFFClientOpen( * Setup header and write. */ #ifdef WORDS_BIGENDIAN - tif->tif_header.common.tiff_magic = tif->tif_flags & TIFF_SWAB + tif->tif_header.common.tiff_magic = (tif->tif_flags & TIFF_SWAB) ? TIFF_LITTLEENDIAN : TIFF_BIGENDIAN; #else - tif->tif_header.common.tiff_magic = tif->tif_flags & TIFF_SWAB + tif->tif_header.common.tiff_magic = (tif->tif_flags & TIFF_SWAB) ? TIFF_BIGENDIAN : TIFF_LITTLEENDIAN; #endif if (!(tif->tif_flags&TIFF_BIGTIFF)) diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_packbits.c b/thirdparty/tiff-4.2.0/libtiff/tif_packbits.c similarity index 95% rename from thirdparty/tiff-4.0.3/libtiff/tif_packbits.c rename to thirdparty/tiff-4.2.0/libtiff/tif_packbits.c index 9e771901..a8f29e87 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_packbits.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_packbits.c @@ -1,5 +1,3 @@ -/* $Id: tif_packbits.c,v 1.22 2012-06-20 05:25:33 fwarmerdam Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -38,7 +36,8 @@ PackBitsPreEncode(TIFF* tif, uint16 s) { (void) s; - if (!(tif->tif_data = (uint8*)_TIFFmalloc(sizeof(tmsize_t)))) + tif->tif_data = (uint8*)_TIFFmalloc(sizeof(tmsize_t)); + if (tif->tif_data == NULL) return (0); /* * Calculate the scanline/tile-width size in bytes. @@ -81,7 +80,9 @@ PackBitsEncode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) /* * Find the longest string of identical bytes. */ - b = *bp++, cc--, n = 1; + b = *bp++; + cc--; + n = 1; for (; cc > 0 && b == *bp; cc--, bp++) n++; again: @@ -96,7 +97,7 @@ PackBitsEncode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) slop = (long)(op - lastliteral); tif->tif_rawcc += (tmsize_t)(lastliteral - tif->tif_rawcp); if (!TIFFFlushData1(tif)) - return (-1); + return (0); op = tif->tif_rawcp; while (slop-- > 0) *op++ = *lastliteral++; @@ -104,7 +105,7 @@ PackBitsEncode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s) } else { tif->tif_rawcc += (tmsize_t)(op - tif->tif_rawcp); if (!TIFFFlushData1(tif)) - return (-1); + return (0); op = tif->tif_rawcp; } } @@ -222,7 +223,8 @@ PackBitsDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) bp = (char*) tif->tif_rawcp; cc = tif->tif_rawcc; while (cc > 0 && occ > 0) { - n = (long) *bp++, cc--; + n = (long) *bp++; + cc--; /* * Watch out for compilers that * don't sign extend chars... @@ -240,8 +242,15 @@ PackBitsDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) (unsigned long) ((tmsize_t)n - occ)); n = (long)occ; } + if( cc == 0 ) + { + TIFFWarningExt(tif->tif_clientdata, module, + "Terminating PackBitsDecode due to lack of data."); + break; + } occ -= n; - b = *bp++, cc--; + b = *bp++; + cc--; while (n-- > 0) *op++ = (uint8) b; } else { /* copy next n+1 bytes literally */ diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_pixarlog.c b/thirdparty/tiff-4.2.0/libtiff/tif_pixarlog.c similarity index 85% rename from thirdparty/tiff-4.0.3/libtiff/tif_pixarlog.c rename to thirdparty/tiff-4.2.0/libtiff/tif_pixarlog.c index e5831170..f2912015 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_pixarlog.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_pixarlog.c @@ -1,5 +1,3 @@ -/* $Id: tif_pixarlog.c,v 1.38 2012-06-21 01:01:53 fwarmerdam Exp $ */ - /* * Copyright (c) 1996-1997 Sam Leffler * Copyright (c) 1996 Pixar @@ -45,15 +43,15 @@ * input is assumed to be unsigned linear color values that represent * the range 0-1. In the case of IEEE values, the 0-1 range is assumed to * be the normal linear color range, in addition over 1 values are - * accepted up to a value of about 25.0 to encode "hot" hightlights and such. + * accepted up to a value of about 25.0 to encode "hot" highlights and such. * The encoding is lossless for 8-bit values, slightly lossy for the * other bit depths. The actual color precision should be better * than the human eye can perceive with extra room to allow for * error introduced by further image computation. As with any quantized * color format, it is possible to perform image calculations which * expose the quantization error. This format should certainly be less - * susceptable to such errors than standard 8-bit encodings, but more - * susceptable than straight 16-bit or 32-bit encodings. + * susceptible to such errors than standard 8-bit encodings, but more + * susceptible than straight 16-bit or 32-bit encodings. * * On reading the internal format is converted to the desired output format. * The program can request which format it desires by setting the internal @@ -296,33 +294,35 @@ horizontalAccumulate16(uint16 *wp, int n, int stride, uint16 *op, static void horizontalAccumulate11(uint16 *wp, int n, int stride, uint16 *op) { - register unsigned int cr, cg, cb, ca, mask; + register unsigned int cr, cg, cb, ca, mask; if (n >= stride) { mask = CODE_MASK; if (stride == 3) { - op[0] = cr = wp[0]; op[1] = cg = wp[1]; op[2] = cb = wp[2]; + op[0] = wp[0]; op[1] = wp[1]; op[2] = wp[2]; + cr = wp[0]; cg = wp[1]; cb = wp[2]; n -= 3; while (n > 0) { wp += 3; op += 3; n -= 3; - op[0] = (cr += wp[0]) & mask; - op[1] = (cg += wp[1]) & mask; - op[2] = (cb += wp[2]) & mask; + op[0] = (uint16)((cr += wp[0]) & mask); + op[1] = (uint16)((cg += wp[1]) & mask); + op[2] = (uint16)((cb += wp[2]) & mask); } } else if (stride == 4) { - op[0] = cr = wp[0]; op[1] = cg = wp[1]; - op[2] = cb = wp[2]; op[3] = ca = wp[3]; + op[0] = wp[0]; op[1] = wp[1]; + op[2] = wp[2]; op[3] = wp[3]; + cr = wp[0]; cg = wp[1]; cb = wp[2]; ca = wp[3]; n -= 4; while (n > 0) { wp += 4; op += 4; n -= 4; - op[0] = (cr += wp[0]) & mask; - op[1] = (cg += wp[1]) & mask; - op[2] = (cb += wp[2]) & mask; - op[3] = (ca += wp[3]) & mask; + op[0] = (uint16)((cr += wp[0]) & mask); + op[1] = (uint16)((cg += wp[1]) & mask); + op[2] = (uint16)((cb += wp[2]) & mask); + op[3] = (uint16)((ca += wp[3]) & mask); } } else { REPEAT(stride, *op = *wp&mask; wp++; op++) @@ -457,6 +457,7 @@ horizontalAccumulate8abgr(uint16 *wp, int n, int stride, unsigned char *op, typedef struct { TIFFPredictorState predict; z_stream stream; + tmsize_t tbuf_size; /* only set/used on reading for now */ uint16 *tbuf; uint16 stride; int state; @@ -556,7 +557,7 @@ PixarLogMakeTables(PixarLogState *sp) for (i = 0; i < lt2size; i++) { if ((i*linstep)*(i*linstep) > ToLinearF[j]*ToLinearF[j+1]) j++; - FromLT2[i] = j; + FromLT2[i] = (uint16)j; } /* @@ -568,14 +569,14 @@ PixarLogMakeTables(PixarLogState *sp) for (i = 0; i < 16384; i++) { while ((i/16383.)*(i/16383.) > ToLinearF[j]*ToLinearF[j+1]) j++; - From14[i] = j; + From14[i] = (uint16)j; } j = 0; for (i = 0; i < 256; i++) { while ((i/255.)*(i/255.) > ToLinearF[j]*ToLinearF[j+1]) j++; - From8[i] = j; + From8[i] = (uint16)j; } Fltsize = (float)(lt2size/2); @@ -636,12 +637,20 @@ PixarLogGuessDataFmt(TIFFDirectory *td) static tmsize_t multiply_ms(tmsize_t m1, tmsize_t m2) { - tmsize_t bytes = m1 * m2; + return _TIFFMultiplySSize(NULL, m1, m2, NULL); +} - if (m1 && bytes / m1 != m2) - bytes = 0; +static tmsize_t +add_ms(tmsize_t m1, tmsize_t m2) +{ + assert(m1 >= 0 && m2 >= 0); + /* if either input is zero, assume overflow already occurred */ + if (m1 == 0 || m2 == 0) + return 0; + else if (m1 > TIFF_TMSIZE_T_MAX - m2) + return 0; - return bytes; + return m1 + m2; } static int @@ -658,9 +667,20 @@ PixarLogSetupDecode(TIFF* tif) TIFFDirectory *td = &tif->tif_dir; PixarLogState* sp = DecoderState(tif); tmsize_t tbuf_size; + uint32 strip_height; assert(sp != NULL); + /* This function can possibly be called several times by */ + /* PredictorSetupDecode() if this function succeeds but */ + /* PredictorSetup() fails */ + if( (sp->state & PLSTATE_INIT) != 0 ) + return 1; + + strip_height = td->td_rowsperstrip; + if( strip_height > td->td_imagelength ) + strip_height = td->td_imagelength; + /* Make sure no byte swapping happens on the data * after decompression. */ tif->tif_postdecode = _TIFFNoPostDecode; @@ -670,15 +690,21 @@ PixarLogSetupDecode(TIFF* tif) sp->stride = (td->td_planarconfig == PLANARCONFIG_CONTIG ? td->td_samplesperpixel : 1); tbuf_size = multiply_ms(multiply_ms(multiply_ms(sp->stride, td->td_imagewidth), - td->td_rowsperstrip), sizeof(uint16)); + strip_height), sizeof(uint16)); + /* add one more stride in case input ends mid-stride */ + tbuf_size = add_ms(tbuf_size, sizeof(uint16) * sp->stride); if (tbuf_size == 0) return (0); /* TODO: this is an error return without error report through TIFFErrorExt */ - sp->tbuf = (uint16 *) _TIFFmalloc(tbuf_size+sizeof(uint16)*sp->stride); + sp->tbuf = (uint16 *) _TIFFmalloc(tbuf_size); if (sp->tbuf == NULL) return (0); + sp->tbuf_size = tbuf_size; if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) sp->user_datafmt = PixarLogGuessDataFmt(td); if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) { + _TIFFfree(sp->tbuf); + sp->tbuf = NULL; + sp->tbuf_size = 0; TIFFErrorExt(tif->tif_clientdata, module, "PixarLog compression can't handle bits depth/data format combination (depth: %d)", td->td_bitspersample); @@ -686,7 +712,10 @@ PixarLogSetupDecode(TIFF* tif) } if (inflateInit(&sp->stream) != Z_OK) { - TIFFErrorExt(tif->tif_clientdata, module, "%s", sp->stream.msg); + _TIFFfree(sp->tbuf); + sp->tbuf = NULL; + sp->tbuf_size = 0; + TIFFErrorExt(tif->tif_clientdata, module, "%s", sp->stream.msg ? sp->stream.msg : "(null)"); return (0); } else { sp->state |= PLSTATE_INIT; @@ -709,7 +738,7 @@ PixarLogPreDecode(TIFF* tif, uint16 s) assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised, we need to simplify this code to reflect a ZLib that is likely updated to deal with 8byte memory sizes, though this code will respond - apropriately even before we simplify it */ + appropriately even before we simplify it */ sp->stream.avail_in = (uInt) tif->tif_rawcc; if ((tmsize_t)sp->stream.avail_in != tif->tif_rawcc) { @@ -754,17 +783,27 @@ PixarLogDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) (void) s; assert(sp != NULL); + + sp->stream.next_in = tif->tif_rawcp; + sp->stream.avail_in = (uInt) tif->tif_rawcc; + sp->stream.next_out = (unsigned char *) sp->tbuf; assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised, we need to simplify this code to reflect a ZLib that is likely updated to deal with 8byte memory sizes, though this code will respond - apropriately even before we simplify it */ + appropriately even before we simplify it */ sp->stream.avail_out = (uInt) (nsamples * sizeof(uint16)); if (sp->stream.avail_out != nsamples * sizeof(uint16)) { TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size"); return (0); } + /* Check that we will not fill more than what was allocated */ + if ((tmsize_t)sp->stream.avail_out > sp->tbuf_size) + { + TIFFErrorExt(tif->tif_clientdata, module, "sp->stream.avail_out > sp->tbuf_size"); + return (0); + } do { int state = inflate(&sp->stream, Z_PARTIAL_FLUSH); if (state == Z_STREAM_END) { @@ -773,14 +812,12 @@ PixarLogDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) if (state == Z_DATA_ERROR) { TIFFErrorExt(tif->tif_clientdata, module, "Decoding error at scanline %lu, %s", - (unsigned long) tif->tif_row, sp->stream.msg); - if (inflateSync(&sp->stream) != Z_OK) - return (0); - continue; + (unsigned long) tif->tif_row, sp->stream.msg ? sp->stream.msg : "(null)"); + return (0); } if (state != Z_OK) { TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s", - sp->stream.msg); + sp->stream.msg ? sp->stream.msg : "(null)"); return (0); } } while (sp->stream.avail_out > 0); @@ -793,6 +830,9 @@ PixarLogDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) return (0); } + tif->tif_rawcp = sp->stream.next_in; + tif->tif_rawcc = sp->stream.avail_in; + up = sp->tbuf; /* Swap bytes in the data if from a different endian machine. */ if (tif->tif_flags & TIFF_SWAB) @@ -882,7 +922,7 @@ PixarLogSetupEncode(TIFF* tif) } if (deflateInit(&sp->stream, sp->quality) != Z_OK) { - TIFFErrorExt(tif->tif_clientdata, module, "%s", sp->stream.msg); + TIFFErrorExt(tif->tif_clientdata, module, "%s", sp->stream.msg ? sp->stream.msg : "(null)"); return (0); } else { sp->state |= PLSTATE_INIT; @@ -905,8 +945,8 @@ PixarLogPreEncode(TIFF* tif, uint16 s) assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised, we need to simplify this code to reflect a ZLib that is likely updated to deal with 8byte memory sizes, though this code will respond - apropriately even before we simplify it */ - sp->stream.avail_out = tif->tif_rawdatasize; + appropriately even before we simplify it */ + sp->stream.avail_out = (uInt)tif->tif_rawdatasize; if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) { TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size"); @@ -937,9 +977,9 @@ horizontalDifferenceF(float *ip, int n, int stride, uint16 *wp, uint16 *FromLT2) n -= 3; wp += 3; ip += 3; - r1 = (int32) CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1; - g1 = (int32) CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1; - b1 = (int32) CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1; + r1 = (int32) CLAMP(ip[0]); wp[0] = (uint16)((r1-r2) & mask); r2 = r1; + g1 = (int32) CLAMP(ip[1]); wp[1] = (uint16)((g1-g2) & mask); g2 = g1; + b1 = (int32) CLAMP(ip[2]); wp[2] = (uint16)((b1-b2) & mask); b2 = b1; } } else if (stride == 4) { r2 = wp[0] = (uint16) CLAMP(ip[0]); @@ -951,23 +991,20 @@ horizontalDifferenceF(float *ip, int n, int stride, uint16 *wp, uint16 *FromLT2) n -= 4; wp += 4; ip += 4; - r1 = (int32) CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1; - g1 = (int32) CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1; - b1 = (int32) CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1; - a1 = (int32) CLAMP(ip[3]); wp[3] = (a1-a2) & mask; a2 = a1; + r1 = (int32) CLAMP(ip[0]); wp[0] = (uint16)((r1-r2) & mask); r2 = r1; + g1 = (int32) CLAMP(ip[1]); wp[1] = (uint16)((g1-g2) & mask); g2 = g1; + b1 = (int32) CLAMP(ip[2]); wp[2] = (uint16)((b1-b2) & mask); b2 = b1; + a1 = (int32) CLAMP(ip[3]); wp[3] = (uint16)((a1-a2) & mask); a2 = a1; } } else { - ip += n - 1; /* point to last one */ - wp += n - 1; /* point to last one */ - n -= stride; - while (n > 0) { - REPEAT(stride, wp[0] = (uint16) CLAMP(ip[0]); - wp[stride] -= wp[0]; - wp[stride] &= mask; - wp--; ip--) - n -= stride; - } - REPEAT(stride, wp[0] = (uint16) CLAMP(ip[0]); wp--; ip--) + REPEAT(stride, wp[0] = (uint16) CLAMP(ip[0]); wp++; ip++) + n -= stride; + while (n > 0) { + REPEAT(stride, + wp[0] = (uint16)(((int32)CLAMP(ip[0])-(int32)CLAMP(ip[-stride])) & mask); + wp++; ip++) + n -= stride; + } } } } @@ -992,9 +1029,9 @@ horizontalDifference16(unsigned short *ip, int n, int stride, n -= 3; wp += 3; ip += 3; - r1 = CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1; - g1 = CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1; - b1 = CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1; + r1 = CLAMP(ip[0]); wp[0] = (uint16)((r1-r2) & mask); r2 = r1; + g1 = CLAMP(ip[1]); wp[1] = (uint16)((g1-g2) & mask); g2 = g1; + b1 = CLAMP(ip[2]); wp[2] = (uint16)((b1-b2) & mask); b2 = b1; } } else if (stride == 4) { r2 = wp[0] = CLAMP(ip[0]); g2 = wp[1] = CLAMP(ip[1]); @@ -1004,23 +1041,20 @@ horizontalDifference16(unsigned short *ip, int n, int stride, n -= 4; wp += 4; ip += 4; - r1 = CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1; - g1 = CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1; - b1 = CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1; - a1 = CLAMP(ip[3]); wp[3] = (a1-a2) & mask; a2 = a1; + r1 = CLAMP(ip[0]); wp[0] = (uint16)((r1-r2) & mask); r2 = r1; + g1 = CLAMP(ip[1]); wp[1] = (uint16)((g1-g2) & mask); g2 = g1; + b1 = CLAMP(ip[2]); wp[2] = (uint16)((b1-b2) & mask); b2 = b1; + a1 = CLAMP(ip[3]); wp[3] = (uint16)((a1-a2) & mask); a2 = a1; } } else { - ip += n - 1; /* point to last one */ - wp += n - 1; /* point to last one */ + REPEAT(stride, wp[0] = CLAMP(ip[0]); wp++; ip++) n -= stride; while (n > 0) { - REPEAT(stride, wp[0] = CLAMP(ip[0]); - wp[stride] -= wp[0]; - wp[stride] &= mask; - wp--; ip--) - n -= stride; - } - REPEAT(stride, wp[0] = CLAMP(ip[0]); wp--; ip--) + REPEAT(stride, + wp[0] = (uint16)((CLAMP(ip[0])-CLAMP(ip[-stride])) & mask); + wp++; ip++) + n -= stride; + } } } } @@ -1043,9 +1077,9 @@ horizontalDifference8(unsigned char *ip, int n, int stride, n -= 3; while (n > 0) { n -= 3; - r1 = CLAMP(ip[3]); wp[3] = (r1-r2) & mask; r2 = r1; - g1 = CLAMP(ip[4]); wp[4] = (g1-g2) & mask; g2 = g1; - b1 = CLAMP(ip[5]); wp[5] = (b1-b2) & mask; b2 = b1; + r1 = CLAMP(ip[3]); wp[3] = (uint16)((r1-r2) & mask); r2 = r1; + g1 = CLAMP(ip[4]); wp[4] = (uint16)((g1-g2) & mask); g2 = g1; + b1 = CLAMP(ip[5]); wp[5] = (uint16)((b1-b2) & mask); b2 = b1; wp += 3; ip += 3; } @@ -1055,26 +1089,23 @@ horizontalDifference8(unsigned char *ip, int n, int stride, n -= 4; while (n > 0) { n -= 4; - r1 = CLAMP(ip[4]); wp[4] = (r1-r2) & mask; r2 = r1; - g1 = CLAMP(ip[5]); wp[5] = (g1-g2) & mask; g2 = g1; - b1 = CLAMP(ip[6]); wp[6] = (b1-b2) & mask; b2 = b1; - a1 = CLAMP(ip[7]); wp[7] = (a1-a2) & mask; a2 = a1; + r1 = CLAMP(ip[4]); wp[4] = (uint16)((r1-r2) & mask); r2 = r1; + g1 = CLAMP(ip[5]); wp[5] = (uint16)((g1-g2) & mask); g2 = g1; + b1 = CLAMP(ip[6]); wp[6] = (uint16)((b1-b2) & mask); b2 = b1; + a1 = CLAMP(ip[7]); wp[7] = (uint16)((a1-a2) & mask); a2 = a1; wp += 4; ip += 4; } } else { - wp += n + stride - 1; /* point to last one */ - ip += n + stride - 1; /* point to last one */ - n -= stride; - while (n > 0) { - REPEAT(stride, wp[0] = CLAMP(ip[0]); - wp[stride] -= wp[0]; - wp[stride] &= mask; - wp--; ip--) - n -= stride; - } - REPEAT(stride, wp[0] = CLAMP(ip[0]); wp--; ip--) - } + REPEAT(stride, wp[0] = CLAMP(ip[0]); wp++; ip++) + n -= stride; + while (n > 0) { + REPEAT(stride, + wp[0] = (uint16)((CLAMP(ip[0])-CLAMP(ip[-stride])) & mask); + wp++; ip++) + n -= stride; + } + } } } @@ -1115,6 +1146,13 @@ PixarLogEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) } llen = sp->stride * td->td_imagewidth; + /* Check against the number of elements (of size uint16) of sp->tbuf */ + if( n > ((tmsize_t)td->td_rowsperstrip * llen) ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Too many input bytes provided"); + return 0; + } for (i = 0, up = sp->tbuf; i < n; i += llen, up += llen) { switch (sp->user_datafmt) { @@ -1145,7 +1183,7 @@ PixarLogEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised, we need to simplify this code to reflect a ZLib that is likely updated to deal with 8byte memory sizes, though this code will respond - apropriately even before we simplify it */ + appropriately even before we simplify it */ sp->stream.avail_in = (uInt) (n * sizeof(uint16)); if ((sp->stream.avail_in / sizeof(uint16)) != (uInt) n) { @@ -1157,12 +1195,13 @@ PixarLogEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) do { if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) { TIFFErrorExt(tif->tif_clientdata, module, "Encoder error: %s", - sp->stream.msg); + sp->stream.msg ? sp->stream.msg : "(null)"); return (0); } if (sp->stream.avail_out == 0) { tif->tif_rawcc = tif->tif_rawdatasize; - TIFFFlushData1(tif); + if (!TIFFFlushData1(tif)) + return 0; sp->stream.next_out = tif->tif_rawdata; sp->stream.avail_out = (uInt) tif->tif_rawdatasize; /* this is a safe typecast, as check is made already in PixarLogPreEncode */ } @@ -1192,14 +1231,15 @@ PixarLogPostEncode(TIFF* tif) if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) { tif->tif_rawcc = tif->tif_rawdatasize - sp->stream.avail_out; - TIFFFlushData1(tif); + if (!TIFFFlushData1(tif)) + return 0; sp->stream.next_out = tif->tif_rawdata; sp->stream.avail_out = (uInt) tif->tif_rawdatasize; /* this is a safe typecast, as check is made already in PixarLogPreEncode */ } break; default: TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s", - sp->stream.msg); + sp->stream.msg ? sp->stream.msg : "(null)"); return (0); } } while (state != Z_STREAM_END); @@ -1209,9 +1249,11 @@ PixarLogPostEncode(TIFF* tif) static void PixarLogClose(TIFF* tif) { + PixarLogState* sp = (PixarLogState*) tif->tif_data; TIFFDirectory *td = &tif->tif_dir; - /* In a really sneaky (and really incorrect, and untruthfull, and + assert(sp != 0); + /* In a really sneaky (and really incorrect, and untruthful, and * troublesome, and error-prone) maneuver that completely goes against * the spirit of TIFF, and breaks TIFF, on close, we covertly * modify both bitspersample and sampleformat in the directory to @@ -1219,8 +1261,19 @@ PixarLogClose(TIFF* tif) * readers that don't know about PixarLog, or how to set * the PIXARLOGDATFMT pseudo-tag. */ - td->td_bitspersample = 8; - td->td_sampleformat = SAMPLEFORMAT_UINT; + + if (sp->state&PLSTATE_INIT) { + /* We test the state to avoid an issue such as in + * http://bugzilla.maptools.org/show_bug.cgi?id=2604 + * What appends in that case is that the bitspersample is 1 and + * a TransferFunction is set. The size of the TransferFunction + * depends on 1<td_bitspersample = 8; + td->td_sampleformat = SAMPLEFORMAT_UINT; + } } static void @@ -1269,7 +1322,7 @@ PixarLogVSetField(TIFF* tif, uint32 tag, va_list ap) if (deflateParams(&sp->stream, sp->quality, Z_DEFAULT_STRATEGY) != Z_OK) { TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s", - sp->stream.msg); + sp->stream.msg ? sp->stream.msg : "(null)"); return (0); } } @@ -1347,6 +1400,7 @@ TIFFInitPixarLog(TIFF* tif, int scheme) PixarLogState* sp; + (void)scheme; assert(scheme == COMPRESSION_PIXARLOG); /* diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_predict.c b/thirdparty/tiff-4.2.0/libtiff/tif_predict.c similarity index 67% rename from thirdparty/tiff-4.0.3/libtiff/tif_predict.c rename to thirdparty/tiff-4.2.0/libtiff/tif_predict.c index f93c6645..c0233974 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_predict.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_predict.c @@ -1,5 +1,3 @@ -/* $Id: tif_predict.c,v 1.32 2010-03-10 18:56:49 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -34,16 +32,18 @@ #define PredictorState(tif) ((TIFFPredictorState*) (tif)->tif_data) -static void horAcc8(TIFF* tif, uint8* cp0, tmsize_t cc); -static void horAcc16(TIFF* tif, uint8* cp0, tmsize_t cc); -static void horAcc32(TIFF* tif, uint8* cp0, tmsize_t cc); -static void swabHorAcc16(TIFF* tif, uint8* cp0, tmsize_t cc); -static void swabHorAcc32(TIFF* tif, uint8* cp0, tmsize_t cc); -static void horDiff8(TIFF* tif, uint8* cp0, tmsize_t cc); -static void horDiff16(TIFF* tif, uint8* cp0, tmsize_t cc); -static void horDiff32(TIFF* tif, uint8* cp0, tmsize_t cc); -static void fpAcc(TIFF* tif, uint8* cp0, tmsize_t cc); -static void fpDiff(TIFF* tif, uint8* cp0, tmsize_t cc); +static int horAcc8(TIFF* tif, uint8* cp0, tmsize_t cc); +static int horAcc16(TIFF* tif, uint8* cp0, tmsize_t cc); +static int horAcc32(TIFF* tif, uint8* cp0, tmsize_t cc); +static int swabHorAcc16(TIFF* tif, uint8* cp0, tmsize_t cc); +static int swabHorAcc32(TIFF* tif, uint8* cp0, tmsize_t cc); +static int horDiff8(TIFF* tif, uint8* cp0, tmsize_t cc); +static int horDiff16(TIFF* tif, uint8* cp0, tmsize_t cc); +static int horDiff32(TIFF* tif, uint8* cp0, tmsize_t cc); +static int swabHorDiff16(TIFF* tif, uint8* cp0, tmsize_t cc); +static int swabHorDiff32(TIFF* tif, uint8* cp0, tmsize_t cc); +static int fpAcc(TIFF* tif, uint8* cp0, tmsize_t cc); +static int fpDiff(TIFF* tif, uint8* cp0, tmsize_t cc); static int PredictorDecodeRow(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s); static int PredictorDecodeTile(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s); static int PredictorEncodeRow(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s); @@ -78,6 +78,15 @@ PredictorSetup(TIFF* tif) td->td_sampleformat); return 0; } + if (td->td_bitspersample != 16 + && td->td_bitspersample != 24 + && td->td_bitspersample != 32 + && td->td_bitspersample != 64) { /* Should 64 be allowed? */ + TIFFErrorExt(tif->tif_clientdata, module, + "Floating point \"Predictor\" not supported with %d-bit samples", + td->td_bitspersample); + return 0; + } break; default: TIFFErrorExt(tif->tif_clientdata, module, @@ -106,6 +115,9 @@ PredictorSetupDecode(TIFF* tif) TIFFPredictorState* sp = PredictorState(tif); TIFFDirectory* td = &tif->tif_dir; + /* Note: when PredictorSetup() fails, the effets of setupdecode() */ + /* will not be "canceled" so setupdecode() might be robust to */ + /* be called several times. */ if (!(*sp->setupdecode)(tif) || !PredictorSetup(tif)) return 0; @@ -172,7 +184,7 @@ PredictorSetupDecode(TIFF* tif) } /* * Allocate buffer to keep the decoded bytes before - * rearranging in the ight order + * rearranging in the right order */ } @@ -207,7 +219,24 @@ PredictorSetupEncode(TIFF* tif) sp->encodetile = tif->tif_encodetile; tif->tif_encodetile = PredictorEncodeTile; } - } + + /* + * If the data is horizontally differenced 16-bit data that + * requires byte-swapping, then it must be byte swapped after + * the differentiation step. We do this with a special-purpose + * routine and override the normal post decoding logic that + * the library setup when the directory was read. + */ + if (tif->tif_flags & TIFF_SWAB) { + if (sp->encodepfunc == horDiff16) { + sp->encodepfunc = swabHorDiff16; + tif->tif_postdecode = _TIFFNoPostDecode; + } else if (sp->encodepfunc == horDiff32) { + sp->encodepfunc = swabHorDiff32; + tif->tif_postdecode = _TIFFNoPostDecode; + } + } + } else if (sp->predictor == 3) { sp->encodepfunc = fpDiff; @@ -231,21 +260,35 @@ PredictorSetupEncode(TIFF* tif) #define REPEAT4(n, op) \ switch (n) { \ - default: { tmsize_t i; for (i = n-4; i > 0; i--) { op; } } \ - case 4: op; \ - case 3: op; \ - case 2: op; \ - case 1: op; \ + default: { \ + tmsize_t i; for (i = n-4; i > 0; i--) { op; } } /*-fallthrough*/ \ + case 4: op; /*-fallthrough*/ \ + case 3: op; /*-fallthrough*/ \ + case 2: op; /*-fallthrough*/ \ + case 1: op; /*-fallthrough*/ \ case 0: ; \ } -static void +/* Remarks related to C standard compliance in all below functions : */ +/* - to avoid any undefined behavior, we only operate on unsigned types */ +/* since the behavior of "overflows" is defined (wrap over) */ +/* - when storing into the byte stream, we explicitly mask with 0xff so */ +/* as to make icc -check=conversions happy (not necessary by the standard) */ + +TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW +static int horAcc8(TIFF* tif, uint8* cp0, tmsize_t cc) { tmsize_t stride = PredictorState(tif)->stride; - char* cp = (char*) cp0; - assert((cc%stride)==0); + unsigned char* cp = (unsigned char*) cp0; + if((cc%stride)!=0) + { + TIFFErrorExt(tif->tif_clientdata, "horAcc8", + "%s", "(cc%stride)!=0"); + return 0; + } + if (cc > stride) { /* * Pipeline the most common cases. @@ -257,9 +300,9 @@ horAcc8(TIFF* tif, uint8* cp0, tmsize_t cc) cc -= 3; cp += 3; while (cc>0) { - cp[0] = (char) (cr += cp[0]); - cp[1] = (char) (cg += cp[1]); - cp[2] = (char) (cb += cp[2]); + cp[0] = (unsigned char) ((cr += cp[0]) & 0xff); + cp[1] = (unsigned char) ((cg += cp[1]) & 0xff); + cp[2] = (unsigned char) ((cb += cp[2]) & 0xff); cc -= 3; cp += 3; } @@ -271,10 +314,10 @@ horAcc8(TIFF* tif, uint8* cp0, tmsize_t cc) cc -= 4; cp += 4; while (cc>0) { - cp[0] = (char) (cr += cp[0]); - cp[1] = (char) (cg += cp[1]); - cp[2] = (char) (cb += cp[2]); - cp[3] = (char) (ca += cp[3]); + cp[0] = (unsigned char) ((cr += cp[0]) & 0xff); + cp[1] = (unsigned char) ((cg += cp[1]) & 0xff); + cp[2] = (unsigned char) ((cb += cp[2]) & 0xff); + cp[3] = (unsigned char) ((ca += cp[3]) & 0xff); cc -= 4; cp += 4; } @@ -282,77 +325,73 @@ horAcc8(TIFF* tif, uint8* cp0, tmsize_t cc) cc -= stride; do { REPEAT4(stride, cp[stride] = - (char) (cp[stride] + *cp); cp++) + (unsigned char) ((cp[stride] + *cp) & 0xff); cp++) cc -= stride; } while (cc>0); } } + return 1; } -static void +static int swabHorAcc16(TIFF* tif, uint8* cp0, tmsize_t cc) { - tmsize_t stride = PredictorState(tif)->stride; uint16* wp = (uint16*) cp0; tmsize_t wc = cc / 2; - assert((cc%(2*stride))==0); - - if (wc > stride) { - TIFFSwabArrayOfShort(wp, wc); - wc -= stride; - do { - REPEAT4(stride, wp[stride] += wp[0]; wp++) - wc -= stride; - } while (wc > 0); - } + TIFFSwabArrayOfShort(wp, wc); + return horAcc16(tif, cp0, cc); } -static void +TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW +static int horAcc16(TIFF* tif, uint8* cp0, tmsize_t cc) { tmsize_t stride = PredictorState(tif)->stride; uint16* wp = (uint16*) cp0; tmsize_t wc = cc / 2; - assert((cc%(2*stride))==0); + if((cc%(2*stride))!=0) + { + TIFFErrorExt(tif->tif_clientdata, "horAcc16", + "%s", "cc%(2*stride))!=0"); + return 0; + } if (wc > stride) { wc -= stride; do { - REPEAT4(stride, wp[stride] += wp[0]; wp++) + REPEAT4(stride, wp[stride] = (uint16)(((unsigned int)wp[stride] + (unsigned int)wp[0]) & 0xffff); wp++) wc -= stride; } while (wc > 0); } + return 1; } -static void +static int swabHorAcc32(TIFF* tif, uint8* cp0, tmsize_t cc) { - tmsize_t stride = PredictorState(tif)->stride; uint32* wp = (uint32*) cp0; tmsize_t wc = cc / 4; - assert((cc%(4*stride))==0); - - if (wc > stride) { - TIFFSwabArrayOfLong(wp, wc); - wc -= stride; - do { - REPEAT4(stride, wp[stride] += wp[0]; wp++) - wc -= stride; - } while (wc > 0); - } + TIFFSwabArrayOfLong(wp, wc); + return horAcc32(tif, cp0, cc); } -static void +TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW +static int horAcc32(TIFF* tif, uint8* cp0, tmsize_t cc) { tmsize_t stride = PredictorState(tif)->stride; uint32* wp = (uint32*) cp0; tmsize_t wc = cc / 4; - assert((cc%(4*stride))==0); + if((cc%(4*stride))!=0) + { + TIFFErrorExt(tif->tif_clientdata, "horAcc32", + "%s", "cc%(4*stride))!=0"); + return 0; + } if (wc > stride) { wc -= stride; @@ -361,12 +400,13 @@ horAcc32(TIFF* tif, uint8* cp0, tmsize_t cc) wc -= stride; } while (wc > 0); } + return 1; } /* * Floating point predictor accumulation routine. */ -static void +static int fpAcc(TIFF* tif, uint8* cp0, tmsize_t cc) { tmsize_t stride = PredictorState(tif)->stride; @@ -374,15 +414,22 @@ fpAcc(TIFF* tif, uint8* cp0, tmsize_t cc) tmsize_t wc = cc / bps; tmsize_t count = cc; uint8 *cp = (uint8 *) cp0; - uint8 *tmp = (uint8 *)_TIFFmalloc(cc); + uint8 *tmp; - assert((cc%(bps*stride))==0); + if(cc%(bps*stride)!=0) + { + TIFFErrorExt(tif->tif_clientdata, "fpAcc", + "%s", "cc%(bps*stride))!=0"); + return 0; + } + tmp = (uint8 *)_TIFFmalloc(cc); if (!tmp) - return; + return 0; while (count > stride) { - REPEAT4(stride, cp[stride] += cp[0]; cp++) + REPEAT4(stride, cp[stride] = + (unsigned char) ((cp[stride] + cp[0]) & 0xff); cp++) count -= stride; } @@ -400,6 +447,7 @@ fpAcc(TIFF* tif, uint8* cp0, tmsize_t cc) } } _TIFFfree(tmp); + return 1; } /* @@ -415,8 +463,7 @@ PredictorDecodeRow(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) assert(sp->decodepfunc != NULL); if ((*sp->decoderow)(tif, op0, occ0, s)) { - (*sp->decodepfunc)(tif, op0, occ0); - return 1; + return (*sp->decodepfunc)(tif, op0, occ0); } else return 0; } @@ -439,10 +486,16 @@ PredictorDecodeTile(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) if ((*sp->decodetile)(tif, op0, occ0, s)) { tmsize_t rowsize = sp->rowsize; assert(rowsize > 0); - assert((occ0%rowsize)==0); + if((occ0%rowsize) !=0) + { + TIFFErrorExt(tif->tif_clientdata, "PredictorDecodeTile", + "%s", "occ0%rowsize != 0"); + return 0; + } assert(sp->decodepfunc != NULL); while (occ0 > 0) { - (*sp->decodepfunc)(tif, op0, rowsize); + if( !(*sp->decodepfunc)(tif, op0, rowsize) ) + return 0; occ0 -= rowsize; op0 += rowsize; } @@ -451,14 +504,20 @@ PredictorDecodeTile(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) return 0; } -static void +TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW +static int horDiff8(TIFF* tif, uint8* cp0, tmsize_t cc) { TIFFPredictorState* sp = PredictorState(tif); tmsize_t stride = sp->stride; - char* cp = (char*) cp0; + unsigned char* cp = (unsigned char*) cp0; - assert((cc%stride)==0); + if((cc%stride)!=0) + { + TIFFErrorExt(tif->tif_clientdata, "horDiff8", + "%s", "(cc%stride)!=0"); + return 0; + } if (cc > stride) { cc -= stride; @@ -466,67 +525,94 @@ horDiff8(TIFF* tif, uint8* cp0, tmsize_t cc) * Pipeline the most common cases. */ if (stride == 3) { - int r1, g1, b1; - int r2 = cp[0]; - int g2 = cp[1]; - int b2 = cp[2]; + unsigned int r1, g1, b1; + unsigned int r2 = cp[0]; + unsigned int g2 = cp[1]; + unsigned int b2 = cp[2]; do { - r1 = cp[3]; cp[3] = r1-r2; r2 = r1; - g1 = cp[4]; cp[4] = g1-g2; g2 = g1; - b1 = cp[5]; cp[5] = b1-b2; b2 = b1; + r1 = cp[3]; cp[3] = (unsigned char)((r1-r2)&0xff); r2 = r1; + g1 = cp[4]; cp[4] = (unsigned char)((g1-g2)&0xff); g2 = g1; + b1 = cp[5]; cp[5] = (unsigned char)((b1-b2)&0xff); b2 = b1; cp += 3; } while ((cc -= 3) > 0); } else if (stride == 4) { - int r1, g1, b1, a1; - int r2 = cp[0]; - int g2 = cp[1]; - int b2 = cp[2]; - int a2 = cp[3]; + unsigned int r1, g1, b1, a1; + unsigned int r2 = cp[0]; + unsigned int g2 = cp[1]; + unsigned int b2 = cp[2]; + unsigned int a2 = cp[3]; do { - r1 = cp[4]; cp[4] = r1-r2; r2 = r1; - g1 = cp[5]; cp[5] = g1-g2; g2 = g1; - b1 = cp[6]; cp[6] = b1-b2; b2 = b1; - a1 = cp[7]; cp[7] = a1-a2; a2 = a1; + r1 = cp[4]; cp[4] = (unsigned char)((r1-r2)&0xff); r2 = r1; + g1 = cp[5]; cp[5] = (unsigned char)((g1-g2)&0xff); g2 = g1; + b1 = cp[6]; cp[6] = (unsigned char)((b1-b2)&0xff); b2 = b1; + a1 = cp[7]; cp[7] = (unsigned char)((a1-a2)&0xff); a2 = a1; cp += 4; } while ((cc -= 4) > 0); } else { cp += cc - 1; do { - REPEAT4(stride, cp[stride] -= cp[0]; cp--) + REPEAT4(stride, cp[stride] = (unsigned char)((cp[stride] - cp[0])&0xff); cp--) } while ((cc -= stride) > 0); } } + return 1; } -static void +TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW +static int horDiff16(TIFF* tif, uint8* cp0, tmsize_t cc) { TIFFPredictorState* sp = PredictorState(tif); tmsize_t stride = sp->stride; - int16 *wp = (int16*) cp0; + uint16 *wp = (uint16*) cp0; tmsize_t wc = cc/2; - assert((cc%(2*stride))==0); + if((cc%(2*stride))!=0) + { + TIFFErrorExt(tif->tif_clientdata, "horDiff8", + "%s", "(cc%(2*stride))!=0"); + return 0; + } if (wc > stride) { wc -= stride; wp += wc - 1; do { - REPEAT4(stride, wp[stride] -= wp[0]; wp--) + REPEAT4(stride, wp[stride] = (uint16)(((unsigned int)wp[stride] - (unsigned int)wp[0]) & 0xffff); wp--) wc -= stride; } while (wc > 0); } + return 1; } -static void +static int +swabHorDiff16(TIFF* tif, uint8* cp0, tmsize_t cc) +{ + uint16* wp = (uint16*) cp0; + tmsize_t wc = cc / 2; + + if( !horDiff16(tif, cp0, cc) ) + return 0; + + TIFFSwabArrayOfShort(wp, wc); + return 1; +} + +TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW +static int horDiff32(TIFF* tif, uint8* cp0, tmsize_t cc) { TIFFPredictorState* sp = PredictorState(tif); tmsize_t stride = sp->stride; - int32 *wp = (int32*) cp0; + uint32 *wp = (uint32*) cp0; tmsize_t wc = cc/4; - assert((cc%(4*stride))==0); + if((cc%(4*stride))!=0) + { + TIFFErrorExt(tif->tif_clientdata, "horDiff32", + "%s", "(cc%(4*stride))!=0"); + return 0; + } if (wc > stride) { wc -= stride; @@ -536,12 +622,27 @@ horDiff32(TIFF* tif, uint8* cp0, tmsize_t cc) wc -= stride; } while (wc > 0); } + return 1; +} + +static int +swabHorDiff32(TIFF* tif, uint8* cp0, tmsize_t cc) +{ + uint32* wp = (uint32*) cp0; + tmsize_t wc = cc / 4; + + if( !horDiff32(tif, cp0, cc) ) + return 0; + + TIFFSwabArrayOfLong(wp, wc); + return 1; } /* * Floating point predictor differencing routine. */ -static void +TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW +static int fpDiff(TIFF* tif, uint8* cp0, tmsize_t cc) { tmsize_t stride = PredictorState(tif)->stride; @@ -549,12 +650,18 @@ fpDiff(TIFF* tif, uint8* cp0, tmsize_t cc) tmsize_t wc = cc / bps; tmsize_t count; uint8 *cp = (uint8 *) cp0; - uint8 *tmp = (uint8 *)_TIFFmalloc(cc); + uint8 *tmp; - assert((cc%(bps*stride))==0); + if((cc%(bps*stride))!=0) + { + TIFFErrorExt(tif->tif_clientdata, "fpDiff", + "%s", "(cc%(bps*stride))!=0"); + return 0; + } + tmp = (uint8 *)_TIFFmalloc(cc); if (!tmp) - return; + return 0; _TIFFmemcpy(tmp, cp0, cc); for (count = 0; count < wc; count++) { @@ -573,7 +680,8 @@ fpDiff(TIFF* tif, uint8* cp0, tmsize_t cc) cp = (uint8 *) cp0; cp += cc - stride - 1; for (count = cc; count > stride; count -= stride) - REPEAT4(stride, cp[stride] -= cp[0]; cp--) + REPEAT4(stride, cp[stride] = (unsigned char)((cp[stride] - cp[0])&0xff); cp--) + return 1; } static int @@ -586,7 +694,8 @@ PredictorEncodeRow(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) assert(sp->encoderow != NULL); /* XXX horizontal differencing alters user's data XXX */ - (*sp->encodepfunc)(tif, bp, cc); + if( !(*sp->encodepfunc)(tif, bp, cc) ) + return 0; return (*sp->encoderow)(tif, bp, cc, s); } @@ -621,7 +730,13 @@ PredictorEncodeTile(TIFF* tif, uint8* bp0, tmsize_t cc0, uint16 s) rowsize = sp->rowsize; assert(rowsize > 0); - assert((cc0%rowsize)==0); + if((cc0%rowsize)!=0) + { + TIFFErrorExt(tif->tif_clientdata, "PredictorEncodeTile", + "%s", "(cc0%rowsize)!=0"); + _TIFFfree( working_copy ); + return 0; + } while (cc > 0) { (*sp->encodepfunc)(tif, bp, rowsize); cc -= rowsize; @@ -670,7 +785,7 @@ PredictorVGetField(TIFF* tif, uint32 tag, va_list ap) switch (tag) { case TIFFTAG_PREDICTOR: - *va_arg(ap, uint16*) = sp->predictor; + *va_arg(ap, uint16*) = (uint16)sp->predictor; break; default: return (*sp->vgetparent)(tif, tag, ap); @@ -691,7 +806,7 @@ PredictorPrintDir(TIFF* tif, FILE* fd, long flags) case 2: fprintf(fd, "horizontal differencing "); break; case 3: fprintf(fd, "floating point predictor "); break; } - fprintf(fd, "%u (0x%x)\n", sp->predictor, sp->predictor); + fprintf(fd, "%d (0x%x)\n", sp->predictor, sp->predictor); } if (sp->printdir) (*sp->printdir)(tif, fd, flags); diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_predict.h b/thirdparty/tiff-4.2.0/libtiff/tif_predict.h similarity index 91% rename from thirdparty/tiff-4.0.3/libtiff/tif_predict.h rename to thirdparty/tiff-4.2.0/libtiff/tif_predict.h index dc7144c6..a326b9b8 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_predict.h +++ b/thirdparty/tiff-4.2.0/libtiff/tif_predict.h @@ -1,5 +1,3 @@ -/* $Id: tif_predict.h,v 1.8 2010-03-10 18:56:49 bfriesen Exp $ */ - /* * Copyright (c) 1995-1997 Sam Leffler * Copyright (c) 1995-1997 Silicon Graphics, Inc. @@ -26,10 +24,16 @@ #ifndef _TIFFPREDICT_ #define _TIFFPREDICT_ + +#include "tiffio.h" +#include "tiffiop.h" + /* * ``Library-private'' Support for the Predictor Tag */ +typedef int (*TIFFEncodeDecodeMethod)(TIFF* tif, uint8* buf, tmsize_t size); + /* * Codecs that want to support the Predictor tag must place * this structure first in their private state block so that @@ -43,12 +47,12 @@ typedef struct { TIFFCodeMethod encoderow; /* parent codec encode/decode row */ TIFFCodeMethod encodestrip; /* parent codec encode/decode strip */ TIFFCodeMethod encodetile; /* parent codec encode/decode tile */ - TIFFPostMethod encodepfunc; /* horizontal differencer */ + TIFFEncodeDecodeMethod encodepfunc; /* horizontal differencer */ TIFFCodeMethod decoderow; /* parent codec encode/decode row */ TIFFCodeMethod decodestrip; /* parent codec encode/decode strip */ TIFFCodeMethod decodetile; /* parent codec encode/decode tile */ - TIFFPostMethod decodepfunc; /* horizontal accumulator */ + TIFFEncodeDecodeMethod decodepfunc; /* horizontal accumulator */ TIFFVGetMethod vgetparent; /* super-class method */ TIFFVSetMethod vsetparent; /* super-class method */ diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_print.c b/thirdparty/tiff-4.2.0/libtiff/tif_print.c similarity index 95% rename from thirdparty/tiff-4.0.3/libtiff/tif_print.c rename to thirdparty/tiff-4.2.0/libtiff/tif_print.c index 402666d7..a0737941 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_print.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_print.c @@ -1,5 +1,3 @@ -/* $Id: tif_print.c,v 1.60 2012-08-19 16:56:35 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -35,9 +33,9 @@ #include static void -_TIFFprintAsciiBounded(FILE* fd, const char* cp, int max_chars); +_TIFFprintAsciiBounded(FILE* fd, const char* cp, size_t max_chars); -static const char *photoNames[] = { +static const char * const photoNames[] = { "min-is-white", /* PHOTOMETRIC_MINISWHITE */ "min-is-black", /* PHOTOMETRIC_MINISBLACK */ "RGB color", /* PHOTOMETRIC_RGB */ @@ -52,7 +50,7 @@ static const char *photoNames[] = { }; #define NPHOTONAMES (sizeof (photoNames) / sizeof (photoNames[0])) -static const char *orientNames[] = { +static const char * const orientNames[] = { "0 (0x0)", "row 0 top, col 0 lhs", /* ORIENTATION_TOPLEFT */ "row 0 top, col 0 rhs", /* ORIENTATION_TOPRIGHT */ @@ -237,7 +235,6 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) { TIFFDirectory *td = &tif->tif_dir; char *sep; - uint16 i; long l, n; #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) @@ -263,7 +260,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) if (td->td_subfiletype & FILETYPE_MASK) fprintf(fd, "%stransparency mask", sep); fprintf(fd, " (%lu = 0x%lx)\n", - (long) td->td_subfiletype, (long) td->td_subfiletype); + (unsigned long) td->td_subfiletype, (long) td->td_subfiletype); } if (TIFFFieldSet(tif,FIELD_IMAGEDIMENSIONS)) { fprintf(fd, " Image Width: %lu Image Length: %lu", @@ -365,6 +362,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) } } if (TIFFFieldSet(tif,FIELD_EXTRASAMPLES) && td->td_extrasamples) { + uint16 i; fprintf(fd, " Extra Samples: %u<", td->td_extrasamples); sep = ""; for (i = 0; i < td->td_extrasamples; i++) { @@ -389,13 +387,14 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) } if (TIFFFieldSet(tif,FIELD_INKNAMES)) { char* cp; + uint16 i; fprintf(fd, " Ink Names: "); i = td->td_samplesperpixel; sep = ""; for (cp = td->td_inknames; i > 0 && cp < td->td_inknames + td->td_inknameslen; cp = strchr(cp,'\0')+1, i--) { - int max_chars = + size_t max_chars = td->td_inknameslen - (cp - td->td_inknames); fputs(sep, fd); _TIFFprintAsciiBounded(fd, cp, max_chars); @@ -481,6 +480,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) if (TIFFFieldSet(tif,FIELD_MAXSAMPLEVALUE)) fprintf(fd, " Max Sample Value: %u\n", td->td_maxsamplevalue); if (TIFFFieldSet(tif,FIELD_SMINSAMPLEVALUE)) { + int i; int count = (tif->tif_flags & TIFF_PERSAMPLE) ? td->td_samplesperpixel : 1; fprintf(fd, " SMin Sample Value:"); for (i = 0; i < count; ++i) @@ -488,6 +488,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) fprintf(fd, "\n"); } if (TIFFFieldSet(tif,FIELD_SMAXSAMPLEVALUE)) { + int i; int count = (tif->tif_flags & TIFF_PERSAMPLE) ? td->td_samplesperpixel : 1; fprintf(fd, " SMax Sample Value:"); for (i = 0; i < count; ++i) @@ -518,7 +519,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) fprintf(fd, "\n"); n = 1L<td_bitspersample; for (l = 0; l < n; l++) - fprintf(fd, " %5lu: %5u %5u %5u\n", + fprintf(fd, " %5ld: %5u %5u %5u\n", l, td->td_colormap[0][l], td->td_colormap[1][l], @@ -527,6 +528,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) fprintf(fd, "(present)\n"); } if (TIFFFieldSet(tif,FIELD_REFBLACKWHITE)) { + int i; fprintf(fd, " Reference Black/White:\n"); for (i = 0; i < 3; i++) fprintf(fd, " %2d: %5g %5g\n", i, @@ -539,9 +541,10 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) fprintf(fd, "\n"); n = 1L<td_bitspersample; for (l = 0; l < n; l++) { - fprintf(fd, " %2lu: %5u", + uint16 i; + fprintf(fd, " %2ld: %5u", l, td->td_transferfunction[0][l]); - for (i = 1; i < td->td_samplesperpixel; i++) + for (i = 1; i < td->td_samplesperpixel - td->td_extrasamples && i < 3; i++) fprintf(fd, " %5u", td->td_transferfunction[i][l]); fputc('\n', fd); @@ -550,6 +553,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) fprintf(fd, "(present)\n"); } if (TIFFFieldSet(tif, FIELD_SUBIFD) && (td->td_subifd)) { + uint16 i; fprintf(fd, " SubIFD Offsets:"); for (i = 0; i < td->td_nsubifd; i++) #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) @@ -582,10 +586,10 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) continue; if(fip->field_passcount) { - if (fip->field_readcount == TIFF_VARIABLE ) { + if (fip->field_readcount == TIFF_VARIABLE2 ) { if(TIFFGetField(tif, tag, &value_count, &raw_data) != 1) continue; - } else if (fip->field_readcount == TIFF_VARIABLE2 ) { + } else if (fip->field_readcount == TIFF_VARIABLE ) { uint16 small_value_count; if(TIFFGetField(tif, tag, &small_value_count, &raw_data) != 1) continue; @@ -648,26 +652,24 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) if (tif->tif_tagmethods.printdir) (*tif->tif_tagmethods.printdir)(tif, fd, flags); - _TIFFFillStriles( tif ); - if ((flags & TIFFPRINT_STRIPS) && TIFFFieldSet(tif,FIELD_STRIPOFFSETS)) { uint32 s; fprintf(fd, " %lu %s:\n", - (long) td->td_nstrips, + (unsigned long) td->td_nstrips, isTiled(tif) ? "Tiles" : "Strips"); for (s = 0; s < td->td_nstrips; s++) #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) fprintf(fd, " %3lu: [%8I64u, %8I64u]\n", (unsigned long) s, - (unsigned __int64) td->td_stripoffset[s], - (unsigned __int64) td->td_stripbytecount[s]); + (unsigned __int64) TIFFGetStrileOffset(tif, s), + (unsigned __int64) TIFFGetStrileByteCount(tif, s)); #else fprintf(fd, " %3lu: [%8llu, %8llu]\n", (unsigned long) s, - (unsigned long long) td->td_stripoffset[s], - (unsigned long long) td->td_stripbytecount[s]); + (unsigned long long) TIFFGetStrileOffset(tif, s), + (unsigned long long) TIFFGetStrileByteCount(tif, s)); #endif } } @@ -679,7 +681,7 @@ _TIFFprintAscii(FILE* fd, const char* cp) } static void -_TIFFprintAsciiBounded(FILE* fd, const char* cp, int max_chars) +_TIFFprintAsciiBounded(FILE* fd, const char* cp, size_t max_chars) { for (; max_chars > 0 && *cp != '\0'; cp++, max_chars--) { const char* tp; diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_read.c b/thirdparty/tiff-4.2.0/libtiff/tif_read.c similarity index 51% rename from thirdparty/tiff-4.0.3/libtiff/tif_read.c rename to thirdparty/tiff-4.2.0/libtiff/tif_read.c index fe36e683..c4c868b1 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_read.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_read.c @@ -1,5 +1,3 @@ -/* $Id: tif_read.c,v 1.41 2012-07-06 19:22:58 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -38,31 +36,176 @@ static int TIFFStartTile(TIFF* tif, uint32 tile); static int TIFFCheckRead(TIFF*, int); static tmsize_t TIFFReadRawStrip1(TIFF* tif, uint32 strip, void* buf, tmsize_t size,const char* module); +static tmsize_t +TIFFReadRawTile1(TIFF* tif, uint32 tile, void* buf, tmsize_t size, const char* module); #define NOSTRIP ((uint32)(-1)) /* undefined state */ #define NOTILE ((uint32)(-1)) /* undefined state */ +#define INITIAL_THRESHOLD (1024 * 1024) +#define THRESHOLD_MULTIPLIER 10 +#define MAX_THRESHOLD (THRESHOLD_MULTIPLIER * THRESHOLD_MULTIPLIER * THRESHOLD_MULTIPLIER * INITIAL_THRESHOLD) + +#define TIFF_INT64_MAX ((((int64)0x7FFFFFFF) << 32) | 0xFFFFFFFF) + +/* Read 'size' bytes in tif_rawdata buffer starting at offset 'rawdata_offset' + * Returns 1 in case of success, 0 otherwise. */ +static int TIFFReadAndRealloc( TIFF* tif, tmsize_t size, + tmsize_t rawdata_offset, + int is_strip, uint32 strip_or_tile, + const char* module ) +{ +#if SIZEOF_SIZE_T == 8 + tmsize_t threshold = INITIAL_THRESHOLD; +#endif + tmsize_t already_read = 0; + + +#if SIZEOF_SIZE_T != 8 + /* On 32 bit processes, if the request is large enough, check against */ + /* file size */ + if( size > 1000 * 1000 * 1000 ) + { + uint64 filesize = TIFFGetFileSize(tif); + if( (uint64)size >= filesize ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Chunk size requested is larger than file size."); + return 0; + } + } +#endif + + /* On 64 bit processes, read first a maximum of 1 MB, then 10 MB, etc */ + /* so as to avoid allocating too much memory in case the file is too */ + /* short. We could ask for the file size, but this might be */ + /* expensive with some I/O layers (think of reading a gzipped file) */ + /* Restrict to 64 bit processes, so as to avoid reallocs() */ + /* on 32 bit processes where virtual memory is scarce. */ + while( already_read < size ) + { + tmsize_t bytes_read; + tmsize_t to_read = size - already_read; +#if SIZEOF_SIZE_T == 8 + if( to_read >= threshold && threshold < MAX_THRESHOLD && + already_read + to_read + rawdata_offset > tif->tif_rawdatasize ) + { + to_read = threshold; + threshold *= THRESHOLD_MULTIPLIER; + } +#endif + if (already_read + to_read + rawdata_offset > tif->tif_rawdatasize) { + uint8* new_rawdata; + assert((tif->tif_flags & TIFF_MYBUFFER) != 0); + tif->tif_rawdatasize = (tmsize_t)TIFFroundup_64( + (uint64)already_read + to_read + rawdata_offset, 1024); + if (tif->tif_rawdatasize==0) { + TIFFErrorExt(tif->tif_clientdata, module, + "Invalid buffer size"); + return 0; + } + new_rawdata = (uint8*) _TIFFrealloc( + tif->tif_rawdata, tif->tif_rawdatasize); + if( new_rawdata == 0 ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "No space for data buffer at scanline %lu", + (unsigned long) tif->tif_row); + _TIFFfree(tif->tif_rawdata); + tif->tif_rawdata = 0; + tif->tif_rawdatasize = 0; + return 0; + } + tif->tif_rawdata = new_rawdata; + } + if( tif->tif_rawdata == NULL ) + { + /* should not happen in practice but helps CoverityScan */ + return 0; + } + + bytes_read = TIFFReadFile(tif, + tif->tif_rawdata + rawdata_offset + already_read, to_read); + already_read += bytes_read; + if (bytes_read != to_read) { + memset( tif->tif_rawdata + rawdata_offset + already_read, 0, + tif->tif_rawdatasize - rawdata_offset - already_read ); +#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) + if( is_strip ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Read error at scanline %lu; got %I64u bytes, " + "expected %I64u", + (unsigned long) tif->tif_row, + (unsigned __int64) already_read, + (unsigned __int64) size); + } + else + { + TIFFErrorExt(tif->tif_clientdata, module, + "Read error at row %lu, col %lu, tile %lu; " + "got %I64u bytes, expected %I64u", + (unsigned long) tif->tif_row, + (unsigned long) tif->tif_col, + (unsigned long) strip_or_tile, + (unsigned __int64) already_read, + (unsigned __int64) size); + } +#else + if( is_strip ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Read error at scanline %lu; got %llu bytes, " + "expected %llu", + (unsigned long) tif->tif_row, + (unsigned long long) already_read, + (unsigned long long) size); + } + else + { + TIFFErrorExt(tif->tif_clientdata, module, + "Read error at row %lu, col %lu, tile %lu; " + "got %llu bytes, expected %llu", + (unsigned long) tif->tif_row, + (unsigned long) tif->tif_col, + (unsigned long) strip_or_tile, + (unsigned long long) already_read, + (unsigned long long) size); + } +#endif + return 0; + } + } + return 1; +} + + static int TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart ) { static const char module[] = "TIFFFillStripPartial"; register TIFFDirectory *td = &tif->tif_dir; - uint64 unused_data; + tmsize_t unused_data; uint64 read_offset; - tmsize_t cc, to_read; + tmsize_t to_read; + tmsize_t read_ahead_mod; /* tmsize_t bytecountm; */ - - if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount) - return 0; - + /* * Expand raw data buffer, if needed, to hold data * strip coming from file (perhaps should set upper * bound on the size of a buffer we'll use?). */ - /* bytecountm=(tmsize_t) td->td_stripbytecount[strip]; */ - if (read_ahead*2 > tif->tif_rawdatasize) { + /* bytecountm=(tmsize_t) TIFFGetStrileByteCount(tif, strip); */ + + /* Not completely sure where the * 2 comes from, but probably for */ + /* an exponentional growth strategy of tif_rawdatasize */ + if( read_ahead < TIFF_TMSIZE_T_MAX / 2 ) + read_ahead_mod = read_ahead * 2; + else + read_ahead_mod = read_ahead; + if (read_ahead_mod > tif->tif_rawdatasize) { assert( restart ); tif->tif_curstrip = NOSTRIP; @@ -72,8 +215,6 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart ) (unsigned long) strip); return (0); } - if (!TIFFReadBufferSetup(tif, 0, read_ahead*2)) - return (0); } if( restart ) @@ -100,7 +241,7 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart ) /* ** Seek to the point in the file where more data should be read. */ - read_offset = td->td_stripoffset[strip] + read_offset = TIFFGetStrileOffset(tif, strip) + tif->tif_rawdataoff + tif->tif_rawdataloaded; if (!SeekOK(tif, read_offset)) { @@ -113,37 +254,30 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart ) /* ** How much do we want to read? */ - to_read = tif->tif_rawdatasize - unused_data; - if( (uint64) to_read > td->td_stripbytecount[strip] + if( read_ahead_mod > tif->tif_rawdatasize ) + to_read = read_ahead_mod - unused_data; + else + to_read = tif->tif_rawdatasize - unused_data; + if( (uint64) to_read > TIFFGetStrileByteCount(tif, strip) - tif->tif_rawdataoff - tif->tif_rawdataloaded ) { - to_read = td->td_stripbytecount[strip] + to_read = (tmsize_t) TIFFGetStrileByteCount(tif, strip) - tif->tif_rawdataoff - tif->tif_rawdataloaded; } assert((tif->tif_flags&TIFF_BUFFERMMAP)==0); - cc = TIFFReadFile(tif, tif->tif_rawdata + unused_data, to_read); - - if (cc != to_read) { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, - "Read error at scanline %lu; got %I64u bytes, expected %I64u", - (unsigned long) tif->tif_row, - (unsigned __int64) cc, - (unsigned __int64) to_read); -#else - TIFFErrorExt(tif->tif_clientdata, module, - "Read error at scanline %lu; got %llu bytes, expected %llu", - (unsigned long) tif->tif_row, - (unsigned long long) cc, - (unsigned long long) to_read); -#endif + if( !TIFFReadAndRealloc( tif, to_read, unused_data, + 1, /* is_strip */ + 0, /* strip_or_tile */ + module) ) + { return 0; } - + tif->tif_rawdataoff = tif->tif_rawdataoff + tif->tif_rawdataloaded - unused_data ; tif->tif_rawdataloaded = unused_data + to_read; + tif->tif_rawcc = tif->tif_rawdataloaded; tif->tif_rawcp = tif->tif_rawdata; if (!isFillOrder(tif, td->td_fillorder) && @@ -157,9 +291,30 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart ) ** restart the decoder. */ if( restart ) - return TIFFStartStrip(tif, strip); + { + +#ifdef JPEG_SUPPORT + /* A bit messy since breaks the codec abstraction. Ultimately */ + /* there should be a function pointer for that, but it seems */ + /* only JPEG is affected. */ + /* For JPEG, if there are multiple scans (can generally be known */ + /* with the read_ahead used), we need to read the whole strip */ + if( tif->tif_dir.td_compression==COMPRESSION_JPEG && + (uint64)tif->tif_rawcc < TIFFGetStrileByteCount(tif, strip) ) + { + if( TIFFJPEGIsFullStripRequired(tif) ) + { + return TIFFFillStrip(tif, strip); + } + } +#endif + + return TIFFStartStrip(tif, strip); + } else + { return 1; + } } /* @@ -204,17 +359,33 @@ TIFFSeek(TIFF* tif, uint32 row, uint16 sample ) * read it a few lines at a time? */ #if defined(CHUNKY_STRIP_READ_SUPPORT) - if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount) - return 0; - whole_strip = tif->tif_dir.td_stripbytecount[strip] < 10 + whole_strip = TIFFGetStrileByteCount(tif, strip) < 10 || isMapped(tif); + if( td->td_compression == COMPRESSION_LERC || + td->td_compression == COMPRESSION_JBIG ) + { + /* Ideally plugins should have a way to declare they don't support + * chunk strip */ + whole_strip = 1; + } #else whole_strip = 1; #endif if( !whole_strip ) { - read_ahead = tif->tif_scanlinesize * 16 + 5000; + /* 16 is for YCbCr mode where we may need to read 16 */ + /* lines at a time to get a decompressed line, and 5000 */ + /* is some constant value, for example for JPEG tables */ + if( tif->tif_scanlinesize < TIFF_TMSIZE_T_MAX / 16 && + tif->tif_scanlinesize * 16 < TIFF_TMSIZE_T_MAX - 5000 ) + { + read_ahead = tif->tif_scanlinesize * 16 + 5000; + } + else + { + read_ahead = tif->tif_scanlinesize; + } } /* @@ -241,7 +412,7 @@ TIFFSeek(TIFF* tif, uint32 row, uint16 sample ) else if( !whole_strip ) { if( ((tif->tif_rawdata + tif->tif_rawdataloaded) - tif->tif_rawcp) < read_ahead - && (uint64) tif->tif_rawdataoff+tif->tif_rawdataloaded < td->td_stripbytecount[strip] ) + && (uint64) tif->tif_rawdataoff+tif->tif_rawdataloaded < TIFFGetStrileByteCount(tif, strip) ) { if( !TIFFFillStripPartial(tif,strip,read_ahead,0) ) return 0; @@ -310,18 +481,17 @@ TIFFReadScanline(TIFF* tif, void* buf, uint32 row, uint16 sample) } /* - * Read a strip of data and decompress the specified - * amount into the user-supplied buffer. + * Calculate the strip size according to the number of + * rows in the strip (check for truncated last strip on any + * of the separations). */ -tmsize_t -TIFFReadEncodedStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size) +static tmsize_t TIFFReadEncodedStripGetStripSize(TIFF* tif, uint32 strip, uint16* pplane) { static const char module[] = "TIFFReadEncodedStrip"; TIFFDirectory *td = &tif->tif_dir; uint32 rowsperstrip; uint32 stripsperplane; uint32 stripinplane; - uint16 plane; uint32 rows; tmsize_t stripsize; if (!TIFFCheckRead(tif,0)) @@ -333,23 +503,55 @@ TIFFReadEncodedStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size) (unsigned long)td->td_nstrips); return((tmsize_t)(-1)); } - /* - * Calculate the strip size according to the number of - * rows in the strip (check for truncated last strip on any - * of the separations). - */ + rowsperstrip=td->td_rowsperstrip; if (rowsperstrip>td->td_imagelength) rowsperstrip=td->td_imagelength; - stripsperplane=((td->td_imagelength+rowsperstrip-1)/rowsperstrip); + stripsperplane= TIFFhowmany_32_maxuint_compat(td->td_imagelength, rowsperstrip); stripinplane=(strip%stripsperplane); - plane=(strip/stripsperplane); + if( pplane ) *pplane=(uint16)(strip/stripsperplane); rows=td->td_imagelength-stripinplane*rowsperstrip; if (rows>rowsperstrip) rows=rowsperstrip; stripsize=TIFFVStripSize(tif,rows); if (stripsize==0) return((tmsize_t)(-1)); + return stripsize; +} + +/* + * Read a strip of data and decompress the specified + * amount into the user-supplied buffer. + */ +tmsize_t +TIFFReadEncodedStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size) +{ + static const char module[] = "TIFFReadEncodedStrip"; + TIFFDirectory *td = &tif->tif_dir; + tmsize_t stripsize; + uint16 plane; + + stripsize=TIFFReadEncodedStripGetStripSize(tif, strip, &plane); + if (stripsize==((tmsize_t)(-1))) + return((tmsize_t)(-1)); + + /* shortcut to avoid an extra memcpy() */ + if( td->td_compression == COMPRESSION_NONE && + size!=(tmsize_t)(-1) && size >= stripsize && + !isMapped(tif) && + ((tif->tif_flags&TIFF_NOREADRAW)==0) ) + { + if (TIFFReadRawStrip1(tif, strip, buf, stripsize, module) != stripsize) + return ((tmsize_t)(-1)); + + if (!isFillOrder(tif, td->td_fillorder) && + (tif->tif_flags & TIFF_NOBITREV) == 0) + TIFFReverseBits(buf,stripsize); + + (*tif->tif_postdecode)(tif,buf,stripsize); + return (stripsize); + } + if ((size!=(tmsize_t)(-1))&&(sizetif_clientdata, TIFFFileName(tif), "No space for strip buffer"); + return((tmsize_t)(-1)); + } + _TIFFmemset(*buf, 0, bufsizetoalloc); + + if ((*tif->tif_decodestrip)(tif,*buf,this_stripsize,plane)<=0) + return((tmsize_t)(-1)); + (*tif->tif_postdecode)(tif,*buf,this_stripsize); + return(this_stripsize); + + +} + static tmsize_t TIFFReadRawStrip1(TIFF* tif, uint32 strip, void* buf, tmsize_t size, const char* module) { - TIFFDirectory *td = &tif->tif_dir; - - if (!_TIFFFillStriles( tif )) - return ((tmsize_t)(-1)); - assert((tif->tif_flags&TIFF_NOREADRAW)==0); if (!isMapped(tif)) { tmsize_t cc; - if (!SeekOK(tif, td->td_stripoffset[strip])) { + if (!SeekOK(tif, TIFFGetStrileOffset(tif, strip))) { TIFFErrorExt(tif->tif_clientdata, module, "Seek error at scanline %lu, strip %lu", (unsigned long) tif->tif_row, (unsigned long) strip); @@ -397,16 +637,25 @@ TIFFReadRawStrip1(TIFF* tif, uint32 strip, void* buf, tmsize_t size, return ((tmsize_t)(-1)); } } else { - tmsize_t ma,mb; + tmsize_t ma = 0; tmsize_t n; - ma=(tmsize_t)td->td_stripoffset[strip]; - mb=ma+size; - if (((uint64)ma!=td->td_stripoffset[strip])||(ma>tif->tif_size)) - n=0; - else if ((mbtif->tif_size)) - n=tif->tif_size-ma; - else - n=size; + if ((TIFFGetStrileOffset(tif, strip) > (uint64)TIFF_TMSIZE_T_MAX)|| + ((ma=(tmsize_t)TIFFGetStrileOffset(tif, strip))>tif->tif_size)) + { + n=0; + } + else if( ma > TIFF_TMSIZE_T_MAX - size ) + { + n=0; + } + else + { + tmsize_t mb=ma+size; + if (mb>tif->tif_size) + n=tif->tif_size-ma; + else + n=size; + } if (n!=size) { #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) TIFFErrorExt(tif->tif_clientdata, module, @@ -431,6 +680,41 @@ TIFFReadRawStrip1(TIFF* tif, uint32 strip, void* buf, tmsize_t size, return (size); } +static tmsize_t +TIFFReadRawStripOrTile2(TIFF* tif, uint32 strip_or_tile, int is_strip, + tmsize_t size, const char* module) +{ + assert( !isMapped(tif) ); + assert((tif->tif_flags&TIFF_NOREADRAW)==0); + + if (!SeekOK(tif, TIFFGetStrileOffset(tif, strip_or_tile))) { + if( is_strip ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Seek error at scanline %lu, strip %lu", + (unsigned long) tif->tif_row, + (unsigned long) strip_or_tile); + } + else + { + TIFFErrorExt(tif->tif_clientdata, module, + "Seek error at row %lu, col %lu, tile %lu", + (unsigned long) tif->tif_row, + (unsigned long) tif->tif_col, + (unsigned long) strip_or_tile); + } + return ((tmsize_t)(-1)); + } + + if( !TIFFReadAndRealloc( tif, size, 0, is_strip, + strip_or_tile, module ) ) + { + return ((tmsize_t)(-1)); + } + + return (size); +} + /* * Read a strip of data from the file. */ @@ -439,7 +723,7 @@ TIFFReadRawStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size) { static const char module[] = "TIFFReadRawStrip"; TIFFDirectory *td = &tif->tif_dir; - uint64 bytecount; + uint64 bytecount64; tmsize_t bytecountm; if (!TIFFCheckRead(tif, 0)) @@ -457,31 +741,23 @@ TIFFReadRawStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size) "Compression scheme does not support access to raw uncompressed data"); return ((tmsize_t)(-1)); } - bytecount = td->td_stripbytecount[strip]; - if (bytecount <= 0) { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, - "%I64u: Invalid strip byte count, strip %lu", - (unsigned __int64) bytecount, - (unsigned long) strip); -#else - TIFFErrorExt(tif->tif_clientdata, module, - "%llu: Invalid strip byte count, strip %lu", - (unsigned long long) bytecount, - (unsigned long) strip); -#endif - return ((tmsize_t)(-1)); - } - bytecountm = (tmsize_t)bytecount; - if ((uint64)bytecountm!=bytecount) { - TIFFErrorExt(tif->tif_clientdata, module, "Integer overflow"); - return ((tmsize_t)(-1)); - } - if (size != (tmsize_t)(-1) && size < bytecountm) + bytecount64 = TIFFGetStrileByteCount(tif, strip); + if (size != (tmsize_t)(-1) && (uint64)size <= bytecount64) bytecountm = size; + else + bytecountm = _TIFFCastUInt64ToSSize(tif, bytecount64, module); + if( bytecountm == 0 ) { + return ((tmsize_t)(-1)); + } return (TIFFReadRawStrip1(tif, strip, buf, bytecountm, module)); } +TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW +static uint64 NoSanitizeSubUInt64(uint64 a, uint64 b) +{ + return a - b; +} + /* * Read the specified strip and setup for decoding. The data buffer is * expanded, as necessary, to hold the strip's data. @@ -492,13 +768,10 @@ TIFFFillStrip(TIFF* tif, uint32 strip) static const char module[] = "TIFFFillStrip"; TIFFDirectory *td = &tif->tif_dir; - if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount) - return 0; - if ((tif->tif_flags&TIFF_NOREADRAW)==0) { - uint64 bytecount = td->td_stripbytecount[strip]; - if (bytecount <= 0) { + uint64 bytecount = TIFFGetStrileByteCount(tif, strip); + if( bytecount == 0 || bytecount > (uint64)TIFF_INT64_MAX ) { #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) TIFFErrorExt(tif->tif_clientdata, module, "Invalid strip byte count %I64u, strip %lu", @@ -512,6 +785,78 @@ TIFFFillStrip(TIFF* tif, uint32 strip) #endif return (0); } + + /* To avoid excessive memory allocations: */ + /* Byte count should normally not be larger than a number of */ + /* times the uncompressed size plus some margin */ + if( bytecount > 1024 * 1024 ) + { + /* 10 and 4096 are just values that could be adjusted. */ + /* Hopefully they are safe enough for all codecs */ + tmsize_t stripsize = TIFFStripSize(tif); + if( stripsize != 0 && + (bytecount - 4096) / 10 > (uint64)stripsize ) + { + uint64 newbytecount = (uint64)stripsize * 10 + 4096; + if( newbytecount == 0 || newbytecount > (uint64)TIFF_INT64_MAX ) + { +#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) + TIFFWarningExt(tif->tif_clientdata, module, + "Too large strip byte count %I64u, strip %lu. Limiting to %I64u", + (unsigned __int64) bytecount, + (unsigned long) strip, + (unsigned __int64) newbytecount); +#else + TIFFErrorExt(tif->tif_clientdata, module, + "Too large strip byte count %llu, strip %lu. Limiting to %llu", + (unsigned long long) bytecount, + (unsigned long) strip, + (unsigned long long) newbytecount); +#endif + bytecount = newbytecount; + } + } + } + + if (isMapped(tif)) { + /* + * We must check for overflow, potentially causing + * an OOB read. Instead of simple + * + * TIFFGetStrileOffset(tif, strip)+bytecount > tif->tif_size + * + * comparison (which can overflow) we do the following + * two comparisons: + */ + if (bytecount > (uint64)tif->tif_size || + TIFFGetStrileOffset(tif, strip) > (uint64)tif->tif_size - bytecount) { + /* + * This error message might seem strange, but + * it's what would happen if a read were done + * instead. + */ +#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) + TIFFErrorExt(tif->tif_clientdata, module, + + "Read error on strip %lu; " + "got %I64u bytes, expected %I64u", + (unsigned long) strip, + (unsigned __int64) NoSanitizeSubUInt64(tif->tif_size, TIFFGetStrileOffset(tif, strip)), + (unsigned __int64) bytecount); +#else + TIFFErrorExt(tif->tif_clientdata, module, + + "Read error on strip %lu; " + "got %llu bytes, expected %llu", + (unsigned long) strip, + (unsigned long long) NoSanitizeSubUInt64(tif->tif_size, TIFFGetStrileOffset(tif, strip)), + (unsigned long long) bytecount); +#endif + tif->tif_curstrip = NOSTRIP; + return (0); + } + } + if (isMapped(tif) && (isFillOrder(tif, td->td_fillorder) || (tif->tif_flags & TIFF_NOBITREV))) { @@ -532,44 +877,8 @@ TIFFFillStrip(TIFF* tif, uint32 strip) tif->tif_rawdatasize = 0; } tif->tif_flags &= ~TIFF_MYBUFFER; - /* - * We must check for overflow, potentially causing - * an OOB read. Instead of simple - * - * td->td_stripoffset[strip]+bytecount > tif->tif_size - * - * comparison (which can overflow) we do the following - * two comparisons: - */ - if (bytecount > (uint64)tif->tif_size || - td->td_stripoffset[strip] > (uint64)tif->tif_size - bytecount) { - /* - * This error message might seem strange, but - * it's what would happen if a read were done - * instead. - */ -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, - - "Read error on strip %lu; " - "got %I64u bytes, expected %I64u", - (unsigned long) strip, - (unsigned __int64) tif->tif_size - td->td_stripoffset[strip], - (unsigned __int64) bytecount); -#else - TIFFErrorExt(tif->tif_clientdata, module, - - "Read error on strip %lu; " - "got %llu bytes, expected %llu", - (unsigned long) strip, - (unsigned long long) tif->tif_size - td->td_stripoffset[strip], - (unsigned long long) bytecount); -#endif - tif->tif_curstrip = NOSTRIP; - return (0); - } tif->tif_rawdatasize = (tmsize_t)bytecount; - tif->tif_rawdata = tif->tif_base + (tmsize_t)td->td_stripoffset[strip]; + tif->tif_rawdata = tif->tif_base + (tmsize_t)TIFFGetStrileOffset(tif, strip); tif->tif_rawdataoff = 0; tif->tif_rawdataloaded = (tmsize_t) bytecount; @@ -601,17 +910,36 @@ TIFFFillStrip(TIFF* tif, uint32 strip) (unsigned long) strip); return (0); } - if (!TIFFReadBufferSetup(tif, 0, bytecountm)) - return (0); } if (tif->tif_flags&TIFF_BUFFERMMAP) { tif->tif_curstrip = NOSTRIP; - if (!TIFFReadBufferSetup(tif, 0, bytecountm)) - return (0); + tif->tif_rawdata = NULL; + tif->tif_rawdatasize = 0; + tif->tif_flags &= ~TIFF_BUFFERMMAP; } - if (TIFFReadRawStrip1(tif, strip, tif->tif_rawdata, - bytecountm, module) != bytecountm) - return (0); + + if( isMapped(tif) ) + { + if (bytecountm > tif->tif_rawdatasize && + !TIFFReadBufferSetup(tif, 0, bytecountm)) + { + return (0); + } + if (TIFFReadRawStrip1(tif, strip, tif->tif_rawdata, + bytecountm, module) != bytecountm) + { + return (0); + } + } + else + { + if (TIFFReadRawStripOrTile2(tif, strip, 1, + bytecountm, module) != bytecountm) + { + return (0); + } + } + tif->tif_rawdataoff = 0; tif->tif_rawdataloaded = bytecountm; @@ -661,6 +989,24 @@ TIFFReadEncodedTile(TIFF* tif, uint32 tile, void* buf, tmsize_t size) (unsigned long) tile, (unsigned long) td->td_nstrips); return ((tmsize_t)(-1)); } + + /* shortcut to avoid an extra memcpy() */ + if( td->td_compression == COMPRESSION_NONE && + size!=(tmsize_t)(-1) && size >= tilesize && + !isMapped(tif) && + ((tif->tif_flags&TIFF_NOREADRAW)==0) ) + { + if (TIFFReadRawTile1(tif, tile, buf, tilesize, module) != tilesize) + return ((tmsize_t)(-1)); + + if (!isFillOrder(tif, td->td_fillorder) && + (tif->tif_flags & TIFF_NOBITREV) == 0) + TIFFReverseBits(buf,tilesize); + + (*tif->tif_postdecode)(tif,buf,tilesize); + return (tilesize); + } + if (size == (tmsize_t)(-1)) size = tilesize; else if (size > tilesize) @@ -673,19 +1019,85 @@ TIFFReadEncodedTile(TIFF* tif, uint32 tile, void* buf, tmsize_t size) return ((tmsize_t)(-1)); } +/* Variant of TIFFReadTile() that does + * * if *buf == NULL, *buf = _TIFFmalloc(bufsizetoalloc) only after TIFFFillTile() has + * succeeded. This avoid excessive memory allocation in case of truncated + * file. + * * calls regular TIFFReadEncodedTile() if *buf != NULL + */ +tmsize_t +_TIFFReadTileAndAllocBuffer(TIFF* tif, + void **buf, tmsize_t bufsizetoalloc, + uint32 x, uint32 y, uint32 z, uint16 s) +{ + if (!TIFFCheckRead(tif, 1) || !TIFFCheckTile(tif, x, y, z, s)) + return ((tmsize_t)(-1)); + return (_TIFFReadEncodedTileAndAllocBuffer(tif, + TIFFComputeTile(tif, x, y, z, s), + buf, bufsizetoalloc, + (tmsize_t)(-1))); +} + +/* Variant of TIFFReadEncodedTile() that does + * * if *buf == NULL, *buf = _TIFFmalloc(bufsizetoalloc) only after TIFFFillTile() has + * succeeded. This avoid excessive memory allocation in case of truncated + * file. + * * calls regular TIFFReadEncodedTile() if *buf != NULL + */ +tmsize_t +_TIFFReadEncodedTileAndAllocBuffer(TIFF* tif, uint32 tile, + void **buf, tmsize_t bufsizetoalloc, + tmsize_t size_to_read) +{ + static const char module[] = "_TIFFReadEncodedTileAndAllocBuffer"; + TIFFDirectory *td = &tif->tif_dir; + tmsize_t tilesize = tif->tif_tilesize; + + if( *buf != NULL ) + { + return TIFFReadEncodedTile(tif, tile, *buf, size_to_read); + } + + if (!TIFFCheckRead(tif, 1)) + return ((tmsize_t)(-1)); + if (tile >= td->td_nstrips) { + TIFFErrorExt(tif->tif_clientdata, module, + "%lu: Tile out of range, max %lu", + (unsigned long) tile, (unsigned long) td->td_nstrips); + return ((tmsize_t)(-1)); + } + + if (!TIFFFillTile(tif,tile)) + return((tmsize_t)(-1)); + + *buf = _TIFFmalloc(bufsizetoalloc); + if (*buf == NULL) { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), + "No space for tile buffer"); + return((tmsize_t)(-1)); + } + _TIFFmemset(*buf, 0, bufsizetoalloc); + + if (size_to_read == (tmsize_t)(-1)) + size_to_read = tilesize; + else if (size_to_read > tilesize) + size_to_read = tilesize; + if( (*tif->tif_decodetile)(tif, + (uint8*) *buf, size_to_read, (uint16)(tile/td->td_stripsperimage))) { + (*tif->tif_postdecode)(tif, (uint8*) *buf, size_to_read); + return (size_to_read); + } else + return ((tmsize_t)(-1)); +} + static tmsize_t TIFFReadRawTile1(TIFF* tif, uint32 tile, void* buf, tmsize_t size, const char* module) { - TIFFDirectory *td = &tif->tif_dir; - - if (!_TIFFFillStriles( tif )) - return ((tmsize_t)(-1)); - assert((tif->tif_flags&TIFF_NOREADRAW)==0); if (!isMapped(tif)) { tmsize_t cc; - if (!SeekOK(tif, td->td_stripoffset[tile])) { + if (!SeekOK(tif, TIFFGetStrileOffset(tif, tile))) { TIFFErrorExt(tif->tif_clientdata, module, "Seek error at row %lu, col %lu, tile %lu", (unsigned long) tif->tif_row, @@ -715,9 +1127,9 @@ TIFFReadRawTile1(TIFF* tif, uint32 tile, void* buf, tmsize_t size, const char* m } else { tmsize_t ma,mb; tmsize_t n; - ma=(tmsize_t)td->td_stripoffset[tile]; + ma=(tmsize_t)TIFFGetStrileOffset(tif, tile); mb=ma+size; - if (((uint64)ma!=td->td_stripoffset[tile])||(ma>tif->tif_size)) + if ((TIFFGetStrileOffset(tif, tile) > (uint64)TIFF_TMSIZE_T_MAX)||(ma>tif->tif_size)) n=0; else if ((mbtif->tif_size)) n=tif->tif_size-ma; @@ -773,13 +1185,12 @@ TIFFReadRawTile(TIFF* tif, uint32 tile, void* buf, tmsize_t size) "Compression scheme does not support access to raw uncompressed data"); return ((tmsize_t)(-1)); } - bytecount64 = td->td_stripbytecount[tile]; - if (size != (tmsize_t)(-1) && (uint64)size < bytecount64) - bytecount64 = (uint64)size; - bytecountm = (tmsize_t)bytecount64; - if ((uint64)bytecountm!=bytecount64) - { - TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); + bytecount64 = TIFFGetStrileByteCount(tif, tile); + if (size != (tmsize_t)(-1) && (uint64)size <= bytecount64) + bytecountm = size; + else + bytecountm = _TIFFCastUInt64ToSSize(tif, bytecount64, module); + if( bytecountm == 0 ) { return ((tmsize_t)(-1)); } return (TIFFReadRawTile1(tif, tile, buf, bytecountm, module)); @@ -795,13 +1206,10 @@ TIFFFillTile(TIFF* tif, uint32 tile) static const char module[] = "TIFFFillTile"; TIFFDirectory *td = &tif->tif_dir; - if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount) - return 0; - if ((tif->tif_flags&TIFF_NOREADRAW)==0) { - uint64 bytecount = td->td_stripbytecount[tile]; - if (bytecount <= 0) { + uint64 bytecount = TIFFGetStrileByteCount(tif, tile); + if( bytecount == 0 || bytecount > (uint64)TIFF_INT64_MAX ) { #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) TIFFErrorExt(tif->tif_clientdata, module, "%I64u: Invalid tile byte count, tile %lu", @@ -815,6 +1223,56 @@ TIFFFillTile(TIFF* tif, uint32 tile) #endif return (0); } + + /* To avoid excessive memory allocations: */ + /* Byte count should normally not be larger than a number of */ + /* times the uncompressed size plus some margin */ + if( bytecount > 1024 * 1024 ) + { + /* 10 and 4096 are just values that could be adjusted. */ + /* Hopefully they are safe enough for all codecs */ + tmsize_t stripsize = TIFFTileSize(tif); + if( stripsize != 0 && + (bytecount - 4096) / 10 > (uint64)stripsize ) + { + uint64 newbytecount = (uint64)stripsize * 10 + 4096; + if( newbytecount == 0 || newbytecount > (uint64)TIFF_INT64_MAX ) + { +#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) + TIFFWarningExt(tif->tif_clientdata, module, + "Too large tile byte count %I64u, tile %lu. Limiting to %I64u", + (unsigned __int64) bytecount, + (unsigned long) tile, + (unsigned __int64) newbytecount); +#else + TIFFErrorExt(tif->tif_clientdata, module, + "Too large tile byte count %llu, tile %lu. Limiting to %llu", + (unsigned long long) bytecount, + (unsigned long) tile, + (unsigned long long) newbytecount); +#endif + bytecount = newbytecount; + } + } + } + + if (isMapped(tif)) { + /* + * We must check for overflow, potentially causing + * an OOB read. Instead of simple + * + * TIFFGetStrileOffset(tif, tile)+bytecount > tif->tif_size + * + * comparison (which can overflow) we do the following + * two comparisons: + */ + if (bytecount > (uint64)tif->tif_size || + TIFFGetStrileOffset(tif, tile) > (uint64)tif->tif_size - bytecount) { + tif->tif_curtile = NOTILE; + return (0); + } + } + if (isMapped(tif) && (isFillOrder(tif, td->td_fillorder) || (tif->tif_flags & TIFF_NOBITREV))) { @@ -835,23 +1293,10 @@ TIFFFillTile(TIFF* tif, uint32 tile) tif->tif_rawdatasize = 0; } tif->tif_flags &= ~TIFF_MYBUFFER; - /* - * We must check for overflow, potentially causing - * an OOB read. Instead of simple - * - * td->td_stripoffset[tile]+bytecount > tif->tif_size - * - * comparison (which can overflow) we do the following - * two comparisons: - */ - if (bytecount > (uint64)tif->tif_size || - td->td_stripoffset[tile] > (uint64)tif->tif_size - bytecount) { - tif->tif_curtile = NOTILE; - return (0); - } + tif->tif_rawdatasize = (tmsize_t)bytecount; tif->tif_rawdata = - tif->tif_base + (tmsize_t)td->td_stripoffset[tile]; + tif->tif_base + (tmsize_t)TIFFGetStrileOffset(tif, tile); tif->tif_rawdataoff = 0; tif->tif_rawdataloaded = (tmsize_t) bytecount; tif->tif_flags |= TIFF_BUFFERMMAP; @@ -876,23 +1321,42 @@ TIFFFillTile(TIFF* tif, uint32 tile) (unsigned long) tile); return (0); } - if (!TIFFReadBufferSetup(tif, 0, bytecountm)) - return (0); } if (tif->tif_flags&TIFF_BUFFERMMAP) { tif->tif_curtile = NOTILE; - if (!TIFFReadBufferSetup(tif, 0, bytecountm)) - return (0); + tif->tif_rawdata = NULL; + tif->tif_rawdatasize = 0; + tif->tif_flags &= ~TIFF_BUFFERMMAP; + } + + if( isMapped(tif) ) + { + if (bytecountm > tif->tif_rawdatasize && + !TIFFReadBufferSetup(tif, 0, bytecountm)) + { + return (0); + } + if (TIFFReadRawTile1(tif, tile, tif->tif_rawdata, + bytecountm, module) != bytecountm) + { + return (0); + } + } + else + { + if (TIFFReadRawStripOrTile2(tif, tile, 0, + bytecountm, module) != bytecountm) + { + return (0); + } } - if (TIFFReadRawTile1(tif, tile, tif->tif_rawdata, - bytecountm, module) != bytecountm) - return (0); tif->tif_rawdataoff = 0; tif->tif_rawdataloaded = bytecountm; - if (!isFillOrder(tif, td->td_fillorder) && + if (tif->tif_rawdata != NULL && + !isFillOrder(tif, td->td_fillorder) && (tif->tif_flags & TIFF_NOBITREV) == 0) TIFFReverseBits(tif->tif_rawdata, tif->tif_rawdataloaded); @@ -930,9 +1394,14 @@ TIFFReadBufferSetup(TIFF* tif, void* bp, tmsize_t size) tif->tif_flags &= ~TIFF_MYBUFFER; } else { tif->tif_rawdatasize = (tmsize_t)TIFFroundup_64((uint64)size, 1024); - if (tif->tif_rawdatasize==0) - tif->tif_rawdatasize=(tmsize_t)(-1); - tif->tif_rawdata = (uint8*) _TIFFmalloc(tif->tif_rawdatasize); + if (tif->tif_rawdatasize==0) { + TIFFErrorExt(tif->tif_clientdata, module, + "Invalid buffer size"); + return (0); + } + /* Initialize to zero to avoid uninitialized buffers in case of */ + /* short reads (http://bugzilla.maptools.org/show_bug.cgi?id=2651) */ + tif->tif_rawdata = (uint8*) _TIFFcalloc(1, tif->tif_rawdatasize); tif->tif_flags |= TIFF_MYBUFFER; } if (tif->tif_rawdata == NULL) { @@ -954,9 +1423,6 @@ TIFFStartStrip(TIFF* tif, uint32 strip) { TIFFDirectory *td = &tif->tif_dir; - if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount) - return 0; - if ((tif->tif_flags & TIFF_CODERSETUP) == 0) { if (!(*tif->tif_setupdecode)(tif)) return (0); @@ -974,10 +1440,21 @@ TIFFStartStrip(TIFF* tif, uint32 strip) else { tif->tif_rawcp = tif->tif_rawdata; - tif->tif_rawcc = (tmsize_t)td->td_stripbytecount[strip]; + if( tif->tif_rawdataloaded > 0 ) + tif->tif_rawcc = tif->tif_rawdataloaded; + else + tif->tif_rawcc = (tmsize_t)TIFFGetStrileByteCount(tif, strip); } - return ((*tif->tif_predecode)(tif, - (uint16)(strip / td->td_stripsperimage))); + if ((*tif->tif_predecode)(tif, + (uint16)(strip / td->td_stripsperimage)) == 0 ) { + /* Needed for example for scanline access, if tif_predecode */ + /* fails, and we try to read the same strip again. Without invalidating */ + /* tif_curstrip, we'd call tif_decoderow() on a possibly invalid */ + /* codec state. */ + tif->tif_curstrip = NOSTRIP; + return 0; + } + return 1; } /* @@ -987,10 +1464,9 @@ TIFFStartStrip(TIFF* tif, uint32 strip) static int TIFFStartTile(TIFF* tif, uint32 tile) { + static const char module[] = "TIFFStartTile"; TIFFDirectory *td = &tif->tif_dir; - - if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount) - return 0; + uint32 howmany32; if ((tif->tif_flags & TIFF_CODERSETUP) == 0) { if (!(*tif->tif_setupdecode)(tif)) @@ -998,12 +1474,18 @@ TIFFStartTile(TIFF* tif, uint32 tile) tif->tif_flags |= TIFF_CODERSETUP; } tif->tif_curtile = tile; - tif->tif_row = - (tile % TIFFhowmany_32(td->td_imagewidth, td->td_tilewidth)) * - td->td_tilelength; - tif->tif_col = - (tile % TIFFhowmany_32(td->td_imagelength, td->td_tilelength)) * - td->td_tilewidth; + howmany32=TIFFhowmany_32(td->td_imagewidth, td->td_tilewidth); + if (howmany32 == 0) { + TIFFErrorExt(tif->tif_clientdata,module,"Zero tiles"); + return 0; + } + tif->tif_row = (tile % howmany32) * td->td_tilelength; + howmany32=TIFFhowmany_32(td->td_imagelength, td->td_tilelength); + if (howmany32 == 0) { + TIFFErrorExt(tif->tif_clientdata,module,"Zero tiles"); + return 0; + } + tif->tif_col = (tile % howmany32) * td->td_tilewidth; tif->tif_flags &= ~TIFF_BUF4WRITE; if (tif->tif_flags&TIFF_NOREADRAW) { @@ -1013,7 +1495,10 @@ TIFFStartTile(TIFF* tif, uint32 tile) else { tif->tif_rawcp = tif->tif_rawdata; - tif->tif_rawcc = (tmsize_t)td->td_stripbytecount[tile]; + if( tif->tif_rawdataloaded > 0 ) + tif->tif_rawcc = tif->tif_rawdataloaded; + else + tif->tif_rawcc = (tmsize_t)TIFFGetStrileByteCount(tif, tile); } return ((*tif->tif_predecode)(tif, (uint16)(tile/td->td_stripsperimage))); @@ -1028,13 +1513,100 @@ TIFFCheckRead(TIFF* tif, int tiles) } if (tiles ^ isTiled(tif)) { TIFFErrorExt(tif->tif_clientdata, tif->tif_name, tiles ? - "Can not read tiles from a stripped image" : + "Can not read tiles from a striped image" : "Can not read scanlines from a tiled image"); return (0); } return (1); } +/* Use the provided input buffer (inbuf, insize) and decompress it into + * (outbuf, outsize). + * This function replaces the use of TIFFReadEncodedStrip()/TIFFReadEncodedTile() + * when the user can provide the buffer for the input data, for example when + * he wants to avoid libtiff to read the strile offset/count values from the + * [Strip|Tile][Offsets/ByteCounts] array. + * inbuf content must be writable (if bit reversal is needed) + * Returns 1 in case of success, 0 otherwise. + */ +int TIFFReadFromUserBuffer(TIFF* tif, uint32 strile, + void* inbuf, tmsize_t insize, + void* outbuf, tmsize_t outsize) +{ + static const char module[] = "TIFFReadFromUserBuffer"; + TIFFDirectory *td = &tif->tif_dir; + int ret = 1; + uint32 old_tif_flags = tif->tif_flags; + tmsize_t old_rawdatasize = tif->tif_rawdatasize; + void* old_rawdata = tif->tif_rawdata; + + if (tif->tif_mode == O_WRONLY) { + TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "File not open for reading"); + return 0; + } + if (tif->tif_flags&TIFF_NOREADRAW) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Compression scheme does not support access to raw uncompressed data"); + return 0; + } + + tif->tif_flags &= ~TIFF_MYBUFFER; + tif->tif_flags |= TIFF_BUFFERMMAP; + tif->tif_rawdatasize = insize; + tif->tif_rawdata = inbuf; + tif->tif_rawdataoff = 0; + tif->tif_rawdataloaded = insize; + + if (!isFillOrder(tif, td->td_fillorder) && + (tif->tif_flags & TIFF_NOBITREV) == 0) + { + TIFFReverseBits(inbuf, insize); + } + + if( TIFFIsTiled(tif) ) + { + if( !TIFFStartTile(tif, strile) || + !(*tif->tif_decodetile)(tif, (uint8*) outbuf, outsize, + (uint16)(strile/td->td_stripsperimage)) ) + { + ret = 0; + } + } + else + { + uint32 rowsperstrip=td->td_rowsperstrip; + uint32 stripsperplane; + if (rowsperstrip>td->td_imagelength) + rowsperstrip=td->td_imagelength; + stripsperplane= TIFFhowmany_32_maxuint_compat(td->td_imagelength, rowsperstrip); + if( !TIFFStartStrip(tif, strile) || + !(*tif->tif_decodestrip)(tif, (uint8*) outbuf, outsize, + (uint16)(strile/stripsperplane)) ) + { + ret = 0; + } + } + if( ret ) + { + (*tif->tif_postdecode)(tif, (uint8*) outbuf, outsize); + } + + if (!isFillOrder(tif, td->td_fillorder) && + (tif->tif_flags & TIFF_NOBITREV) == 0) + { + TIFFReverseBits(inbuf, insize); + } + + tif->tif_flags = old_tif_flags; + tif->tif_rawdatasize = old_rawdatasize; + tif->tif_rawdata = old_rawdata; + tif->tif_rawdataoff = 0; + tif->tif_rawdataloaded = 0; + + return ret; +} + void _TIFFNoPostDecode(TIFF* tif, uint8* buf, tmsize_t cc) { diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_stream.cxx b/thirdparty/tiff-4.2.0/libtiff/tif_stream.cxx similarity index 98% rename from thirdparty/tiff-4.0.3/libtiff/tif_stream.cxx rename to thirdparty/tiff-4.2.0/libtiff/tif_stream.cxx index 163447eb..7f640a9c 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_stream.cxx +++ b/thirdparty/tiff-4.2.0/libtiff/tif_stream.cxx @@ -1,5 +1,3 @@ -/* $Id: tif_stream.cxx,v 1.11 2010-12-11 23:12:29 faxguy Exp $ */ - /* * Copyright (c) 1988-1996 Sam Leffler * Copyright (c) 1991-1996 Silicon Graphics, Inc. @@ -340,12 +338,16 @@ _tiffisCloseProc(thandle_t fd) static int _tiffDummyMapProc(thandle_t , void** base, toff_t* size ) { + (void) base; + (void) size; return (0); } static void _tiffDummyUnmapProc(thandle_t , void* base, toff_t size ) { + (void) base; + (void) size; } /* @@ -371,6 +373,9 @@ _tiffStreamOpen(const char* name, const char* mode, void *fd) _tiffosSizeProc, _tiffDummyMapProc, _tiffDummyUnmapProc); + if (!tif) { + delete data; + } } else { tiffis_data *data = new tiffis_data; data->stream = reinterpret_cast(fd); @@ -385,6 +390,9 @@ _tiffStreamOpen(const char* name, const char* mode, void *fd) _tiffisSizeProc, _tiffDummyMapProc, _tiffDummyUnmapProc); + if (!tif) { + delete data; + } } return (tif); @@ -417,9 +425,10 @@ TIFFStreamOpen(const char* name, istream *is) /* vim: set ts=8 sts=8 sw=8 noet: */ /* - Local Variables: - mode: c - indent-tabs-mode: true - c-basic-offset: 8 - End: -*/ + * Local Variables: + * mode: c + * c-basic-offset: 8 + * fill-column: 78 + * End: + */ + diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_strip.c b/thirdparty/tiff-4.2.0/libtiff/tif_strip.c similarity index 93% rename from thirdparty/tiff-4.0.3/libtiff/tif_strip.c rename to thirdparty/tiff-4.2.0/libtiff/tif_strip.c index 568e4898..c08c60a7 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_strip.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_strip.c @@ -1,5 +1,3 @@ -/* $Id: tif_strip.c,v 1.35 2012-06-06 05:33:55 fwarmerdam Exp $ */ - /* * Copyright (c) 1991-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -131,15 +129,8 @@ TIFFVStripSize(TIFF* tif, uint32 nrows) { static const char module[] = "TIFFVStripSize"; uint64 m; - tmsize_t n; m=TIFFVStripSize64(tif,nrows); - n=(tmsize_t)m; - if ((uint64)n!=m) - { - TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); - n=0; - } - return(n); + return _TIFFCastUInt64ToSSize(tif, m, module); } /* @@ -149,8 +140,7 @@ uint64 TIFFRawStripSize64(TIFF* tif, uint32 strip) { static const char module[] = "TIFFRawStripSize64"; - TIFFDirectory* td = &tif->tif_dir; - uint64 bytecount = td->td_stripbytecount[strip]; + uint64 bytecount = TIFFGetStrileByteCount(tif, strip); if (bytecount == 0) { @@ -213,15 +203,8 @@ TIFFStripSize(TIFF* tif) { static const char module[] = "TIFFStripSize"; uint64 m; - tmsize_t n; m=TIFFStripSize64(tif); - n=(tmsize_t)m; - if ((uint64)n!=m) - { - TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); - n=0; - } - return(n); + return _TIFFCastUInt64ToSSize(tif, m, module); } /* @@ -317,7 +300,14 @@ TIFFScanlineSize64(TIFF* tif) } } else + { scanline_size=TIFFhowmany_64(_TIFFMultiply64(tif,td->td_imagewidth,td->td_bitspersample,module),8); + } + if (scanline_size == 0) + { + TIFFErrorExt(tif->tif_clientdata,module,"Computed scanline size is zero"); + return 0; + } return(scanline_size); } tmsize_t @@ -325,15 +315,8 @@ TIFFScanlineSize(TIFF* tif) { static const char module[] = "TIFFScanlineSize"; uint64 m; - tmsize_t n; m=TIFFScanlineSize64(tif); - n=(tmsize_t)m; - if ((uint64)n!=m) - { - TIFFErrorExt(tif->tif_clientdata,module,"Integer arithmetic overflow"); - n=0; - } - return(n); + return _TIFFCastUInt64ToSSize(tif, m, module); } /* @@ -362,15 +345,8 @@ TIFFRasterScanlineSize(TIFF* tif) { static const char module[] = "TIFFRasterScanlineSize"; uint64 m; - tmsize_t n; m=TIFFRasterScanlineSize64(tif); - n=(tmsize_t)m; - if ((uint64)n!=m) - { - TIFFErrorExt(tif->tif_clientdata,module,"Integer arithmetic overflow"); - n=0; - } - return(n); + return _TIFFCastUInt64ToSSize(tif, m, module); } /* vim: set ts=8 sts=8 sw=8 noet: */ diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_swab.c b/thirdparty/tiff-4.2.0/libtiff/tif_swab.c similarity index 91% rename from thirdparty/tiff-4.0.3/libtiff/tif_swab.c rename to thirdparty/tiff-4.2.0/libtiff/tif_swab.c index f37e33f1..b174ba69 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_swab.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_swab.c @@ -1,5 +1,3 @@ -/* $Id: tif_swab.c,v 1.13 2010-03-10 18:56:49 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -31,7 +29,7 @@ */ #include "tiffiop.h" -#ifndef TIFFSwabShort +#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabShort) void TIFFSwabShort(uint16* wp) { @@ -42,7 +40,7 @@ TIFFSwabShort(uint16* wp) } #endif -#ifndef TIFFSwabLong +#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabLong) void TIFFSwabLong(uint32* lp) { @@ -54,7 +52,7 @@ TIFFSwabLong(uint32* lp) } #endif -#ifndef TIFFSwabLong8 +#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabLong8) void TIFFSwabLong8(uint64* lp) { @@ -68,7 +66,7 @@ TIFFSwabLong8(uint64* lp) } #endif -#ifndef TIFFSwabArrayOfShort +#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabArrayOfShort) void TIFFSwabArrayOfShort(register uint16* wp, tmsize_t n) { @@ -84,7 +82,7 @@ TIFFSwabArrayOfShort(register uint16* wp, tmsize_t n) } #endif -#ifndef TIFFSwabArrayOfTriples +#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabArrayOfTriples) void TIFFSwabArrayOfTriples(register uint8* tp, tmsize_t n) { @@ -100,7 +98,7 @@ TIFFSwabArrayOfTriples(register uint8* tp, tmsize_t n) } #endif -#ifndef TIFFSwabArrayOfLong +#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabArrayOfLong) void TIFFSwabArrayOfLong(register uint32* lp, tmsize_t n) { @@ -117,7 +115,7 @@ TIFFSwabArrayOfLong(register uint32* lp, tmsize_t n) } #endif -#ifndef TIFFSwabArrayOfLong8 +#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabArrayOfLong8) void TIFFSwabArrayOfLong8(register uint64* lp, tmsize_t n) { @@ -136,7 +134,7 @@ TIFFSwabArrayOfLong8(register uint64* lp, tmsize_t n) } #endif -#ifndef TIFFSwabFloat +#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabFloat) void TIFFSwabFloat(float* fp) { @@ -148,7 +146,7 @@ TIFFSwabFloat(float* fp) } #endif -#ifndef TIFFSwabArrayOfFloat +#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabArrayOfFloat) void TIFFSwabArrayOfFloat(register float* fp, tmsize_t n) { @@ -165,7 +163,7 @@ TIFFSwabArrayOfFloat(register float* fp, tmsize_t n) } #endif -#ifndef TIFFSwabDouble +#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabDouble) void TIFFSwabDouble(double *dp) { @@ -179,7 +177,7 @@ TIFFSwabDouble(double *dp) } #endif -#ifndef TIFFSwabArrayOfDouble +#if defined(DISABLE_CHECK_TIFFSWABMACROS) || !defined(TIFFSwabArrayOfDouble) void TIFFSwabArrayOfDouble(double* dp, tmsize_t n) { @@ -296,8 +294,10 @@ TIFFReverseBits(uint8* cp, tmsize_t n) cp[7] = TIFFBitRevTable[cp[7]]; cp += 8; } - while (n-- > 0) - *cp = TIFFBitRevTable[*cp], cp++; + while (n-- > 0) { + *cp = TIFFBitRevTable[*cp]; + cp++; + } } /* vim: set ts=8 sts=8 sw=8 noet: */ diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_thunder.c b/thirdparty/tiff-4.2.0/libtiff/tif_thunder.c similarity index 94% rename from thirdparty/tiff-4.0.3/libtiff/tif_thunder.c rename to thirdparty/tiff-4.2.0/libtiff/tif_thunder.c index 390891c9..db6383a8 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_thunder.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_thunder.c @@ -1,5 +1,3 @@ -/* $Id: tif_thunder.c,v 1.12 2011-04-02 20:54:09 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -100,7 +98,8 @@ ThunderDecode(TIFF* tif, uint8* op, tmsize_t maxpixels) while (cc > 0 && npixels < maxpixels) { int n, delta; - n = *bp++, cc--; + n = *bp++; + cc--; switch (n & THUNDER_CODE) { case THUNDER_RUN: /* pixel run */ /* @@ -123,17 +122,17 @@ ThunderDecode(TIFF* tif, uint8* op, tmsize_t maxpixels) break; case THUNDER_2BITDELTAS: /* 2-bit deltas */ if ((delta = ((n >> 4) & 3)) != DELTA2_SKIP) - SETPIXEL(op, lastpixel + twobitdeltas[delta]); + SETPIXEL(op, (unsigned)((int)lastpixel + twobitdeltas[delta])); if ((delta = ((n >> 2) & 3)) != DELTA2_SKIP) - SETPIXEL(op, lastpixel + twobitdeltas[delta]); + SETPIXEL(op, (unsigned)((int)lastpixel + twobitdeltas[delta])); if ((delta = (n & 3)) != DELTA2_SKIP) - SETPIXEL(op, lastpixel + twobitdeltas[delta]); + SETPIXEL(op, (unsigned)((int)lastpixel + twobitdeltas[delta])); break; case THUNDER_3BITDELTAS: /* 3-bit deltas */ if ((delta = ((n >> 3) & 7)) != DELTA3_SKIP) - SETPIXEL(op, lastpixel + threebitdeltas[delta]); + SETPIXEL(op, (unsigned)((int)lastpixel + threebitdeltas[delta])); if ((delta = (n & 7)) != DELTA3_SKIP) - SETPIXEL(op, lastpixel + threebitdeltas[delta]); + SETPIXEL(op, (unsigned)((int)lastpixel + threebitdeltas[delta])); break; case THUNDER_RAW: /* raw data */ SETPIXEL(op, n); diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_tile.c b/thirdparty/tiff-4.2.0/libtiff/tif_tile.c similarity index 88% rename from thirdparty/tiff-4.0.3/libtiff/tif_tile.c rename to thirdparty/tiff-4.2.0/libtiff/tif_tile.c index 0ff7e853..661cc771 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_tile.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_tile.c @@ -1,5 +1,3 @@ -/* $Id: tif_tile.c,v 1.23 2012-06-06 05:33:55 fwarmerdam Exp $ */ - /* * Copyright (c) 1991-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -143,32 +141,48 @@ TIFFNumberOfTiles(TIFF* tif) uint64 TIFFTileRowSize64(TIFF* tif) { + static const char module[] = "TIFFTileRowSize64"; TIFFDirectory *td = &tif->tif_dir; uint64 rowsize; + uint64 tilerowsize; - if (td->td_tilelength == 0 || td->td_tilewidth == 0) + if (td->td_tilelength == 0) + { + TIFFErrorExt(tif->tif_clientdata,module,"Tile length is zero"); + return 0; + } + if (td->td_tilewidth == 0) + { + TIFFErrorExt(tif->tif_clientdata,module,"Tile width is zero"); return (0); + } rowsize = _TIFFMultiply64(tif, td->td_bitspersample, td->td_tilewidth, "TIFFTileRowSize"); if (td->td_planarconfig == PLANARCONFIG_CONTIG) + { + if (td->td_samplesperpixel == 0) + { + TIFFErrorExt(tif->tif_clientdata,module,"Samples per pixel is zero"); + return 0; + } rowsize = _TIFFMultiply64(tif, rowsize, td->td_samplesperpixel, "TIFFTileRowSize"); - return (TIFFhowmany8_64(rowsize)); + } + tilerowsize=TIFFhowmany8_64(rowsize); + if (tilerowsize == 0) + { + TIFFErrorExt(tif->tif_clientdata,module,"Computed tile row size is zero"); + return 0; + } + return (tilerowsize); } tmsize_t TIFFTileRowSize(TIFF* tif) { static const char module[] = "TIFFTileRowSize"; uint64 m; - tmsize_t n; m=TIFFTileRowSize64(tif); - n=(tmsize_t)m; - if ((uint64)n!=m) - { - TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); - n=0; - } - return(n); + return _TIFFCastUInt64ToSSize(tif, m, module); } /* @@ -227,15 +241,8 @@ TIFFVTileSize(TIFF* tif, uint32 nrows) { static const char module[] = "TIFFVTileSize"; uint64 m; - tmsize_t n; m=TIFFVTileSize64(tif,nrows); - n=(tmsize_t)m; - if ((uint64)n!=m) - { - TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); - n=0; - } - return(n); + return _TIFFCastUInt64ToSSize(tif, m, module); } /* @@ -251,15 +258,8 @@ TIFFTileSize(TIFF* tif) { static const char module[] = "TIFFTileSize"; uint64 m; - tmsize_t n; m=TIFFTileSize64(tif); - n=(tmsize_t)m; - if ((uint64)n!=m) - { - TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); - n=0; - } - return(n); + return _TIFFCastUInt64ToSSize(tif, m, module); } /* diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_unix.c b/thirdparty/tiff-4.2.0/libtiff/tif_unix.c similarity index 71% rename from thirdparty/tiff-4.0.3/libtiff/tif_unix.c rename to thirdparty/tiff-4.2.0/libtiff/tif_unix.c index 1387558f..bea1ef78 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_unix.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_unix.c @@ -1,5 +1,3 @@ -/* $Id: tif_unix.c,v 1.23 2012-06-01 21:40:59 fwarmerdam Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -55,53 +53,102 @@ #include "tiffiop.h" + +#define TIFF_IO_MAX 2147483647U + + +typedef union fd_as_handle_union +{ + int fd; + thandle_t h; +} fd_as_handle_union_t; + static tmsize_t _tiffReadProc(thandle_t fd, void* buf, tmsize_t size) { - size_t size_io = (size_t) size; - if ((tmsize_t) size_io != size) + fd_as_handle_union_t fdh; + const size_t bytes_total = (size_t) size; + size_t bytes_read; + tmsize_t count = -1; + if ((tmsize_t) bytes_total != size) { errno=EINVAL; return (tmsize_t) -1; } - return ((tmsize_t) read((int) fd, buf, size_io)); + fdh.h = fd; + for (bytes_read=0; bytes_read < bytes_total; bytes_read+=count) + { + char *buf_offset = (char *) buf+bytes_read; + size_t io_size = bytes_total-bytes_read; + if (io_size > TIFF_IO_MAX) + io_size = TIFF_IO_MAX; + count=read(fdh.fd, buf_offset, (TIFFIOSize_t) io_size); + if (count <= 0) + break; + } + if (count < 0) + return (tmsize_t)-1; + return (tmsize_t) bytes_read; } static tmsize_t _tiffWriteProc(thandle_t fd, void* buf, tmsize_t size) { - size_t size_io = (size_t) size; - if ((tmsize_t) size_io != size) + fd_as_handle_union_t fdh; + const size_t bytes_total = (size_t) size; + size_t bytes_written; + tmsize_t count = -1; + if ((tmsize_t) bytes_total != size) { errno=EINVAL; return (tmsize_t) -1; } - return ((tmsize_t) write((int) fd, buf, size_io)); + fdh.h = fd; + for (bytes_written=0; bytes_written < bytes_total; bytes_written+=count) + { + const char *buf_offset = (char *) buf+bytes_written; + size_t io_size = bytes_total-bytes_written; + if (io_size > TIFF_IO_MAX) + io_size = TIFF_IO_MAX; + count=write(fdh.fd, buf_offset, (TIFFIOSize_t) io_size); + if (count <= 0) + break; + } + if (count < 0) + return (tmsize_t)-1; + return (tmsize_t) bytes_written; + /* return ((tmsize_t) write(fdh.fd, buf, bytes_total)); */ } static uint64 _tiffSeekProc(thandle_t fd, uint64 off, int whence) { - off_t off_io = (off_t) off; + fd_as_handle_union_t fdh; + _TIFF_off_t off_io = (_TIFF_off_t) off; if ((uint64) off_io != off) { errno=EINVAL; return (uint64) -1; /* this is really gross */ } - return((uint64)lseek((int)fd,off_io,whence)); + fdh.h = fd; + return((uint64)_TIFF_lseek_f(fdh.fd,off_io,whence)); } static int _tiffCloseProc(thandle_t fd) { - return(close((int)fd)); + fd_as_handle_union_t fdh; + fdh.h = fd; + return(close(fdh.fd)); } static uint64 _tiffSizeProc(thandle_t fd) { - struct stat sb; - if (fstat((int)fd,&sb)<0) + _TIFF_stat_s sb; + fd_as_handle_union_t fdh; + fdh.h = fd; + if (_TIFF_fstat_f(fdh.fd,&sb)<0) return(0); else return((uint64)sb.st_size); @@ -115,9 +162,11 @@ _tiffMapProc(thandle_t fd, void** pbase, toff_t* psize) { uint64 size64 = _tiffSizeProc(fd); tmsize_t sizem = (tmsize_t)size64; - if ((uint64)sizem==size64) { + if (size64 && (uint64)sizem==size64) { + fd_as_handle_union_t fdh; + fdh.h = fd; *pbase = (void*) - mmap(0, (size_t)sizem, PROT_READ, MAP_SHARED, (int) fd, 0); + mmap(0, (size_t)sizem, PROT_READ, MAP_SHARED, fdh.fd, 0); if (*pbase != (void*) -1) { *psize = (tmsize_t)sizem; return (1); @@ -155,8 +204,10 @@ TIFFFdOpen(int fd, const char* name, const char* mode) { TIFF* tif; + fd_as_handle_union_t fdh; + fdh.fd = fd; tif = TIFFClientOpen(name, mode, - (thandle_t) fd, + fdh.h, _tiffReadProc, _tiffWriteProc, _tiffSeekProc, _tiffCloseProc, _tiffSizeProc, _tiffMapProc, _tiffUnmapProc); @@ -225,7 +276,7 @@ TIFFOpenW(const wchar_t* name, const char* mode) fd = _wopen(name, m, 0666); if (fd < 0) { - TIFFErrorExt(0, module, "%s: Cannot open", name); + TIFFErrorExt(0, module, "%ls: Cannot open", name); return ((TIFF *)0); } @@ -257,9 +308,20 @@ TIFFOpenW(const wchar_t* name, const char* mode) void* _TIFFmalloc(tmsize_t s) { + if (s == 0) + return ((void *) NULL); + return (malloc((size_t) s)); } +void* _TIFFcalloc(tmsize_t nmemb, tmsize_t siz) +{ + if( nmemb == 0 || siz == 0 ) + return ((void *) NULL); + + return calloc((size_t) nmemb, (size_t)siz); +} + void _TIFFfree(void* p) { diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_version.c b/thirdparty/tiff-4.2.0/libtiff/tif_version.c similarity index 93% rename from thirdparty/tiff-4.0.3/libtiff/tif_version.c rename to thirdparty/tiff-4.2.0/libtiff/tif_version.c index f92c843d..60875bbf 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_version.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_version.c @@ -1,4 +1,3 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_version.c,v 1.3 2010-03-10 18:56:49 bfriesen Exp $ */ /* * Copyright (c) 1992-1997 Sam Leffler * Copyright (c) 1992-1997 Silicon Graphics, Inc. diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_warning.c b/thirdparty/tiff-4.2.0/libtiff/tif_warning.c similarity index 88% rename from thirdparty/tiff-4.0.3/libtiff/tif_warning.c rename to thirdparty/tiff-4.2.0/libtiff/tif_warning.c index 423b636e..c482785c 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_warning.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_warning.c @@ -1,5 +1,3 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_warning.c,v 1.3 2010-03-10 18:56:49 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -51,24 +49,32 @@ void TIFFWarning(const char* module, const char* fmt, ...) { va_list ap; - va_start(ap, fmt); - if (_TIFFwarningHandler) + if (_TIFFwarningHandler) { + va_start(ap, fmt); (*_TIFFwarningHandler)(module, fmt, ap); - if (_TIFFwarningHandlerExt) + va_end(ap); + } + if (_TIFFwarningHandlerExt) { + va_start(ap, fmt); (*_TIFFwarningHandlerExt)(0, module, fmt, ap); - va_end(ap); + va_end(ap); + } } void TIFFWarningExt(thandle_t fd, const char* module, const char* fmt, ...) { va_list ap; - va_start(ap, fmt); - if (_TIFFwarningHandler) + if (_TIFFwarningHandler) { + va_start(ap, fmt); (*_TIFFwarningHandler)(module, fmt, ap); - if (_TIFFwarningHandlerExt) + va_end(ap); + } + if (_TIFFwarningHandlerExt) { + va_start(ap, fmt); (*_TIFFwarningHandlerExt)(fd, module, fmt, ap); - va_end(ap); + va_end(ap); + } } diff --git a/thirdparty/tiff-4.2.0/libtiff/tif_webp.c b/thirdparty/tiff-4.2.0/libtiff/tif_webp.c new file mode 100644 index 00000000..a00478f6 --- /dev/null +++ b/thirdparty/tiff-4.2.0/libtiff/tif_webp.c @@ -0,0 +1,702 @@ +/* +* Copyright (c) 2018, Mapbox +* Author: +* +* Permission to use, copy, modify, distribute, and sell this software and +* its documentation for any purpose is hereby granted without fee, provided +* that (i) the above copyright notices and this permission notice appear in +* all copies of the software and related documentation, and (ii) the names of +* Sam Leffler and Silicon Graphics may not be used in any advertising or +* publicity relating to the software without the specific, prior written +* permission of Sam Leffler and Silicon Graphics. +* +* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +* +* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +* OF THIS SOFTWARE. +*/ + +#include "tiffiop.h" +#ifdef WEBP_SUPPORT +/* + * TIFF Library. + * + * WEBP Compression Support + * + */ + +#include "webp/decode.h" +#include "webp/encode.h" + +#include + +#define LSTATE_INIT_DECODE 0x01 +#define LSTATE_INIT_ENCODE 0x02 +/* + * State block for each open TIFF + * file using WEBP compression/decompression. + */ +typedef struct { + uint16 nSamples; /* number of samples per pixel */ + + int lossless; /* lossy/lossless compression */ + int quality_level; /* compression level */ + WebPPicture sPicture; /* WebP Picture */ + WebPConfig sEncoderConfig; /* WebP encoder config */ + uint8* pBuffer; /* buffer to hold raw data on encoding */ + unsigned int buffer_offset; /* current offset into the buffer */ + unsigned int buffer_size; + + WebPIDecoder* psDecoder; /* WebPIDecoder */ + WebPDecBuffer sDecBuffer; /* Decoder buffer */ + int last_y; /* Last row decoded */ + + int state; /* state flags */ + + TIFFVGetMethod vgetparent; /* super-class method */ + TIFFVSetMethod vsetparent; /* super-class method */ +} WebPState; + +#define LState(tif) ((WebPState*) (tif)->tif_data) +#define DecoderState(tif) LState(tif) +#define EncoderState(tif) LState(tif) + +static int TWebPEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s); +static int TWebPDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s); + +static +int TWebPDatasetWriter(const uint8_t* data, size_t data_size, + const WebPPicture* const picture) +{ + static const char module[] = "TWebPDatasetWriter"; + TIFF* tif = (TIFF*)(picture->custom_ptr); + + if ( (tif->tif_rawcc + (tmsize_t)data_size) > tif->tif_rawdatasize ) { + TIFFErrorExt(tif->tif_clientdata, module, + "Buffer too small by " TIFF_SIZE_FORMAT " bytes.", + (size_t) (tif->tif_rawcc + data_size - tif->tif_rawdatasize)); + return 0; + } else { + _TIFFmemcpy(tif->tif_rawcp, data, data_size); + tif->tif_rawcc += data_size; + tif->tif_rawcp += data_size; + return 1; + } +} + +/* + * Encode a chunk of pixels. + */ +static int +TWebPEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) +{ + static const char module[] = "TWebPEncode"; + WebPState *sp = EncoderState(tif); + (void) s; + + assert(sp != NULL); + assert(sp->state == LSTATE_INIT_ENCODE); + + if( (uint64)sp->buffer_offset + + (uint64)cc > sp->buffer_size ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Too many bytes to be written"); + return 0; + } + + memcpy(sp->pBuffer + sp->buffer_offset, + bp, cc); + sp->buffer_offset += (unsigned)cc; + + return 1; + +} + +static int +TWebPDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) +{ + static const char module[] = "WebPDecode"; + VP8StatusCode status = VP8_STATUS_OK; + WebPState *sp = DecoderState(tif); + (void) s; + + assert(sp != NULL); + assert(sp->state == LSTATE_INIT_DECODE); + + if (occ % sp->sDecBuffer.u.RGBA.stride) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Fractional scanlines cannot be read"); + return 0; + } + + status = WebPIAppend(sp->psDecoder, tif->tif_rawcp, tif->tif_rawcc); + + if (status != VP8_STATUS_OK && status != VP8_STATUS_SUSPENDED) { + if (status == VP8_STATUS_INVALID_PARAM) { + TIFFErrorExt(tif->tif_clientdata, module, + "Invalid parameter used."); + } else if (status == VP8_STATUS_OUT_OF_MEMORY) { + TIFFErrorExt(tif->tif_clientdata, module, + "Out of memory."); + } else { + TIFFErrorExt(tif->tif_clientdata, module, + "Unrecognized error."); + } + return 0; + } else { + int current_y, stride; + uint8_t* buf; + + /* Returns the RGB/A image decoded so far */ + buf = WebPIDecGetRGB(sp->psDecoder, ¤t_y, NULL, NULL, &stride); + + if ((buf != NULL) && + (occ <= stride * (current_y - sp->last_y))) { + memcpy(op, + buf + (sp->last_y * stride), + occ); + + tif->tif_rawcp += tif->tif_rawcc; + tif->tif_rawcc = 0; + sp->last_y += occ / sp->sDecBuffer.u.RGBA.stride; + return 1; + } else { + TIFFErrorExt(tif->tif_clientdata, module, "Unable to decode WebP data."); + return 0; + } + } +} + +static int +TWebPFixupTags(TIFF* tif) +{ + (void) tif; + if (tif->tif_dir.td_planarconfig != PLANARCONFIG_CONTIG) { + static const char module[] = "TWebPFixupTags"; + TIFFErrorExt(tif->tif_clientdata, module, + "TIFF WEBP requires data to be stored contiguously in RGB e.g. RGBRGBRGB " +#if WEBP_ENCODER_ABI_VERSION >= 0x0100 + "or RGBARGBARGBA" +#endif + ); + return 0; + } + return 1; +} + +static int +TWebPSetupDecode(TIFF* tif) +{ + static const char module[] = "WebPSetupDecode"; + uint16 nBitsPerSample = tif->tif_dir.td_bitspersample; + uint16 sampleFormat = tif->tif_dir.td_sampleformat; + + WebPState* sp = DecoderState(tif); + assert(sp != NULL); + + sp->nSamples = tif->tif_dir.td_samplesperpixel; + + /* check band count */ + if ( sp->nSamples != 3 +#if WEBP_ENCODER_ABI_VERSION >= 0x0100 + && sp->nSamples != 4 +#endif + ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "WEBP driver doesn't support %d bands. Must be 3 (RGB) " + #if WEBP_ENCODER_ABI_VERSION >= 0x0100 + "or 4 (RGBA) " + #endif + "bands.", + sp->nSamples ); + return 0; + } + + /* check bits per sample and data type */ + if ((nBitsPerSample != 8) && (sampleFormat != 1)) { + TIFFErrorExt(tif->tif_clientdata, module, + "WEBP driver requires 8 bit unsigned data"); + return 0; + } + + /* if we were last encoding, terminate this mode */ + if (sp->state & LSTATE_INIT_ENCODE) { + WebPPictureFree(&sp->sPicture); + if (sp->pBuffer != NULL) { + _TIFFfree(sp->pBuffer); + sp->pBuffer = NULL; + } + sp->buffer_offset = 0; + sp->state = 0; + } + + sp->state |= LSTATE_INIT_DECODE; + + return 1; +} + +/* +* Setup state for decoding a strip. +*/ +static int +TWebPPreDecode(TIFF* tif, uint16 s) +{ + static const char module[] = "TWebPPreDecode"; + uint32 segment_width, segment_height; + WebPState* sp = DecoderState(tif); + TIFFDirectory* td = &tif->tif_dir; + (void) s; + assert(sp != NULL); + + if (isTiled(tif)) { + segment_width = td->td_tilewidth; + segment_height = td->td_tilelength; + } else { + segment_width = td->td_imagewidth; + segment_height = td->td_imagelength - tif->tif_row; + if (segment_height > td->td_rowsperstrip) + segment_height = td->td_rowsperstrip; + } + + if( segment_width > 16383 || segment_height > 16383 ) { + TIFFErrorExt(tif->tif_clientdata, module, + "WEBP maximum image dimensions are 16383 x 16383."); + return 0; + } + + if( (sp->state & LSTATE_INIT_DECODE) == 0 ) + tif->tif_setupdecode(tif); + + if (sp->psDecoder != NULL) { + WebPIDelete(sp->psDecoder); + WebPFreeDecBuffer(&sp->sDecBuffer); + sp->psDecoder = NULL; + } + + sp->last_y = 0; + + WebPInitDecBuffer(&sp->sDecBuffer); + + sp->sDecBuffer.is_external_memory = 0; + sp->sDecBuffer.width = segment_width; + sp->sDecBuffer.height = segment_height; + sp->sDecBuffer.u.RGBA.stride = segment_width * sp->nSamples; + sp->sDecBuffer.u.RGBA.size = segment_width * sp->nSamples * segment_height; + + if (sp->nSamples > 3) { + sp->sDecBuffer.colorspace = MODE_RGBA; + } else { + sp->sDecBuffer.colorspace = MODE_RGB; + } + + sp->psDecoder = WebPINewDecoder(&sp->sDecBuffer); + + if (sp->psDecoder == NULL) { + TIFFErrorExt(tif->tif_clientdata, module, + "Unable to allocate WebP decoder."); + return 0; + } + + return 1; +} + +static int +TWebPSetupEncode(TIFF* tif) +{ + static const char module[] = "WebPSetupEncode"; + uint16 nBitsPerSample = tif->tif_dir.td_bitspersample; + uint16 sampleFormat = tif->tif_dir.td_sampleformat; + + WebPState* sp = EncoderState(tif); + assert(sp != NULL); + + sp->nSamples = tif->tif_dir.td_samplesperpixel; + + /* check band count */ + if ( sp->nSamples != 3 +#if WEBP_ENCODER_ABI_VERSION >= 0x0100 + && sp->nSamples != 4 +#endif + ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "WEBP driver doesn't support %d bands. Must be 3 (RGB) " +#if WEBP_ENCODER_ABI_VERSION >= 0x0100 + "or 4 (RGBA) " +#endif + "bands.", + sp->nSamples ); + return 0; + } + + /* check bits per sample and data type */ + if ((nBitsPerSample != 8) || (sampleFormat != SAMPLEFORMAT_UINT)) { + TIFFErrorExt(tif->tif_clientdata, module, + "WEBP driver requires 8 bit unsigned data"); + return 0; + } + + if (sp->state & LSTATE_INIT_DECODE) { + WebPIDelete(sp->psDecoder); + WebPFreeDecBuffer(&sp->sDecBuffer); + sp->psDecoder = NULL; + sp->last_y = 0; + sp->state = 0; + } + + sp->state |= LSTATE_INIT_ENCODE; + + if (!WebPPictureInit(&sp->sPicture)) { + TIFFErrorExt(tif->tif_clientdata, module, + "Error initializing WebP picture."); + return 0; + } + + if (!WebPConfigInitInternal(&sp->sEncoderConfig, WEBP_PRESET_DEFAULT, + (float)sp->quality_level, + WEBP_ENCODER_ABI_VERSION)) { + TIFFErrorExt(tif->tif_clientdata, module, + "Error creating WebP encoder configuration."); + return 0; + } + + // WebPConfigInitInternal above sets lossless to false + #if WEBP_ENCODER_ABI_VERSION >= 0x0100 + sp->sEncoderConfig.lossless = sp->lossless; + if (sp->lossless) { + sp->sPicture.use_argb = 1; + } + #endif + + if (!WebPValidateConfig(&sp->sEncoderConfig)) { + TIFFErrorExt(tif->tif_clientdata, module, + "Error with WebP encoder configuration."); + return 0; + } + + return 1; +} + +/* +* Reset encoding state at the start of a strip. +*/ +static int +TWebPPreEncode(TIFF* tif, uint16 s) +{ + static const char module[] = "TWebPPreEncode"; + uint32 segment_width, segment_height; + WebPState *sp = EncoderState(tif); + TIFFDirectory* td = &tif->tif_dir; + + (void) s; + + assert(sp != NULL); + if( sp->state != LSTATE_INIT_ENCODE ) + tif->tif_setupencode(tif); + + /* + * Set encoding parameters for this strip/tile. + */ + if (isTiled(tif)) { + segment_width = td->td_tilewidth; + segment_height = td->td_tilelength; + } else { + segment_width = td->td_imagewidth; + segment_height = td->td_imagelength - tif->tif_row; + if (segment_height > td->td_rowsperstrip) + segment_height = td->td_rowsperstrip; + } + + if( segment_width > 16383 || segment_height > 16383 ) { + TIFFErrorExt(tif->tif_clientdata, module, + "WEBP maximum image dimensions are 16383 x 16383."); + return 0; + } + + /* set up buffer for raw data */ + /* given above check and that nSamples <= 4, buffer_size is <= 1 GB */ + sp->buffer_size = segment_width * segment_height * sp->nSamples; + + if (sp->pBuffer != NULL) { + _TIFFfree(sp->pBuffer); + sp->pBuffer = NULL; + } + + sp->pBuffer = _TIFFmalloc(sp->buffer_size); + if( !sp->pBuffer) { + TIFFErrorExt(tif->tif_clientdata, module, "Cannot allocate buffer"); + return 0; + } + sp->buffer_offset = 0; + + sp->sPicture.width = segment_width; + sp->sPicture.height = segment_height; + sp->sPicture.writer = TWebPDatasetWriter; + sp->sPicture.custom_ptr = tif; + + return 1; +} + +/* +* Finish off an encoded strip by flushing it. +*/ +static int +TWebPPostEncode(TIFF* tif) +{ + static const char module[] = "WebPPostEncode"; + int64_t stride; + WebPState *sp = EncoderState(tif); + assert(sp != NULL); + + assert(sp->state == LSTATE_INIT_ENCODE); + + stride = (int64_t)sp->sPicture.width * sp->nSamples; + +#if WEBP_ENCODER_ABI_VERSION >= 0x0100 + if (sp->nSamples == 4) { + if (!WebPPictureImportRGBA(&sp->sPicture, sp->pBuffer, (int)stride)) { + TIFFErrorExt(tif->tif_clientdata, module, + "WebPPictureImportRGBA() failed" ); + return 0; + } + } + else +#endif + if (!WebPPictureImportRGB(&sp->sPicture, sp->pBuffer, (int)stride)) { + TIFFErrorExt(tif->tif_clientdata, module, + "WebPPictureImportRGB() failed"); + return 0; + } + + if (!WebPEncode(&sp->sEncoderConfig, &sp->sPicture)) { + +#if WEBP_ENCODER_ABI_VERSION >= 0x0100 + const char* pszErrorMsg = NULL; + switch(sp->sPicture.error_code) { + case VP8_ENC_ERROR_OUT_OF_MEMORY: + pszErrorMsg = "Out of memory"; break; + case VP8_ENC_ERROR_BITSTREAM_OUT_OF_MEMORY: + pszErrorMsg = "Out of memory while flushing bits"; break; + case VP8_ENC_ERROR_NULL_PARAMETER: + pszErrorMsg = "A pointer parameter is NULL"; break; + case VP8_ENC_ERROR_INVALID_CONFIGURATION: + pszErrorMsg = "Configuration is invalid"; break; + case VP8_ENC_ERROR_BAD_DIMENSION: + pszErrorMsg = "Picture has invalid width/height"; break; + case VP8_ENC_ERROR_PARTITION0_OVERFLOW: + pszErrorMsg = "Partition is bigger than 512k. Try using less " + "SEGMENTS, or increase PARTITION_LIMIT value"; + break; + case VP8_ENC_ERROR_PARTITION_OVERFLOW: + pszErrorMsg = "Partition is bigger than 16M"; + break; + case VP8_ENC_ERROR_BAD_WRITE: + pszErrorMsg = "Error while fludshing bytes"; break; + case VP8_ENC_ERROR_FILE_TOO_BIG: + pszErrorMsg = "File is bigger than 4G"; break; + case VP8_ENC_ERROR_USER_ABORT: + pszErrorMsg = "User interrupted"; + break; + default: + TIFFErrorExt(tif->tif_clientdata, module, + "WebPEncode returned an unknown error code: %d", + sp->sPicture.error_code); + pszErrorMsg = "Unknown WebP error type."; + break; + } + TIFFErrorExt(tif->tif_clientdata, module, + "WebPEncode() failed : %s", pszErrorMsg); +#else + TIFFErrorExt(tif->tif_clientdata, module, + "Error in WebPEncode()"); +#endif + return 0; + } + + sp->sPicture.custom_ptr = NULL; + + if (!TIFFFlushData1(tif)) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Error flushing TIFF WebP encoder."); + return 0; + } + + return 1; +} + +static void +TWebPCleanup(TIFF* tif) +{ + WebPState* sp = LState(tif); + + assert(sp != 0); + + tif->tif_tagmethods.vgetfield = sp->vgetparent; + tif->tif_tagmethods.vsetfield = sp->vsetparent; + + if (sp->state & LSTATE_INIT_ENCODE) { + WebPPictureFree(&sp->sPicture); + } + + if (sp->psDecoder != NULL) { + WebPIDelete(sp->psDecoder); + WebPFreeDecBuffer(&sp->sDecBuffer); + sp->psDecoder = NULL; + sp->last_y = 0; + } + + if (sp->pBuffer != NULL) { + _TIFFfree(sp->pBuffer); + sp->pBuffer = NULL; + } + + _TIFFfree(tif->tif_data); + tif->tif_data = NULL; + + _TIFFSetDefaultCompressionState(tif); +} + +static int +TWebPVSetField(TIFF* tif, uint32 tag, va_list ap) +{ + static const char module[] = "WebPVSetField"; + WebPState* sp = LState(tif); + + switch (tag) { + case TIFFTAG_WEBP_LEVEL: + sp->quality_level = (int) va_arg(ap, int); + if( sp->quality_level <= 0 || + sp->quality_level > 100.0f ) { + TIFFWarningExt(tif->tif_clientdata, module, + "WEBP_LEVEL should be between 1 and 100"); + } + return 1; + case TIFFTAG_WEBP_LOSSLESS: + #if WEBP_ENCODER_ABI_VERSION >= 0x0100 + sp->lossless = va_arg(ap, int); + if (sp->lossless){ + sp->quality_level = 100; + } + return 1; + #else + TIFFErrorExt(tif->tif_clientdata, module, + "Need to upgrade WEBP driver, this version doesn't support " + "lossless compression."); + return 0; + #endif + default: + return (*sp->vsetparent)(tif, tag, ap); + } + /*NOTREACHED*/ +} + +static int +TWebPVGetField(TIFF* tif, uint32 tag, va_list ap) +{ + WebPState* sp = LState(tif); + + switch (tag) { + case TIFFTAG_WEBP_LEVEL: + *va_arg(ap, int*) = sp->quality_level; + break; + case TIFFTAG_WEBP_LOSSLESS: + *va_arg(ap, int*) = sp->lossless; + break; + default: + return (*sp->vgetparent)(tif, tag, ap); + } + return 1; +} + +static const TIFFField TWebPFields[] = { + { TIFFTAG_WEBP_LEVEL, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, + TIFF_SETGET_UNDEFINED, + FIELD_PSEUDO, TRUE, FALSE, "WEBP quality", NULL }, + { TIFFTAG_WEBP_LOSSLESS, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, + TIFF_SETGET_UNDEFINED, + FIELD_PSEUDO, TRUE, FALSE, "WEBP lossless/lossy", NULL + }, +}; + +int +TIFFInitWebP(TIFF* tif, int scheme) +{ + static const char module[] = "TIFFInitWebP"; + WebPState* sp; + + (void)scheme; + assert( scheme == COMPRESSION_WEBP ); + + /* + * Merge codec-specific tag information. + */ + if ( !_TIFFMergeFields(tif, TWebPFields, TIFFArrayCount(TWebPFields)) ) { + TIFFErrorExt(tif->tif_clientdata, module, + "Merging WebP codec-specific tags failed"); + return 0; + } + + /* + * Allocate state block so tag methods have storage to record values. + */ + tif->tif_data = (uint8*) _TIFFmalloc(sizeof(WebPState)); + if (tif->tif_data == NULL) + goto bad; + sp = LState(tif); + + /* + * Override parent get/set field methods. + */ + sp->vgetparent = tif->tif_tagmethods.vgetfield; + tif->tif_tagmethods.vgetfield = TWebPVGetField; /* hook for codec tags */ + sp->vsetparent = tif->tif_tagmethods.vsetfield; + tif->tif_tagmethods.vsetfield = TWebPVSetField; /* hook for codec tags */ + + /* Default values for codec-specific fields */ + sp->quality_level = 75; /* default comp. level */ + sp->lossless = 0; /* default to false */ + sp->state = 0; + sp->nSamples = 0; + sp->psDecoder = NULL; + sp->last_y = 0; + + sp->buffer_offset = 0; + sp->pBuffer = NULL; + + /* + * Install codec methods. + * Notes: + * encoderow is not supported + */ + tif->tif_fixuptags = TWebPFixupTags; + tif->tif_setupdecode = TWebPSetupDecode; + tif->tif_predecode = TWebPPreDecode; + tif->tif_decoderow = TWebPDecode; + tif->tif_decodestrip = TWebPDecode; + tif->tif_decodetile = TWebPDecode; + tif->tif_setupencode = TWebPSetupEncode; + tif->tif_preencode = TWebPPreEncode; + tif->tif_postencode = TWebPPostEncode; + tif->tif_encoderow = TWebPEncode; + tif->tif_encodestrip = TWebPEncode; + tif->tif_encodetile = TWebPEncode; + tif->tif_cleanup = TWebPCleanup; + + return 1; +bad: + TIFFErrorExt(tif->tif_clientdata, module, + "No space for WebP state block"); + return 0; +} + +#endif /* WEBP_SUPPORT */ diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_win32.c b/thirdparty/tiff-4.2.0/libtiff/tif_win32.c similarity index 83% rename from thirdparty/tiff-4.0.3/libtiff/tif_win32.c rename to thirdparty/tiff-4.2.0/libtiff/tif_win32.c index 2cf1de93..89645693 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_win32.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_win32.c @@ -1,5 +1,3 @@ -/* $Id: tif_win32.c,v 1.39 2011-12-22 17:07:57 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -28,10 +26,39 @@ * TIFF Library Win32-specific Routines. Adapted from tif_unix.c 4/5/95 by * Scott Wagner (wagner@itek.com), Itek Graphix, Rochester, NY USA */ + #include "tiffiop.h" #include +/* + CreateFileA/CreateFileW return type 'HANDLE' while TIFFFdOpen() takes 'int', + which is formally incompatible and can even seemingly be of different size: + HANDLE is 64 bit under Win64, while int is still 32 bits there. + + However, only the lower 32 bits of a HANDLE are significant under Win64 as, + for interoperability reasons, they must have the same values in 32- and + 64-bit programs running on the same system, see + + https://docs.microsoft.com/en-us/windows/win32/winprog64/interprocess-communication + + Because of this, it is safe to define the following trivial functions for + casting between ints and HANDLEs, which are only really needed to avoid + compiler warnings (and, perhaps, to make the code slightly more clear). + Note that using the intermediate cast to "intptr_t" is crucial for warning + avoidance, as this integer type has the same size as HANDLE in all builds. +*/ + +static inline thandle_t thandle_from_int(int ifd) +{ + return (thandle_t)(intptr_t)ifd; +} + +static inline int thandle_to_int(thandle_t fd) +{ + return (int)(intptr_t)fd; +} + static tmsize_t _tiffReadProc(thandle_t fd, void* buf, tmsize_t size) { @@ -128,9 +155,11 @@ _tiffCloseProc(thandle_t fd) static uint64 _tiffSizeProc(thandle_t fd) { - ULARGE_INTEGER m; - m.LowPart=GetFileSize(fd,&m.HighPart); - return(m.QuadPart); + LARGE_INTEGER m; + if (GetFileSizeEx(fd,&m)) + return(m.QuadPart); + else + return(0); } static int @@ -162,7 +191,7 @@ _tiffMapProc(thandle_t fd, void** pbase, toff_t* psize) size = _tiffSizeProc(fd); sizem = (tmsize_t)size; - if ((uint64)sizem!=size) + if (!size || (uint64)sizem!=size) return (0); /* By passing in 0 for the maximum file size, it specifies that we @@ -214,7 +243,7 @@ TIFFFdOpen(int ifd, const char* name, const char* mode) break; } } - tif = TIFFClientOpen(name, mode, (thandle_t)ifd, + tif = TIFFClientOpen(name, mode, thandle_from_int(ifd), _tiffReadProc, _tiffWriteProc, _tiffSeekProc, _tiffCloseProc, _tiffSizeProc, fSuppressMap ? _tiffDummyMapProc : _tiffMapProc, @@ -259,7 +288,7 @@ TIFFOpen(const char* name, const char* mode) return ((TIFF *)0); } - tif = TIFFFdOpen((int)fd, name, mode); + tif = TIFFFdOpen(thandle_to_int(fd), name, mode); if(!tif) CloseHandle(fd); return tif; @@ -314,7 +343,7 @@ TIFFOpenW(const wchar_t* name, const char* mode) NULL, NULL); } - tif = TIFFFdOpen((int)fd, + tif = TIFFFdOpen(thandle_to_int(fd), (mbname != NULL) ? mbname : "", mode); if(!tif) CloseHandle(fd); @@ -329,9 +358,20 @@ TIFFOpenW(const wchar_t* name, const char* mode) void* _TIFFmalloc(tmsize_t s) { + if (s == 0) + return ((void *) NULL); + return (malloc((size_t) s)); } +void* _TIFFcalloc(tmsize_t nmemb, tmsize_t siz) +{ + if( nmemb == 0 || siz == 0 ) + return ((void *) NULL); + + return calloc((size_t) nmemb, (size_t)siz); +} + void _TIFFfree(void* p) { @@ -371,60 +411,21 @@ _TIFFmemcmp(const void* p1, const void* p2, tmsize_t c) static void Win32WarningHandler(const char* module, const char* fmt, va_list ap) { -#ifndef TIF_PLATFORM_CONSOLE - LPTSTR szTitle; - LPTSTR szTmp; - LPCTSTR szTitleText = "%s Warning"; - LPCTSTR szDefaultModule = "LIBTIFF"; - LPCTSTR szTmpModule = (module == NULL) ? szDefaultModule : module; - SIZE_T nBufSize = (strlen(szTmpModule) + - strlen(szTitleText) + strlen(fmt) + 256)*sizeof(char); - - if ((szTitle = (LPTSTR)LocalAlloc(LMEM_FIXED, nBufSize)) == NULL) - return; - sprintf(szTitle, szTitleText, szTmpModule); - szTmp = szTitle + (strlen(szTitle)+2)*sizeof(char); - vsnprintf(szTmp, nBufSize-(strlen(szTitle)+2)*sizeof(char), fmt, ap); - MessageBoxA(GetFocus(), szTmp, szTitle, MB_OK | MB_ICONINFORMATION); - LocalFree(szTitle); - - return; -#else if (module != NULL) fprintf(stderr, "%s: ", module); fprintf(stderr, "Warning, "); vfprintf(stderr, fmt, ap); fprintf(stderr, ".\n"); -#endif } TIFFErrorHandler _TIFFwarningHandler = Win32WarningHandler; static void Win32ErrorHandler(const char* module, const char* fmt, va_list ap) { -#ifndef TIF_PLATFORM_CONSOLE - LPTSTR szTitle; - LPTSTR szTmp; - LPCTSTR szTitleText = "%s Error"; - LPCTSTR szDefaultModule = "LIBTIFF"; - LPCTSTR szTmpModule = (module == NULL) ? szDefaultModule : module; - SIZE_T nBufSize = (strlen(szTmpModule) + - strlen(szTitleText) + strlen(fmt) + 256)*sizeof(char); - - if ((szTitle = (LPTSTR)LocalAlloc(LMEM_FIXED, nBufSize)) == NULL) - return; - sprintf(szTitle, szTitleText, szTmpModule); - szTmp = szTitle + (strlen(szTitle)+2)*sizeof(char); - vsnprintf(szTmp, nBufSize-(strlen(szTitle)+2)*sizeof(char), fmt, ap); - MessageBoxA(GetFocus(), szTmp, szTitle, MB_OK | MB_ICONEXCLAMATION); - LocalFree(szTitle); - return; -#else if (module != NULL) fprintf(stderr, "%s: ", module); vfprintf(stderr, fmt, ap); fprintf(stderr, ".\n"); -#endif } TIFFErrorHandler _TIFFerrorHandler = Win32ErrorHandler; diff --git a/thirdparty/tiff-4.0.3/libtiff/tif_write.c b/thirdparty/tiff-4.2.0/libtiff/tif_write.c similarity index 73% rename from thirdparty/tiff-4.0.3/libtiff/tif_write.c rename to thirdparty/tiff-4.2.0/libtiff/tif_write.c index 8792123c..3af69ab4 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tif_write.c +++ b/thirdparty/tiff-4.2.0/libtiff/tif_write.c @@ -1,5 +1,3 @@ -/* $Id: tif_write.c,v 1.37 2012-08-13 22:10:17 fwarmerdam Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -115,6 +113,10 @@ TIFFWriteScanline(TIFF* tif, void* buf, uint32 row, uint16 sample) if (strip >= td->td_stripsperimage && imagegrew) td->td_stripsperimage = TIFFhowmany_32(td->td_imagelength,td->td_rowsperstrip); + if (td->td_stripsperimage == 0) { + TIFFErrorExt(tif->tif_clientdata, module, "Zero strips per image"); + return (-1); + } tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip; if ((tif->tif_flags & TIFF_CODERSETUP) == 0) { @@ -126,10 +128,10 @@ TIFFWriteScanline(TIFF* tif, void* buf, uint32 row, uint16 sample) tif->tif_rawcc = 0; tif->tif_rawcp = tif->tif_rawdata; - if( td->td_stripbytecount[strip] > 0 ) + if( td->td_stripbytecount_p[strip] > 0 ) { /* if we are writing over existing tiles, zero length */ - td->td_stripbytecount[strip] = 0; + td->td_stripbytecount_p[strip] = 0; /* this forces TIFFAppendToStrip() to do a seek */ tif->tif_curoff = 0; @@ -174,6 +176,32 @@ TIFFWriteScanline(TIFF* tif, void* buf, uint32 row, uint16 sample) return (status); } +/* Make sure that at the first attempt of rewriting a tile/strip, we will have */ +/* more bytes available in the output buffer than the previous byte count, */ +/* so that TIFFAppendToStrip() will detect the overflow when it is called the first */ +/* time if the new compressed tile is bigger than the older one. (GDAL #4771) */ +static int _TIFFReserveLargeEnoughWriteBuffer(TIFF* tif, uint32 strip_or_tile) +{ + TIFFDirectory *td = &tif->tif_dir; + if( td->td_stripbytecount_p[strip_or_tile] > 0 ) + { + /* The +1 is to ensure at least one extra bytes */ + /* The +4 is because the LZW encoder flushes 4 bytes before the limit */ + uint64 safe_buffer_size = (uint64)(td->td_stripbytecount_p[strip_or_tile] + 1 + 4); + if( tif->tif_rawdatasize <= (tmsize_t)safe_buffer_size ) + { + if( !(TIFFWriteBufferSetup(tif, NULL, + (tmsize_t)TIFFroundup_64(safe_buffer_size, 1024))) ) + return 0; + } + + /* Force TIFFAppendToStrip() to consider placing data at end + of file. */ + tif->tif_curoff = 0; + } + return 1; +} + /* * Encode the supplied data and write it to the * specified strip. @@ -220,6 +248,18 @@ TIFFWriteEncodedStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc) tif->tif_flags |= TIFF_BUF4WRITE; tif->tif_curstrip = strip; + if( !_TIFFReserveLargeEnoughWriteBuffer(tif, strip) ) { + return ((tmsize_t)(-1)); + } + + tif->tif_rawcc = 0; + tif->tif_rawcp = tif->tif_rawdata; + + if (td->td_stripsperimage == 0) { + TIFFErrorExt(tif->tif_clientdata, module, "Zero strips per image"); + return ((tmsize_t) -1); + } + tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip; if ((tif->tif_flags & TIFF_CODERSETUP) == 0) { if (!(*tif->tif_setupencode)(tif)) @@ -227,28 +267,24 @@ TIFFWriteEncodedStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc) tif->tif_flags |= TIFF_CODERSETUP; } - if( td->td_stripbytecount[strip] > 0 ) - { - /* Make sure that at the first attempt of rewriting the tile, we will have */ - /* more bytes available in the output buffer than the previous byte count, */ - /* so that TIFFAppendToStrip() will detect the overflow when it is called the first */ - /* time if the new compressed tile is bigger than the older one. (GDAL #4771) */ - if( tif->tif_rawdatasize <= td->td_stripbytecount[strip] ) - { - if( !(TIFFWriteBufferSetup(tif, NULL, - (tmsize_t)TIFFroundup_64((uint64)(td->td_stripbytecount[strip] + 1), 1024))) ) - return ((tmsize_t)(-1)); - } - - /* Force TIFFAppendToStrip() to consider placing data at end - of file. */ - tif->tif_curoff = 0; - } - - tif->tif_rawcc = 0; - tif->tif_rawcp = tif->tif_rawdata; - tif->tif_flags &= ~TIFF_POSTENCODE; + + /* shortcut to avoid an extra memcpy() */ + if( td->td_compression == COMPRESSION_NONE ) + { + /* swab if needed - note that source buffer will be altered */ + tif->tif_postdecode( tif, (uint8*) data, cc ); + + if (!isFillOrder(tif, td->td_fillorder) && + (tif->tif_flags & TIFF_NOBITREV) == 0) + TIFFReverseBits((uint8*) data, cc); + + if (cc > 0 && + !TIFFAppendToStrip(tif, strip, (uint8*) data, cc)) + return ((tmsize_t) -1); + return (cc); + } + sample = (uint16)(strip / td->td_stripsperimage); if (!(*tif->tif_preencode)(tif, sample)) return ((tmsize_t) -1); @@ -257,7 +293,7 @@ TIFFWriteEncodedStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc) tif->tif_postdecode( tif, (uint8*) data, cc ); if (!(*tif->tif_encodestrip)(tif, (uint8*) data, cc, sample)) - return (0); + return ((tmsize_t) -1); if (!(*tif->tif_postencode)(tif)) return ((tmsize_t) -1); if (!isFillOrder(tif, td->td_fillorder) && @@ -311,6 +347,10 @@ TIFFWriteRawStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc) return ((tmsize_t) -1); } tif->tif_curstrip = strip; + if (td->td_stripsperimage == 0) { + TIFFErrorExt(tif->tif_clientdata, module,"Zero strips per image"); + return ((tmsize_t) -1); + } tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip; return (TIFFAppendToStrip(tif, strip, (uint8*) data, cc) ? cc : (tmsize_t) -1); @@ -353,6 +393,7 @@ TIFFWriteEncodedTile(TIFF* tif, uint32 tile, void* data, tmsize_t cc) static const char module[] = "TIFFWriteEncodedTile"; TIFFDirectory *td; uint16 sample; + uint32 howmany32; if (!WRITECHECKTILES(tif, module)) return ((tmsize_t)(-1)); @@ -373,35 +414,29 @@ TIFFWriteEncodedTile(TIFF* tif, uint32 tile, void* data, tmsize_t cc) tif->tif_flags |= TIFF_BUF4WRITE; tif->tif_curtile = tile; - if( td->td_stripbytecount[tile] > 0 ) - { - /* Make sure that at the first attempt of rewriting the tile, we will have */ - /* more bytes available in the output buffer than the previous byte count, */ - /* so that TIFFAppendToStrip() will detect the overflow when it is called the first */ - /* time if the new compressed tile is bigger than the older one. (GDAL #4771) */ - if( tif->tif_rawdatasize <= td->td_stripbytecount[tile] ) - { - if( !(TIFFWriteBufferSetup(tif, NULL, - (tmsize_t)TIFFroundup_64((uint64)(td->td_stripbytecount[tile] + 1), 1024))) ) - return ((tmsize_t)(-1)); - } - - /* Force TIFFAppendToStrip() to consider placing data at end - of file. */ - tif->tif_curoff = 0; + if( !_TIFFReserveLargeEnoughWriteBuffer(tif, tile) ) { + return ((tmsize_t)(-1)); } - tif->tif_rawcc = 0; - tif->tif_rawcp = tif->tif_rawdata; + tif->tif_rawcc = 0; + tif->tif_rawcp = tif->tif_rawdata; /* * Compute tiles per row & per column to compute * current row and column */ - tif->tif_row = (tile % TIFFhowmany_32(td->td_imagelength, td->td_tilelength)) - * td->td_tilelength; - tif->tif_col = (tile % TIFFhowmany_32(td->td_imagewidth, td->td_tilewidth)) - * td->td_tilewidth; + howmany32=TIFFhowmany_32(td->td_imagelength, td->td_tilelength); + if (howmany32 == 0) { + TIFFErrorExt(tif->tif_clientdata,module,"Zero tiles"); + return ((tmsize_t)(-1)); + } + tif->tif_row = (tile % howmany32) * td->td_tilelength; + howmany32=TIFFhowmany_32(td->td_imagewidth, td->td_tilewidth); + if (howmany32 == 0) { + TIFFErrorExt(tif->tif_clientdata,module,"Zero tiles"); + return ((tmsize_t)(-1)); + } + tif->tif_col = (tile % howmany32) * td->td_tilewidth; if ((tif->tif_flags & TIFF_CODERSETUP) == 0) { if (!(*tif->tif_setupencode)(tif)) @@ -409,9 +444,7 @@ TIFFWriteEncodedTile(TIFF* tif, uint32 tile, void* data, tmsize_t cc) tif->tif_flags |= TIFF_CODERSETUP; } tif->tif_flags &= ~TIFF_POSTENCODE; - sample = (uint16)(tile/td->td_stripsperimage); - if (!(*tif->tif_preencode)(tif, sample)) - return ((tmsize_t)(-1)); + /* * Clamp write amount to the tile size. This is mostly * done so that callers can pass in some large number @@ -420,22 +453,41 @@ TIFFWriteEncodedTile(TIFF* tif, uint32 tile, void* data, tmsize_t cc) if ( cc < 1 || cc > tif->tif_tilesize) cc = tif->tif_tilesize; + /* shortcut to avoid an extra memcpy() */ + if( td->td_compression == COMPRESSION_NONE ) + { /* swab if needed - note that source buffer will be altered */ - tif->tif_postdecode( tif, (uint8*) data, cc ); + tif->tif_postdecode( tif, (uint8*) data, cc ); - if (!(*tif->tif_encodetile)(tif, (uint8*) data, cc, sample)) - return (0); - if (!(*tif->tif_postencode)(tif)) - return ((tmsize_t)(-1)); - if (!isFillOrder(tif, td->td_fillorder) && - (tif->tif_flags & TIFF_NOBITREV) == 0) - TIFFReverseBits((uint8*)tif->tif_rawdata, tif->tif_rawcc); - if (tif->tif_rawcc > 0 && !TIFFAppendToStrip(tif, tile, - tif->tif_rawdata, tif->tif_rawcc)) - return ((tmsize_t)(-1)); - tif->tif_rawcc = 0; - tif->tif_rawcp = tif->tif_rawdata; - return (cc); + if (!isFillOrder(tif, td->td_fillorder) && + (tif->tif_flags & TIFF_NOBITREV) == 0) + TIFFReverseBits((uint8*) data, cc); + + if (cc > 0 && + !TIFFAppendToStrip(tif, tile, (uint8*) data, cc)) + return ((tmsize_t) -1); + return (cc); + } + + sample = (uint16)(tile/td->td_stripsperimage); + if (!(*tif->tif_preencode)(tif, sample)) + return ((tmsize_t)(-1)); + /* swab if needed - note that source buffer will be altered */ + tif->tif_postdecode( tif, (uint8*) data, cc ); + + if (!(*tif->tif_encodetile)(tif, (uint8*) data, cc, sample)) + return ((tmsize_t) -1); + if (!(*tif->tif_postencode)(tif)) + return ((tmsize_t)(-1)); + if (!isFillOrder(tif, td->td_fillorder) && + (tif->tif_flags & TIFF_NOBITREV) == 0) + TIFFReverseBits((uint8*)tif->tif_rawdata, tif->tif_rawcc); + if (tif->tif_rawcc > 0 && !TIFFAppendToStrip(tif, tile, + tif->tif_rawdata, tif->tif_rawcc)) + return ((tmsize_t)(-1)); + tif->tif_rawcc = 0; + tif->tif_rawcp = tif->tif_rawdata; + return (cc); } /* @@ -481,20 +533,29 @@ TIFFSetupStrips(TIFF* tif) isUnspecified(tif, FIELD_ROWSPERSTRIP) ? td->td_samplesperpixel : TIFFNumberOfStrips(tif); td->td_nstrips = td->td_stripsperimage; + /* TIFFWriteDirectoryTagData has a limitation to 0x80000000U bytes */ + if( td->td_nstrips >= 0x80000000U / ((tif->tif_flags&TIFF_BIGTIFF)?0x8U:0x4U) ) + { + TIFFErrorExt(tif->tif_clientdata, "TIFFSetupStrips", + "Too large Strip/Tile Offsets/ByteCounts arrays"); + return 0; + } if (td->td_planarconfig == PLANARCONFIG_SEPARATE) td->td_stripsperimage /= td->td_samplesperpixel; - td->td_stripoffset = (uint64 *) - _TIFFmalloc(td->td_nstrips * sizeof (uint64)); - td->td_stripbytecount = (uint64 *) - _TIFFmalloc(td->td_nstrips * sizeof (uint64)); - if (td->td_stripoffset == NULL || td->td_stripbytecount == NULL) + td->td_stripoffset_p = (uint64 *) + _TIFFCheckMalloc(tif, td->td_nstrips, sizeof (uint64), + "for \"StripOffsets\" array"); + td->td_stripbytecount_p = (uint64 *) + _TIFFCheckMalloc(tif, td->td_nstrips, sizeof (uint64), + "for \"StripByteCounts\" array"); + if (td->td_stripoffset_p == NULL || td->td_stripbytecount_p == NULL) return (0); /* * Place data at the end-of-file * (by setting offsets to zero). */ - _TIFFmemset(td->td_stripoffset, 0, td->td_nstrips*sizeof (uint64)); - _TIFFmemset(td->td_stripbytecount, 0, td->td_nstrips*sizeof (uint64)); + _TIFFmemset(td->td_stripoffset_p, 0, td->td_nstrips*sizeof (uint64)); + _TIFFmemset(td->td_stripbytecount_p, 0, td->td_nstrips*sizeof (uint64)); TIFFSetFieldBit(tif, FIELD_STRIPOFFSETS); TIFFSetFieldBit(tif, FIELD_STRIPBYTECOUNTS); return (1); @@ -516,7 +577,7 @@ TIFFWriteCheck(TIFF* tif, int tiles, const char* module) } if (tiles ^ isTiled(tif)) { TIFFErrorExt(tif->tif_clientdata, module, tiles ? - "Can not write tiles to a stripped image" : + "Can not write tiles to a striped image" : "Can not write scanlines to a tiled image"); return (0); } @@ -554,7 +615,7 @@ TIFFWriteCheck(TIFF* tif, int tiles, const char* module) return (0); } } - if (tif->tif_dir.td_stripoffset == NULL && !TIFFSetupStrips(tif)) { + if (tif->tif_dir.td_stripoffset_p == NULL && !TIFFSetupStrips(tif)) { tif->tif_dir.td_nstrips = 0; TIFFErrorExt(tif->tif_clientdata, module, "No space for %s arrays", isTiled(tif) ? "tile" : "strip"); @@ -572,6 +633,20 @@ TIFFWriteCheck(TIFF* tif, int tiles, const char* module) if (tif->tif_scanlinesize == 0) return (0); tif->tif_flags |= TIFF_BEENWRITING; + + if( tif->tif_dir.td_stripoffset_entry.tdir_tag != 0 && + tif->tif_dir.td_stripoffset_entry.tdir_count == 0 && + tif->tif_dir.td_stripoffset_entry.tdir_type == 0 && + tif->tif_dir.td_stripoffset_entry.tdir_offset.toff_long8 == 0 && + tif->tif_dir.td_stripbytecount_entry.tdir_tag != 0 && + tif->tif_dir.td_stripbytecount_entry.tdir_count == 0 && + tif->tif_dir.td_stripbytecount_entry.tdir_type == 0 && + tif->tif_dir.td_stripbytecount_entry.tdir_offset.toff_long8 == 0 && + !(tif->tif_flags & TIFF_DIRTYDIRECT) ) + { + TIFFForceStrileArrayWriting(tif); + } + return (1); } @@ -593,6 +668,10 @@ TIFFWriteBufferSetup(TIFF* tif, void* bp, tmsize_t size) if (size == (tmsize_t)(-1)) { size = (isTiled(tif) ? tif->tif_tilesize : TIFFStripSize(tif)); + + /* Adds 10% margin for cases where compression would expand a bit */ + if( size < TIFF_TMSIZE_T_MAX - size / 10 ) + size += size / 10; /* * Make raw data buffer at least 8K */ @@ -628,9 +707,9 @@ TIFFGrowStrips(TIFF* tif, uint32 delta, const char* module) uint64* new_stripbytecount; assert(td->td_planarconfig == PLANARCONFIG_CONTIG); - new_stripoffset = (uint64*)_TIFFrealloc(td->td_stripoffset, + new_stripoffset = (uint64*)_TIFFrealloc(td->td_stripoffset_p, (td->td_nstrips + delta) * sizeof (uint64)); - new_stripbytecount = (uint64*)_TIFFrealloc(td->td_stripbytecount, + new_stripbytecount = (uint64*)_TIFFrealloc(td->td_stripbytecount_p, (td->td_nstrips + delta) * sizeof (uint64)); if (new_stripoffset == NULL || new_stripbytecount == NULL) { if (new_stripoffset) @@ -641,11 +720,11 @@ TIFFGrowStrips(TIFF* tif, uint32 delta, const char* module) TIFFErrorExt(tif->tif_clientdata, module, "No space to expand strip arrays"); return (0); } - td->td_stripoffset = new_stripoffset; - td->td_stripbytecount = new_stripbytecount; - _TIFFmemset(td->td_stripoffset + td->td_nstrips, + td->td_stripoffset_p = new_stripoffset; + td->td_stripbytecount_p = new_stripbytecount; + _TIFFmemset(td->td_stripoffset_p + td->td_nstrips, 0, delta*sizeof (uint64)); - _TIFFmemset(td->td_stripbytecount + td->td_nstrips, + _TIFFmemset(td->td_stripbytecount_p + td->td_nstrips, 0, delta*sizeof (uint64)); td->td_nstrips += delta; tif->tif_flags |= TIFF_DIRTYDIRECT; @@ -664,12 +743,12 @@ TIFFAppendToStrip(TIFF* tif, uint32 strip, uint8* data, tmsize_t cc) uint64 m; int64 old_byte_count = -1; - if (td->td_stripoffset[strip] == 0 || tif->tif_curoff == 0) { + if (td->td_stripoffset_p[strip] == 0 || tif->tif_curoff == 0) { assert(td->td_nstrips > 0); - if( td->td_stripbytecount[strip] != 0 - && td->td_stripoffset[strip] != 0 - && td->td_stripbytecount[strip] >= (uint64) cc ) + if( td->td_stripbytecount_p[strip] != 0 + && td->td_stripoffset_p[strip] != 0 + && td->td_stripbytecount_p[strip] >= (uint64) cc ) { /* * There is already tile data on disk, and the new tile @@ -678,7 +757,7 @@ TIFFAppendToStrip(TIFF* tif, uint32 strip, uint8* data, tmsize_t cc) * more data to append to this strip before we are done * depending on how we are getting called. */ - if (!SeekOK(tif, td->td_stripoffset[strip])) { + if (!SeekOK(tif, td->td_stripoffset_p[strip])) { TIFFErrorExt(tif->tif_clientdata, module, "Seek error at scanline %lu", (unsigned long)tif->tif_row); @@ -691,17 +770,17 @@ TIFFAppendToStrip(TIFF* tif, uint32 strip, uint8* data, tmsize_t cc) * Seek to end of file, and set that as our location to * write this strip. */ - td->td_stripoffset[strip] = TIFFSeekFile(tif, 0, SEEK_END); + td->td_stripoffset_p[strip] = TIFFSeekFile(tif, 0, SEEK_END); tif->tif_flags |= TIFF_DIRTYSTRIP; } - tif->tif_curoff = td->td_stripoffset[strip]; + tif->tif_curoff = td->td_stripoffset_p[strip]; /* * We are starting a fresh strip/tile, so set the size to zero. */ - old_byte_count = td->td_stripbytecount[strip]; - td->td_stripbytecount[strip] = 0; + old_byte_count = td->td_stripbytecount_p[strip]; + td->td_stripbytecount_p[strip] = 0; } m = tif->tif_curoff+cc; @@ -718,9 +797,9 @@ TIFFAppendToStrip(TIFF* tif, uint32 strip, uint8* data, tmsize_t cc) return (0); } tif->tif_curoff = m; - td->td_stripbytecount[strip] += cc; + td->td_stripbytecount_p[strip] += cc; - if( (int64) td->td_stripbytecount[strip] != old_byte_count ) + if( (int64) td->td_stripbytecount_p[strip] != old_byte_count ) tif->tif_flags |= TIFF_DIRTYSTRIP; return (1); @@ -742,7 +821,14 @@ TIFFFlushData1(TIFF* tif) if (!TIFFAppendToStrip(tif, isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip, tif->tif_rawdata, tif->tif_rawcc)) + { + /* We update those variables even in case of error since there's */ + /* code that doesn't really check the return code of this */ + /* function */ + tif->tif_rawcc = 0; + tif->tif_rawcp = tif->tif_rawdata; return (0); + } tif->tif_rawcc = 0; tif->tif_rawcp = tif->tif_rawdata; } diff --git a/thirdparty/tiff-4.2.0/libtiff/tif_zip.c b/thirdparty/tiff-4.2.0/libtiff/tif_zip.c new file mode 100644 index 00000000..e71c312c --- /dev/null +++ b/thirdparty/tiff-4.2.0/libtiff/tif_zip.c @@ -0,0 +1,700 @@ +/* + * Copyright (c) 1995-1997 Sam Leffler + * Copyright (c) 1995-1997 Silicon Graphics, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that (i) the above copyright notices and this permission notice appear in + * all copies of the software and related documentation, and (ii) the names of + * Sam Leffler and Silicon Graphics may not be used in any advertising or + * publicity relating to the software without the specific, prior written + * permission of Sam Leffler and Silicon Graphics. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR + * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF + * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +#include "tiffiop.h" +#ifdef ZIP_SUPPORT +/* + * TIFF Library. + * + * ZIP (aka Deflate) Compression Support + * + * This file is an interface to the zlib library written by + * Jean-loup Gailly and Mark Adler. You must use version 1.0 or later + * of the library. + * + * Optionally, libdeflate (https://github.com/ebiggers/libdeflate) may be used + * to do the compression and decompression, but only for whole strips and tiles. + * For scanline access, zlib will be sued as a fallback. + */ +#include "tif_predict.h" +#include "zlib.h" + +#if LIBDEFLATE_SUPPORT +#include "libdeflate.h" +#endif +#define LIBDEFLATE_MAX_COMPRESSION_LEVEL 12 + +#include + +/* + * Sigh, ZLIB_VERSION is defined as a string so there's no + * way to do a proper check here. Instead we guess based + * on the presence of #defines that were added between the + * 0.95 and 1.0 distributions. + */ +#if !defined(Z_NO_COMPRESSION) || !defined(Z_DEFLATED) +#error "Antiquated ZLIB software; you must use version 1.0 or later" +#endif + +#define SAFE_MSG(sp) ((sp)->stream.msg == NULL ? "" : (sp)->stream.msg) + +/* + * State block for each open TIFF + * file using ZIP compression/decompression. + */ +typedef struct { + TIFFPredictorState predict; + z_stream stream; + int zipquality; /* compression level */ + int state; /* state flags */ + int subcodec; /* DEFLATE_SUBCODEC_ZLIB or DEFLATE_SUBCODEC_LIBDEFLATE */ +#if LIBDEFLATE_SUPPORT + int libdeflate_state; /* -1 = until first time ZIPEncode() / ZIPDecode() is called, 0 = use zlib, 1 = use libdeflate */ + struct libdeflate_decompressor* libdeflate_dec; + struct libdeflate_compressor* libdeflate_enc; +#endif +#define ZSTATE_INIT_DECODE 0x01 +#define ZSTATE_INIT_ENCODE 0x02 + + TIFFVGetMethod vgetparent; /* super-class method */ + TIFFVSetMethod vsetparent; /* super-class method */ +} ZIPState; + +#define ZState(tif) ((ZIPState*) (tif)->tif_data) +#define DecoderState(tif) ZState(tif) +#define EncoderState(tif) ZState(tif) + +static int ZIPEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s); +static int ZIPDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s); + +static int +ZIPFixupTags(TIFF* tif) +{ + (void) tif; + return (1); +} + +static int +ZIPSetupDecode(TIFF* tif) +{ + static const char module[] = "ZIPSetupDecode"; + ZIPState* sp = DecoderState(tif); + + assert(sp != NULL); + + /* if we were last encoding, terminate this mode */ + if (sp->state & ZSTATE_INIT_ENCODE) { + deflateEnd(&sp->stream); + sp->state = 0; + } + + /* This function can possibly be called several times by */ + /* PredictorSetupDecode() if this function succeeds but */ + /* PredictorSetup() fails */ + if ((sp->state & ZSTATE_INIT_DECODE) == 0 && + inflateInit(&sp->stream) != Z_OK) { + TIFFErrorExt(tif->tif_clientdata, module, "%s", SAFE_MSG(sp)); + return (0); + } else { + sp->state |= ZSTATE_INIT_DECODE; + return (1); + } +} + +/* + * Setup state for decoding a strip. + */ +static int +ZIPPreDecode(TIFF* tif, uint16 s) +{ + ZIPState* sp = DecoderState(tif); + + (void) s; + assert(sp != NULL); + + if( (sp->state & ZSTATE_INIT_DECODE) == 0 ) + tif->tif_setupdecode( tif ); + +#if LIBDEFLATE_SUPPORT + sp->libdeflate_state = -1; +#endif + sp->stream.next_in = tif->tif_rawdata; + assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised, + we need to simplify this code to reflect a ZLib that is likely updated + to deal with 8byte memory sizes, though this code will respond + appropriately even before we simplify it */ + sp->stream.avail_in = (uint64)tif->tif_rawcc < 0xFFFFFFFFU ? (uInt) tif->tif_rawcc : 0xFFFFFFFFU; + return (inflateReset(&sp->stream) == Z_OK); +} + +static int +ZIPDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) +{ + static const char module[] = "ZIPDecode"; + ZIPState* sp = DecoderState(tif); + + (void) s; + assert(sp != NULL); + assert(sp->state == ZSTATE_INIT_DECODE); + +#if LIBDEFLATE_SUPPORT + if( sp->libdeflate_state == 1 ) + return 0; + + /* If we have libdeflate support and we are asked to read a whole */ + /* strip/tile, then go for using it */ + do { + TIFFDirectory *td = &tif->tif_dir; + + if( sp->libdeflate_state == 0 ) + break; + if( sp->subcodec == DEFLATE_SUBCODEC_ZLIB ) + break; + + /* Check if we are in the situation where we can use libdeflate */ + if (isTiled(tif)) { + if( TIFFTileSize64(tif) != (uint64)occ ) + break; + } else { + uint32 strip_height = td->td_imagelength - tif->tif_row; + if (strip_height > td->td_rowsperstrip) + strip_height = td->td_rowsperstrip; + if( TIFFVStripSize64(tif, strip_height) != (uint64)occ ) + break; + } + + /* Check for overflow */ + if( (size_t)tif->tif_rawcc != (uint64)tif->tif_rawcc ) + break; + if( (size_t)occ != (uint64)occ ) + break; + + /* Go for decompression using libdeflate */ + { + enum libdeflate_result res; + if( sp->libdeflate_dec == NULL ) + { + sp->libdeflate_dec = libdeflate_alloc_decompressor(); + if( sp->libdeflate_dec == NULL ) + { + break; + } + } + + sp->libdeflate_state = 1; + + res = libdeflate_zlib_decompress( + sp->libdeflate_dec, tif->tif_rawcp, (size_t)tif->tif_rawcc, op, (size_t)occ, NULL); + + tif->tif_rawcp += tif->tif_rawcc; + tif->tif_rawcc = 0; + + /* We accept LIBDEFLATE_INSUFFICIENT_SPACE has a return */ + /* There are odd files in the wild where the last strip, when */ + /* it is smaller in height than td_rowsperstrip, actually contains */ + /* data for td_rowsperstrip lines. Just ignore that silently. */ + if( res != LIBDEFLATE_SUCCESS && + res != LIBDEFLATE_INSUFFICIENT_SPACE ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Decoding error at scanline %lu", + (unsigned long) tif->tif_row); + return 0; + } + + return 1; + } + } while(0); + sp->libdeflate_state = 0; +#endif /* LIBDEFLATE_SUPPORT */ + + sp->stream.next_in = tif->tif_rawcp; + + sp->stream.next_out = op; + assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised, + we need to simplify this code to reflect a ZLib that is likely updated + to deal with 8byte memory sizes, though this code will respond + appropriately even before we simplify it */ + do { + int state; + uInt avail_in_before = (uint64)tif->tif_rawcc <= 0xFFFFFFFFU ? (uInt)tif->tif_rawcc : 0xFFFFFFFFU; + uInt avail_out_before = (uint64)occ < 0xFFFFFFFFU ? (uInt) occ : 0xFFFFFFFFU; + sp->stream.avail_in = avail_in_before; + sp->stream.avail_out = avail_out_before; + state = inflate(&sp->stream, Z_PARTIAL_FLUSH); + tif->tif_rawcc -= (avail_in_before - sp->stream.avail_in); + occ -= (avail_out_before - sp->stream.avail_out); + if (state == Z_STREAM_END) + break; + if (state == Z_DATA_ERROR) { + TIFFErrorExt(tif->tif_clientdata, module, + "Decoding error at scanline %lu, %s", + (unsigned long) tif->tif_row, SAFE_MSG(sp)); + return (0); + } + if (state != Z_OK) { + TIFFErrorExt(tif->tif_clientdata, module, + "ZLib error: %s", SAFE_MSG(sp)); + return (0); + } + } while (occ > 0); + if (occ != 0) { + TIFFErrorExt(tif->tif_clientdata, module, + "Not enough data at scanline %lu (short " TIFF_UINT64_FORMAT " bytes)", + (unsigned long) tif->tif_row, (TIFF_UINT64_T) occ); + return (0); + } + + tif->tif_rawcp = sp->stream.next_in; + + return (1); +} + +static int +ZIPSetupEncode(TIFF* tif) +{ + static const char module[] = "ZIPSetupEncode"; + ZIPState* sp = EncoderState(tif); + int cappedQuality; + + assert(sp != NULL); + if (sp->state & ZSTATE_INIT_DECODE) { + inflateEnd(&sp->stream); + sp->state = 0; + } + + cappedQuality = sp->zipquality; + if( cappedQuality > Z_BEST_COMPRESSION ) + cappedQuality = Z_BEST_COMPRESSION; + + if (deflateInit(&sp->stream, cappedQuality) != Z_OK) { + TIFFErrorExt(tif->tif_clientdata, module, "%s", SAFE_MSG(sp)); + return (0); + } else { + sp->state |= ZSTATE_INIT_ENCODE; + return (1); + } +} + +/* + * Reset encoding state at the start of a strip. + */ +static int +ZIPPreEncode(TIFF* tif, uint16 s) +{ + ZIPState *sp = EncoderState(tif); + + (void) s; + assert(sp != NULL); + if( sp->state != ZSTATE_INIT_ENCODE ) + tif->tif_setupencode( tif ); + +#if LIBDEFLATE_SUPPORT + sp->libdeflate_state = -1; +#endif + sp->stream.next_out = tif->tif_rawdata; + assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised, + we need to simplify this code to reflect a ZLib that is likely updated + to deal with 8byte memory sizes, though this code will respond + appropriately even before we simplify it */ + sp->stream.avail_out = (uint64)tif->tif_rawdatasize <= 0xFFFFFFFFU ? (uInt)tif->tif_rawdatasize : 0xFFFFFFFFU; + return (deflateReset(&sp->stream) == Z_OK); +} + +/* + * Encode a chunk of pixels. + */ +static int +ZIPEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) +{ + static const char module[] = "ZIPEncode"; + ZIPState *sp = EncoderState(tif); + + assert(sp != NULL); + assert(sp->state == ZSTATE_INIT_ENCODE); + + (void) s; + +#if LIBDEFLATE_SUPPORT + if( sp->libdeflate_state == 1 ) + return 0; + + /* If we have libdeflate support and we are asked to write a whole */ + /* strip/tile, then go for using it */ + do { + TIFFDirectory *td = &tif->tif_dir; + + if( sp->libdeflate_state == 0 ) + break; + if( sp->subcodec == DEFLATE_SUBCODEC_ZLIB ) + break; + + /* Libdeflate does not support the 0-compression level */ + if( sp->zipquality == Z_NO_COMPRESSION ) + break; + + /* Check if we are in the situation where we can use libdeflate */ + if (isTiled(tif)) { + if( TIFFTileSize64(tif) != (uint64)cc ) + break; + } else { + uint32 strip_height = td->td_imagelength - tif->tif_row; + if (strip_height > td->td_rowsperstrip) + strip_height = td->td_rowsperstrip; + if( TIFFVStripSize64(tif, strip_height) != (uint64)cc ) + break; + } + + /* Check for overflow */ + if( (size_t)tif->tif_rawdatasize != (uint64)tif->tif_rawdatasize ) + break; + if( (size_t)cc != (uint64)cc ) + break; + + /* Go for compression using libdeflate */ + { + size_t nCompressedBytes; + if( sp->libdeflate_enc == NULL ) + { + /* To get results as good as zlib, we asked for an extra */ + /* level of compression */ + sp->libdeflate_enc = libdeflate_alloc_compressor( + sp->zipquality == Z_DEFAULT_COMPRESSION ? 7 : + sp->zipquality >= 6 && sp->zipquality <= 9 ? sp->zipquality + 1 : + sp->zipquality); + if( sp->libdeflate_enc == NULL ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Cannot allocate compressor"); + break; + } + } + + /* Make sure the output buffer is large enough for the worse case. */ + /* In TIFFWriteBufferSetup(), when libtiff allocates the buffer */ + /* we've taken a 10% margin over the uncompressed size, which should */ + /* be large enough even for the the worse case scenario. */ + if( libdeflate_zlib_compress_bound(sp->libdeflate_enc, (size_t)cc) > + (size_t)tif->tif_rawdatasize) + { + break; + } + + sp->libdeflate_state = 1; + nCompressedBytes = libdeflate_zlib_compress( + sp->libdeflate_enc, bp, (size_t)cc, tif->tif_rawdata, (size_t)tif->tif_rawdatasize); + + if( nCompressedBytes == 0 ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Encoder error at scanline %lu", + (unsigned long) tif->tif_row); + return 0; + } + + tif->tif_rawcc = nCompressedBytes; + + if( !TIFFFlushData1(tif) ) + return 0; + + return 1; + } + } while(0); + sp->libdeflate_state = 0; +#endif /* LIBDEFLATE_SUPPORT */ + + sp->stream.next_in = bp; + assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised, + we need to simplify this code to reflect a ZLib that is likely updated + to deal with 8byte memory sizes, though this code will respond + appropriately even before we simplify it */ + do { + uInt avail_in_before = (uint64)cc <= 0xFFFFFFFFU ? (uInt)cc : 0xFFFFFFFFU; + sp->stream.avail_in = avail_in_before; + if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) { + TIFFErrorExt(tif->tif_clientdata, module, + "Encoder error: %s", + SAFE_MSG(sp)); + return (0); + } + if (sp->stream.avail_out == 0) { + tif->tif_rawcc = tif->tif_rawdatasize; + if (!TIFFFlushData1(tif)) + return 0; + sp->stream.next_out = tif->tif_rawdata; + sp->stream.avail_out = (uint64)tif->tif_rawdatasize <= 0xFFFFFFFFU ? (uInt)tif->tif_rawdatasize : 0xFFFFFFFFU; + } + cc -= (avail_in_before - sp->stream.avail_in); + } while (cc > 0); + return (1); +} + +/* + * Finish off an encoded strip by flushing the last + * string and tacking on an End Of Information code. + */ +static int +ZIPPostEncode(TIFF* tif) +{ + static const char module[] = "ZIPPostEncode"; + ZIPState *sp = EncoderState(tif); + int state; + +#if LIBDEFLATE_SUPPORT + if( sp->libdeflate_state == 1 ) + return 1; +#endif + + sp->stream.avail_in = 0; + do { + state = deflate(&sp->stream, Z_FINISH); + switch (state) { + case Z_STREAM_END: + case Z_OK: + if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) + { + tif->tif_rawcc = tif->tif_rawdatasize - sp->stream.avail_out; + if (!TIFFFlushData1(tif)) + return 0; + sp->stream.next_out = tif->tif_rawdata; + sp->stream.avail_out = (uint64)tif->tif_rawdatasize <= 0xFFFFFFFFU ? (uInt)tif->tif_rawdatasize : 0xFFFFFFFFU; + } + break; + default: + TIFFErrorExt(tif->tif_clientdata, module, + "ZLib error: %s", SAFE_MSG(sp)); + return (0); + } + } while (state != Z_STREAM_END); + return (1); +} + +static void +ZIPCleanup(TIFF* tif) +{ + ZIPState* sp = ZState(tif); + + assert(sp != 0); + + (void)TIFFPredictorCleanup(tif); + + tif->tif_tagmethods.vgetfield = sp->vgetparent; + tif->tif_tagmethods.vsetfield = sp->vsetparent; + + if (sp->state & ZSTATE_INIT_ENCODE) { + deflateEnd(&sp->stream); + sp->state = 0; + } else if( sp->state & ZSTATE_INIT_DECODE) { + inflateEnd(&sp->stream); + sp->state = 0; + } + +#if LIBDEFLATE_SUPPORT + if( sp->libdeflate_dec ) + libdeflate_free_decompressor(sp->libdeflate_dec); + if( sp->libdeflate_enc ) + libdeflate_free_compressor(sp->libdeflate_enc); +#endif + + _TIFFfree(sp); + tif->tif_data = NULL; + + _TIFFSetDefaultCompressionState(tif); +} + +static int +ZIPVSetField(TIFF* tif, uint32 tag, va_list ap) +{ + static const char module[] = "ZIPVSetField"; + ZIPState* sp = ZState(tif); + + switch (tag) { + case TIFFTAG_ZIPQUALITY: + sp->zipquality = (int) va_arg(ap, int); + if( sp->zipquality < Z_DEFAULT_COMPRESSION || + sp->zipquality > LIBDEFLATE_MAX_COMPRESSION_LEVEL ) { + TIFFErrorExt(tif->tif_clientdata, module, + "Invalid ZipQuality value. Should be in [-1,%d] range", + LIBDEFLATE_MAX_COMPRESSION_LEVEL); + return 0; + } + + if ( sp->state&ZSTATE_INIT_ENCODE ) { + int cappedQuality = sp->zipquality; + if( cappedQuality > Z_BEST_COMPRESSION ) + cappedQuality = Z_BEST_COMPRESSION; + if (deflateParams(&sp->stream, + cappedQuality, Z_DEFAULT_STRATEGY) != Z_OK) { + TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s", + SAFE_MSG(sp)); + return (0); + } + } + +#if LIBDEFLATE_SUPPORT + if( sp->libdeflate_enc ) + { + libdeflate_free_compressor(sp->libdeflate_enc); + sp->libdeflate_enc = NULL; + } +#endif + + return (1); + + case TIFFTAG_DEFLATE_SUBCODEC: + sp->subcodec = (int) va_arg(ap, int); + if( sp->subcodec != DEFLATE_SUBCODEC_ZLIB && + sp->subcodec != DEFLATE_SUBCODEC_LIBDEFLATE ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "Invalid DeflateCodec value."); + return 0; + } +#if !LIBDEFLATE_SUPPORT + if( sp->subcodec == DEFLATE_SUBCODEC_LIBDEFLATE ) + { + TIFFErrorExt(tif->tif_clientdata, module, + "DeflateCodec = DEFLATE_SUBCODEC_LIBDEFLATE unsupported in this build"); + return 0; + } +#endif + return 1; + + default: + return (*sp->vsetparent)(tif, tag, ap); + } + /*NOTREACHED*/ +} + +static int +ZIPVGetField(TIFF* tif, uint32 tag, va_list ap) +{ + ZIPState* sp = ZState(tif); + + switch (tag) { + case TIFFTAG_ZIPQUALITY: + *va_arg(ap, int*) = sp->zipquality; + break; + + case TIFFTAG_DEFLATE_SUBCODEC: + *va_arg(ap, int*) = sp->subcodec; + break; + + default: + return (*sp->vgetparent)(tif, tag, ap); + } + return (1); +} + +static const TIFFField zipFields[] = { + { TIFFTAG_ZIPQUALITY, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, TRUE, FALSE, "", NULL }, + { TIFFTAG_DEFLATE_SUBCODEC, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, TRUE, FALSE, "", NULL }, +}; + +int +TIFFInitZIP(TIFF* tif, int scheme) +{ + static const char module[] = "TIFFInitZIP"; + ZIPState* sp; + + assert( (scheme == COMPRESSION_DEFLATE) + || (scheme == COMPRESSION_ADOBE_DEFLATE)); +#ifdef NDEBUG + (void)scheme; +#endif + + /* + * Merge codec-specific tag information. + */ + if (!_TIFFMergeFields(tif, zipFields, TIFFArrayCount(zipFields))) { + TIFFErrorExt(tif->tif_clientdata, module, + "Merging Deflate codec-specific tags failed"); + return 0; + } + + /* + * Allocate state block so tag methods have storage to record values. + */ + tif->tif_data = (uint8*) _TIFFcalloc(sizeof (ZIPState), 1); + if (tif->tif_data == NULL) + goto bad; + sp = ZState(tif); + sp->stream.zalloc = NULL; + sp->stream.zfree = NULL; + sp->stream.opaque = NULL; + sp->stream.data_type = Z_BINARY; + + /* + * Override parent get/set field methods. + */ + sp->vgetparent = tif->tif_tagmethods.vgetfield; + tif->tif_tagmethods.vgetfield = ZIPVGetField; /* hook for codec tags */ + sp->vsetparent = tif->tif_tagmethods.vsetfield; + tif->tif_tagmethods.vsetfield = ZIPVSetField; /* hook for codec tags */ + + /* Default values for codec-specific fields */ + sp->zipquality = Z_DEFAULT_COMPRESSION; /* default comp. level */ + sp->state = 0; +#if LIBDEFLATE_SUPPORT + sp->subcodec = DEFLATE_SUBCODEC_LIBDEFLATE; +#else + sp->subcodec = DEFLATE_SUBCODEC_ZLIB; +#endif + + /* + * Install codec methods. + */ + tif->tif_fixuptags = ZIPFixupTags; + tif->tif_setupdecode = ZIPSetupDecode; + tif->tif_predecode = ZIPPreDecode; + tif->tif_decoderow = ZIPDecode; + tif->tif_decodestrip = ZIPDecode; + tif->tif_decodetile = ZIPDecode; + tif->tif_setupencode = ZIPSetupEncode; + tif->tif_preencode = ZIPPreEncode; + tif->tif_postencode = ZIPPostEncode; + tif->tif_encoderow = ZIPEncode; + tif->tif_encodestrip = ZIPEncode; + tif->tif_encodetile = ZIPEncode; + tif->tif_cleanup = ZIPCleanup; + /* + * Setup predictor setup. + */ + (void) TIFFPredictorInit(tif); + return (1); +bad: + TIFFErrorExt(tif->tif_clientdata, module, + "No space for ZIP state block"); + return (0); +} +#endif /* ZIP_SUPPORT */ + +/* vim: set ts=8 sts=8 sw=8 noet: */ +/* + * Local Variables: + * mode: c + * c-basic-offset: 8 + * fill-column: 78 + * End: + */ diff --git a/thirdparty/tiff-4.2.0/libtiff/tif_zstd.c b/thirdparty/tiff-4.2.0/libtiff/tif_zstd.c new file mode 100644 index 00000000..66135e03 --- /dev/null +++ b/thirdparty/tiff-4.2.0/libtiff/tif_zstd.c @@ -0,0 +1,442 @@ +/* +* Copyright (c) 2017, Planet Labs +* Author: +* +* Permission to use, copy, modify, distribute, and sell this software and +* its documentation for any purpose is hereby granted without fee, provided +* that (i) the above copyright notices and this permission notice appear in +* all copies of the software and related documentation, and (ii) the names of +* Sam Leffler and Silicon Graphics may not be used in any advertising or +* publicity relating to the software without the specific, prior written +* permission of Sam Leffler and Silicon Graphics. +* +* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +* +* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +* OF THIS SOFTWARE. +*/ + +#include "tiffiop.h" +#ifdef ZSTD_SUPPORT +/* +* TIFF Library. +* +* ZSTD Compression Support +* +*/ + +#include "tif_predict.h" +#include "zstd.h" + +#include + +/* +* State block for each open TIFF file using ZSTD compression/decompression. +*/ +typedef struct { + TIFFPredictorState predict; + ZSTD_DStream* dstream; + ZSTD_CStream* cstream; + int compression_level; /* compression level */ + ZSTD_outBuffer out_buffer; + int state; /* state flags */ +#define LSTATE_INIT_DECODE 0x01 +#define LSTATE_INIT_ENCODE 0x02 + + TIFFVGetMethod vgetparent; /* super-class method */ + TIFFVSetMethod vsetparent; /* super-class method */ +} ZSTDState; + +#define LState(tif) ((ZSTDState*) (tif)->tif_data) +#define DecoderState(tif) LState(tif) +#define EncoderState(tif) LState(tif) + +static int ZSTDEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s); +static int ZSTDDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s); + +static int +ZSTDFixupTags(TIFF* tif) +{ + (void) tif; + return 1; +} + +static int +ZSTDSetupDecode(TIFF* tif) +{ + ZSTDState* sp = DecoderState(tif); + + assert(sp != NULL); + + /* if we were last encoding, terminate this mode */ + if (sp->state & LSTATE_INIT_ENCODE) { + ZSTD_freeCStream(sp->cstream); + sp->cstream = NULL; + sp->state = 0; + } + + sp->state |= LSTATE_INIT_DECODE; + return 1; +} + +/* +* Setup state for decoding a strip. +*/ +static int +ZSTDPreDecode(TIFF* tif, uint16 s) +{ + static const char module[] = "ZSTDPreDecode"; + ZSTDState* sp = DecoderState(tif); + size_t zstd_ret; + + (void) s; + assert(sp != NULL); + + if( (sp->state & LSTATE_INIT_DECODE) == 0 ) + tif->tif_setupdecode(tif); + + if( sp->dstream ) + { + ZSTD_freeDStream(sp->dstream); + sp->dstream = NULL; + } + + sp->dstream = ZSTD_createDStream(); + if( sp->dstream == NULL ) { + TIFFErrorExt(tif->tif_clientdata, module, + "Cannot allocate decompression stream"); + return 0; + } + zstd_ret = ZSTD_initDStream(sp->dstream); + if( ZSTD_isError(zstd_ret) ) { + TIFFErrorExt(tif->tif_clientdata, module, + "Error in ZSTD_initDStream(): %s", + ZSTD_getErrorName(zstd_ret)); + return 0; + } + + return 1; +} + +static int +ZSTDDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s) +{ + static const char module[] = "ZSTDDecode"; + ZSTDState* sp = DecoderState(tif); + ZSTD_inBuffer in_buffer; + ZSTD_outBuffer out_buffer; + size_t zstd_ret; + + (void) s; + assert(sp != NULL); + assert(sp->state == LSTATE_INIT_DECODE); + + in_buffer.src = tif->tif_rawcp; + in_buffer.size = (size_t) tif->tif_rawcc; + in_buffer.pos = 0; + + out_buffer.dst = op; + out_buffer.size = (size_t) occ; + out_buffer.pos = 0; + + do { + zstd_ret = ZSTD_decompressStream(sp->dstream, &out_buffer, + &in_buffer); + if( ZSTD_isError(zstd_ret) ) { + TIFFErrorExt(tif->tif_clientdata, module, + "Error in ZSTD_decompressStream(): %s", + ZSTD_getErrorName(zstd_ret)); + return 0; + } + } while( zstd_ret != 0 && + in_buffer.pos < in_buffer.size && + out_buffer.pos < out_buffer.size ); + + if (out_buffer.pos < (size_t)occ) { + TIFFErrorExt(tif->tif_clientdata, module, + "Not enough data at scanline %lu (short %lu bytes)", + (unsigned long) tif->tif_row, + (unsigned long) (size_t)occ - out_buffer.pos); + return 0; + } + + tif->tif_rawcp += in_buffer.pos; + tif->tif_rawcc -= in_buffer.pos; + + return 1; +} + +static int +ZSTDSetupEncode(TIFF* tif) +{ + ZSTDState* sp = EncoderState(tif); + + assert(sp != NULL); + if (sp->state & LSTATE_INIT_DECODE) { + ZSTD_freeDStream(sp->dstream); + sp->dstream = NULL; + sp->state = 0; + } + + sp->state |= LSTATE_INIT_ENCODE; + return 1; +} + +/* +* Reset encoding state at the start of a strip. +*/ +static int +ZSTDPreEncode(TIFF* tif, uint16 s) +{ + static const char module[] = "ZSTDPreEncode"; + ZSTDState *sp = EncoderState(tif); + size_t zstd_ret; + + (void) s; + assert(sp != NULL); + if( sp->state != LSTATE_INIT_ENCODE ) + tif->tif_setupencode(tif); + + if (sp->cstream) { + ZSTD_freeCStream(sp->cstream); + sp->cstream = NULL; + } + sp->cstream = ZSTD_createCStream(); + if( sp->cstream == NULL ) { + TIFFErrorExt(tif->tif_clientdata, module, + "Cannot allocate compression stream"); + return 0; + } + + zstd_ret = ZSTD_initCStream(sp->cstream, sp->compression_level); + if( ZSTD_isError(zstd_ret) ) { + TIFFErrorExt(tif->tif_clientdata, module, + "Error in ZSTD_initCStream(): %s", + ZSTD_getErrorName(zstd_ret)); + return 0; + } + + sp->out_buffer.dst = tif->tif_rawdata; + sp->out_buffer.size = (size_t)tif->tif_rawdatasize; + sp->out_buffer.pos = 0; + + return 1; +} + +/* +* Encode a chunk of pixels. +*/ +static int +ZSTDEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) +{ + static const char module[] = "ZSTDEncode"; + ZSTDState *sp = EncoderState(tif); + ZSTD_inBuffer in_buffer; + size_t zstd_ret; + + assert(sp != NULL); + assert(sp->state == LSTATE_INIT_ENCODE); + + (void) s; + + in_buffer.src = bp; + in_buffer.size = (size_t)cc; + in_buffer.pos = 0; + + do { + zstd_ret = ZSTD_compressStream(sp->cstream, &sp->out_buffer, + &in_buffer); + if( ZSTD_isError(zstd_ret) ) { + TIFFErrorExt(tif->tif_clientdata, module, + "Error in ZSTD_compressStream(): %s", + ZSTD_getErrorName(zstd_ret)); + return 0; + } + if( sp->out_buffer.pos == sp->out_buffer.size ) { + tif->tif_rawcc = tif->tif_rawdatasize; + if (!TIFFFlushData1(tif)) + return 0; + sp->out_buffer.dst = tif->tif_rawcp; + sp->out_buffer.pos = 0; + } + } while( in_buffer.pos < in_buffer.size ); + + return 1; +} + +/* +* Finish off an encoded strip by flushing it. +*/ +static int +ZSTDPostEncode(TIFF* tif) +{ + static const char module[] = "ZSTDPostEncode"; + ZSTDState *sp = EncoderState(tif); + size_t zstd_ret; + + do { + zstd_ret = ZSTD_endStream(sp->cstream, &sp->out_buffer); + if( ZSTD_isError(zstd_ret) ) { + TIFFErrorExt(tif->tif_clientdata, module, + "Error in ZSTD_endStream(): %s", + ZSTD_getErrorName(zstd_ret)); + return 0; + } + if( sp->out_buffer.pos > 0 ) { + tif->tif_rawcc = sp->out_buffer.pos; + if (!TIFFFlushData1(tif)) + return 0; + sp->out_buffer.dst = tif->tif_rawcp; + sp->out_buffer.pos = 0; + } + } while (zstd_ret != 0); + return 1; +} + +static void +ZSTDCleanup(TIFF* tif) +{ + ZSTDState* sp = LState(tif); + + assert(sp != 0); + + (void)TIFFPredictorCleanup(tif); + + tif->tif_tagmethods.vgetfield = sp->vgetparent; + tif->tif_tagmethods.vsetfield = sp->vsetparent; + + if (sp->dstream) { + ZSTD_freeDStream(sp->dstream); + sp->dstream = NULL; + } + if (sp->cstream) { + ZSTD_freeCStream(sp->cstream); + sp->cstream = NULL; + } + _TIFFfree(sp); + tif->tif_data = NULL; + + _TIFFSetDefaultCompressionState(tif); +} + +static int +ZSTDVSetField(TIFF* tif, uint32 tag, va_list ap) +{ + static const char module[] = "ZSTDVSetField"; + ZSTDState* sp = LState(tif); + + switch (tag) { + case TIFFTAG_ZSTD_LEVEL: + sp->compression_level = (int) va_arg(ap, int); + if( sp->compression_level <= 0 || + sp->compression_level > ZSTD_maxCLevel() ) + { + TIFFWarningExt(tif->tif_clientdata, module, + "ZSTD_LEVEL should be between 1 and %d", + ZSTD_maxCLevel()); + } + return 1; + default: + return (*sp->vsetparent)(tif, tag, ap); + } + /*NOTREACHED*/ +} + +static int +ZSTDVGetField(TIFF* tif, uint32 tag, va_list ap) +{ + ZSTDState* sp = LState(tif); + + switch (tag) { + case TIFFTAG_ZSTD_LEVEL: + *va_arg(ap, int*) = sp->compression_level; + break; + default: + return (*sp->vgetparent)(tif, tag, ap); + } + return 1; +} + +static const TIFFField ZSTDFields[] = { + { TIFFTAG_ZSTD_LEVEL, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, + TIFF_SETGET_UNDEFINED, + FIELD_PSEUDO, TRUE, FALSE, "ZSTD compression_level", NULL }, +}; + +int +TIFFInitZSTD(TIFF* tif, int scheme) +{ + static const char module[] = "TIFFInitZSTD"; + ZSTDState* sp; + + assert( scheme == COMPRESSION_ZSTD ); + + /* + * Merge codec-specific tag information. + */ + if (!_TIFFMergeFields(tif, ZSTDFields, TIFFArrayCount(ZSTDFields))) { + TIFFErrorExt(tif->tif_clientdata, module, + "Merging ZSTD codec-specific tags failed"); + return 0; + } + + /* + * Allocate state block so tag methods have storage to record values. + */ + tif->tif_data = (uint8*) _TIFFmalloc(sizeof(ZSTDState)); + if (tif->tif_data == NULL) + goto bad; + sp = LState(tif); + + /* + * Override parent get/set field methods. + */ + sp->vgetparent = tif->tif_tagmethods.vgetfield; + tif->tif_tagmethods.vgetfield = ZSTDVGetField; /* hook for codec tags */ + sp->vsetparent = tif->tif_tagmethods.vsetfield; + tif->tif_tagmethods.vsetfield = ZSTDVSetField; /* hook for codec tags */ + + /* Default values for codec-specific fields */ + sp->compression_level = 9; /* default comp. level */ + sp->state = 0; + sp->dstream = 0; + sp->cstream = 0; + sp->out_buffer.dst = NULL; + sp->out_buffer.size = 0; + sp->out_buffer.pos = 0; + + /* + * Install codec methods. + */ + tif->tif_fixuptags = ZSTDFixupTags; + tif->tif_setupdecode = ZSTDSetupDecode; + tif->tif_predecode = ZSTDPreDecode; + tif->tif_decoderow = ZSTDDecode; + tif->tif_decodestrip = ZSTDDecode; + tif->tif_decodetile = ZSTDDecode; + tif->tif_setupencode = ZSTDSetupEncode; + tif->tif_preencode = ZSTDPreEncode; + tif->tif_postencode = ZSTDPostEncode; + tif->tif_encoderow = ZSTDEncode; + tif->tif_encodestrip = ZSTDEncode; + tif->tif_encodetile = ZSTDEncode; + tif->tif_cleanup = ZSTDCleanup; + /* + * Setup predictor setup. + */ + (void) TIFFPredictorInit(tif); + return 1; +bad: + TIFFErrorExt(tif->tif_clientdata, module, + "No space for ZSTD state block"); + return 0; +} +#endif /* ZSTD_SUPPORT */ + +/* vim: set ts=8 sts=8 sw=8 noet: */ diff --git a/thirdparty/tiff-4.0.3/libtiff/tiff.h b/thirdparty/tiff-4.2.0/libtiff/tiff.h similarity index 75% rename from thirdparty/tiff-4.0.3/libtiff/tiff.h rename to thirdparty/tiff-4.2.0/libtiff/tiff.h index 19b4e797..2d4a4767 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tiff.h +++ b/thirdparty/tiff-4.2.0/libtiff/tiff.h @@ -1,5 +1,3 @@ -/* $Id: tiff.h,v 1.68 2012-08-19 16:56:35 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -121,6 +119,11 @@ typedef struct { * Tag data type information. * * Note: RATIONALs are the ratio of two 32-bit integer values. + *--: + * Note2: TIFF_IFD8 data type is used in tiffFields[]-tag definition in order to distinguish the write-handling + of those tags between ClassicTIFF and BigTiff: + For ClassicTIFF libtiff writes a 32-bit value and the TIFF_IFD type-id into the file + For BigTIFF libtiff writes a 64-bit value and the TIFF_IFD8 type-id into the file */ typedef enum { TIFF_NOTYPE = 0, /* placeholder */ @@ -189,7 +192,11 @@ typedef enum { #define COMPRESSION_SGILOG 34676 /* SGI Log Luminance RLE */ #define COMPRESSION_SGILOG24 34677 /* SGI Log 24-bit packed */ #define COMPRESSION_JP2000 34712 /* Leadtools JPEG2000 */ +#define COMPRESSION_LERC 34887 /* ESRI Lerc codec: https://github.com/Esri/lerc */ +/* compression codes 34887-34889 are reserved for ESRI */ #define COMPRESSION_LZMA 34925 /* LZMA2 */ +#define COMPRESSION_ZSTD 50000 /* ZSTD: WARNING not registered in Adobe-maintained registry */ +#define COMPRESSION_WEBP 50001 /* WEBP: WARNING not registered in Adobe-maintained registry */ #define TIFFTAG_PHOTOMETRIC 262 /* photometric interpretation */ #define PHOTOMETRIC_MINISWHITE 0 /* min value is white */ #define PHOTOMETRIC_MINISBLACK 1 /* min value is black */ @@ -201,6 +208,7 @@ typedef enum { #define PHOTOMETRIC_CIELAB 8 /* !1976 CIE L*a*b* */ #define PHOTOMETRIC_ICCLAB 9 /* ICC L*a*b* [Adobe TIFF Technote 4] */ #define PHOTOMETRIC_ITULAB 10 /* ITU L*a*b* */ +#define PHOTOMETRIC_CFA 32803 /* color filter array */ #define PHOTOMETRIC_LOGL 32844 /* CIE Log2(L) */ #define PHOTOMETRIC_LOGLUV 32845 /* CIE Log2(L) (u',v') */ #define TIFFTAG_THRESHHOLDING 263 /* +thresholding used on data */ @@ -278,7 +286,7 @@ typedef enum { #define PREDICTOR_FLOATINGPOINT 3 /* floating point predictor */ #define TIFFTAG_WHITEPOINT 318 /* image white point */ #define TIFFTAG_PRIMARYCHROMATICITIES 319 /* !primary chromaticities */ -#define TIFFTAG_COLORMAP 320 /* RGB map for pallette image */ +#define TIFFTAG_COLORMAP 320 /* RGB map for palette image */ #define TIFFTAG_HALFTONEHINTS 321 /* !highlight+shadow info */ #define TIFFTAG_TILEWIDTH 322 /* !tile width in pixels */ #define TIFFTAG_TILELENGTH 323 /* !tile height in pixels */ @@ -357,7 +365,7 @@ typedef enum { #define TIFFTAG_JPEGRESTARTINTERVAL 515 /* !restart interval length */ #define TIFFTAG_JPEGLOSSLESSPREDICTORS 517 /* !lossless proc predictor */ #define TIFFTAG_JPEGPOINTTRANSFORM 518 /* !lossless point transform */ -#define TIFFTAG_JPEGQTABLES 519 /* !Q matrice offsets */ +#define TIFFTAG_JPEGQTABLES 519 /* !Q matrix offsets */ #define TIFFTAG_JPEGDCTABLES 520 /* !DCT table offsets */ #define TIFFTAG_JPEGACTABLES 521 /* !AC coefficient offsets */ #define TIFFTAG_YCBCRCOEFFICIENTS 529 /* !RGB -> YCbCr transform */ @@ -372,6 +380,7 @@ typedef enum { January 2004 */ #define TIFFTAG_OPIIMAGEID 32781 /* %OPI ImageID [Adobe TIFF technote] */ +#define TIFFTAG_TIFFANNOTATIONDATA 32932 /* http://web.archive.org/web/20050309141348/http://www.kofile.com/support%20pro/faqs/annospec.htm */ /* tags 32952-32956 are private tags registered to Island Graphics */ #define TIFFTAG_REFPTS 32953 /* image reference points */ #define TIFFTAG_REGIONTACKPOINT 32954 /* region-xform tack point */ @@ -402,10 +411,27 @@ typedef enum { #define TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA 33306 /* tag 33405 is a private tag registered to Eastman Kodak */ #define TIFFTAG_WRITERSERIALNUMBER 33405 /* device serial number */ +#define TIFFTAG_CFAREPEATPATTERNDIM 33421 /* dimensions of CFA pattern */ +#define TIFFTAG_CFAPATTERN 33422 /* color filter array pattern */ /* tag 33432 is listed in the 6.0 spec w/ unknown ownership */ #define TIFFTAG_COPYRIGHT 33432 /* copyright string */ +/* Tags 33445-33452 are used for GEL fileformat, see + * http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf + */ +#define TIFFTAG_MD_FILETAG 33445 /* http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf */ +#define TIFFTAG_MD_SCALEPIXEL 33446 /* http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf */ +#define TIFFTAG_MD_COLORTABLE 33447 /* http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf */ +#define TIFFTAG_MD_LABNAME 33448 /* http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf */ +#define TIFFTAG_MD_SAMPLEINFO 33449 /* http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf */ +#define TIFFTAG_MD_PREPDATE 33450 /* http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf */ +#define TIFFTAG_MD_PREPTIME 33451 /* http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf */ +#define TIFFTAG_MD_FILEUNITS 33452 /* http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf */ /* IPTC TAG from RichTIFF specifications */ #define TIFFTAG_RICHTIFFIPTC 33723 +#define TIFFTAG_INGR_PACKET_DATA_TAG 33918 /* Intergraph Application specific storage. */ +#define TIFFTAG_INGR_FLAG_REGISTERS 33919 /* Intergraph Application specific flags. */ +#define TIFFTAG_IRASB_TRANSORMATION_MATRIX 33920 /* Originally part of Intergraph's GeoTIFF tags, but likely understood by IrasB only. */ +#define TIFFTAG_MODELTIEPOINTTAG 33922 /* GeoTIFF */ /* 34016-34029 are reserved for ANSI IT8 TIFF/IT #include "tiff.h" +#include "tiffio.h" extern TIFF* TIFFStreamOpen(const char*, std::ostream *); extern TIFF* TIFFStreamOpen(const char*, std::istream *); diff --git a/thirdparty/tiff-4.0.3/libtiff/tiffiop.h b/thirdparty/tiff-4.2.0/libtiff/tiffiop.h similarity index 66% rename from thirdparty/tiff-4.0.3/libtiff/tiffiop.h rename to thirdparty/tiff-4.2.0/libtiff/tiffiop.h index 53357d85..39b54c89 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tiffiop.h +++ b/thirdparty/tiff-4.2.0/libtiff/tiffiop.h @@ -1,5 +1,3 @@ -/* $Id: tiffiop.h,v 1.84 2012-05-30 01:50:17 fwarmerdam Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -57,6 +55,12 @@ extern void *lfind(const void *, const void *, size_t *, size_t, int (*)(const void *, const void *)); #endif +#if !defined(HAVE_SNPRINTF) && !defined(HAVE__SNPRINTF) +#undef snprintf +#define snprintf _TIFF_snprintf_f +extern int snprintf(char* str, size_t size, const char* format, ...); +#endif + #include "tiffio.h" #include "tif_dir.h" @@ -66,12 +70,26 @@ extern void *lfind(const void *, const void *, size_t *, size_t, #endif #define streq(a,b) (strcmp(a,b) == 0) +#define strneq(a,b,n) (strncmp(a,b,n) == 0) #ifndef TRUE #define TRUE 1 #define FALSE 0 #endif +#define TIFF_SIZE_T_MAX ((size_t) ~ ((size_t)0)) +#define TIFF_TMSIZE_T_MAX (tmsize_t)(TIFF_SIZE_T_MAX >> 1) + +/* + * Largest 32-bit unsigned integer value. + */ +#define TIFF_UINT32_MAX 0xFFFFFFFFU + +/* + * Largest 64-bit unsigned integer value. + */ +#define TIFF_UINT64_MAX (((uint64)(TIFF_UINT32_MAX)) << 32 | TIFF_UINT32_MAX) + typedef struct client_info { struct client_info *next; void *data; @@ -80,7 +98,7 @@ typedef struct client_info { /* * Typedefs for ``method pointers'' used internally. - * these are depriciated and provided only for backwards compatibility + * these are deprecated and provided only for backwards compatibility. */ typedef unsigned char tidataval_t; /* internal image data value type */ typedef tidataval_t* tidata_t; /* reference to internal image data */ @@ -99,33 +117,36 @@ struct tiff { int tif_fd; /* open file descriptor */ int tif_mode; /* open mode (O_*) */ uint32 tif_flags; - #define TIFF_FILLORDER 0x00003 /* natural bit fill order for machine */ - #define TIFF_DIRTYHEADER 0x00004 /* header must be written on close */ - #define TIFF_DIRTYDIRECT 0x00008 /* current directory must be written */ - #define TIFF_BUFFERSETUP 0x00010 /* data buffers setup */ - #define TIFF_CODERSETUP 0x00020 /* encoder/decoder setup done */ - #define TIFF_BEENWRITING 0x00040 /* written 1+ scanlines to file */ - #define TIFF_SWAB 0x00080 /* byte swap file information */ - #define TIFF_NOBITREV 0x00100 /* inhibit bit reversal logic */ - #define TIFF_MYBUFFER 0x00200 /* my raw data buffer; free on close */ - #define TIFF_ISTILED 0x00400 /* file is tile, not strip- based */ - #define TIFF_MAPPED 0x00800 /* file is mapped into memory */ - #define TIFF_POSTENCODE 0x01000 /* need call to postencode routine */ - #define TIFF_INSUBIFD 0x02000 /* currently writing a subifd */ - #define TIFF_UPSAMPLED 0x04000 /* library is doing data up-sampling */ - #define TIFF_STRIPCHOP 0x08000 /* enable strip chopping support */ - #define TIFF_HEADERONLY 0x10000 /* read header only, do not process the first directory */ - #define TIFF_NOREADRAW 0x20000 /* skip reading of raw uncompressed image data */ - #define TIFF_INCUSTOMIFD 0x40000 /* currently writing a custom IFD */ - #define TIFF_BIGTIFF 0x80000 /* read/write bigtiff */ - #define TIFF_BUF4WRITE 0x100000 /* rawcc bytes are for writing */ - #define TIFF_DIRTYSTRIP 0x200000 /* stripoffsets/stripbytecount dirty*/ - #define TIFF_PERSAMPLE 0x400000 /* get/set per sample tags as arrays */ - #define TIFF_BUFFERMMAP 0x800000 /* read buffer (tif_rawdata) points into mmap() memory */ + #define TIFF_FILLORDER 0x00003U /* natural bit fill order for machine */ + #define TIFF_DIRTYHEADER 0x00004U /* header must be written on close */ + #define TIFF_DIRTYDIRECT 0x00008U /* current directory must be written */ + #define TIFF_BUFFERSETUP 0x00010U /* data buffers setup */ + #define TIFF_CODERSETUP 0x00020U /* encoder/decoder setup done */ + #define TIFF_BEENWRITING 0x00040U /* written 1+ scanlines to file */ + #define TIFF_SWAB 0x00080U /* byte swap file information */ + #define TIFF_NOBITREV 0x00100U /* inhibit bit reversal logic */ + #define TIFF_MYBUFFER 0x00200U /* my raw data buffer; free on close */ + #define TIFF_ISTILED 0x00400U /* file is tile, not strip- based */ + #define TIFF_MAPPED 0x00800U /* file is mapped into memory */ + #define TIFF_POSTENCODE 0x01000U /* need call to postencode routine */ + #define TIFF_INSUBIFD 0x02000U /* currently writing a subifd */ + #define TIFF_UPSAMPLED 0x04000U /* library is doing data up-sampling */ + #define TIFF_STRIPCHOP 0x08000U /* enable strip chopping support */ + #define TIFF_HEADERONLY 0x10000U /* read header only, do not process the first directory */ + #define TIFF_NOREADRAW 0x20000U /* skip reading of raw uncompressed image data */ + #define TIFF_INCUSTOMIFD 0x40000U /* currently writing a custom IFD */ + #define TIFF_BIGTIFF 0x80000U /* read/write bigtiff */ + #define TIFF_BUF4WRITE 0x100000U /* rawcc bytes are for writing */ + #define TIFF_DIRTYSTRIP 0x200000U /* stripoffsets/stripbytecount dirty*/ + #define TIFF_PERSAMPLE 0x400000U /* get/set per sample tags as arrays */ + #define TIFF_BUFFERMMAP 0x800000U /* read buffer (tif_rawdata) points into mmap() memory */ + #define TIFF_DEFERSTRILELOAD 0x1000000U /* defer strip/tile offset/bytecount array loading. */ + #define TIFF_LAZYSTRILELOAD 0x2000000U /* lazy/ondemand loading of strip/tile offset/bytecount values. Only used if TIFF_DEFERSTRILELOAD is set and in read-only mode */ + #define TIFF_CHOPPEDUPARRAYS 0x4000000U /* set when allocChoppedUpStripArrays() has modified strip array */ uint64 tif_diroff; /* file offset of current directory */ uint64 tif_nextdiroff; /* file offset of following directory */ uint64* tif_dirlist; /* list of offsets to already seen directories to prevent IFD looping */ - uint16 tif_dirlistsize; /* number of entires in offset list */ + uint16 tif_dirlistsize; /* number of entries in offset list */ uint16 tif_dirnumber; /* number of already seen directories */ TIFFDirectory tif_dir; /* internal rep of current directory */ TIFFDirectory tif_customdir; /* custom IFDs are separated from the main ones */ @@ -232,8 +253,7 @@ struct tiff { (TIFFReadFile((tif),(buf),(size))==(size)) #endif #ifndef SeekOK -#define SeekOK(tif, off) \ - (TIFFSeekFile((tif),(off),SEEK_SET)==(off)) +#define SeekOK(tif, off) _TIFFSeekOK(tif, off) #endif #ifndef WriteOK #define WriteOK(tif, buf, size) \ @@ -244,13 +264,17 @@ struct tiff { #define TIFFhowmany_32(x, y) (((uint32)x < (0xffffffff - (uint32)(y-1))) ? \ ((((uint32)(x))+(((uint32)(y))-1))/((uint32)(y))) : \ 0U) +/* Variant of TIFFhowmany_32() that doesn't return 0 if x close to MAXUINT. */ +/* Caution: TIFFhowmany_32_maxuint_compat(x,y)*y might overflow */ +#define TIFFhowmany_32_maxuint_compat(x, y) \ + (((uint32)(x) / (uint32)(y)) + ((((uint32)(x) % (uint32)(y)) != 0) ? 1 : 0)) #define TIFFhowmany8_32(x) (((x)&0x07)?((uint32)(x)>>3)+1:(uint32)(x)>>3) #define TIFFroundup_32(x, y) (TIFFhowmany_32(x,y)*(y)) #define TIFFhowmany_64(x, y) ((((uint64)(x))+(((uint64)(y))-1))/((uint64)(y))) #define TIFFhowmany8_64(x) (((x)&0x07)?((uint64)(x)>>3)+1:(uint64)(x)>>3) #define TIFFroundup_64(x, y) (TIFFhowmany_64(x,y)*(y)) -/* Safe multiply which returns zero if there is an integer overflow */ +/* Safe multiply which returns zero if there is an *unsigned* integer overflow. This macro is not safe for *signed* integer types */ #define TIFFSafeMultiply(t,v,m) ((((t)(m) != (t)0) && (((t)(((v)*(m))/(m))) == (t)(v))) ? (t)((v)*(m)) : (t)0) #define TIFFmax(A,B) ((A)>(B)?(A):(B)) @@ -258,6 +282,64 @@ struct tiff { #define TIFFArrayCount(a) (sizeof (a) / sizeof ((a)[0])) +/* + Support for large files. + + Windows read/write APIs support only 'unsigned int' rather than 'size_t'. + Windows off_t is only 32-bit, even in 64-bit builds. +*/ +#if defined(HAVE_FSEEKO) +/* + Use fseeko() and ftello() if they are available since they use + 'off_t' rather than 'long'. It is wrong to use fseeko() and + ftello() only on systems with special LFS support since some systems + (e.g. FreeBSD) support a 64-bit off_t by default. + + For MinGW, __MSVCRT_VERSION__ must be at least 0x800 to expose these + interfaces. The MinGW compiler must support the requested version. MinGW + does not distribute the CRT (it is supplied by Microsoft) so the correct CRT + must be available on the target computer in order for the program to run. +*/ +#if defined(HAVE_FSEEKO) +# define fseek(stream,offset,whence) fseeko(stream,offset,whence) +# define ftell(stream,offset,whence) ftello(stream,offset,whence) +#endif +#endif +#if defined(__WIN32__) && \ + !(defined(_MSC_VER) && _MSC_VER < 1400) && \ + !(defined(__MSVCRT_VERSION__) && __MSVCRT_VERSION__ < 0x800) +typedef unsigned int TIFFIOSize_t; +#define _TIFF_lseek_f(fildes,offset,whence) _lseeki64(fildes,/* __int64 */ offset,whence) +/* #define _TIFF_tell_f(fildes) /\* __int64 *\/ _telli64(fildes) */ +#define _TIFF_fseek_f(stream,offset,whence) _fseeki64(stream,/* __int64 */ offset,whence) +#define _TIFF_fstat_f(fildes,stat_buff) _fstati64(fildes,/* struct _stati64 */ stat_buff) +/* #define _TIFF_ftell_f(stream) /\* __int64 *\/ _ftelli64(stream) */ +/* #define _TIFF_stat_f(path,stat_buff) _stati64(path,/\* struct _stati64 *\/ stat_buff) */ +#define _TIFF_stat_s struct _stati64 +#define _TIFF_off_t __int64 +#else +typedef size_t TIFFIOSize_t; +#define _TIFF_lseek_f(fildes,offset,whence) lseek(fildes,offset,whence) +/* #define _TIFF_tell_f(fildes) (_TIFF_lseek_f(fildes,0,SEEK_CUR)) */ +#define _TIFF_fseek_f(stream,offset,whence) fseek(stream,offset,whence) +#define _TIFF_fstat_f(fildes,stat_buff) fstat(fildes,stat_buff) +/* #define _TIFF_ftell_f(stream) ftell(stream) */ +/* #define _TIFF_stat_f(path,stat_buff) stat(path,stat_buff) */ +#define _TIFF_stat_s struct stat +#define _TIFF_off_t off_t +#endif + +#if defined(__has_attribute) && defined(__clang__) +#if __has_attribute(no_sanitize) +#define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW __attribute__((no_sanitize("unsigned-integer-overflow"))) +#else +#define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW +#endif +#else +#define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW +#endif + + #if defined(__cplusplus) extern "C" { #endif @@ -285,6 +367,9 @@ extern uint32 _TIFFDefaultStripSize(TIFF* tif, uint32 s); extern void _TIFFDefaultTileSize(TIFF* tif, uint32* tw, uint32* th); extern int _TIFFDataSize(TIFFDataType type); +/*--: Rational2Double: Return size of TIFFSetGetFieldType in bytes. */ +extern int _TIFFSetGetFieldSize(TIFFSetGetFieldType setgettype); + extern void _TIFFsetByteArray(void**, void*, uint32); extern void _TIFFsetString(char**, char*); extern void _TIFFsetShortArray(uint16**, uint16*, uint32); @@ -302,12 +387,30 @@ extern TIFFErrorHandlerExt _TIFFerrorHandlerExt; extern uint32 _TIFFMultiply32(TIFF*, uint32, uint32, const char*); extern uint64 _TIFFMultiply64(TIFF*, uint64, uint64, const char*); +extern tmsize_t _TIFFMultiplySSize(TIFF*, tmsize_t, tmsize_t, const char*); +extern tmsize_t _TIFFCastUInt64ToSSize(TIFF*, uint64, const char*); extern void* _TIFFCheckMalloc(TIFF*, tmsize_t, tmsize_t, const char*); extern void* _TIFFCheckRealloc(TIFF*, void*, tmsize_t, tmsize_t, const char*); extern double _TIFFUInt64ToDouble(uint64); extern float _TIFFUInt64ToFloat(uint64); +extern float _TIFFClampDoubleToFloat(double); + +extern tmsize_t +_TIFFReadEncodedStripAndAllocBuffer(TIFF* tif, uint32 strip, + void **buf, tmsize_t bufsizetoalloc, + tmsize_t size_to_read); +extern tmsize_t +_TIFFReadEncodedTileAndAllocBuffer(TIFF* tif, uint32 tile, + void **buf, tmsize_t bufsizetoalloc, + tmsize_t size_to_read); +extern tmsize_t +_TIFFReadTileAndAllocBuffer(TIFF* tif, + void **buf, tmsize_t bufsizetoalloc, + uint32 x, uint32 y, uint32 z, uint16 s); +extern int _TIFFSeekOK(TIFF* tif, toff_t off); + extern int TIFFInitDumpMode(TIFF*, int); #ifdef PACKBITS_SUPPORT extern int TIFFInitPackBits(TIFF*, int); @@ -330,6 +433,7 @@ extern int TIFFInitOJPEG(TIFF*, int); #endif #ifdef JPEG_SUPPORT extern int TIFFInitJPEG(TIFF*, int); +extern int TIFFJPEGIsFullStripRequired(TIFF*); #endif #ifdef JBIG_SUPPORT extern int TIFFInitJBIG(TIFF*, int); @@ -346,6 +450,12 @@ extern int TIFFInitSGILog(TIFF*, int); #ifdef LZMA_SUPPORT extern int TIFFInitLZMA(TIFF*, int); #endif +#ifdef ZSTD_SUPPORT +extern int TIFFInitZSTD(TIFF*, int); +#endif +#ifdef WEBP_SUPPORT +extern int TIFFInitWebP(TIFF*, int); +#endif #ifdef VMS extern const TIFFCodec _TIFFBuiltinCODECS[]; #else diff --git a/thirdparty/tiff-4.0.3/libtiff/tiffvers.h b/thirdparty/tiff-4.2.0/libtiff/tiffvers.h similarity index 76% rename from thirdparty/tiff-4.0.3/libtiff/tiffvers.h rename to thirdparty/tiff-4.2.0/libtiff/tiffvers.h index 40edc813..0cce798b 100644 --- a/thirdparty/tiff-4.0.3/libtiff/tiffvers.h +++ b/thirdparty/tiff-4.2.0/libtiff/tiffvers.h @@ -1,4 +1,4 @@ -#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.0.3\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc." +#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.2.0\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc." /* * This define can be used in code that requires * compilation-related definitions specific to a @@ -6,4 +6,4 @@ * version checking should be done based on the * string returned by TIFFGetVersion. */ -#define TIFFLIB_VERSION 20120922 +#define TIFFLIB_VERSION 20201219 diff --git a/thirdparty/tiff-4.0.3/libtiff/uvcode.h b/thirdparty/tiff-4.2.0/libtiff/uvcode.h similarity index 99% rename from thirdparty/tiff-4.0.3/libtiff/uvcode.h rename to thirdparty/tiff-4.2.0/libtiff/uvcode.h index 50f11d7e..6286cfbb 100644 --- a/thirdparty/tiff-4.0.3/libtiff/uvcode.h +++ b/thirdparty/tiff-4.2.0/libtiff/uvcode.h @@ -3,7 +3,7 @@ #define UV_NDIVS 16289 #define UV_VSTART (float)0.016940 #define UV_NVS 163 -static struct { +static const struct { float ustart; short nus, ncum; } uv_row[UV_NVS] = { diff --git a/thirdparty/tiff-4.0.3/m4/acinclude.m4 b/thirdparty/tiff-4.2.0/m4/acinclude.m4 similarity index 100% rename from thirdparty/tiff-4.0.3/m4/acinclude.m4 rename to thirdparty/tiff-4.2.0/m4/acinclude.m4 diff --git a/thirdparty/tiff-4.0.3/m4/libtool.m4 b/thirdparty/tiff-4.2.0/m4/libtool.m4 similarity index 72% rename from thirdparty/tiff-4.0.3/m4/libtool.m4 rename to thirdparty/tiff-4.2.0/m4/libtool.m4 index 49216cbc..a3bc337b 100644 --- a/thirdparty/tiff-4.0.3/m4/libtool.m4 +++ b/thirdparty/tiff-4.2.0/m4/libtool.m4 @@ -1,8 +1,6 @@ # 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, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -10,36 +8,30 @@ # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 +# Copyright (C) 2014 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. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of of the License, or +# (at your option) any later version. # -# This file is part of GNU Libtool. +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. # -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . ]) -# serial 57 LT_INIT +# serial 58 LT_INIT # LT_PREREQ(VERSION) @@ -67,7 +59,7 @@ esac # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl @@ -91,7 +83,7 @@ dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" +LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -111,26 +103,43 @@ dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) +# _LT_PREPARE_CC_BASENAME +# ----------------------- +m4_defun([_LT_PREPARE_CC_BASENAME], [ +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in @S|@*""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} +])# _LT_PREPARE_CC_BASENAME + + # _LT_CC_BASENAME(CC) # ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, +# but that macro is also expanded into generated libtool script, which +# arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +[m4_require([_LT_PREPARE_CC_BASENAME])dnl +AC_REQUIRE([_LT_DECL_SED])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +func_cc_basename $1 +cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} @@ -177,15 +186,16 @@ m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl +m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our +# See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then +if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) -if test -n "${ZSH_VERSION+set}" ; then +if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi @@ -198,7 +208,7 @@ aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then + if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -209,14 +219,14 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except MSVC, +# All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a -with_gnu_ld="$lt_cv_prog_gnu_ld" +with_gnu_ld=$lt_cv_prog_gnu_ld -old_CC="$CC" -old_CFLAGS="$CFLAGS" +old_CC=$CC +old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc @@ -269,14 +279,14 @@ no_glob_subst='s/\*/\\\*/g' # _LT_PROG_LTMAIN # --------------- -# Note that this code is called both from `configure', and `config.status' +# Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, +# 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN @@ -286,7 +296,7 @@ ltmain="$ac_aux_dir/ltmain.sh" # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' +# in macros and then make a single call at the end using the 'libtool' # label. @@ -421,8 +431,8 @@ m4_define([_lt_decl_all_varnames], # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME +# Quote a variable value, and forward it to 'config.status' so that its +# declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) @@ -446,7 +456,7 @@ m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl +available_tags='_LT_TAGS'dnl ]) @@ -474,7 +484,7 @@ m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], @@ -500,8 +510,8 @@ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated +# into 'config.status', and then the shell code to quote escape them in +# for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], @@ -547,7 +557,7 @@ for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -560,7 +570,7 @@ for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -576,7 +586,7 @@ _LT_OUTPUT_LIBTOOL_INIT # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this +# '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). @@ -598,7 +608,7 @@ AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl +test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT @@ -621,7 +631,7 @@ exec AS_MESSAGE_LOG_FD>>config.log } >&AS_MESSAGE_LOG_FD lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, +'$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. @@ -643,7 +653,7 @@ 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." -while test $[#] != 0 +while test 0 != $[#] do case $[1] in --version | --v* | -V ) @@ -656,10 +666,10 @@ do lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; +Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; +Try '$[0] --help' for more information.]) ;; esac shift done @@ -685,7 +695,7 @@ chmod +x "$CONFIG_LT" # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: -test "$silent" = yes && +test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false @@ -705,32 +715,47 @@ m4_defun([_LT_CONFIG], _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our + # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then + if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi - cfgfile="${ofile}T" + cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. -# + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + _LT_COPYING _LT_LIBTOOL_TAGS +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} + # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +_LT_PREPARE_MUNGE_PATH_LIST +_LT_PREPARE_CC_BASENAME + +# ### END FUNCTIONS SHARED WITH CONFIGURE + _LT_EOF case $host_os in @@ -739,7 +764,7 @@ _LT_EOF # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then +if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -756,8 +781,6 @@ _LT_EOF sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) - _LT_PROG_REPLACE_SHELLFNS - mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -775,7 +798,6 @@ _LT_EOF [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS @@ -974,7 +996,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then + if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the @@ -992,7 +1014,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 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 + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1010,7 +1032,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], @@ -1032,7 +1054,7 @@ _LT_EOF _lt_result=$? 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 + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1042,32 +1064,32 @@ _LT_EOF ]) case $host_os in rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[[012]][[,.]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then + if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -1087,29 +1109,29 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _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\"`' + if test yes = "$lt_cv_ld_force_load"; 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 _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; + ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test "$_lt_dar_can_shared" = "yes"; then + if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" +[ if test yes != "$lt_cv_apple_cc_single_mod"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else @@ -1129,7 +1151,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl -if test "${lt_cv_aix_libpath+set}" = set; then +if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], @@ -1147,7 +1169,7 @@ else _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) @@ -1167,8 +1189,8 @@ m4_define([_LT_SHELL_INIT], # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script which will find a shell with a builtin -# printf (which we can use as an echo command). +# of the generated configure script that will find a shell with a builtin +# printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO @@ -1196,10 +1218,10 @@ fi # Invoke $ECHO with all args, space-separated. func_echo_all () { - $ECHO "$*" + $ECHO "$*" } -case "$ECHO" in +case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; @@ -1225,16 +1247,17 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], -[ --with-sysroot[=DIR] Search for dependent libraries within DIR - (or the compiler's sysroot if not specified).], +[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], + [Search for dependent libraries within DIR (or the compiler's sysroot + if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= -case ${with_sysroot} in #( +case $with_sysroot in #( yes) - if test "$GCC" = yes; then + if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( @@ -1244,14 +1267,14 @@ case ${with_sysroot} in #( no|'') ;; #( *) - AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and in which our libraries should be installed.])]) +[dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- @@ -1259,31 +1282,33 @@ m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) - HPUX_IA64_MODE="32" + HPUX_IA64_MODE=32 ;; *ELF-64*) - HPUX_IA64_MODE="64" + HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" @@ -1312,9 +1337,46 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in @@ -1324,9 +1386,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1345,7 +1417,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -1363,19 +1438,20 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" + SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then + if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in @@ -1392,7 +1468,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 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" + LD=${LD-ld}_sol2 fi ;; *) @@ -1408,7 +1484,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ;; esac -need_locks="$enable_libtool_lock" +need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK @@ -1427,11 +1503,11 @@ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -eq 0; then + if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -ne 0; then + if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi @@ -1439,7 +1515,7 @@ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], ]) ]) -if test "x$lt_cv_ar_at_file" = xno; then +if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file @@ -1470,7 +1546,7 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in - openbsd*) + bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) @@ -1506,7 +1582,7 @@ AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" + lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -1533,7 +1609,7 @@ AC_CACHE_CHECK([$1], [$2], $RM conftest* ]) -if test x"[$]$2" = xyes; then +if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) @@ -1555,7 +1631,7 @@ AC_DEFUN([_LT_LINKER_OPTION], m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -1574,10 +1650,10 @@ AC_CACHE_CHECK([$1], [$2], fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS ]) -if test x"[$]$2" = xyes; then +if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) @@ -1598,7 +1674,7 @@ AC_DEFUN([LT_CMD_MAX_LEN], AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 - teststring="ABCD" + teststring=ABCD case $build_os in msdosdjgpp*) @@ -1638,7 +1714,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -1688,22 +1764,23 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do + for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # 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"`env 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 + test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring @@ -1719,7 +1796,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl ;; esac ]) -if test -n $lt_cv_sys_max_cmd_len ; then +if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) @@ -1747,7 +1824,7 @@ m4_defun([_LT_HEADER_DLFCN], # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : +if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -1794,9 +1871,9 @@ else # endif #endif -/* When -fvisbility=hidden is used, assume the code has been annotated +/* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -1822,7 +1899,7 @@ int main () return status; }] _LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in @@ -1843,7 +1920,7 @@ rm -fr conftest* # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then +if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown @@ -1853,44 +1930,52 @@ else case $host_os in beos*) - lt_cv_dlopen="load_add_on" + lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) - # if libdl is installed we need to link against it + # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ + lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + *) AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], + [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], + [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) @@ -1899,21 +1984,21 @@ else ;; esac - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else + if test no = "$lt_cv_dlopen"; then enable_dlopen=no + else + enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - save_LIBS="$LIBS" + save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], @@ -1923,7 +2008,7 @@ else lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) - if test "x$lt_cv_dlopen_self" = xyes; then + if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl @@ -1933,9 +2018,9 @@ else ]) fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS ;; esac @@ -2027,8 +2112,8 @@ m4_defun([_LT_COMPILER_FILE_LOCKS], m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then +hard_links=nottested +if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes @@ -2038,8 +2123,8 @@ if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + if test no = "$hard_links"; then + AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else @@ -2066,8 +2151,8 @@ objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) +AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", + [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR @@ -2079,15 +2164,15 @@ m4_defun([_LT_LINKER_HARDCODE_LIBPATH], _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && + test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else @@ -2101,12 +2186,12 @@ else fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then +if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || + test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi @@ -2130,7 +2215,7 @@ else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) - if test -n "$STRIP" ; then + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) @@ -2148,6 +2233,47 @@ _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB +# _LT_PREPARE_MUNGE_PATH_LIST +# --------------------------- +# Make sure func_munge_path_list() is defined correctly. +m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], +[[# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x@S|@2 in + x) + ;; + *:) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" + ;; + x:*) + eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" + ;; + *) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + esac +} +]])# _LT_PREPARE_PATH_LIST + + # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics @@ -2158,17 +2284,18 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; + mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in @@ -2184,28 +2311,35 @@ if test "$GCC" = yes; then ;; esac # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. + # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; + lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } @@ -2219,7 +2353,7 @@ BEGIN {RS=" "; FS="/|\n";} { # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else @@ -2228,7 +2362,7 @@ fi]) library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=".so" +shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -2245,14 +2379,17 @@ hardcode_into_libs=no # flags to be left without arguments need_version=unknown +AC_ARG_VAR([LT_SYS_LIBRARY_PATH], +[User-defined run-time library search path.]) + case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' + soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) @@ -2260,41 +2397,91 @@ aix[[4-9]]*) need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac shlibpath_var=LIBPATH fi ;; @@ -2304,18 +2491,18 @@ amigaos*) powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) - library_names_spec='${libname}${shared_ext}' + library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; @@ -2323,8 +2510,8 @@ beos*) bsdi[[45]]*) 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' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" @@ -2336,7 +2523,7 @@ bsdi[[45]]*) cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=".dll" + shrext_cmds=.dll need_version=no need_lib_prefix=no @@ -2345,8 +2532,8 @@ cygwin* | mingw* | pw32* | cegcc*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ @@ -2362,17 +2549,17 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' @@ -2381,8 +2568,8 @@ m4_if([$1], [],[ *,cl*) # Native MSVC libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' + soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' case $build_os in mingw*) @@ -2409,7 +2596,7 @@ m4_if([$1], [],[ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - sys_lib_search_path_spec="$LIB" + sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` @@ -2422,8 +2609,8 @@ m4_if([$1], [],[ esac # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' @@ -2436,7 +2623,7 @@ m4_if([$1], [],[ *) # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac @@ -2449,8 +2636,8 @@ darwin* | rhapsody*) version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' @@ -2463,8 +2650,8 @@ dgux*) 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' + 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 ;; @@ -2482,12 +2669,13 @@ freebsd* | dragonfly*) 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}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac @@ -2512,26 +2700,15 @@ freebsd* | dragonfly*) esac ;; -gnu*) - 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 # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + 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=LIBRARY_PATH - shlibpath_overrides_runpath=yes + shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -2549,14 +2726,15 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -2564,8 +2742,8 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; @@ -2574,8 +2752,8 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... @@ -2588,8 +2766,8 @@ interix[[3-9]]*) 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' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -2600,7 +2778,7 @@ irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix @@ -2608,8 +2786,8 @@ irix5* | irix6* | nonstopux*) esac need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= @@ -2628,8 +2806,8 @@ irix5* | irix6* | nonstopux*) esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; @@ -2638,13 +2816,33 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + ;; + # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 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' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -2669,7 +2867,12 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) # before this can be enabled. hardcode_into_libs=yes - # Append ld.so.conf contents to the search path + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" @@ -2689,12 +2892,12 @@ netbsd*) need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH @@ -2704,7 +2907,7 @@ netbsd*) newsos6) 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}' + 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 ;; @@ -2713,58 +2916,68 @@ newsos6) version_type=qnx 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' + 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 dynamic_linker='ldqnx.so' ;; -openbsd*) +openbsd* | bitrig*) version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" + sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no + else + need_version=yes + fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi + shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' - shrext_cmds=".dll" + version_type=windows + shrext_cmds=.dll + need_version=no need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) @@ -2775,8 +2988,8 @@ solaris*) 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' + 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=yes hardcode_into_libs=yes @@ -2786,11 +2999,11 @@ solaris*) sunos4*) version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes @@ -2798,8 +3011,8 @@ sunos4*) sysv4 | sysv4.3*) 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' + 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 case $host_vendor in sni) @@ -2820,24 +3033,24 @@ sysv4 | sysv4.3*) ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then 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' + 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 fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf + version_type=sco need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' @@ -2855,7 +3068,7 @@ tpf*) 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}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes @@ -2863,8 +3076,8 @@ tpf*) uts4*) 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' + 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 ;; @@ -2873,20 +3086,30 @@ uts4*) ;; esac AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no +test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then +if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) @@ -2919,39 +3142,41 @@ _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) +_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], + [Detected run-time system search path for libraries]) +_LT_DECL([], [configure_time_lt_sys_library_path], [2], + [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- -# find a file program which can recognize shared library +# find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -f "$ac_dir/$1"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -2974,11 +3199,11 @@ _LT_EOF break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else @@ -2996,7 +3221,7 @@ dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- -# find a file program which can recognize a shared library +# find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then @@ -3023,16 +3248,16 @@ m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], + [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld -if test "$GCC" = yes; then +if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw + # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; @@ -3046,7 +3271,7 @@ if test "$GCC" = yes; then while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - test -z "$LD" && LD="$ac_prog" + test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. @@ -3057,37 +3282,37 @@ if test "$GCC" = yes; then with_gnu_ld=unknown ;; esac -elif test "$with_gnu_ld" = yes; then +elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" + lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], +[if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi]) +rm -f conftest.i conftest2.i conftest.out]) +])# _LT_PATH_DD + + +# _LT_CMD_TRUNCATE +# ---------------- +# find command to truncate a binary pipe +m4_defun([_LT_CMD_TRUNCATE], +[m4_require([_LT_PATH_DD]) +AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], +[printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) +_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], + [Command to truncate a binary pipe]) +])# _LT_CMD_TRUNCATE + + # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies @@ -3173,13 +3435,13 @@ lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. +# 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) @@ -3206,8 +3468,7 @@ mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else @@ -3243,10 +3504,6 @@ freebsd* | dragonfly*) fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -3285,7 +3542,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; @@ -3307,8 +3564,8 @@ newos6*) lt_cv_deplibs_check_method=pass_all ;; -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' @@ -3361,6 +3618,9 @@ sysv4 | sysv4.3*) tpf*) lt_cv_deplibs_check_method=pass_all ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; esac ]) @@ -3401,33 +3661,38 @@ AC_DEFUN([LT_PATH_NM], AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. - lt_cv_path_NM="$NM" + lt_cv_path_NM=$NM else - lt_nm_to_check="${ac_tool_prefix}nm" + lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" - break + break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" - break + break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but @@ -3438,21 +3703,21 @@ else esac fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) - DUMPBIN="$DUMPBIN -symbols" + DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: @@ -3460,8 +3725,8 @@ else esac fi AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" + if test : != "$DUMPBIN"; then + NM=$DUMPBIN fi fi test -z "$NM" && NM=nm @@ -3507,8 +3772,8 @@ lt_cv_sharedlib_from_linklib_cmd, case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib @@ -3520,7 +3785,7 @@ cygwin* | mingw* | pw32* | cegcc*) ;; *) # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" + lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) @@ -3547,13 +3812,28 @@ AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) -if test "x$lt_cv_path_mainfest_tool" != xyes; then +if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL +# _LT_DLL_DEF_P([FILE]) +# --------------------- +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with func_dll_def_p in the libtool script +AC_DEFUN([_LT_DLL_DEF_P], +[dnl + test DEF = "`$SED -n dnl + -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace + -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments + -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl + -e q dnl Only consider the first "real" line + $1`" dnl +])# _LT_DLL_DEF_P + + # LT_LIB_M # -------- # check for math library @@ -3565,11 +3845,11 @@ case $host in # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) - AC_CHECK_LIB(m, cos, LIBM="-lm") + AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) @@ -3588,7 +3868,7 @@ m4_defun([_LT_COMPILER_NO_RTTI], _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; @@ -3640,7 +3920,7 @@ cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; @@ -3673,14 +3953,44 @@ case `$NM -V 2>&1` in symcode='[[ABCDGIRSTW]]' ;; esac +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -3698,21 +4008,24 @@ for ac_symprfx in "" "_"; do # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # 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};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" @@ -3752,11 +4065,11 @@ _LT_EOF if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST -#elif defined(__osf__) +#elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else @@ -3782,7 +4095,7 @@ lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; @@ -3802,9 +4115,9 @@ _LT_EOF mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" + LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS @@ -3825,7 +4138,7 @@ _LT_EOF rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then + if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= @@ -3852,12 +4165,16 @@ _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], + [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], + [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS @@ -3873,17 +4190,18 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then + if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) @@ -3894,8 +4212,8 @@ m4_if([$1], [CXX], [ ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -3911,6 +4229,11 @@ m4_if([$1], [CXX], [ # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; darwin* | rhapsody*) # PIC is the default on this platform @@ -3960,7 +4283,7 @@ m4_if([$1], [CXX], [ case $host_os in aix[[4-9]]*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else @@ -4001,14 +4324,14 @@ m4_if([$1], [CXX], [ case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' + if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default @@ -4037,7 +4360,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -4045,7 +4368,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. + # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' @@ -4190,17 +4513,18 @@ m4_if([$1], [CXX], [ fi ], [ - if test "$GCC" = yes; then + if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) @@ -4211,8 +4535,8 @@ m4_if([$1], [CXX], [ ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -4229,6 +4553,11 @@ m4_if([$1], [CXX], [ # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; darwin* | rhapsody*) @@ -4299,7 +4628,7 @@ m4_if([$1], [CXX], [ case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else @@ -4307,11 +4636,30 @@ m4_if([$1], [CXX], [ fi ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; hpux9* | hpux10* | hpux11*) @@ -4327,7 +4675,7 @@ m4_if([$1], [CXX], [ ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) @@ -4336,9 +4684,9 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. + # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' @@ -4363,6 +4711,12 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; + tcc*) + # Fabrice Bellard et al's Tiny C 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' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -4460,7 +4814,7 @@ m4_if([$1], [CXX], [ ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi @@ -4489,7 +4843,7 @@ m4_if([$1], [CXX], [ fi ]) case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: + # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; @@ -4555,17 +4909,21 @@ m4_if([$1], [CXX], [ case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in @@ -4611,9 +4969,9 @@ m4_if([$1], [CXX], [ # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if @@ -4629,7 +4987,7 @@ dnl Note also adjust exclude_expsyms for C++ above. # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. - if test "$GCC" != yes; then + if test yes != "$GCC"; then with_gnu_ld=no fi ;; @@ -4637,7 +4995,7 @@ dnl Note also adjust exclude_expsyms for C++ above. # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; - openbsd*) + openbsd* | bitrig*) with_gnu_ld=no ;; esac @@ -4647,7 +5005,7 @@ dnl Note also adjust exclude_expsyms for C++ above. # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility @@ -4669,24 +5027,24 @@ dnl Note also adjust exclude_expsyms for C++ above. esac fi - if test "$lt_use_gnu_ld_interface" = yes; then + if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no - case `$LD -v 2>&1` in + case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -4699,7 +5057,7 @@ dnl Note also adjust exclude_expsyms for C++ above. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then + if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 @@ -4718,7 +5076,7 @@ _LT_EOF case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) @@ -4734,7 +5092,7 @@ _LT_EOF _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4744,7 +5102,7 @@ _LT_EOF # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes @@ -4752,61 +5110,89 @@ _LT_EOF _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no - if test "$host_os" = linux-dietlibc; then + if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no + && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -4817,42 +5203,47 @@ _LT_EOF lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in + tcc*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' + ;; 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)='${wl}-rpath ${wl}$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 + if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -4866,8 +5257,8 @@ _LT_EOF _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -4885,8 +5276,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4898,7 +5289,7 @@ _LT_EOF _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify @@ -4913,9 +5304,9 @@ _LT_EOF # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4932,15 +5323,15 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= @@ -4956,7 +5347,7 @@ _LT_EOF # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported @@ -4964,34 +5355,57 @@ _LT_EOF ;; aix[[4-9]]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -5010,13 +5424,21 @@ _LT_EOF _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac - if test "$GCC" = yes; then + if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -5035,61 +5457,80 @@ _LT_EOF ;; esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -5098,7 +5539,7 @@ _LT_EOF case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) @@ -5128,16 +5569,17 @@ _LT_EOF # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # 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 @@ -5146,18 +5588,18 @@ _LT_EOF # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # Assume MSVC wrapper @@ -5166,7 +5608,7 @@ _LT_EOF # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. @@ -5216,33 +5658,33 @@ _LT_EOF ;; hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test yes,no = "$GCC,$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -5250,25 +5692,25 @@ _LT_EOF ;; hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then + if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ @@ -5276,14 +5718,14 @@ _LT_EOF # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) + [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in @@ -5294,7 +5736,7 @@ _LT_EOF *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. @@ -5305,16 +5747,16 @@ _LT_EOF ;; irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], - [save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + [save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], @@ -5327,21 +5769,31 @@ _LT_EOF end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) - LDFLAGS="$save_LDFLAGS"]) - if test "$lt_cv_irix_exported_symbol" = yes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + LDFLAGS=$save_LDFLAGS]) + if test yes = "$lt_cv_irix_exported_symbol"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + _LT_TAGVAR(ld_shlibs, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out @@ -5356,7 +5808,7 @@ _LT_EOF newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; @@ -5364,27 +5816,19 @@ _LT_EOF *nto* | *qnx*) ;; - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no @@ -5395,33 +5839,53 @@ _LT_EOF _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + if test yes = "$GCC"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -5432,24 +5896,24 @@ _LT_EOF solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + wlarc='$wl' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + wlarc='$wl' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi @@ -5459,11 +5923,11 @@ _LT_EOF solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', + # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + if test yes = "$GCC"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi @@ -5473,10 +5937,10 @@ _LT_EOF ;; sunos4*) - if test "x$host_vendor" = xsequent; then + if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi @@ -5525,43 +5989,43 @@ _LT_EOF ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; @@ -5576,17 +6040,17 @@ _LT_EOF ;; esac - if test x$host_vendor = xsni; then + if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no +test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld @@ -5603,7 +6067,7 @@ x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then + if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -5683,12 +6147,12 @@ _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the + "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR @@ -5729,10 +6193,10 @@ dnl [Compiler flag to generate thread safe objects]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. +# the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" +lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. @@ -5772,18 +6236,18 @@ if test -n "$compiler"; then LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB - # Report which library types will actually be built + # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' @@ -5791,8 +6255,12 @@ if test -n "$compiler"; then ;; aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -5800,13 +6268,13 @@ if test -n "$compiler"; then AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP -CC="$lt_save_CC" +CC=$lt_save_CC ])# _LT_LANG_C_CONFIG @@ -5814,14 +6282,14 @@ CC="$lt_save_CC" # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. +# the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then +if test -n "$CXX" && ( test no != "$CXX" && + ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || + (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes @@ -5863,7 +6331,7 @@ _LT_TAGVAR(objext, $1)=$objext # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then +if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" @@ -5905,35 +6373,35 @@ if test "$_lt_caught_CXX_error" != yes; then if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately - if test "$GXX" = yes; then + if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi - if test "$GXX" = yes; then + if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + if test yes = "$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) - wlarc='${wl}' + wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi @@ -5969,18 +6437,30 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in @@ -5990,6 +6470,13 @@ if test "$_lt_caught_CXX_error" != yes; then ;; esac done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -6008,13 +6495,21 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac - if test "$GXX" = yes; then + if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -6032,64 +6527,84 @@ if test "$_lt_caught_CXX_error" != yes; then fi esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag=$shared_flag' $wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # The "-G" linker flag allows undefined symbols. + _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared + # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -6099,7 +6614,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -6127,57 +6642,58 @@ if test "$_lt_caught_CXX_error" != yes; then # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # 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 # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -6188,6 +6704,34 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_DARWIN_LINKER_FEATURES($1) ;; + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + dgux*) case $cc_basename in ec++*) @@ -6222,18 +6766,15 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=yes ;; - gnu*) - ;; - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default @@ -6245,7 +6786,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -6254,11 +6795,11 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + if test yes = "$GXX"; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no @@ -6268,15 +6809,15 @@ if test "$_lt_caught_CXX_error" != yes; then ;; hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi @@ -6302,13 +6843,13 @@ if test "$_lt_caught_CXX_error" != yes; then aCC*) case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists @@ -6319,20 +6860,20 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -6347,22 +6888,22 @@ if test "$_lt_caught_CXX_error" != yes; then interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -6371,22 +6912,22 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -6394,8 +6935,8 @@ if test "$_lt_caught_CXX_error" != yes; then # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -6404,10 +6945,10 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. @@ -6421,59 +6962,59 @@ if test "$_lt_caught_CXX_error" != yes; then # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -6487,18 +7028,18 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) @@ -6506,10 +7047,10 @@ if test "$_lt_caught_CXX_error" != yes; then *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on @@ -6567,22 +7108,17 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=yes ;; - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else @@ -6598,9 +7134,9 @@ if test "$_lt_caught_CXX_error" != yes; then # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using @@ -6618,17 +7154,17 @@ if test "$_lt_caught_CXX_error" != yes; then cxx*) case $host in osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ + $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac @@ -6643,21 +7179,21 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + if test yes,no = "$GXX,$with_gnu_ld"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists @@ -6703,9 +7239,9 @@ if test "$_lt_caught_CXX_error" != yes; then # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -6713,7 +7249,7 @@ if test "$_lt_caught_CXX_error" != yes; then solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. + # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; @@ -6730,30 +7266,30 @@ if test "$_lt_caught_CXX_error" != yes; then ;; gcx*) # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if test yes,no = "$GXX,$with_gnu_ld"; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else - # g++ 2.7 appears to require `-G' NOT `-shared' on this + # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when @@ -6761,11 +7297,11 @@ if test "$_lt_caught_CXX_error" != yes; then output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi @@ -6774,52 +7310,52 @@ if test "$_lt_caught_CXX_error" != yes; then ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" + '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" + '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; @@ -6850,10 +7386,10 @@ if test "$_lt_caught_CXX_error" != yes; then esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$GXX + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -6880,7 +7416,7 @@ if test "$_lt_caught_CXX_error" != yes; then lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes +fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG @@ -6902,13 +7438,14 @@ AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + case @S|@2 in + .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; + *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose @@ -6992,13 +7529,13 @@ if AC_TRY_EVAL(ac_compile); then pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in + case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. - if test $p = "-L" || - test $p = "-R"; then + if test x-L = "$p" || + test x-R = "$p"; then prev=$p continue fi @@ -7014,16 +7551,16 @@ if AC_TRY_EVAL(ac_compile); then case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in + if test no = "$pre_test_object_deps_done"; then + case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being @@ -7031,9 +7568,9 @@ if AC_TRY_EVAL(ac_compile); then esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" + _LT_TAGVAR(postdeps, $1)=$prev$p else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= @@ -7048,15 +7585,15 @@ if AC_TRY_EVAL(ac_compile); then continue fi - if test "$pre_test_object_deps_done" = no; then + if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" + _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" + _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi @@ -7087,51 +7624,6 @@ interix[[3-9]]*) _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; esac ]) @@ -7140,7 +7632,7 @@ case " $_LT_TAGVAR(postdeps, $1) " in esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) @@ -7160,10 +7652,10 @@ _LT_TAGDECL([], [compiler_lib_search_path], [1], # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test "X$F77" = "Xno"; then +if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi @@ -7200,7 +7692,7 @@ _LT_TAGVAR(objext, $1)=$objext # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then +if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t @@ -7222,7 +7714,7 @@ if test "$_lt_disable_F77" != yes; then _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. - lt_save_CC="$CC" + lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} @@ -7236,21 +7728,25 @@ if test "$_lt_disable_F77" != yes; then AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -7258,11 +7754,11 @@ if test "$_lt_disable_F77" != yes; then AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$G77 + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -7279,9 +7775,9 @@ if test "$_lt_disable_F77" != yes; then fi # test -n "$compiler" GCC=$lt_save_GCC - CC="$lt_save_CC" - CFLAGS="$lt_save_CFLAGS" -fi # test "$_lt_disable_F77" != yes + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG @@ -7291,11 +7787,11 @@ AC_LANG_POP # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) -if test -z "$FC" || test "X$FC" = "Xno"; then +if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi @@ -7332,7 +7828,7 @@ _LT_TAGVAR(objext, $1)=$objext # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then +if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t @@ -7354,7 +7850,7 @@ if test "$_lt_disable_FC" != yes; then _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. - lt_save_CC="$CC" + lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} @@ -7370,21 +7866,25 @@ if test "$_lt_disable_FC" != yes; then AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -7392,11 +7892,11 @@ if test "$_lt_disable_FC" != yes; then AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -7416,7 +7916,7 @@ if test "$_lt_disable_FC" != yes; then GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS -fi # test "$_lt_disable_FC" != yes +fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG @@ -7426,7 +7926,7 @@ AC_LANG_POP # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE @@ -7460,7 +7960,7 @@ CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" +_LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. @@ -7497,7 +7997,7 @@ CFLAGS=$lt_save_CFLAGS # -------------------------- # 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'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE @@ -7531,7 +8031,7 @@ CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" +_LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. @@ -7568,7 +8068,7 @@ CFLAGS=$lt_save_CFLAGS # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE @@ -7584,7 +8084,7 @@ _LT_TAGVAR(objext, $1)=$objext lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" +lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER @@ -7594,7 +8094,7 @@ _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. -lt_save_CC="$CC" +lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= @@ -7623,7 +8123,7 @@ AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) @@ -7734,7 +8234,7 @@ lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue + test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in @@ -7751,9 +8251,9 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break + test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then + if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi @@ -7777,27 +8277,7 @@ dnl AC_DEFUN([LT_AC_PROG_SED], []) # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false @@ -7821,102 +8301,9 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES -# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) -# ------------------------------------------------------ -# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and -# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. -m4_defun([_LT_PROG_FUNCTION_REPLACE], -[dnl { -sed -e '/^$1 ()$/,/^} # $1 /c\ -$1 ()\ -{\ -m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) -} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: -]) - - -# _LT_PROG_REPLACE_SHELLFNS -# ------------------------- -# Replace existing portable implementations of several shell functions with -# equivalent extended shell implementations where those features are available.. -m4_defun([_LT_PROG_REPLACE_SHELLFNS], -[if test x"$xsi_shell" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl - func_split_long_opt_name=${1%%=*} - func_split_long_opt_arg=${1#*=}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) - - _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) - - _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) - - _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) -fi - -if test x"$lt_shell_append" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) - - _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl - func_quote_for_eval "${2}" -dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ - eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) -fi -]) - # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- -# Determine which file name conversion functions should be used by +# Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], diff --git a/thirdparty/tiff-4.0.3/m4/ltoptions.m4 b/thirdparty/tiff-4.2.0/m4/ltoptions.m4 similarity index 73% rename from thirdparty/tiff-4.0.3/m4/ltoptions.m4 rename to thirdparty/tiff-4.2.0/m4/ltoptions.m4 index 5d9acd8e..94b08297 100644 --- a/thirdparty/tiff-4.0.3/m4/ltoptions.m4 +++ b/thirdparty/tiff-4.2.0/m4/ltoptions.m4 @@ -1,14 +1,14 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software +# Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # 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 7 ltoptions.m4 +# serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) @@ -29,7 +29,7 @@ m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl + [m4_warning([Unknown $1 option '$2'])])[]dnl ]) @@ -75,13 +75,15 @@ m4_if([$1],[LT_INIT],[ dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) + [_LT_ENABLE_FAST_INSTALL]) + _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], + [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS @@ -112,7 +114,7 @@ AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) +put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -148,7 +150,7 @@ AU_DEFUN([AC_LIBTOOL_WIN32_DLL], _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) +put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -157,9 +159,9 @@ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# implement the --enable-shared flag, and supports the 'shared' and +# 'disable-shared' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], @@ -172,14 +174,14 @@ AC_ARG_ENABLE([shared], *) enable_shared=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) @@ -211,9 +213,9 @@ dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# implement the --enable-static flag, and support the 'static' and +# 'disable-static' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], @@ -226,14 +228,14 @@ AC_ARG_ENABLE([static], *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) @@ -265,9 +267,9 @@ dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# implement the --enable-fast-install flag, and support the 'fast-install' +# and 'disable-fast-install' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], @@ -280,14 +282,14 @@ AC_ARG_ENABLE([fast-install], *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) @@ -304,14 +306,14 @@ AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) +the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) +the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -319,11 +321,64 @@ dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) +# _LT_WITH_AIX_SONAME([DEFAULT]) +# ---------------------------------- +# implement the --with-aix-soname flag, and support the `aix-soname=aix' +# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT +# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. +m4_define([_LT_WITH_AIX_SONAME], +[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl +shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[[5-9]]*,yes) + AC_MSG_CHECKING([which variant of shared library versioning to provide]) + AC_ARG_WITH([aix-soname], + [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], + [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], + [case $withval in + aix|svr4|both) + ;; + *) + AC_MSG_ERROR([Unknown argument to --with-aix-soname]) + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname], + [AC_CACHE_VAL([lt_cv_with_aix_soname], + [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) + with_aix_soname=$lt_cv_with_aix_soname]) + AC_MSG_RESULT([$with_aix_soname]) + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + +_LT_DECL([], [shared_archive_member_spec], [0], + [Shared archive member basename, for filename based shared library versioning on AIX])dnl +])# _LT_WITH_AIX_SONAME + +LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) + + # _LT_WITH_PIC([MODE]) # -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +# 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@<:@=PKGS@:>@], @@ -334,19 +389,17 @@ m4_define([_LT_WITH_PIC], *) pic_mode=default # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC @@ -359,7 +412,7 @@ AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) +put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: diff --git a/thirdparty/tiff-4.0.3/m4/ltsugar.m4 b/thirdparty/tiff-4.2.0/m4/ltsugar.m4 similarity index 95% rename from thirdparty/tiff-4.0.3/m4/ltsugar.m4 rename to thirdparty/tiff-4.2.0/m4/ltsugar.m4 index 9000a057..48bc9344 100644 --- a/thirdparty/tiff-4.0.3/m4/ltsugar.m4 +++ b/thirdparty/tiff-4.2.0/m4/ltsugar.m4 @@ -1,6 +1,7 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software +# Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives @@ -33,7 +34,7 @@ m4_define([_lt_join], # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. +# Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], @@ -44,7 +45,7 @@ m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different diff --git a/thirdparty/tiff-4.0.3/m4/ltversion.m4 b/thirdparty/tiff-4.2.0/m4/ltversion.m4 similarity index 68% rename from thirdparty/tiff-4.0.3/m4/ltversion.m4 rename to thirdparty/tiff-4.2.0/m4/ltversion.m4 index 07a8602d..fa04b52a 100644 --- a/thirdparty/tiff-4.0.3/m4/ltversion.m4 +++ b/thirdparty/tiff-4.2.0/m4/ltversion.m4 @@ -1,6 +1,6 @@ # ltversion.m4 -- version numbers -*- Autoconf -*- # -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives @@ -9,15 +9,15 @@ # @configure_input@ -# serial 3337 ltversion.m4 +# serial 4179 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4.2]) -m4_define([LT_PACKAGE_REVISION], [1.3337]) +m4_define([LT_PACKAGE_VERSION], [2.4.6]) +m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.2' -macro_revision='1.3337' +[macro_version='2.4.6' +macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff --git a/thirdparty/tiff-4.0.3/m4/lt~obsolete.m4 b/thirdparty/tiff-4.2.0/m4/lt~obsolete.m4 similarity index 98% rename from thirdparty/tiff-4.0.3/m4/lt~obsolete.m4 rename to thirdparty/tiff-4.2.0/m4/lt~obsolete.m4 index c573da90..c6b26f88 100644 --- a/thirdparty/tiff-4.0.3/m4/lt~obsolete.m4 +++ b/thirdparty/tiff-4.2.0/m4/lt~obsolete.m4 @@ -1,6 +1,7 @@ # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software +# Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives @@ -11,7 +12,7 @@ # These exist entirely to fool aclocal when bootstrapping libtool. # -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # @@ -25,7 +26,7 @@ # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until diff --git a/thirdparty/tiff-4.2.0/man/CMakeLists.txt b/thirdparty/tiff-4.2.0/man/CMakeLists.txt new file mode 100644 index 00000000..be5e2949 --- /dev/null +++ b/thirdparty/tiff-4.2.0/man/CMakeLists.txt @@ -0,0 +1,97 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +set(man1_MANS + fax2ps.1 + fax2tiff.1 + pal2rgb.1 + ppm2tiff.1 + raw2tiff.1 + tiff2bw.1 + tiff2pdf.1 + tiff2ps.1 + tiff2rgba.1 + tiffcmp.1 + tiffcp.1 + tiffcrop.1 + tiffdither.1 + tiffdump.1 + tiffgt.1 + tiffinfo.1 + tiffmedian.1 + tiffset.1 + tiffsplit.1) + +set(man3_MANS + libtiff.3tiff + TIFFbuffer.3tiff + TIFFClose.3tiff + TIFFcodec.3tiff + TIFFcolor.3tiff + TIFFDataWidth.3tiff + TIFFError.3tiff + TIFFFieldDataType.3tiff + TIFFFieldName.3tiff + TIFFFieldPassCount.3tiff + TIFFFieldReadCount.3tiff + TIFFFieldTag.3tiff + TIFFFieldWriteCount.3tiff + TIFFFlush.3tiff + TIFFGetField.3tiff + TIFFmemory.3tiff + TIFFOpen.3tiff + TIFFPrintDirectory.3tiff + TIFFquery.3tiff + TIFFReadDirectory.3tiff + TIFFReadEncodedStrip.3tiff + TIFFReadEncodedTile.3tiff + TIFFReadRawStrip.3tiff + TIFFReadRawTile.3tiff + TIFFReadRGBAImage.3tiff + TIFFReadRGBAStrip.3tiff + TIFFReadRGBATile.3tiff + TIFFReadScanline.3tiff + TIFFReadTile.3tiff + TIFFRGBAImage.3tiff + TIFFSetDirectory.3tiff + TIFFSetField.3tiff + TIFFsize.3tiff + TIFFstrip.3tiff + TIFFswab.3tiff + TIFFtile.3tiff + TIFFWarning.3tiff + TIFFWriteDirectory.3tiff + TIFFWriteEncodedStrip.3tiff + TIFFWriteEncodedTile.3tiff + TIFFWriteRawStrip.3tiff + TIFFWriteRawTile.3tiff + TIFFWriteScanline.3tiff + TIFFWriteTile.3tiff) + +install(FILES ${man1_MANS} + DESTINATION "${CMAKE_INSTALL_FULL_MANDIR}/man1") +install(FILES ${man3_MANS} + DESTINATION "${CMAKE_INSTALL_FULL_MANDIR}/man3") + +extra_dist(${man1_MANS} ${man3_MANS}) diff --git a/thirdparty/tiff-4.0.3/man/Makefile.am b/thirdparty/tiff-4.2.0/man/Makefile.am similarity index 95% rename from thirdparty/tiff-4.0.3/man/Makefile.am rename to thirdparty/tiff-4.2.0/man/Makefile.am index bcad9ba7..0fe9e4d0 100644 --- a/thirdparty/tiff-4.0.3/man/Makefile.am +++ b/thirdparty/tiff-4.2.0/man/Makefile.am @@ -24,17 +24,11 @@ # Process this file with automake to produce Makefile.in. dist_man1_MANS = \ - bmp2tiff.1 \ fax2ps.1 \ fax2tiff.1 \ - gif2tiff.1 \ pal2rgb.1 \ ppm2tiff.1 \ - ras2tiff.1 \ raw2tiff.1 \ - rgb2ycbcr.1 \ - sgi2tiff.1 \ - thumbnail.1 \ tiff2bw.1 \ tiff2pdf.1 \ tiff2ps.1 \ @@ -48,8 +42,7 @@ dist_man1_MANS = \ tiffinfo.1 \ tiffmedian.1 \ tiffset.1 \ - tiffsplit.1 \ - tiffsv.1 + tiffsplit.1 dist_man3_MANS = \ libtiff.3tiff \ @@ -96,3 +89,6 @@ dist_man3_MANS = \ TIFFWriteRawTile.3tiff \ TIFFWriteScanline.3tiff \ TIFFWriteTile.3tiff + +EXTRA_DIST = \ + CMakeLists.txt diff --git a/thirdparty/tiff-4.0.3/man/Makefile.in b/thirdparty/tiff-4.2.0/man/Makefile.in similarity index 86% rename from thirdparty/tiff-4.0.3/man/Makefile.in rename to thirdparty/tiff-4.2.0/man/Makefile.in index ff60f6f3..4568bfe7 100644 --- a/thirdparty/tiff-4.0.3/man/Makefile.in +++ b/thirdparty/tiff-4.2.0/man/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -39,23 +39,61 @@ # Process this file with automake to produce Makefile.in. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -75,9 +113,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = man -DIST_COMMON = $(dist_man1_MANS) $(dist_man3_MANS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -85,7 +120,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = @@ -141,6 +177,9 @@ am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" man3dir = $(mandir)/man3 NROFF = nroff MANS = $(dist_man1_MANS) $(dist_man3_MANS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(dist_man1_MANS) $(dist_man3_MANS) \ + $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -154,6 +193,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -201,6 +241,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -289,17 +330,11 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dist_man1_MANS = \ - bmp2tiff.1 \ fax2ps.1 \ fax2tiff.1 \ - gif2tiff.1 \ pal2rgb.1 \ ppm2tiff.1 \ - ras2tiff.1 \ raw2tiff.1 \ - rgb2ycbcr.1 \ - sgi2tiff.1 \ - thumbnail.1 \ tiff2bw.1 \ tiff2pdf.1 \ tiff2ps.1 \ @@ -313,8 +348,7 @@ dist_man1_MANS = \ tiffinfo.1 \ tiffmedian.1 \ tiffset.1 \ - tiffsplit.1 \ - tiffsv.1 + tiffsplit.1 dist_man3_MANS = \ libtiff.3tiff \ @@ -362,6 +396,9 @@ dist_man3_MANS = \ TIFFWriteScanline.3tiff \ TIFFWriteTile.3tiff +EXTRA_DIST = \ + CMakeLists.txt + all: all-am .SUFFIXES: @@ -377,14 +414,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign man/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -483,29 +519,17 @@ uninstall-man3: } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: cscope cscopelist: -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically 'make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -643,17 +667,19 @@ uninstall-man: uninstall-man1 uninstall-man3 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-man1 \ - install-man3 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am uninstall uninstall-am uninstall-man uninstall-man1 \ - uninstall-man3 + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-man3 install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-man uninstall-man1 uninstall-man3 + +.PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/thirdparty/tiff-4.0.3/man/TIFFClose.3tiff b/thirdparty/tiff-4.2.0/man/TIFFClose.3tiff similarity index 94% rename from thirdparty/tiff-4.0.3/man/TIFFClose.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFClose.3tiff index bcb76044..fc64ccc3 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFClose.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFClose.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFClose.3tiff,v 1.3 2009-08-24 19:13:40 bfriesen Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -50,4 +49,4 @@ routine. .BR TIFFOpen (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFDataWidth.3tiff b/thirdparty/tiff-4.2.0/man/TIFFDataWidth.3tiff similarity index 94% rename from thirdparty/tiff-4.0.3/man/TIFFDataWidth.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFDataWidth.3tiff index cb274d89..efcd39d7 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFDataWidth.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFDataWidth.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFDataWidth.3tiff,v 1.3 2006-03-23 14:54:02 dron Exp $ .\" .\" Copyright (c) 2002, Andrey Kiselev .\" @@ -71,4 +70,4 @@ uknown data type supplied. .BR libtiff (3TIFF), .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFError.3tiff b/thirdparty/tiff-4.2.0/man/TIFFError.3tiff similarity index 96% rename from thirdparty/tiff-4.0.3/man/TIFFError.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFError.3tiff index 761ff08c..5d0c2196 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFError.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFError.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFError.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -66,4 +65,4 @@ returns a reference to the previous error handling function. .BR printf (3) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFFieldDataType.3tiff b/thirdparty/tiff-4.2.0/man/TIFFFieldDataType.3tiff similarity index 94% rename from thirdparty/tiff-4.0.3/man/TIFFFieldDataType.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFFieldDataType.3tiff index 3efe6974..6049f591 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFFieldDataType.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFFieldDataType.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFFieldDataType.3tiff,v 1.1 2012-07-29 15:45:29 tgl Exp $ .\" .\" Copyright (c) 2012, Tom Lane .\" @@ -50,4 +49,4 @@ returns a member of the enum type .BR libtiff (3TIFF), .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFFieldName.3tiff b/thirdparty/tiff-4.2.0/man/TIFFFieldName.3tiff similarity index 94% rename from thirdparty/tiff-4.0.3/man/TIFFFieldName.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFFieldName.3tiff index 2755d181..47d9ad84 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFFieldName.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFFieldName.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFFieldName.3tiff,v 1.1 2012-07-29 15:45:29 tgl Exp $ .\" .\" Copyright (c) 2012, Tom Lane .\" @@ -49,4 +48,4 @@ returns a constant C string. .BR libtiff (3TIFF), .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFFieldPassCount.3tiff b/thirdparty/tiff-4.2.0/man/TIFFFieldPassCount.3tiff similarity index 95% rename from thirdparty/tiff-4.0.3/man/TIFFFieldPassCount.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFFieldPassCount.3tiff index 8f3c5d0d..ff14c520 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFFieldPassCount.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFFieldPassCount.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFFieldPassCount.3tiff,v 1.1 2012-07-29 15:45:29 tgl Exp $ .\" .\" Copyright (c) 2012, Tom Lane .\" @@ -70,4 +69,4 @@ returns an integer that is always 1 (true) or 0 (false). .BR libtiff (3TIFF), .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFFieldReadCount.3tiff b/thirdparty/tiff-4.2.0/man/TIFFFieldReadCount.3tiff similarity index 95% rename from thirdparty/tiff-4.0.3/man/TIFFFieldReadCount.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFFieldReadCount.3tiff index cdb5858a..b6a4546c 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFFieldReadCount.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFFieldReadCount.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFFieldReadCount.3tiff,v 1.1 2012-07-29 15:45:30 tgl Exp $ .\" .\" Copyright (c) 2012, Tom Lane .\" @@ -74,4 +73,4 @@ returns an integer. .BR libtiff (3TIFF), .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFFieldTag.3tiff b/thirdparty/tiff-4.2.0/man/TIFFFieldTag.3tiff similarity index 94% rename from thirdparty/tiff-4.0.3/man/TIFFFieldTag.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFFieldTag.3tiff index bf8174e2..3d1e83d0 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFFieldTag.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFFieldTag.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFFieldTag.3tiff,v 1.1 2012-07-29 15:45:30 tgl Exp $ .\" .\" Copyright (c) 2012, Tom Lane .\" @@ -53,4 +52,4 @@ returns an integer tag value. .BR libtiff (3TIFF), .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFFieldWriteCount.3tiff b/thirdparty/tiff-4.2.0/man/TIFFFieldWriteCount.3tiff similarity index 95% rename from thirdparty/tiff-4.0.3/man/TIFFFieldWriteCount.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFFieldWriteCount.3tiff index 63305320..f80290fe 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFFieldWriteCount.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFFieldWriteCount.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFFieldWriteCount.3tiff,v 1.1 2012-07-29 15:45:30 tgl Exp $ .\" .\" Copyright (c) 2012, Tom Lane .\" @@ -85,4 +84,4 @@ returns an integer. .BR libtiff (3TIFF), .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFFlush.3tiff b/thirdparty/tiff-4.2.0/man/TIFFFlush.3tiff similarity index 95% rename from thirdparty/tiff-4.0.3/man/TIFFFlush.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFFlush.3tiff index af323503..c46a2a3f 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFFlush.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFFlush.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFFlush.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -61,4 +60,4 @@ routine. .BR libtiff (3TIFF), .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFGetField.3tiff b/thirdparty/tiff-4.2.0/man/TIFFGetField.3tiff similarity index 81% rename from thirdparty/tiff-4.0.3/man/TIFFGetField.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFGetField.3tiff index 0624ee9b..431f4ae9 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFGetField.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFGetField.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFGetField.3tiff,v 1.6 2012-05-19 23:15:22 bfriesen Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -23,7 +22,7 @@ .\" OF THIS SOFTWARE. .\" .if n .po 0 -.TH TIFFGetField 3TIFF "March 18, 2005" "libtiff" +.TH TIFFGetField 3TIFF "March 29, 2020" "libtiff" .SH NAME TIFFGetField, TIFFVGetField \- get the value(s) of a tag in an open .SM TIFF @@ -103,77 +102,77 @@ meaning of each tag and their possible values. .ta \w'TIFFTAG_CONSECUTIVEBADFAXLINES'u+2n +\w'Count'u+2n +\w'TIFFFaxFillFunc*'u+2n \fITag Name\fP \fICount\fP \fITypes\fP \fINotes\fP .sp 5p -TIFFTAG_ARTIST 1 char** +TIFFTAG_ARTIST 1 const char** TIFFTAG_BADFAXLINES 1 uint32* TIFFTAG_BITSPERSAMPLE 1 uint16* TIFFTAG_CLEANFAXDATA 1 uint16* -TIFFTAG_COLORMAP 3 uint16** 1<" .sp -.BI "tsize_t TIFFReadEncodedStrip(TIFF *" tif ", tstrip_t " strip ", tdata_t " buf ", tsize_t " size ")" +.BI "tmsize_t TIFFReadEncodedStrip(TIFF *" tif ", uint32 " strip ", void *" buf ", tmsize_t " size ")" .SH DESCRIPTION Read the specified strip of data and place up to .I size @@ -75,4 +74,4 @@ routine. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFReadEncodedTile.3tiff b/thirdparty/tiff-4.2.0/man/TIFFReadEncodedTile.3tiff similarity index 96% rename from thirdparty/tiff-4.0.3/man/TIFFReadEncodedTile.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFReadEncodedTile.3tiff index 5f6d9008..6f8d6496 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFReadEncodedTile.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFReadEncodedTile.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFReadEncodedTile.3tiff,v 1.3 2006-10-13 07:22:01 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -73,4 +72,4 @@ routine. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFReadRGBAImage.3tiff b/thirdparty/tiff-4.2.0/man/TIFFReadRGBAImage.3tiff similarity index 98% rename from thirdparty/tiff-4.0.3/man/TIFFReadRGBAImage.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFReadRGBAImage.3tiff index 5d43ce39..920fc370 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFReadRGBAImage.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFReadRGBAImage.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFReadRGBAImage.3tiff,v 1.4 2006-10-13 07:22:01 dron Exp $ .\" .\" Copyright (c) 1991-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -215,4 +214,4 @@ data to 8-bit .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFReadRGBAStrip.3tiff b/thirdparty/tiff-4.2.0/man/TIFFReadRGBAStrip.3tiff similarity index 98% rename from thirdparty/tiff-4.0.3/man/TIFFReadRGBAStrip.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFReadRGBAStrip.3tiff index a8bb1899..31604124 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFReadRGBAStrip.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFReadRGBAStrip.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFReadRGBAStrip.3tiff,v 1.3 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1991-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -166,5 +165,5 @@ There was insufficient memory to allocate a table used to map data to 8-bit .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFReadRGBATile.3tiff b/thirdparty/tiff-4.2.0/man/TIFFReadRGBATile.3tiff similarity index 98% rename from thirdparty/tiff-4.0.3/man/TIFFReadRGBATile.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFReadRGBATile.3tiff index dfae1a9a..5b9b4bf2 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFReadRGBATile.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFReadRGBATile.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFReadRGBATile.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1991-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -168,4 +167,4 @@ There was insufficient memory to allocate a table used to map data to 8-bit .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFReadRawStrip.3tiff b/thirdparty/tiff-4.2.0/man/TIFFReadRawStrip.3tiff similarity index 95% rename from thirdparty/tiff-4.0.3/man/TIFFReadRawStrip.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFReadRawStrip.3tiff index 1f2d1d1e..6d411df4 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFReadRawStrip.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFReadRawStrip.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFReadRawStrip.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -61,4 +60,4 @@ routine. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFReadRawTile.3tiff b/thirdparty/tiff-4.2.0/man/TIFFReadRawTile.3tiff similarity index 95% rename from thirdparty/tiff-4.0.3/man/TIFFReadRawTile.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFReadRawTile.3tiff index 3945dd90..9c60888a 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFReadRawTile.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFReadRawTile.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFReadRawTile.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -62,4 +61,4 @@ routine. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFReadScanline.3tiff b/thirdparty/tiff-4.2.0/man/TIFFReadScanline.3tiff similarity index 97% rename from thirdparty/tiff-4.0.3/man/TIFFReadScanline.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFReadScanline.3tiff index 7baf6519..ca4b8368 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFReadScanline.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFReadScanline.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFReadScanline.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -91,4 +90,4 @@ tile-based interfaces to read these formats. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFReadTile.3tiff b/thirdparty/tiff-4.2.0/man/TIFFReadTile.3tiff similarity index 96% rename from thirdparty/tiff-4.0.3/man/TIFFReadTile.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFReadTile.3tiff index 4a9b20d5..cf0f21dc 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFReadTile.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFReadTile.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFReadTile.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -81,4 +80,4 @@ routine. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFSetDirectory.3tiff b/thirdparty/tiff-4.2.0/man/TIFFSetDirectory.3tiff similarity index 93% rename from thirdparty/tiff-4.0.3/man/TIFFSetDirectory.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFSetDirectory.3tiff index 162d3107..734c0155 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFSetDirectory.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFSetDirectory.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFSetDirectory.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -33,7 +32,7 @@ file .sp .BI "int TIFFSetDirectory(TIFF *" tif ", tdir_t " dirnum ")" .br -.BI "int TIFFSetSubDirectory(TIFF *" tif ", uint32 " diroff ")" +.BI "int TIFFSetSubDirectory(TIFF *" tif ", uint64 " diroff ")" .SH DESCRIPTION .I TIFFSetDirectory changes the current directory and reads its contents with @@ -76,4 +75,4 @@ next directory in a file. .IR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFSetField.3tiff b/thirdparty/tiff-4.2.0/man/TIFFSetField.3tiff similarity index 97% rename from thirdparty/tiff-4.0.3/man/TIFFSetField.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFSetField.3tiff index 33e94717..df2a5ea2 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFSetField.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFSetField.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFSetField.3tiff,v 1.5 2010-05-06 02:54:46 olivier Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -157,7 +156,7 @@ TIFFTAG_SMINSAMPLEVALUE 1 double TIFFTAG_SOFTWARE 1 char* TIFFTAG_STONITS 1 double \(dg TIFFTAG_SUBFILETYPE 1 uint32 -TIFFTAG_SUBIFD 2 uint16,uint32* count & offsets array +TIFFTAG_SUBIFD 2 uint16,uint64* count & offsets array TIFFTAG_TARGETPRINTER 1 char* TIFFTAG_THRESHHOLDING 1 uint16 TIFFTAG_TILEDEPTH 1 uint32 \(dg @@ -214,4 +213,4 @@ An invalid value was supplied for the named tag. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFWarning.3tiff b/thirdparty/tiff-4.2.0/man/TIFFWarning.3tiff similarity index 95% rename from thirdparty/tiff-4.0.3/man/TIFFWarning.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFWarning.3tiff index 32339aa1..9a4d9096 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFWarning.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFWarning.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFWarning.3tiff,v 1.3 2012-06-01 22:02:44 fwarmerdam Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -67,4 +66,4 @@ returns a reference to the previous error handling function. .BR printf (3) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFWriteDirectory.3tiff b/thirdparty/tiff-4.2.0/man/TIFFWriteDirectory.3tiff similarity index 97% rename from thirdparty/tiff-4.0.3/man/TIFFWriteDirectory.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFWriteDirectory.3tiff index b8de6bf5..e7b84b6d 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFWriteDirectory.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFWriteDirectory.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFWriteDirectory.3tiff,v 1.3 2010-12-12 01:45:35 faxguy Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -135,4 +134,4 @@ written. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFWriteEncodedStrip.3tiff b/thirdparty/tiff-4.2.0/man/TIFFWriteEncodedStrip.3tiff similarity index 96% rename from thirdparty/tiff-4.0.3/man/TIFFWriteEncodedStrip.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFWriteEncodedStrip.3tiff index 41306343..dc410e41 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFWriteEncodedStrip.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFWriteEncodedStrip.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFWriteEncodedStrip.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -99,4 +98,4 @@ counts. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFWriteEncodedTile.3tiff b/thirdparty/tiff-4.2.0/man/TIFFWriteEncodedTile.3tiff similarity index 96% rename from thirdparty/tiff-4.0.3/man/TIFFWriteEncodedTile.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFWriteEncodedTile.3tiff index 4bb471f8..d94f4d0e 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFWriteEncodedTile.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFWriteEncodedTile.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFWriteEncodedTile.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -93,4 +92,4 @@ counts. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFWriteRawStrip.3tiff b/thirdparty/tiff-4.2.0/man/TIFFWriteRawStrip.3tiff similarity index 96% rename from thirdparty/tiff-4.0.3/man/TIFFWriteRawStrip.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFWriteRawStrip.3tiff index 0fed3aa3..784a6e03 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFWriteRawStrip.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFWriteRawStrip.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFWriteRawStrip.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -93,4 +92,4 @@ currently specified image dimensions. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFWriteRawTile.3tiff b/thirdparty/tiff-4.2.0/man/TIFFWriteRawTile.3tiff similarity index 96% rename from thirdparty/tiff-4.0.3/man/TIFFWriteRawTile.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFWriteRawTile.3tiff index d422e588..f3334b85 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFWriteRawTile.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFWriteRawTile.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFWriteRawTile.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -81,4 +80,4 @@ dimensions. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFWriteScanline.3tiff b/thirdparty/tiff-4.2.0/man/TIFFWriteScanline.3tiff similarity index 98% rename from thirdparty/tiff-4.0.3/man/TIFFWriteScanline.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFWriteScanline.3tiff index 0dd35f51..a51cec52 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFWriteScanline.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFWriteScanline.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFWriteScanline.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -151,4 +150,4 @@ the library does not pack the block-interleaved samples. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFWriteTile.3tiff b/thirdparty/tiff-4.2.0/man/TIFFWriteTile.3tiff similarity index 96% rename from thirdparty/tiff-4.0.3/man/TIFFWriteTile.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFWriteTile.3tiff index 08250f7c..a6700258 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFWriteTile.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFWriteTile.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFWriteTile.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -74,4 +73,4 @@ routine. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFbuffer.3tiff b/thirdparty/tiff-4.2.0/man/TIFFbuffer.3tiff similarity index 96% rename from thirdparty/tiff-4.0.3/man/TIFFbuffer.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFbuffer.3tiff index a4446cd9..20111701 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFbuffer.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFbuffer.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFbuffer.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1995 Sam Leffler .\" Copyright (c) 1995 Silicon Graphics, Inc. @@ -74,4 +73,4 @@ was unable to dynamically allocate space for a data buffer. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFcodec.3tiff b/thirdparty/tiff-4.2.0/man/TIFFcodec.3tiff similarity index 96% rename from thirdparty/tiff-4.0.3/man/TIFFcodec.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFcodec.3tiff index 78a0f02e..aa3a8c63 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFcodec.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFcodec.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFcodec.3tiff,v 1.3 2011-08-02 14:09:43 bfriesen Exp $ .\" .\" Copyright (c) 1995 Sam Leffler .\" Copyright (c) 1995 Silicon Graphics, Inc. @@ -79,4 +78,4 @@ compression schemes. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFcolor.3tiff b/thirdparty/tiff-4.2.0/man/TIFFcolor.3tiff similarity index 98% rename from thirdparty/tiff-4.0.3/man/TIFFcolor.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFcolor.3tiff index e5d27270..1d2bb2b8 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFcolor.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFcolor.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFcolor.3tiff,v 1.4 2009-11-30 12:22:26 fwarmerdam Exp $ .\" .\" Copyright (c) 2003, Andrey Kiselev .\" @@ -265,4 +264,4 @@ _TIFFfree(cielab); .BR libtiff (3TIFF), .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFmemory.3tiff b/thirdparty/tiff-4.2.0/man/TIFFmemory.3tiff similarity index 95% rename from thirdparty/tiff-4.0.3/man/TIFFmemory.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFmemory.3tiff index 55f446b4..70a82123 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFmemory.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFmemory.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFmemory.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1995 Sam Leffler .\" Copyright (c) 1995 Silicon Graphics, Inc. @@ -78,7 +77,7 @@ C routines: .IR memcpy , and .IR memcmp , -repsectively. +respectively. .SH DIAGNOSTICS None. .SH "SEE ALSO" @@ -87,4 +86,4 @@ None. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFquery.3tiff b/thirdparty/tiff-4.2.0/man/TIFFquery.3tiff similarity index 97% rename from thirdparty/tiff-4.0.3/man/TIFFquery.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFquery.3tiff index 8bddc889..4d95f5f4 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFquery.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFquery.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFquery.3tiff,v 1.1 2004-11-11 14:39:16 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -114,7 +113,7 @@ returned if the image data is organized in strips. .IR TIFFIsByteSwapped returns a non-zero value if the image data was in a different byte-order than the host machine. Zero is returned if the TIFF file and local host byte-orders -are the same. Note that TIFFReadTile(), TIFFReadStrip() and +are the same. Note that TIFFReadTile(), TIFFReadEncodedStrip() and TIFFReadScanline() functions already normally perform byte swapping to local host order if needed. .PP diff --git a/thirdparty/tiff-4.0.3/man/TIFFsize.3tiff b/thirdparty/tiff-4.2.0/man/TIFFsize.3tiff similarity index 95% rename from thirdparty/tiff-4.0.3/man/TIFFsize.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFsize.3tiff index 6de9084a..5fbc6bc9 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFsize.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFsize.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFsize.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -56,4 +55,4 @@ None. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFstrip.3tiff b/thirdparty/tiff-4.2.0/man/TIFFstrip.3tiff similarity index 92% rename from thirdparty/tiff-4.0.3/man/TIFFstrip.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFstrip.3tiff index bb9658e5..ce3f718c 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFstrip.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFstrip.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFstrip.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1992-1997 Sam Leffler .\" Copyright (c) 1992-1997 Silicon Graphics, Inc. @@ -32,11 +31,11 @@ TIFFComputeStrip, TIFFNumberOfStrips \- strip-related utility routines .sp .BI "uint32 TIFFDefaultStripSize(TIFF *" tif ", uint32 " estimate ")" .br -.BI "tsize_t TIFFStripSize(TIFF *" tif ")" +.BI "tmsize_t TIFFStripSize(TIFF *" tif ")" .br -.BI "tsize_t TIFFVStripSize(TIFF *" tif ", uint32 " nrows ")" +.BI "tmsize_t TIFFVStripSize(TIFF *" tif ", uint32 " nrows ")" .br -.BI "tsize_t TIFFRawStripSize(TIFF *" tif ", tstrip_t " strip ")" +.BI "tmsize_t TIFFRawStripSize(TIFF *" tif ", uint32 " strip ")" .br .BI "tstrip_t TIFFComputeStrip(TIFF *" tif ", uint32 " row ", tsample_t " sample ")" .br @@ -96,4 +95,4 @@ None. .BR libtiff (3TIFF), .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFswab.3tiff b/thirdparty/tiff-4.2.0/man/TIFFswab.3tiff similarity index 96% rename from thirdparty/tiff-4.0.3/man/TIFFswab.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFswab.3tiff index d6432fa5..3d7a47bc 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFswab.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFswab.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFswab.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -77,4 +76,4 @@ None. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/TIFFtile.3tiff b/thirdparty/tiff-4.2.0/man/TIFFtile.3tiff similarity index 97% rename from thirdparty/tiff-4.0.3/man/TIFFtile.3tiff rename to thirdparty/tiff-4.2.0/man/TIFFtile.3tiff index 5431f31a..10310a06 100644 --- a/thirdparty/tiff-4.0.3/man/TIFFtile.3tiff +++ b/thirdparty/tiff-4.2.0/man/TIFFtile.3tiff @@ -1,4 +1,3 @@ -.\" $Id: TIFFtile.3tiff,v 1.2 2005-11-02 11:07:19 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -128,4 +127,4 @@ None. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/fax2ps.1 b/thirdparty/tiff-4.2.0/man/fax2ps.1 similarity index 97% rename from thirdparty/tiff-4.0.3/man/fax2ps.1 rename to thirdparty/tiff-4.2.0/man/fax2ps.1 index 9525f20b..7aeea4f9 100644 --- a/thirdparty/tiff-4.0.3/man/fax2ps.1 +++ b/thirdparty/tiff-4.2.0/man/fax2ps.1 @@ -1,4 +1,3 @@ -.\" $Id: fax2ps.1,v 1.4 2006-04-20 12:17:19 dron Exp $ .\" .\" Copyright (c) 1991-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -156,4 +155,4 @@ job of compressing the output and just generate .BR libtiff (3) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/fax2tiff.1 b/thirdparty/tiff-4.2.0/man/fax2tiff.1 similarity index 98% rename from thirdparty/tiff-4.0.3/man/fax2tiff.1 rename to thirdparty/tiff-4.2.0/man/fax2tiff.1 index 873cab17..97144c9f 100644 --- a/thirdparty/tiff-4.0.3/man/fax2tiff.1 +++ b/thirdparty/tiff-4.2.0/man/fax2tiff.1 @@ -1,4 +1,3 @@ -.\" $Id: fax2tiff.1,v 1.7 2006-04-20 12:17:19 dron Exp $ .\" .\" Copyright (c) 1990-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -283,4 +282,4 @@ an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies. .BR libtiff (3) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/libtiff.3tiff b/thirdparty/tiff-4.2.0/man/libtiff.3tiff similarity index 98% rename from thirdparty/tiff-4.0.3/man/libtiff.3tiff rename to thirdparty/tiff-4.2.0/man/libtiff.3tiff index 59895d62..8e9ff35b 100644 --- a/thirdparty/tiff-4.0.3/man/libtiff.3tiff +++ b/thirdparty/tiff-4.2.0/man/libtiff.3tiff @@ -1,4 +1,3 @@ -.\" $Id: libtiff.3tiff,v 1.4 2012-07-29 15:45:30 tgl Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -343,7 +342,7 @@ WhitePoint 318 R/W XPosition 286 R/W XResolution 282 R/W YCbCrCoefficients 529 R/W used by TIFFRGBAImage support -YCbCrPositioning 531 R/W tile/strip size calulcations +YCbCrPositioning 531 R/W tile/strip size calculations YCbCrSubsampling 530 R/W YPosition 286 R/W YResolution 283 R/W used by Group 3 codec @@ -355,7 +354,7 @@ tags whose values lie in a range outside the valid range of .SM TIFF tags. These tags are termed -.I pseud-tags +.I pseudo-tags and are used to control various codec-specific functions within the library. The table below summarizes the defined pseudo-tags. .sp @@ -409,7 +408,7 @@ The default value is a pointer to a builtin function that images packed bilevel data. .TP .B TIFFTAG_IPTCNEWSPHOTO -Tag contaings image metadata per the IPTC newsphoto spec: Headline, +Tag contains image metadata per the IPTC newsphoto spec: Headline, captioning, credit, etc... Used by most wire services. .TP .B TIFFTAG_PHOTOSHOP @@ -536,7 +535,7 @@ an Aldus Technical Memorandum. an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies. .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ .SH BUGS The library does not support multi-sample images where some samples have different bits/sample. diff --git a/thirdparty/tiff-4.0.3/man/pal2rgb.1 b/thirdparty/tiff-4.2.0/man/pal2rgb.1 similarity index 97% rename from thirdparty/tiff-4.0.3/man/pal2rgb.1 rename to thirdparty/tiff-4.2.0/man/pal2rgb.1 index 0ac2e5af..772b4a7b 100644 --- a/thirdparty/tiff-4.0.3/man/pal2rgb.1 +++ b/thirdparty/tiff-4.2.0/man/pal2rgb.1 @@ -1,4 +1,3 @@ -.\" $Id: pal2rgb.1,v 1.3 2005-11-02 11:07:19 dron Exp $ .\" .\" Copyright (c) 1990-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -108,4 +107,4 @@ Only 8-bit images are handled. .BR libtiff (3) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/ppm2tiff.1 b/thirdparty/tiff-4.2.0/man/ppm2tiff.1 similarity index 96% rename from thirdparty/tiff-4.0.3/man/ppm2tiff.1 rename to thirdparty/tiff-4.2.0/man/ppm2tiff.1 index 882fd045..12e58e2c 100644 --- a/thirdparty/tiff-4.0.3/man/ppm2tiff.1 +++ b/thirdparty/tiff-4.2.0/man/ppm2tiff.1 @@ -1,4 +1,3 @@ -.\" $Id: ppm2tiff.1,v 1.5 2006-03-01 11:20:33 dron Exp $ .\" .\" Copyright (c) 1991-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -102,4 +101,4 @@ dots/inch). .BR libtiff (3) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/raw2tiff.1 b/thirdparty/tiff-4.2.0/man/raw2tiff.1 similarity index 98% rename from thirdparty/tiff-4.0.3/man/raw2tiff.1 rename to thirdparty/tiff-4.2.0/man/raw2tiff.1 index 3e832df2..f45569d4 100644 --- a/thirdparty/tiff-4.0.3/man/raw2tiff.1 +++ b/thirdparty/tiff-4.2.0/man/raw2tiff.1 @@ -1,4 +1,3 @@ -.\" $Id: raw2tiff.1,v 1.7 2009-08-24 19:13:40 bfriesen Exp $ .\" .\" Copyright (c) 1990-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -193,4 +192,4 @@ in some cases. But for most ordinary images guessing method will work fine. .BR libtiff (3) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/tiff2bw.1 b/thirdparty/tiff-4.2.0/man/tiff2bw.1 similarity index 96% rename from thirdparty/tiff-4.0.3/man/tiff2bw.1 rename to thirdparty/tiff-4.2.0/man/tiff2bw.1 index ccbe7e8f..4fe9942f 100644 --- a/thirdparty/tiff-4.0.3/man/tiff2bw.1 +++ b/thirdparty/tiff-4.2.0/man/tiff2bw.1 @@ -1,4 +1,3 @@ -.\" $Id: tiff2bw.1,v 1.3 2006-04-20 12:17:19 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -91,4 +90,4 @@ Specify the percentage of the blue channel to use (default 11). .BR libtiff (3) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/tiff2pdf.1 b/thirdparty/tiff-4.2.0/man/tiff2pdf.1 similarity index 97% rename from thirdparty/tiff-4.0.3/man/tiff2pdf.1 rename to thirdparty/tiff-4.2.0/man/tiff2pdf.1 index ba670cfb..6b3b4abf 100644 --- a/thirdparty/tiff-4.0.3/man/tiff2pdf.1 +++ b/thirdparty/tiff-4.2.0/man/tiff2pdf.1 @@ -1,4 +1,3 @@ -.\" $Id: tiff2pdf.1,v 1.7 2010-12-11 22:47:49 faxguy Exp $ .\" .\" Copyright (c) 2003 Ross Finlayson .\" @@ -213,6 +212,9 @@ Set document information subject, overrides image image description default. .BI \-k " keywords" Set document information keywords. .TP +.BI \-m " size" +Set memory allocation limit (in MiB). Default is 256MiB. Set to 0 to disable the limit. +.TP .B \-h List usage reminder to stderr and exit. .SH EXAMPLES @@ -251,4 +253,4 @@ Please report bugs via the web interface at .BR tiff2ps (1) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/tiff2ps.1 b/thirdparty/tiff-4.2.0/man/tiff2ps.1 similarity index 92% rename from thirdparty/tiff-4.0.3/man/tiff2ps.1 rename to thirdparty/tiff-4.2.0/man/tiff2ps.1 index c3a9bacf..ce323eee 100644 --- a/thirdparty/tiff-4.0.3/man/tiff2ps.1 +++ b/thirdparty/tiff-4.2.0/man/tiff2ps.1 @@ -1,4 +1,3 @@ -.\" $Id: tiff2ps.1,v 1.10 2009-01-12 02:05:19 bfriesen Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -100,6 +99,9 @@ Generate \*(Ps Level 2. Generate \*(Ps Level 3. It basically allows one to use the /flateDecode filter for ZIP compressed TIFF images. .TP +.B \-8 +Disable use of ASCII85 encoding with \*(Ps Level 2/3. +.TP .B \-a Generate output for all IFDs (pages) in the input file. .TP @@ -115,6 +117,9 @@ and the .B \-h option are given. .TP +.B \-C +Specify the document creator name. +.TP .B \-d Set the initial .SM TIFF @@ -123,6 +128,9 @@ directory to the specified directory number. This option is useful for selecting individual pages in a multi-page (e.g. facsimile) file. .TP +.B \-D +Enable duplex printing (two pages per sheet of paper). +.TP .B \-e Force the generation of Encapsulated \*(Ps (implies .BR \-z ). @@ -135,14 +143,6 @@ Specify the maximum height of image (in inches). Images with larger sizes will be split in several pages. Option .B \-L may be used for specifying size of split images overlapping. -.TP -.B \-W -Specify the maximum width of image (in inches). Images with larger sizes will -be split in several pages. Options -.B \-L -and -.B \-W -are mutually exclusive. .B \-i Enable/disable pixel interpolation. This option requires a single numeric value: zero to disable pixel interpolation and @@ -152,14 +152,18 @@ non-zero to enable. The default is enabled. Specify the size of overlapping for split images (in inches). Used in conjunction with .B \-H -option and +and .B \-W -option. +options. .TP .B \-l Specify the left margin for the output (in inches). This does not affect the width of the printed image. .TP +.BI \-M " size" +Set maximum memory allocation size (in MiB). The default is 256MiB. +Set to 0 to disable the limit. +.TP .B \-m Where possible render using the .I imagemask @@ -185,9 +189,15 @@ like which are hidden using the .I SubIFD tag. .TP +.B \-O +Write \*(Ps to specified file instead of standard output. +.TP .B \-p Force the generation of (non-Encapsulated) \*(Ps. .TP +.B \-P L|P +Set optional PageOrientation DSC comment to Landscape or Portrait. +.TP .B \-r 90|180|270|auto Rotate image by 90, 180, 270 degrees or auto. Auto picks the best fit for the image on the specified paper size (eg portrait @@ -197,9 +207,23 @@ counterclockwise. Auto rotates 90 degrees ccw to produce landscape. .B \-s Generate output for a single IFD (page) in the input file. .TP +.B \-t +Specify the document title string. +.TP +.B \-T +Print pages for top edge binding. +.TP .B \-w Specify the horizontal size of the printed area (in inches). .TP +.B \-W +Specify the maximum width of image (in inches). Images with larger sizes will +be split in several pages. Options +.B \-L +and +.B \-W +are mutually exclusive. +.TP .B \-x Override resolution units specified in the TIFF as centimeters. .TP @@ -270,4 +294,4 @@ Does not handle tiled images when generating \*(Ps Level I output. .BR libtiff (3) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/tiff2rgba.1 b/thirdparty/tiff-4.2.0/man/tiff2rgba.1 similarity index 95% rename from thirdparty/tiff-4.0.3/man/tiff2rgba.1 rename to thirdparty/tiff-4.2.0/man/tiff2rgba.1 index c5516563..fe9ebb2c 100644 --- a/thirdparty/tiff-4.0.3/man/tiff2rgba.1 +++ b/thirdparty/tiff-4.2.0/man/tiff2rgba.1 @@ -1,4 +1,3 @@ -.\" $Id: tiff2rgba.1,v 1.4 2006-04-20 12:17:19 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -88,10 +87,14 @@ Drop the alpha component from the output file, producing a pure RGB file. Currently this does not work if the .B \-b flag is also in effect. +.TP +.BI \-M " size" +Set maximum memory allocation size (in MiB). The default is 256MiB. +Set to 0 to disable the limit. .SH "SEE ALSO" .BR tiff2bw (1), .BR TIFFReadRGBAImage (3t), .BR libtiff (3) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/tiffcmp.1 b/thirdparty/tiff-4.2.0/man/tiffcmp.1 similarity index 96% rename from thirdparty/tiff-4.0.3/man/tiffcmp.1 rename to thirdparty/tiff-4.2.0/man/tiffcmp.1 index 961d8122..ee83a742 100644 --- a/thirdparty/tiff-4.0.3/man/tiffcmp.1 +++ b/thirdparty/tiff-4.2.0/man/tiffcmp.1 @@ -1,4 +1,3 @@ -.\" $Id: tiffcmp.1,v 1.6 2009-08-24 19:13:40 bfriesen Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -84,4 +83,4 @@ in some exotic cases. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/tiffcp.1 b/thirdparty/tiff-4.2.0/man/tiffcp.1 similarity index 92% rename from thirdparty/tiff-4.0.3/man/tiffcp.1 rename to thirdparty/tiff-4.2.0/man/tiffcp.1 index 5fdcc474..6bfee348 100644 --- a/thirdparty/tiff-4.0.3/man/tiffcp.1 +++ b/thirdparty/tiff-4.2.0/man/tiffcp.1 @@ -1,4 +1,3 @@ -.\" $Id: tiffcp.1,v 1.12 2010-12-23 13:38:47 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -60,6 +59,9 @@ in a file, but it is explicitly intended to not alter or convert the image data content in any way. .SH OPTIONS .TP +.B \-a +Append to an existing output file instead of overwriting it. +.TP .BI \-b " image" subtract the following monochrome image from all others processed. This can be used to remove a noise bias @@ -91,9 +93,11 @@ for LZMA2 compression, for baseline JPEG compression, .B g3 for CCITT Group 3 (T.4) compression, -and .B g4 -for CCITT Group 4 (T.6) compression. +for CCITT Group 4 (T.6) compression, +or +.B sgilog +for SGILOG compression. By default .I tiffcp will compress data according to the value of the @@ -147,6 +151,17 @@ e.g. for .SM Deflate encoding with maximum compression level and floating point predictor. +.IP +For the +.SM Deflate +codec, and in a libtiff build with libdeflate enabled, ``p12`` is +actually the maximum level. +.IP +For the +.SM Deflate +codec, and in a libtiff build with libdeflate enabled, ``s0`` can be used to +require zlib to be used, and ``s1`` for libdeflate (defaults to libdeflate when +it is available). .TP .B \-f Specify the bit fill order to use in writing output data. @@ -179,6 +194,9 @@ overwritten and not when it is appended to. .B \-M Suppress the use of memory-mapped files when reading images. .TP +.BI \-o " offset" +Set initial directory offset. +.TP .B \-p Specify the planar configuration to use in writing image data that has one 8-bit sample per pixel. @@ -228,6 +246,9 @@ appear in a tile. .B \-x Force the output file to be written with PAGENUMBER value in sequence. .TP +.B \-8 +Write BigTIFF instead of classic TIFF format. +.TP .BI \-,= character substitute .I character @@ -237,6 +258,10 @@ Note that .B \-,= with whitespace immediately following will disable the special meaning of the `,' entirely. See examples. +.TP +.BI \-m " size" +Set maximum memory allocation size (in MiB). The default is 256MiB. +Set to 0 to disable the limit. .SH EXAMPLES The following concatenates two files and writes the result using .SM LZW @@ -303,4 +328,4 @@ tiffcp \-c none \-,=% \-b CCD,X.tif CCD,X%1%.tif result.tif .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/tiffcrop.1 b/thirdparty/tiff-4.2.0/man/tiffcrop.1 similarity index 99% rename from thirdparty/tiff-4.0.3/man/tiffcrop.1 rename to thirdparty/tiff-4.2.0/man/tiffcrop.1 index 0423fb2f..d7a4c4d7 100644 --- a/thirdparty/tiff-4.0.3/man/tiffcrop.1 +++ b/thirdparty/tiff-4.2.0/man/tiffcrop.1 @@ -1,4 +1,3 @@ -.\" $Id: tiffcrop.1,v 1.7 2010-12-12 01:45:35 faxguy Exp $ .\" tiffcrop -- a port of tiffcp.c extended to include extended processing of images .\" .\" Original code: @@ -351,6 +350,10 @@ will force data to be written with the FillOrder tag set to .TP .B \-i Ignore non\-fatal read errors and continue processing of the input file. +.TP +.B "\-k size" +Set maximum memory allocation size (in MiB). The default is 256MiB. +Set to 0 to disable the limit. .TP .B \-l Specify the length of a tile (in pixels). @@ -567,5 +570,5 @@ in research or remote sensing scenarios. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/tiffdither.1 b/thirdparty/tiff-4.2.0/man/tiffdither.1 similarity index 97% rename from thirdparty/tiff-4.0.3/man/tiffdither.1 rename to thirdparty/tiff-4.2.0/man/tiffdither.1 index ab0d32a7..56725b2b 100644 --- a/thirdparty/tiff-4.0.3/man/tiffdither.1 +++ b/thirdparty/tiff-4.2.0/man/tiffdither.1 @@ -1,4 +1,3 @@ -.\" $Id: tiffdither.1,v 1.4 2006-04-20 12:17:19 dron Exp $ .\" .\" Copyright (c) 1990-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -113,6 +112,9 @@ will force data to be written with the tag set to .SM MSB2LSB . .TP +.B \-r +Make each strip have no more than the given number of rows. +.TP .B \-t Set the threshold value for dithering. By default the threshold value is 128. @@ -129,4 +131,4 @@ program (written by Paul Heckbert). .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/tiffdump.1 b/thirdparty/tiff-4.2.0/man/tiffdump.1 similarity index 96% rename from thirdparty/tiff-4.0.3/man/tiffdump.1 rename to thirdparty/tiff-4.2.0/man/tiffdump.1 index 076f9ffe..07b08e3c 100644 --- a/thirdparty/tiff-4.0.3/man/tiffdump.1 +++ b/thirdparty/tiff-4.2.0/man/tiffdump.1 @@ -1,4 +1,3 @@ -.\" $Id: tiffdump.1,v 1.5 2006-04-20 12:17:19 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -78,4 +77,4 @@ i.e. a leading ``0x'' for hexadecimal and a leading ``0'' for octal. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/tiffgt.1 b/thirdparty/tiff-4.2.0/man/tiffgt.1 similarity index 98% rename from thirdparty/tiff-4.0.3/man/tiffgt.1 rename to thirdparty/tiff-4.2.0/man/tiffgt.1 index 680a49a0..6ef6209f 100644 --- a/thirdparty/tiff-4.0.3/man/tiffgt.1 +++ b/thirdparty/tiff-4.2.0/man/tiffgt.1 @@ -1,4 +1,3 @@ -.\" $Id: tiffgt.1,v 1.4 2006-04-20 12:17:19 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -242,4 +241,4 @@ crashing old versions of the window manager. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/tiffinfo.1 b/thirdparty/tiff-4.2.0/man/tiffinfo.1 similarity index 96% rename from thirdparty/tiff-4.0.3/man/tiffinfo.1 rename to thirdparty/tiff-4.2.0/man/tiffinfo.1 index 2d573752..64958a6c 100644 --- a/thirdparty/tiff-4.0.3/man/tiffinfo.1 +++ b/thirdparty/tiff-4.2.0/man/tiffinfo.1 @@ -1,4 +1,3 @@ -.\" $Id: tiffinfo.1,v 1.2 2005-11-02 11:07:19 dron Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -85,4 +84,4 @@ directory to .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/tiffmedian.1 b/thirdparty/tiff-4.2.0/man/tiffmedian.1 similarity index 97% rename from thirdparty/tiff-4.0.3/man/tiffmedian.1 rename to thirdparty/tiff-4.2.0/man/tiffmedian.1 index c584b97f..b10ba798 100644 --- a/thirdparty/tiff-4.0.3/man/tiffmedian.1 +++ b/thirdparty/tiff-4.2.0/man/tiffmedian.1 @@ -1,4 +1,3 @@ -.\" $Id: tiffmedian.1,v 1.3 2005-11-02 11:07:19 dron Exp $ .\" .\" Copyright (c) 1990-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -109,4 +108,4 @@ program. Paul Heckbert, SIGGRAPH proceedings, 1982, pp. 297-307. .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/tiffset.1 b/thirdparty/tiff-4.2.0/man/tiffset.1 similarity index 91% rename from thirdparty/tiff-4.0.3/man/tiffset.1 rename to thirdparty/tiff-4.2.0/man/tiffset.1 index ed0d12fb..513c7567 100644 --- a/thirdparty/tiff-4.0.3/man/tiffset.1 +++ b/thirdparty/tiff-4.2.0/man/tiffset.1 @@ -1,4 +1,3 @@ -.\" $Id: tiffset.1,v 1.5 2011-03-26 12:07:20 fwarmerdam Exp $ .\" .\" Copyright (c) 1988-1997 Sam Leffler .\" Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -23,9 +22,9 @@ .\" OF THIS SOFTWARE. .\" .if n .po 0 -.TH TIFFSET 1 "November 21, 2004" "libtiff" +.TH TIFFSET 1 "December 3, 2012" "libtiff" .SH NAME -tiffset \- set a field in a +tiffset \- set or unset a field in a .SM TIFF header .SH SYNOPSIS @@ -38,7 +37,7 @@ header .I Tiffset sets the value of a .SM TIFF -header to a specified value. +header to a specified value or removes an existing setting. .SH OPTIONS .TP .BI \-d " dirnumber" @@ -53,6 +52,9 @@ change the current directory by offset. .BI \-sf " tagnumber filename" Set the value of the tag to the contents of filename. This option is supported for ASCII tags only. +.TP +.BI \-u " tagnumber" +Unset the tag. .SH EXAMPLES The following example sets the image description tag (270) of a.tif to the contents of the file descrip: @@ -93,4 +95,4 @@ tiffset -d 2 -s 262 1 a.tif .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/man/tiffsplit.1 b/thirdparty/tiff-4.2.0/man/tiffsplit.1 similarity index 95% rename from thirdparty/tiff-4.0.3/man/tiffsplit.1 rename to thirdparty/tiff-4.2.0/man/tiffsplit.1 index 411ebf48..fe309f42 100644 --- a/thirdparty/tiff-4.0.3/man/tiffsplit.1 +++ b/thirdparty/tiff-4.2.0/man/tiffsplit.1 @@ -1,4 +1,3 @@ -.\" $Id: tiffsplit.1,v 1.6 2009-08-24 19:13:40 bfriesen Exp $ .\" .\" Copyright (c) 1992-1997 Sam Leffler .\" Copyright (c) 1992-1997 Silicon Graphics, Inc. @@ -66,4 +65,4 @@ Only a select set of ``known tags'' is copied when splitting. .BR libtiff (3TIFF) .PP Libtiff library home page: -.BR http://www.remotesensing.org/libtiff/ +.BR http://www.simplesystems.org/libtiff/ diff --git a/thirdparty/tiff-4.0.3/nmake.opt b/thirdparty/tiff-4.2.0/nmake.opt similarity index 89% rename from thirdparty/tiff-4.0.3/nmake.opt rename to thirdparty/tiff-4.2.0/nmake.opt index 7e882d2d..d9bf15f1 100644 --- a/thirdparty/tiff-4.0.3/nmake.opt +++ b/thirdparty/tiff-4.2.0/nmake.opt @@ -1,218 +1,220 @@ -# $Id: nmake.opt,v 1.18 2006/06/07 16:33:45 dron Exp $ -# -# Copyright (C) 2004, Andrey Kiselev -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -# Compile time parameters for MS Visual C++ compiler. -# You may edit this file to specify building options. - -# -###### Edit the following lines to choose a feature set you need. ####### -# - -# -# Select WINMODE_CONSOLE to build a library which reports errors to stderr, or -# WINMODE_WINDOWED to build such that errors are reported via MessageBox(). -# -WINMODE_CONSOLE = 1 -#WINMODE_WINDOWED = 1 - -# -# Comment out the following lines to disable internal codecs. -# -# Support for CCITT Group 3 & 4 algorithms -CCITT_SUPPORT = 1 -# Support for Macintosh PackBits algorithm -PACKBITS_SUPPORT = 1 -# Support for LZW algorithm -LZW_SUPPORT = 1 -# Support for ThunderScan 4-bit RLE algorithm -THUNDER_SUPPORT = 1 -# Support for NeXT 2-bit RLE algorithm -NEXT_SUPPORT = 1 -# Support for LogLuv high dynamic range encoding -LOGLUV_SUPPORT = 1 - -# -# Uncomment and edit following lines to enable JPEG support. -# -#JPEG_SUPPORT = 1 -#JPEGDIR = d:/projects/jpeg-6b -#JPEG_INCLUDE = -I$(JPEGDIR) -#JPEG_LIB = $(JPEGDIR)/Release/jpeg.lib - -# -# Uncomment and edit following lines to enable ZIP support -# (required for Deflate compression and Pixar log-format) -# -#ZIP_SUPPORT = 1 -#ZLIBDIR = d:/projects/zlib-1.2.1 -#ZLIB_INCLUDE = -I$(ZLIBDIR) -#ZLIB_LIB = $(ZLIBDIR)/zlib.lib - -# -# Uncomment and edit following lines to enable ISO JBIG support -# -#JBIG_SUPPORT = 1 -#JBIGDIR = d:/projects/jbigkit -#JBIG_INCLUDE = -I$(JBIGDIR)/libjbig -#JBIG_LIB = $(JBIGDIR)/libjbig/jbig.lib - -# -# Uncomment following line to enable Pixar log-format algorithm -# (Zlib required). -# -#PIXARLOG_SUPPORT = 1 - -# -# Comment out the following lines to disable strip chopping -# (whether or not to convert single-strip uncompressed images to mutiple -# strips of specified size to reduce memory usage). Default strip size -# is 8192 bytes, it can be configured via the STRIP_SIZE_DEFAULT parameter -# -STRIPCHOP_SUPPORT = 1 -STRIP_SIZE_DEFAULT = 8192 - -# -# Comment out the following lines to disable treating the fourth sample with -# no EXTRASAMPLE_ value as being ASSOCALPHA. Many packages produce RGBA -# files but don't mark the alpha properly. -# -EXTRASAMPLE_AS_ALPHA_SUPPORT = 1 - -# -# Comment out the following lines to disable picking up YCbCr subsampling -# info from the JPEG data stream to support files lacking the tag. -# See Bug 168 in Bugzilla, and JPEGFixupTestSubsampling() for details. -# -CHECK_JPEG_YCBCR_SUBSAMPLING = 1 - -# -####################### Compiler related options. ####################### -# - -# -# Pick debug or optimized build flags. We default to an optimized build -# with no debugging information. -# NOTE: /EHsc option required if you want to build the C++ stream API -# -OPTFLAGS = /Ox /MD /EHsc /W3 /D_CRT_SECURE_NO_DEPRECATE -#OPTFLAGS = /Zi - -# -# Uncomment following line to enable using Windows Common RunTime Library -# instead of Windows specific system calls. See notes on top of tif_unix.c -# module for details. -# -USE_WIN_CRT_LIB = 1 - -# Compiler specific options. You may probably want to adjust compilation -# parameters in CFLAGS variable. Refer to your compiler documentation -# for the option reference. -# -MAKE = nmake /nologo -CC = cl /nologo -CXX = cl /nologo -AR = lib /nologo -LD = link /nologo - -CFLAGS = $(OPTFLAGS) $(INCL) $(EXTRAFLAGS) -CXXFLAGS = $(OPTFLAGS) $(INCL) $(EXTRAFLAGS) -EXTRAFLAGS = -LIBS = - -# Name of the output shared library -DLLNAME = libtiff.dll - -# -########### There is nothing to edit below this line normally. ########### -# - -# Set the native cpu bit order -EXTRAFLAGS = -DFILLODER_LSB2MSB $(EXTRAFLAGS) - -!IFDEF WINMODE_WINDOWED -EXTRAFLAGS = -DTIF_PLATFORM_WINDOWED $(EXTRAFLAGS) -LIBS = user32.lib $(LIBS) -!ELSE -EXTRAFLAGS = -DTIF_PLATFORM_CONSOLE $(EXTRAFLAGS) -!ENDIF - -# Codec stuff -!IFDEF CCITT_SUPPORT -EXTRAFLAGS = -DCCITT_SUPPORT $(EXTRAFLAGS) -!ENDIF - -!IFDEF PACKBITS_SUPPORT -EXTRAFLAGS = -DPACKBITS_SUPPORT $(EXTRAFLAGS) -!ENDIF - -!IFDEF LZW_SUPPORT -EXTRAFLAGS = -DLZW_SUPPORT $(EXTRAFLAGS) -!ENDIF - -!IFDEF THUNDER_SUPPORT -EXTRAFLAGS = -DTHUNDER_SUPPORT $(EXTRAFLAGS) -!ENDIF - -!IFDEF NEXT_SUPPORT -EXTRAFLAGS = -DNEXT_SUPPORT $(EXTRAFLAGS) -!ENDIF - -!IFDEF LOGLUV_SUPPORT -EXTRAFLAGS = -DLOGLUV_SUPPORT $(EXTRAFLAGS) -!ENDIF - -!IFDEF JPEG_SUPPORT -LIBS = $(LIBS) $(JPEG_LIB) -EXTRAFLAGS = -DJPEG_SUPPORT -DOJPEG_SUPPORT $(EXTRAFLAGS) -!ENDIF - -!IFDEF ZIP_SUPPORT -LIBS = $(LIBS) $(ZLIB_LIB) -EXTRAFLAGS = -DZIP_SUPPORT $(EXTRAFLAGS) -!IFDEF PIXARLOG_SUPPORT -EXTRAFLAGS = -DPIXARLOG_SUPPORT $(EXTRAFLAGS) -!ENDIF -!ENDIF - -!IFDEF JBIG_SUPPORT -LIBS = $(LIBS) $(JBIG_LIB) -EXTRAFLAGS = -DJBIG_SUPPORT $(EXTRAFLAGS) -!ENDIF - -!IFDEF STRIPCHOP_SUPPORT -EXTRAFLAGS = -DSTRIPCHOP_DEFAULT=TIFF_STRIPCHOP -DSTRIP_SIZE_DEFAULT=$(STRIP_SIZE_DEFAULT) $(EXTRAFLAGS) -!ENDIF - -!IFDEF EXTRASAMPLE_AS_ALPHA_SUPPORT -EXTRAFLAGS = -DDEFAULT_EXTRASAMPLE_AS_ALPHA $(EXTRAFLAGS) -!ENDIF - -!IFDEF CHECK_JPEG_YCBCR_SUBSAMPLING -EXTRAFLAGS = -DCHECK_JPEG_YCBCR_SUBSAMPLING $(EXTRAFLAGS) -!ENDIF - -!IFDEF USE_WIN_CRT_LIB -EXTRAFLAGS = -DAVOID_WIN32_FILEIO $(EXTRAFLAGS) -!ELSE -EXTRAFLAGS = -DUSE_WIN32_FILEIO $(EXTRAFLAGS) -!ENDIF +# +# Copyright (C) 2004, Andrey Kiselev +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +# Compile time parameters for MS Visual C++ compiler. +# You may edit this file to specify building options. + +# Options: +# DEBUG - set to disable optimizations and link with debug runtimes +# +# Usage examples (see details below): +# nmake -f makefile.vc +# nmake -f makefile.vc DEBUG=1 +# nmake -f makefile.vc clean +# +# +###### Edit the following lines to choose a feature set you need. ####### +# + +# +# Comment out the following lines to disable internal codecs. +# +# Support for CCITT Group 3 & 4 algorithms +CCITT_SUPPORT = 1 +# Support for Macintosh PackBits algorithm +PACKBITS_SUPPORT = 1 +# Support for LZW algorithm +LZW_SUPPORT = 1 +# Support for ThunderScan 4-bit RLE algorithm +THUNDER_SUPPORT = 1 +# Support for NeXT 2-bit RLE algorithm +NEXT_SUPPORT = 1 +# Support for LogLuv high dynamic range encoding +LOGLUV_SUPPORT = 1 + +# +# Uncomment and edit following lines to enable JPEG support. +# +#JPEG_SUPPORT = 1 +#JPEGDIR = d:/projects/jpeg-6b +#JPEG_INCLUDE = -I$(JPEGDIR) +#JPEG_LIB = $(JPEGDIR)/Release/jpeg.lib + +# +# Uncomment and edit following lines to enable ZIP support +# (required for Deflate compression and Pixar log-format) +# +#ZIP_SUPPORT = 1 +#ZLIBDIR = d:/projects/zlib-1.2.1 +#ZLIB_INCLUDE = -I$(ZLIBDIR) +#ZLIB_LIB = $(ZLIBDIR)/zlib.lib + +# +# Uncomment and edit following lines to enable ISO JBIG support +# +#JBIG_SUPPORT = 1 +#JBIGDIR = d:/projects/jbigkit +#JBIG_INCLUDE = -I$(JBIGDIR)/libjbig +#JBIG_LIB = $(JBIGDIR)/libjbig/jbig.lib + +# +# Uncomment following line to enable Pixar log-format algorithm +# (Zlib required). +# +#PIXARLOG_SUPPORT = 1 + +# +# Comment out the following lines to disable strip chopping +# (whether or not to convert single-strip uncompressed images to mutiple +# strips of specified size to reduce memory usage). Default strip size +# is 8192 bytes, it can be configured via the STRIP_SIZE_DEFAULT parameter +# +STRIPCHOP_SUPPORT = 1 +STRIP_SIZE_DEFAULT = 8192 + +# +# Comment out the following lines to disable treating the fourth sample with +# no EXTRASAMPLE_ value as being ASSOCALPHA. Many packages produce RGBA +# files but don't mark the alpha properly. +# +EXTRASAMPLE_AS_ALPHA_SUPPORT = 1 + +# +# Comment out the following lines to disable picking up YCbCr subsampling +# info from the JPEG data stream to support files lacking the tag. +# See Bug 168 in Bugzilla, and JPEGFixupTestSubsampling() for details. +# +CHECK_JPEG_YCBCR_SUBSAMPLING = 1 + +# +####################### Compiler related options. ####################### +# + + +# Indicate if the compiler provides strtoll/strtoull (default 1) +# Users of MSVC++ 14.0 ("Visual Studio 2015") and later should set this to 1 +HAVE_STRTOLL = 1 + +# +# Pick debug or optimized build flags. We default to an optimized build +# with no debugging information. +# NOTE: /EHsc option required if you want to build the C++ stream API +# +!IFDEF DEBUG +OPTFLAGS = /MDd /EHsc /W3 /D_CRT_SECURE_NO_DEPRECATE +!ELSE +OPTFLAGS = /Ox /MD /EHsc /W3 /D_CRT_SECURE_NO_DEPRECATE +!ENDIF +#OPTFLAGS = /Zi + +# +# Uncomment following line to enable using Windows Common RunTime Library +# instead of Windows specific system calls. See notes on top of tif_unix.c +# module for details. +# +USE_WIN_CRT_LIB = 1 + +# Compiler specific options. You may probably want to adjust compilation +# parameters in CFLAGS variable. Refer to your compiler documentation +# for the option reference. +# +MAKE = nmake /nologo +CC = cl /nologo +CXX = cl /nologo +AR = lib /nologo +LD = link /nologo + +CFLAGS = $(OPTFLAGS) $(INCL) $(EXTRAFLAGS) +CXXFLAGS = $(OPTFLAGS) $(INCL) $(EXTRAFLAGS) +EXTRAFLAGS = -DHAVE_CONFIG_H +LIBS = + +# Name of the output shared library +DLLNAME = libtiff.dll + +# +########### There is nothing to edit below this line normally. ########### +# + +# Set the native cpu bit order +EXTRAFLAGS = -DFILLODER_LSB2MSB $(EXTRAFLAGS) + +# Codec stuff +!IFDEF CCITT_SUPPORT +EXTRAFLAGS = -DCCITT_SUPPORT $(EXTRAFLAGS) +!ENDIF + +!IFDEF PACKBITS_SUPPORT +EXTRAFLAGS = -DPACKBITS_SUPPORT $(EXTRAFLAGS) +!ENDIF + +!IFDEF LZW_SUPPORT +EXTRAFLAGS = -DLZW_SUPPORT $(EXTRAFLAGS) +!ENDIF + +!IFDEF THUNDER_SUPPORT +EXTRAFLAGS = -DTHUNDER_SUPPORT $(EXTRAFLAGS) +!ENDIF + +!IFDEF NEXT_SUPPORT +EXTRAFLAGS = -DNEXT_SUPPORT $(EXTRAFLAGS) +!ENDIF + +!IFDEF LOGLUV_SUPPORT +EXTRAFLAGS = -DLOGLUV_SUPPORT $(EXTRAFLAGS) +!ENDIF + +!IFDEF JPEG_SUPPORT +LIBS = $(LIBS) $(JPEG_LIB) +EXTRAFLAGS = -DJPEG_SUPPORT -DOJPEG_SUPPORT $(EXTRAFLAGS) +!ENDIF + +!IFDEF ZIP_SUPPORT +LIBS = $(LIBS) $(ZLIB_LIB) +EXTRAFLAGS = -DZIP_SUPPORT $(EXTRAFLAGS) +!IFDEF PIXARLOG_SUPPORT +EXTRAFLAGS = -DPIXARLOG_SUPPORT $(EXTRAFLAGS) +!ENDIF +!ENDIF + +!IFDEF JBIG_SUPPORT +LIBS = $(LIBS) $(JBIG_LIB) +EXTRAFLAGS = -DJBIG_SUPPORT $(EXTRAFLAGS) +!ENDIF + +!IFDEF STRIPCHOP_SUPPORT +EXTRAFLAGS = -DSTRIPCHOP_DEFAULT=TIFF_STRIPCHOP -DSTRIP_SIZE_DEFAULT=$(STRIP_SIZE_DEFAULT) $(EXTRAFLAGS) +!ENDIF + +!IFDEF EXTRASAMPLE_AS_ALPHA_SUPPORT +EXTRAFLAGS = -DDEFAULT_EXTRASAMPLE_AS_ALPHA $(EXTRAFLAGS) +!ENDIF + +!IFDEF CHECK_JPEG_YCBCR_SUBSAMPLING +EXTRAFLAGS = -DCHECK_JPEG_YCBCR_SUBSAMPLING $(EXTRAFLAGS) +!ENDIF + +!IFDEF USE_WIN_CRT_LIB +EXTRAFLAGS = -DAVOID_WIN32_FILEIO $(EXTRAFLAGS) +!ELSE +EXTRAFLAGS = -DUSE_WIN32_FILEIO $(EXTRAFLAGS) +!ENDIF diff --git a/thirdparty/tiff-4.2.0/port/CMakeLists.txt b/thirdparty/tiff-4.2.0/port/CMakeLists.txt new file mode 100644 index 00000000..b7eb3a29 --- /dev/null +++ b/thirdparty/tiff-4.2.0/port/CMakeLists.txt @@ -0,0 +1,68 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +set(port_HEADERS libport.h) +set(port_SOURCES dummy.c) +set(port_optional_SOURCES + getopt.c + lfind.c + strcasecmp.c + strtol.c + strtoll.c + strtoul.c + strtoull.c) + +set(port_USED_FILES ${port_SOURCES} ${port_HEADERS}) + +if(NOT HAVE_GETOPT) + list(APPEND port_USED_FILES getopt.c) +endif() +if(NOT HAVE_LFIND) + list(APPEND port_USED_FILES lfind.c) +endif() +if(MSVC AND NOT HAVE_SNPRINTF) + list(APPEND port_USED_FILES snprintf.c) +endif() +if(NOT HAVE_STRCASECMP) + list(APPEND port_USED_FILES strcasecmp.c) +endif() +if(NOT HAVE_STRTOL) + list(APPEND port_USED_FILES strtol.c) +endif() +if(NOT HAVE_STRTOLL) + list(APPEND port_USED_FILES strtoll.c) +endif() +if(NOT HAVE_STRTOUL) + list(APPEND port_USED_FILES strtoul.c) +endif() +if(NOT HAVE_STRTOULL) + list(APPEND port_USED_FILES strtoull.c) +endif() + +add_library(port STATIC ${port_USED_FILES}) + +foreach(file ${port_USED_FILES}) + list(APPEND tiff_port_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${file}") +endforeach() +set(tiff_port_SOURCES ${tiff_port_SOURCES} PARENT_SCOPE) diff --git a/thirdparty/tiff-4.0.3/port/Makefile.am b/thirdparty/tiff-4.2.0/port/Makefile.am similarity index 93% rename from thirdparty/tiff-4.0.3/port/Makefile.am rename to thirdparty/tiff-4.2.0/port/Makefile.am index 94504fd8..250479fe 100644 --- a/thirdparty/tiff-4.0.3/port/Makefile.am +++ b/thirdparty/tiff-4.2.0/port/Makefile.am @@ -23,7 +23,13 @@ # Process this file with automake to produce Makefile.in. -EXTRA_DIST = Makefile.vc libport.h +EXTRA_DIST = \ + CMakeLists.txt \ + Makefile.vc \ + libport.h \ + snprintf.c \ + _strtol.h \ + _strtoul.h noinst_LTLIBRARIES = libport.la libport_la_SOURCES = dummy.c libport.h diff --git a/thirdparty/tiff-4.0.3/port/Makefile.in b/thirdparty/tiff-4.2.0/port/Makefile.in similarity index 74% rename from thirdparty/tiff-4.0.3/port/Makefile.in rename to thirdparty/tiff-4.2.0/port/Makefile.in index f268a9c4..ba9d98f8 100644 --- a/thirdparty/tiff-4.0.3/port/Makefile.in +++ b/thirdparty/tiff-4.2.0/port/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -40,23 +40,61 @@ # Process this file with automake to produce Makefile.in. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -76,10 +114,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = port -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/depcomp \ - $(top_srcdir)/config/mkinstalldirs getopt.c lfind.c \ - strcasecmp.c strtoul.c strtoull.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -87,7 +121,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = @@ -114,7 +149,12 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/libtiff depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = $(DEPDIR)/getopt.Plo $(DEPDIR)/lfind.Plo \ + $(DEPDIR)/snprintf.Plo $(DEPDIR)/strcasecmp.Plo \ + $(DEPDIR)/strtol.Plo $(DEPDIR)/strtoll.Plo \ + $(DEPDIR)/strtoul.Plo $(DEPDIR)/strtoull.Plo \ + ./$(DEPDIR)/dummy.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -141,8 +181,28 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + getopt.c lfind.c snprintf.c strcasecmp.c strtol.c strtoll.c \ + strtoul.c strtoull.c DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -156,6 +216,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -203,6 +264,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -290,7 +352,14 @@ tiff_libs_private = @tiff_libs_private@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = Makefile.vc libport.h +EXTRA_DIST = \ + CMakeLists.txt \ + Makefile.vc \ + libport.h \ + snprintf.c \ + _strtol.h \ + _strtoul.h + noinst_LTLIBRARIES = libport.la libport_la_SOURCES = dummy.c libport.h libport_la_LIBADD = @LTLIBOBJS@ @@ -310,14 +379,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign port/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign port/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -339,6 +407,7 @@ clean-noinstLTLIBRARIES: echo rm -f $${locs}; \ rm -f $${locs}; \ } + libport.la: $(libport_la_OBJECTS) $(libport_la_DEPENDENCIES) $(EXTRA_libport_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libport_la_OBJECTS) $(libport_la_LIBADD) $(LIBS) @@ -348,26 +417,35 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lfind.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strcasecmp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtoul.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtoull.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lfind.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/snprintf.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strcasecmp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtol.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtoll.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtoul.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtoull.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Plo@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -382,26 +460,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -413,15 +480,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -430,9 +493,10 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am -cscopelist: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -448,7 +512,10 @@ cscopelist: $(HEADERS) $(SOURCES) $(LISP) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -518,7 +585,15 @@ clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am - -rm -rf $(DEPDIR) ./$(DEPDIR) + -rm -f $(DEPDIR)/getopt.Plo + -rm -f $(DEPDIR)/lfind.Plo + -rm -f $(DEPDIR)/snprintf.Plo + -rm -f $(DEPDIR)/strcasecmp.Plo + -rm -f $(DEPDIR)/strtol.Plo + -rm -f $(DEPDIR)/strtoll.Plo + -rm -f $(DEPDIR)/strtoul.Plo + -rm -f $(DEPDIR)/strtoull.Plo + -rm -f ./$(DEPDIR)/dummy.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -564,7 +639,15 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf $(DEPDIR) ./$(DEPDIR) + -rm -f $(DEPDIR)/getopt.Plo + -rm -f $(DEPDIR)/lfind.Plo + -rm -f $(DEPDIR)/snprintf.Plo + -rm -f $(DEPDIR)/strcasecmp.Plo + -rm -f $(DEPDIR)/strtol.Plo + -rm -f $(DEPDIR)/strtoll.Plo + -rm -f $(DEPDIR)/strtoul.Plo + -rm -f $(DEPDIR)/strtoull.Plo + -rm -f ./$(DEPDIR)/dummy.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -585,19 +668,21 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES cscopelist ctags \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-libtool clean-noinstLTLIBRARIES \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am + tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/thirdparty/tiff-4.0.3/port/Makefile.vc b/thirdparty/tiff-4.2.0/port/Makefile.vc similarity index 70% rename from thirdparty/tiff-4.0.3/port/Makefile.vc rename to thirdparty/tiff-4.2.0/port/Makefile.vc index f5c85c6b..e4471af5 100644 --- a/thirdparty/tiff-4.0.3/port/Makefile.vc +++ b/thirdparty/tiff-4.2.0/port/Makefile.vc @@ -1,4 +1,3 @@ -# $Id: Makefile.vc,v 1.4 2006/03/23 14:54:02 dron Exp $ # # Copyright (C) 2004, Andrey Kiselev # @@ -24,12 +23,53 @@ # Makefile for MS Visual C and Watcom C compilers. # # To build: -# C:\libtiff\port> nmake /f makefile.vc +# C:\libtiff\port> nmake /f makefile.vc !INCLUDE ..\nmake.opt +HAVE_STRTOL = 1 +HAVE_STRTOUL = 1 + +# strtoul()/strtoull() are provided together +!IF $(HAVE_STRTOLL) +HAVE_STRTOULL = 1 +!ELSE +HAVE_STRTOULL = 0 +!endif + +!IF $(HAVE_STRTOL) +STRTOL_OBJ = +!ELSE +STRTOL_OBJ = strtol.obj +!ENDIF + +!IF $(HAVE_STRTOUL) +STRTOUL_OBJ = +!ELSE +STRTOUL_OBJ = strtoul.obj +!ENDIF + +!IF $(HAVE_STRTOLL) +STRTOLL_OBJ = +!ELSE +STRTOLL_OBJ = strtoll.obj +!ENDIF + +!IF $(HAVE_STRTOULL) +STRTOULL_OBJ = +!ELSE +STRTOULL_OBJ = strtoull.obj +!ENDIF + +INCL = -I..\libtiff + OBJ = \ + snprintf.obj \ strcasecmp.obj \ + $(STRTOL_OBJ) \ + $(STRTOUL_OBJ) \ + $(STRTOLL_OBJ) \ + $(STRTOULL_OBJ) \ getopt.obj all: libport.lib diff --git a/thirdparty/tiff-4.2.0/port/_strtol.h b/thirdparty/tiff-4.2.0/port/_strtol.h new file mode 100644 index 00000000..73a10063 --- /dev/null +++ b/thirdparty/tiff-4.2.0/port/_strtol.h @@ -0,0 +1,160 @@ +/* $NetBSD: _strtol.h,v 1.11 2017/07/06 21:08:44 joerg Exp $ */ + +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Original version ID: + * NetBSD: src/lib/libc/locale/_wcstol.h,v 1.2 2003/08/07 16:43:03 agc Exp + */ + +#include + +/* + * function template for strtol, strtoll and strtoimax. + * + * parameters: + * _FUNCNAME : function name + * __INT : return type + * __INT_MIN : lower limit of the return type + * __INT_MAX : upper limit of the return type + */ +__INT +_FUNCNAME(const char *nptr, char **endptr, int base) +{ + const char *s; + __INT acc, cutoff; + unsigned char c; + int i, neg, any, cutlim; + + assert(nptr != NULL); + /* endptr may be NULL */ + + /* check base value */ + if (base && (base < 2 || base > 36)) { + errno = EINVAL; + if (endptr != NULL) + /* LINTED interface specification */ + *endptr = (char *)(nptr); + return 0; + } + + /* + * Skip white space and pick up leading +/- sign if any. + * If base is 0, allow 0x for hex and 0 for octal, else + * assume decimal; if base is already 16, allow 0x. + */ + s = nptr; + do { + c = *s++; + } while (isspace(c)); + if (c == '-') { + neg = 1; + c = *s++; + } else { + neg = 0; + if (c == '+') + c = *s++; + } + if ((base == 0 || base == 16) && + c == '0' && (*s == 'x' || *s == 'X') && + ((s[1] >= '0' && s[1] <= '9') || + (s[1] >= 'a' && s[1] <= 'f') || + (s[1] >= 'A' && s[1] <= 'F'))) { + c = s[1]; + s += 2; + base = 16; + } else if (base == 0) + base = (c == '0' ? 8 : 10); + + /* + * Compute the cutoff value between legal numbers and illegal + * numbers. That is the largest legal value, divided by the + * base. An input number that is greater than this value, if + * followed by a legal input character, is too big. One that + * is equal to this value may be valid or not; the limit + * between valid and invalid numbers is then based on the last + * digit. For instance, if the range for longs is + * [-2147483648..2147483647] and the input base is 10, + * cutoff will be set to 214748364 and cutlim to either + * 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated + * a value > 214748364, or equal but the next digit is > 7 (or 8), + * the number is too big, and we will return a range error. + * + * Set any if any `digits' consumed; make it negative to indicate + * overflow. + */ + cutoff = (__INT)(neg ? __INT_MIN : __INT_MAX); + cutlim = (int)(cutoff % base); + cutoff /= base; + if (neg) { + if (cutlim > 0) { + cutlim -= base; + cutoff += 1; + } + cutlim = -cutlim; + } + for (acc = 0, any = 0;; c = *s++) { + if (c >= '0' && c <= '9') + i = c - '0'; + else if (c >= 'a' && c <= 'z') + i = (c - 'a') + 10; + else if (c >= 'A' && c <= 'Z') + i = (c - 'A') + 10; + else + break; + if (i >= base) + break; + if (any < 0) + continue; + if (neg) { + if (acc < cutoff || (acc == cutoff && i > cutlim)) { + acc = __INT_MIN; + any = -1; + errno = ERANGE; + } else { + any = 1; + acc *= base; + acc -= i; + } + } else { + if (acc > cutoff || (acc == cutoff && i > cutlim)) { + acc = __INT_MAX; + any = -1; + errno = ERANGE; + } else { + any = 1; + acc *= base; + acc += i; + } + } + } + if (endptr != NULL) + /* LINTED interface specification */ + *endptr = (char *)(any ? s - 1 : nptr); + return(acc); +} diff --git a/thirdparty/tiff-4.0.3/port/strtoul.c b/thirdparty/tiff-4.2.0/port/_strtoul.h similarity index 57% rename from thirdparty/tiff-4.0.3/port/strtoul.c rename to thirdparty/tiff-4.2.0/port/_strtoul.h index f7a9a1a5..5cb62168 100644 --- a/thirdparty/tiff-4.0.3/port/strtoul.c +++ b/thirdparty/tiff-4.2.0/port/_strtoul.h @@ -1,6 +1,6 @@ -/* $Id: strtoul.c,v 1.2 2005/07/07 16:34:06 dron Exp $ */ +/* $NetBSD: _strtoul.h,v 1.11 2017/07/06 21:08:44 joerg Exp $ */ -/* +/*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * @@ -27,38 +27,49 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * Original version ID: + * NetBSD: src/lib/libc/locale/_wcstoul.h,v 1.2 2003/08/07 16:43:03 agc Exp */ -#if 0 -static char sccsid[] = "@(#)strtoul.c 8.1 (Berkeley) 6/4/93"; -__RCSID("$NetBSD: strtoul.c,v 1.16 2003/08/07 16:43:45 agc Exp $"); -#endif - -#include -#include -#include -#include +#include /* - * Convert a string to an unsigned long integer. + * function template for strtoul, strtoull and strtoumax. * - * Ignores `locale' stuff. Assumes that the upper and lower case - * alphabets and digits are each contiguous. + * parameters: + * _FUNCNAME : function name + * __UINT : return type + * __UINT_MAX : upper limit of the return type */ -unsigned long -strtoul(const char *nptr, char **endptr, int base) +__UINT +_FUNCNAME(const char *nptr, char **endptr, int base) { const char *s; - unsigned long acc, cutoff; - int c; - int neg, any, cutlim; + __UINT acc, cutoff; + unsigned char c; + int i, neg, any, cutlim; + + assert(nptr != NULL); + /* endptr may be NULL */ + + /* check base value */ + if (base && (base < 2 || base > 36)) { + errno = EINVAL; + if (endptr != NULL) + /* LINTED interface specification */ + *endptr = (char *)(nptr); + return 0; + } /* - * See strtol for comments as to the logic used. + * Skip white space and pick up leading +/- sign if any. + * If base is 0, allow 0x for hex and 0 for octal, else + * assume decimal; if base is already 16, allow 0x. */ s = nptr; do { - c = (unsigned char) *s++; + c = *s++; } while (isspace(c)); if (c == '-') { neg = 1; @@ -69,41 +80,48 @@ strtoul(const char *nptr, char **endptr, int base) c = *s++; } if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) { + c == '0' && (*s == 'x' || *s == 'X') && + ((s[1] >= '0' && s[1] <= '9') || + (s[1] >= 'a' && s[1] <= 'f') || + (s[1] >= 'A' && s[1] <= 'F'))) { c = s[1]; s += 2; base = 16; - } - if (base == 0) - base = c == '0' ? 8 : 10; + } else if (base == 0) + base = (c == '0' ? 8 : 10); - cutoff = ULONG_MAX / (unsigned long)base; - cutlim = (int)(ULONG_MAX % (unsigned long)base); - for (acc = 0, any = 0;; c = (unsigned char) *s++) { - if (isdigit(c)) - c -= '0'; - else if (isalpha(c)) - c -= isupper(c) ? 'A' - 10 : 'a' - 10; + /* + * See strtol for comments as to the logic used. + */ + cutoff = ((__UINT)__UINT_MAX / (__UINT)base); + cutlim = (int)((__UINT)__UINT_MAX % (__UINT)base); + for (acc = 0, any = 0;; c = *s++) { + if (c >= '0' && c <= '9') + i = c - '0'; + else if (c >= 'a' && c <= 'z') + i = (c - 'a') + 10; + else if (c >= 'A' && c <= 'Z') + i = (c - 'A') + 10; else break; - if (c >= base) + if (i >= base) break; if (any < 0) continue; - if (acc > cutoff || (acc == cutoff && c > cutlim)) { + if (acc > cutoff || (acc == cutoff && i > cutlim)) { + acc = __UINT_MAX; any = -1; - acc = ULONG_MAX; errno = ERANGE; } else { any = 1; - acc *= (unsigned long)base; - acc += c; + acc *= (__UINT)base; + acc += i; } } if (neg && any > 0) acc = -acc; - if (endptr != 0) + if (endptr != NULL) /* LINTED interface specification */ *endptr = (char *)(any ? s - 1 : nptr); - return (acc); + return(acc); } diff --git a/thirdparty/tiff-4.0.3/port/dummy.c b/thirdparty/tiff-4.2.0/port/dummy.c similarity index 70% rename from thirdparty/tiff-4.0.3/port/dummy.c rename to thirdparty/tiff-4.2.0/port/dummy.c index 46f93bcc..346a07ee 100644 --- a/thirdparty/tiff-4.0.3/port/dummy.c +++ b/thirdparty/tiff-4.2.0/port/dummy.c @@ -1,5 +1,3 @@ -/* $Id: dummy.c,v 1.3 2007/03/21 14:54:16 dron Exp $ */ - /* * Dummy function, just to be ensure that the library always will be created. */ diff --git a/thirdparty/tiff-4.0.3/port/getopt.c b/thirdparty/tiff-4.2.0/port/getopt.c similarity index 98% rename from thirdparty/tiff-4.0.3/port/getopt.c rename to thirdparty/tiff-4.2.0/port/getopt.c index 6eff8ee5..c7bdb116 100644 --- a/thirdparty/tiff-4.0.3/port/getopt.c +++ b/thirdparty/tiff-4.2.0/port/getopt.c @@ -1,5 +1,3 @@ -/* $Id: getopt.c,v 1.3 2009-01-22 20:53:07 fwarmerdam Exp $ */ - /* * Copyright (c) 1987, 1993, 1994 * The Regents of the University of California. All rights reserved. diff --git a/thirdparty/tiff-4.0.3/port/lfind.c b/thirdparty/tiff-4.2.0/port/lfind.c similarity index 97% rename from thirdparty/tiff-4.0.3/port/lfind.c rename to thirdparty/tiff-4.2.0/port/lfind.c index 64b261ca..00ab6495 100644 --- a/thirdparty/tiff-4.0.3/port/lfind.c +++ b/thirdparty/tiff-4.2.0/port/lfind.c @@ -1,5 +1,3 @@ -/* $Id: lfind.c,v 1.4 2007/01/15 18:40:39 mloskot Exp $ */ - /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. diff --git a/thirdparty/tiff-4.0.3/port/libport.h b/thirdparty/tiff-4.2.0/port/libport.h similarity index 74% rename from thirdparty/tiff-4.0.3/port/libport.h rename to thirdparty/tiff-4.2.0/port/libport.h index 802f478b..9f2dace1 100644 --- a/thirdparty/tiff-4.0.3/port/libport.h +++ b/thirdparty/tiff-4.2.0/port/libport.h @@ -1,5 +1,3 @@ -/* $Id: libport.h,v 1.2 2009-11-02 14:44:13 bfriesen Exp $ */ - /* * Copyright (c) 2009 Frank Warmerdam * @@ -26,6 +24,10 @@ #ifndef _LIBPORT_ #define _LIBPORT_ +#if defined(HAVE_CONFIG_H) +# include +#endif + int getopt(int argc, char * const argv[], const char *optstring); extern char *optarg; extern int opterr; @@ -38,9 +40,18 @@ int strcasecmp(const char *s1, const char *s2); # define HAVE_GETOPT 1 #endif -#if 0 +#if !defined(HAVE_STRTOL) +long strtol(const char *nptr, char **endptr, int base); +#endif +#if !defined(HAVE_STRTOLL) +long long strtoll(const char *nptr, char **endptr, int base); +#endif +#if !defined(HAVE_STRTOUL) unsigned long strtoul(const char *nptr, char **endptr, int base); #endif +#if !defined(HAVE_STRTOULL) +unsigned long long strtoull(const char *nptr, char **endptr, int base); +#endif #if 0 void * @@ -48,4 +59,13 @@ lfind(const void *key, const void *base, size_t *nmemb, size_t size, int(*compar)(const void *, const void *)); #endif +#if !defined(HAVE_SNPRINTF) +#undef vsnprintf +#define vsnprintf _TIFF_vsnprintf_f + +#undef snprintf +#define snprintf _TIFF_snprintf_f +int snprintf(char* str, size_t size, const char* format, ...); +#endif + #endif /* ndef _LIBPORT_ */ diff --git a/thirdparty/tiff-4.2.0/port/snprintf.c b/thirdparty/tiff-4.2.0/port/snprintf.c new file mode 100644 index 00000000..3542ab75 --- /dev/null +++ b/thirdparty/tiff-4.2.0/port/snprintf.c @@ -0,0 +1,42 @@ +/** + * Workaround for lack of snprintf(3) in Visual Studio. See + * http://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010/8712996#8712996 + * It's a trivial wrapper around the builtin _vsnprintf_s and + * _vscprintf functions. + */ + +#ifdef _MSC_VER + +#include +#include +#include "libport.h" + +int _TIFF_vsnprintf_f(char* str, size_t size, const char* format, va_list ap) +{ + int count = -1; + + if (size != 0) +#if _MSC_VER <= 1310 + count = _vsnprintf(str, size, format, ap); +#else + count = _vsnprintf_s(str, size, _TRUNCATE, format, ap); +#endif + if (count == -1) + count = _vscprintf(format, ap); + + return count; +} + +int _TIFF_snprintf_f(char* str, size_t size, const char* format, ...) +{ + int count; + va_list ap; + + va_start(ap, format); + count = vsnprintf(str, size, format, ap); + va_end(ap); + + return count; +} + +#endif // _MSC_VER diff --git a/thirdparty/tiff-4.0.3/port/strcasecmp.c b/thirdparty/tiff-4.2.0/port/strcasecmp.c similarity index 92% rename from thirdparty/tiff-4.0.3/port/strcasecmp.c rename to thirdparty/tiff-4.2.0/port/strcasecmp.c index 1ff4312b..65e2b411 100644 --- a/thirdparty/tiff-4.0.3/port/strcasecmp.c +++ b/thirdparty/tiff-4.2.0/port/strcasecmp.c @@ -1,5 +1,3 @@ -/* $Id: strcasecmp.c,v 1.3 2009-01-22 20:53:07 fwarmerdam Exp $ */ - /* * Copyright (c) 1987, 1993 * The Regents of the University of California. All rights reserved. @@ -44,8 +42,8 @@ strcasecmp(const char *s1, const char *s2) const unsigned char *us1 = (const unsigned char *)s1, *us2 = (const unsigned char *)s2; - while (tolower(*us1) == tolower(*us2++)) + while (tolower((int) *us1) == tolower((int) *us2++)) if (*us1++ == '\0') return (0); - return (tolower(*us1) - tolower(*--us2)); + return (tolower((int) *us1) - tolower((int) *--us2)); } diff --git a/thirdparty/tiff-4.2.0/port/strtol.c b/thirdparty/tiff-4.2.0/port/strtol.c new file mode 100644 index 00000000..a355dde9 --- /dev/null +++ b/thirdparty/tiff-4.2.0/port/strtol.c @@ -0,0 +1,45 @@ +/* $NetBSD: strtol.c,v 1.18 2008/08/20 12:42:26 joerg Exp $ */ + +/*- + * Copyright (c) 2005 The DragonFly Project. All rights reserved. + * Copyright (c) 2003 Citrus Project, + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if 0 +__RCSID("$NetBSD: strtol.c,v 1.18 2008/08/20 12:42:26 joerg Exp $"); +#endif + +#include +#include +#include +#include +#include + +#define _FUNCNAME strtol +#define __INT long +#define __INT_MIN LONG_MIN +#define __INT_MAX LONG_MAX + +#include "_strtol.h" diff --git a/thirdparty/tiff-4.2.0/port/strtoll.c b/thirdparty/tiff-4.2.0/port/strtoll.c new file mode 100644 index 00000000..4784b098 --- /dev/null +++ b/thirdparty/tiff-4.2.0/port/strtoll.c @@ -0,0 +1,44 @@ +/* $NetBSD: strtol.c,v 1.18 2008/08/20 12:42:26 joerg Exp $ */ + +/*- + * Copyright (c) 2005 The DragonFly Project. All rights reserved. + * Copyright (c) 2003 Citrus Project, + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if 0 +__RCSID("$NetBSD: strtol.c,v 1.18 2008/08/20 12:42:26 joerg Exp $"); +#endif + +#include +#include +#include +#include + +#define _FUNCNAME strtoll +#define __INT long long +#define __INT_MIN LLONG_MIN +#define __INT_MAX LLONG_MAX + +#include "_strtol.h" diff --git a/thirdparty/tiff-4.2.0/port/strtoul.c b/thirdparty/tiff-4.2.0/port/strtoul.c new file mode 100644 index 00000000..dbd44f16 --- /dev/null +++ b/thirdparty/tiff-4.2.0/port/strtoul.c @@ -0,0 +1,44 @@ +/* $NetBSD: strtoul.c,v 1.3 2008/08/20 19:58:34 oster Exp $ */ + +/*- + * Copyright (c) 2005 The DragonFly Project. All rights reserved. + * Copyright (c) 2003 Citrus Project, + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if 0 +__RCSID("$NetBSD: strtoul.c,v 1.3 2008/08/20 19:58:34 oster Exp $"); +#endif + +#include +#include +#include +#include +#include + +#define _FUNCNAME strtoul +#define __UINT unsigned long int +#define __UINT_MAX ULONG_MAX + +#include "_strtoul.h" diff --git a/thirdparty/tiff-4.2.0/port/strtoull.c b/thirdparty/tiff-4.2.0/port/strtoull.c new file mode 100644 index 00000000..91e4ddfb --- /dev/null +++ b/thirdparty/tiff-4.2.0/port/strtoull.c @@ -0,0 +1,44 @@ +/* $NetBSD: strtoul.c,v 1.3 2008/08/20 19:58:34 oster Exp $ */ + +/*- + * Copyright (c) 2005 The DragonFly Project. All rights reserved. + * Copyright (c) 2003 Citrus Project, + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if 0 +__RCSID("$NetBSD: strtoul.c,v 1.3 2008/08/20 19:58:34 oster Exp $"); +#endif + +#include +#include +#include +#include +#include + +#define _FUNCNAME strtoull +#define __UINT unsigned long long int +#define __UINT_MAX ULLONG_MAX + +#include "_strtoul.h" diff --git a/thirdparty/tiff-4.0.3/prj/LibTIFF/LibTIFF.sln b/thirdparty/tiff-4.2.0/prj/LibTIFF/LibTIFF.sln similarity index 100% rename from thirdparty/tiff-4.0.3/prj/LibTIFF/LibTIFF.sln rename to thirdparty/tiff-4.2.0/prj/LibTIFF/LibTIFF.sln diff --git a/thirdparty/tiff-4.0.3/prj/LibTIFF/LibTIFF.vcxproj b/thirdparty/tiff-4.2.0/prj/LibTIFF/LibTIFF.vcxproj similarity index 98% rename from thirdparty/tiff-4.0.3/prj/LibTIFF/LibTIFF.vcxproj rename to thirdparty/tiff-4.2.0/prj/LibTIFF/LibTIFF.vcxproj index b241a674..0d07e8b2 100644 --- a/thirdparty/tiff-4.0.3/prj/LibTIFF/LibTIFF.vcxproj +++ b/thirdparty/tiff-4.2.0/prj/LibTIFF/LibTIFF.vcxproj @@ -85,27 +85,27 @@ StaticLibrary true MultiByte - v140 + v142 StaticLibrary true MultiByte - v140 + v142 StaticLibrary false true MultiByte - v140 + v142 StaticLibrary false true MultiByte - v140 + v142 diff --git a/thirdparty/tiff-4.0.3/prj/LibTIFF/LibTIFF.vcxproj.filters b/thirdparty/tiff-4.2.0/prj/LibTIFF/LibTIFF.vcxproj.filters similarity index 100% rename from thirdparty/tiff-4.0.3/prj/LibTIFF/LibTIFF.vcxproj.filters rename to thirdparty/tiff-4.2.0/prj/LibTIFF/LibTIFF.vcxproj.filters diff --git a/thirdparty/tiff-4.2.0/test/CMakeLists.txt b/thirdparty/tiff-4.2.0/test/CMakeLists.txt new file mode 100644 index 00000000..bffb8bf7 --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/CMakeLists.txt @@ -0,0 +1,443 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +include_directories(${PROJECT_SOURCE_DIR}/libtiff + ${PROJECT_BINARY_DIR}/libtiff + ${CMAKE_CURRENT_BINARY_DIR} + ${TIFF_INCLUDES}) + +# Test scripts (not used by CMake) +set(TESTSCRIPTS + bmp2tiff_palette.sh + bmp2tiff_rgb.sh + gif2tiff.sh + ppm2tiff_pbm.sh + ppm2tiff_pgm.sh + ppm2tiff_ppm.sh + fax2tiff.sh + tiffcp-g3.sh + tiffcp-g3-1d.sh + tiffcp-g3-1d-fill.sh + tiffcp-g3-2d.sh + tiffcp-g3-2d-fill.sh + tiffcp-g4.sh + tiffcp-logluv.sh + tiffcp-thumbnail.sh + tiffcp-lzw-compat.sh + tiffcp-lzw-scanline-decode.sh + tiffdump.sh + tiffinfo.sh + tiffcp-split.sh + tiffcp-split-join.sh + tiff2ps-PS1.sh + tiff2ps-PS2.sh + tiff2ps-PS3.sh + tiff2ps-EPS1.sh + tiff2pdf.sh + tiffcrop-doubleflip-logluv-3c-16b.sh + tiffcrop-doubleflip-minisblack-1c-16b.sh + tiffcrop-doubleflip-minisblack-1c-8b.sh + tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh + tiffcrop-doubleflip-miniswhite-1c-1b.sh + tiffcrop-doubleflip-palette-1c-1b.sh + tiffcrop-doubleflip-palette-1c-4b.sh + tiffcrop-doubleflip-palette-1c-8b.sh + tiffcrop-doubleflip-rgb-3c-16b.sh + tiffcrop-doubleflip-rgb-3c-8b.sh + tiffcrop-extract-logluv-3c-16b.sh + tiffcrop-extract-minisblack-1c-16b.sh + tiffcrop-extract-minisblack-1c-8b.sh + tiffcrop-extract-minisblack-2c-8b-alpha.sh + tiffcrop-extract-miniswhite-1c-1b.sh + tiffcrop-extract-palette-1c-1b.sh + tiffcrop-extract-palette-1c-4b.sh + tiffcrop-extract-palette-1c-8b.sh + tiffcrop-extract-rgb-3c-16b.sh + tiffcrop-extract-rgb-3c-8b.sh + tiffcrop-extractz14-logluv-3c-16b.sh + tiffcrop-extractz14-minisblack-1c-16b.sh + tiffcrop-extractz14-minisblack-1c-8b.sh + tiffcrop-extractz14-minisblack-2c-8b-alpha.sh + tiffcrop-extractz14-miniswhite-1c-1b.sh + tiffcrop-extractz14-palette-1c-1b.sh + tiffcrop-extractz14-palette-1c-4b.sh + tiffcrop-extractz14-palette-1c-8b.sh + tiffcrop-extractz14-rgb-3c-16b.sh + tiffcrop-extractz14-rgb-3c-8b.sh + tiffcrop-R90-logluv-3c-16b.sh + tiffcrop-R90-minisblack-1c-16b.sh + tiffcrop-R90-minisblack-1c-8b.sh + tiffcrop-R90-minisblack-2c-8b-alpha.sh + tiffcrop-R90-miniswhite-1c-1b.sh + tiffcrop-R90-palette-1c-1b.sh + tiffcrop-R90-palette-1c-4b.sh + tiffcrop-R90-palette-1c-8b.sh + tiffcrop-R90-rgb-3c-16b.sh + tiffcrop-R90-rgb-3c-8b.sh + tiff2rgba-logluv-3c-16b.sh + tiff2rgba-minisblack-1c-16b.sh + tiff2rgba-minisblack-1c-8b.sh + tiff2rgba-minisblack-2c-8b-alpha.sh + tiff2rgba-miniswhite-1c-1b.sh + tiff2rgba-palette-1c-1b.sh + tiff2rgba-palette-1c-4b.sh + tiff2rgba-palette-1c-8b.sh + tiff2rgba-rgb-3c-16b.sh + tiff2rgba-rgb-3c-8b.sh + tiff2rgba-quad-tile.jpg.sh + tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh + tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh + tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh + testfax4.sh + testdeflatelaststripextradata.sh) + +# This list should contain all of the TIFF files in the 'images' +# subdirectory which are intended to be used as input images for +# tests. All of these files should use the extension ".tiff". +set(TIFFIMAGES + images/logluv-3c-16b.tiff + images/minisblack-1c-16b.tiff + images/minisblack-1c-8b.tiff + images/minisblack-2c-8b-alpha.tiff + images/miniswhite-1c-1b.tiff + images/palette-1c-1b.tiff + images/palette-1c-4b.tiff + images/palette-1c-8b.tiff + images/rgb-3c-16b.tiff + images/rgb-3c-8b.tiff + images/quad-tile.jpg.tiff + images/quad-lzw-compat.tiff + images/lzw-single-strip.tiff + images/ojpeg_zackthecat_subsamp22_single_strip.tiff + images/ojpeg_chewey_subsamp21_multi_strip.tiff + images/ojpeg_single_strip_no_rowsperstrip.tiff + images/testfax4.tiff) + +set(BMPIMAGES + images/palette-1c-8b.bmp + images/rgb-3c-8b.bmp) + +set(GIFIMAGES + images/palette-1c-8b.gif) + +set(PNMIMAGES + images/minisblack-1c-8b.pgm + images/miniswhite-1c-1b.pbm + images/rgb-3c-16b.ppm + images/rgb-3c-8b.ppm) + +# All uncompressed image files +set(UNCOMPRESSEDIMAGES + images/minisblack-1c-16b.tiff + images/minisblack-1c-8b.tiff + images/miniswhite-1c-1b.tiff + images/palette-1c-1b.tiff + images/palette-1c-4b.tiff + images/palette-1c-8b.tiff + images/rgb-3c-8b.tiff) + +# This list should include all of the files in the 'images' +# subdirectory which are intended to be distributed. This may include +# files which are not currently used by the tests. +set(IMAGES_EXTRA_DIST + images/README.txt + images/miniswhite-1c-1b.g3 + ${BMPIMAGES} + ${GIFIMAGES} + ${PNMIMAGES} + ${TIFFIMAGES}) + +extra_dist( + ${TESTSCRIPTS} + ${IMAGES_EXTRA_DIST} + common.sh) + +set(noinst_HEADERS tifftest.h) + +add_executable(ascii_tag ascii_tag.c) +target_link_libraries(ascii_tag tiff port) + +add_executable(long_tag long_tag.c check_tag.c) +target_link_libraries(long_tag tiff port) + +add_executable(short_tag short_tag.c check_tag.c) +target_link_libraries(short_tag tiff port) + +add_executable(strip_rw strip_rw.c strip.c test_arrays.c test_arrays.h) +target_link_libraries(strip_rw tiff port) + +add_executable(rewrite rewrite_tag.c) +target_link_libraries(rewrite tiff port) + +if(JPEG_SUPPORT) + add_executable(raw_decode raw_decode.c) + target_link_libraries(raw_decode tiff port) +endif() + +add_executable(custom_dir custom_dir.c) +target_link_libraries(custom_dir tiff port) + +if(NOT BUILD_SHARED_LIBS) +add_executable(rational_precision2double rational_precision2double.c) +target_link_libraries(rational_precision2double tiff port) +add_test(NAME "rational_precision2double" + COMMAND "rational_precision2double") +endif() + +if(NOT BUILD_SHARED_LIBS) +add_executable(custom_dir_EXIF_231 custom_dir_EXIF_231.c) +target_link_libraries(custom_dir_EXIF_231 tiff port) +add_test(NAME "custom_dir_EXIF_231" + COMMAND "custom_dir_EXIF_231") +endif() + +add_executable(defer_strile_loading defer_strile_loading.c) +target_link_libraries(defer_strile_loading tiff port) + +add_executable(defer_strile_writing defer_strile_writing.c) +target_link_libraries(defer_strile_writing tiff port) + +add_executable(testtypes testtypes.c) +target_link_libraries(testtypes tiff port) + +if(WEBP_SUPPORT AND EMSCRIPTEN) + # Emscripten is pretty finnicky about linker flags. + # It needs --shared-memory if and only if atomics or bulk-memory is used. + foreach(target ascii_tag + custom_dir + defer_strile_loading + defer_strile_writing + long_tag + rewrite + short_tag + strip_rw) + target_link_options(${target} PUBLIC "-Wl,--shared-memory") + endforeach() + if(JPEG_SUPPORT) + target_link_options(raw_decode PUBLIC "-Wl,--shared-memory") + endif() +endif() + +set(TEST_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/output") +file(MAKE_DIRECTORY "${TEST_OUTPUT}") + +set(tiff_test_extra_args + "-DTIFFCP=$" + "-DTIFFINFO=$" + "-DTIFFSPLIT=$" + "-DLIBTIFF=$") +if(WIN32) + list(APPEND tiff_test_extra_args "-DWIN32=${WIN32}") +endif() +if(CYGWIN) + list(APPEND tiff_test_extra_args "-DCYGWIN=${CYGWIN}") +endif() + +macro(tiff_test_convert name command1 command2 command3 infile outfile validate) + add_test(NAME "${name}" + COMMAND "${CMAKE_COMMAND}" + "-DCONVERT_COMMAND1=${command1}" + "-DCONVERT_COMMAND2=${command2}" + "-DCONVERT_COMMAND3=${command3}" + "-DINFILE=${infile}" + "-DOUTFILE=${outfile}" + "-DVALIDATE=${validate}" + ${tiff_test_extra_args} + -P "${CMAKE_CURRENT_SOURCE_DIR}/TiffTest.cmake") +endmacro() + +macro(tiff_test_stdout name command infile outfile) + add_test(NAME "${name}" + COMMAND "${CMAKE_COMMAND}" + "-DSTDOUT_COMMAND=${command}" + "-DINFILE=${infile}" + "-DOUTFILE=${outfile}" + ${tiff_test_extra_args} + -P "${CMAKE_CURRENT_SOURCE_DIR}/TiffTest.cmake") +endmacro() + +macro(tiff_test_reader name command infile) + add_test(NAME "${name}" + COMMAND "${CMAKE_COMMAND}" + "-DREADER_COMMAND=${command}" + "-DINFILE=${infile}" + ${tiff_test_extra_args} + -P "${CMAKE_CURRENT_SOURCE_DIR}/TiffTest.cmake") +endmacro() + +macro(add_convert_test_multi commandname1 commandname2 commandname3 + categoryname commandargs1 commandargs2 commandargs3 + image validate) + string(REPLACE " " "^" escaped_commandargs1 "${commandargs1}") + string(REPLACE " " "^" escaped_commandargs2 "${commandargs2}") + string(REPLACE " " "^" escaped_commandargs3 "${commandargs3}") + get_filename_component(name "${image}" NAME) + get_filename_component(base "${image}" NAME_WE) + set(testname "${commandname1}-${categoryname}-${base}") + if(commandname1) + set(command1 + "$^${escaped_commandargs1}") + else() + set(command1) + endif() + if(commandname2) + set(command2 + "$^${escaped_commandargs2}") + else() + set(command2) + endif() + if(commandname3) + set(command3 + "$^${escaped_commandargs3}") + else() + set(command3) + endif() + set(infile "${CMAKE_CURRENT_SOURCE_DIR}/${image}") + set(outfile "${TEST_OUTPUT}/${commandname1}-${categoryname}-${name}") + string(REGEX REPLACE "\\.tiff\$" "" name "${name}") + tiff_test_convert("${testname}" "${command1}" "${command2}" "${command3}" + "${infile}" "${outfile}" "${validate}") +endmacro() + +macro(add_convert_test commandname + categoryname commandargs + image validate) + add_convert_test_multi("${commandname}" "" "" + "${categoryname}" "${commandargs}" "" "" + "${image}" "${validate}") +endmacro() + +macro(add_convert_tests_multi commandname commandname2 commandname3 + categoryname + commandargs1 commandargs2 commandargs3 + images validate) + foreach(file ${${images}}) + add_convert_test_multi("${commandname1}" "${commandname2}" + "${commandname3}" "${categoryname}" + "${commandargs1}" "${commandargs2}" + "${commandargs3}" "${file}" "${validate}") + endforeach() +endmacro() + +macro(add_convert_tests commandname categoryname commandargs images validate) + foreach(file ${${images}}) + add_convert_test("${commandname}" "${categoryname}" + "${commandargs}" "${file}" "${validate}") + endforeach() +endmacro() + +macro(add_stdout_test commandname commandargs image) + string(REPLACE " " "^" escaped_commandargs "${commandargs}") + get_filename_component(name "${image}" NAME) + get_filename_component(base "${image}" NAME_WE) + set(testname "${commandname}-${base}") + set(command "$^${escaped_commandargs}") + set(infile "${CMAKE_CURRENT_SOURCE_DIR}/${image}") + set(outfile "${TEST_OUTPUT}/${commandname}-${name}") + string(REGEX REPLACE "\\.tiff\$" "" name "${name}") + tiff_test_stdout("${testname}" "${command}" "${infile}" "${outfile}") +endmacro() + +macro(add_reader_test commandname commandargs image) + string(REPLACE " " "^" escaped_commandargs "${commandargs}") + get_filename_component(name "${image}" NAME) + get_filename_component(base "${image}" NAME_WE) + set(testname "${commandname}-${base}") + set(command "$^${escaped_commandargs}") + set(infile "${CMAKE_CURRENT_SOURCE_DIR}/${image}") + string(REGEX REPLACE "\\.tiff\$" "" name "${name}") + tiff_test_reader("${testname}" "${command}" "${infile}") +endmacro() + +# BMP +add_convert_test(bmp2tiff palette "" "images/palette-1c-8b.bmp" TRUE) +add_convert_test(bmp2tiff rgb "" "images/rgb-3c-8b.bmp" TRUE) + +# GIF +add_convert_test(gif2tiff palette "" "images/palette-1c-8b.gif" TRUE) + +# PPM +add_convert_test(ppm2tiff miniswhite "" "images/miniswhite-1c-1b.pbm" TRUE) +add_convert_test(ppm2tiff minisblack "" "images/minisblack-1c-8b.pgm" TRUE) +add_convert_test(ppm2tiff rgb "" "images/rgb-3c-16b.ppm" TRUE) +add_convert_test(ppm2tiff rgb "" "images/rgb-3c-8b.ppm" TRUE) + +# tiffcp +add_convert_test(tiffcp g3 "-c g3" "images/miniswhite-1c-1b.tiff" FALSE) +add_convert_test(tiffcp g31d "-c g3:1d" "images/miniswhite-1c-1b.tiff" FALSE) +add_convert_test(tiffcp g31dfill "-c g3:1d:fill" "images/miniswhite-1c-1b.tiff" FALSE) +add_convert_test(tiffcp g32d "-c g3:2d" "images/miniswhite-1c-1b.tiff" FALSE) +add_convert_test(tiffcp g32dfill "-c g3:2d:fill" "images/miniswhite-1c-1b.tiff" FALSE) +add_convert_test(tiffcp g4 "-c g4" "images/miniswhite-1c-1b.tiff" FALSE) +add_convert_test(tiffcp none "-c none" "images/quad-lzw-compat.tiff" FALSE) +add_convert_test(tiffcp noner1 "-c none -r 1" "images/lzw-single-strip.tiff" FALSE) +add_convert_test_multi(tiffcp tiffcp "" logluv "-c none" "-c sgilog" "" + "images/logluv-3c-16b.tiff" FALSE) +add_convert_test_multi(tiffcp thumbnail "" thumbnail "g3:1d" "" "" + "images/miniswhite-1c-1b.tiff" FALSE) + +# tiffdump +add_reader_test(tiffdump "" "images/miniswhite-1c-1b.tiff") + +# tiffinfo +add_reader_test(tiffinfo "-c -D -d -j -s" "images/minisblack-1c-16b.tiff") + +# tiffcp split/join +foreach(image ${UNCOMPRESSEDIMAGES}) + list(APPEND ESCAPED_UNCOMPRESSED "${CMAKE_CURRENT_SOURCE_DIR}/${image}") +endforeach() +string(REPLACE ";" "^" ESCAPED_UNCOMPRESSED "${ESCAPED_UNCOMPRESSED}") +add_test(NAME "tiffcp-split" + COMMAND "${CMAKE_COMMAND}" + "-DTESTFILES=${ESCAPED_UNCOMPRESSED}" + "-DCONJOINED=${TEST_OUTPUT}/tiffcp-split-conjoined.tif" + "-DSPLITFILE=${TEST_OUTPUT}/tiffcp-split-split-" + ${tiff_test_extra_args} + -P "${CMAKE_CURRENT_SOURCE_DIR}/TiffSplitTest.cmake") +add_test(NAME "tiffcp-split-join" + COMMAND "${CMAKE_COMMAND}" + "-DTESTFILES=${ESCAPED_UNCOMPRESSED}" + "-DCONJOINED=${TEST_OUTPUT}/tiffcp-split-join-conjoined.tif" + "-DSPLITFILE=${TEST_OUTPUT}/tiffcp-split-join-split-" + "-DRECONJOINED=${TEST_OUTPUT}/tiffcp-split-join-reconjoined.tif" + ${tiff_test_extra_args} + -P "${CMAKE_CURRENT_SOURCE_DIR}/TiffSplitTest.cmake") + +# PDF +add_stdout_test(tiff2pdf "" "images/miniswhite-1c-1b.tiff" TRUE) + +# RGBA +add_convert_tests(tiff2rgba default "" TIFFIMAGES TRUE) +# Test rotations +add_convert_tests(tiffcrop R90 "-R90" TIFFIMAGES TRUE) +# Test flip (mirror) +add_convert_tests(tiffcrop doubleflip "-F both" TIFFIMAGES TRUE) +# Test extracting a section 60 pixels wide and 60 pixels high +add_convert_tests(tiffcrop extract "-U px -E top -X 60 -Y 60" TIFFIMAGES TRUE) +# Test extracting the first and fourth quarters from the left side. +add_convert_tests(tiffcrop extractz14 "-E left -Z1:4,2:4" TIFFIMAGES TRUE) + +# test types +add_test(NAME "testtypes" + COMMAND "testtypes") diff --git a/thirdparty/tiff-4.0.3/test/Makefile.am b/thirdparty/tiff-4.2.0/test/Makefile.am similarity index 72% rename from thirdparty/tiff-4.0.3/test/Makefile.am rename to thirdparty/tiff-4.2.0/test/Makefile.am index 4e115c95..4973b614 100644 --- a/thirdparty/tiff-4.0.3/test/Makefile.am +++ b/thirdparty/tiff-4.2.0/test/Makefile.am @@ -34,9 +34,14 @@ TESTS_ENVIRONMENT = \ MEMCHECK="$(MEMCHECK)" EXTRA_DIST = \ + $(REFFILES) \ $(TESTSCRIPTS) \ $(IMAGES_EXTRA_DIST) \ - common.sh + CMakeLists.txt \ + common.sh \ + TiffSplitTest.cmake \ + TiffTestCommon.cmake \ + TiffTest.cmake # All of the tests to execute via 'make check' TESTS = $(check_PROGRAMS) $(TESTSCRIPTS) @@ -47,17 +52,31 @@ XFAIL_TESTS = # Extra files which should be cleaned by 'make clean' CLEANFILES = test_packbits.tif o-* +if HAVE_JPEG +JPEG_DEPENDENT_CHECK_PROG=raw_decode +JPEG_DEPENDENT_TESTSCRIPTS=\ + tiff2rgba-quad-tile.jpg.sh \ + tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh \ + tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh \ + tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh + +else +JPEG_DEPENDENT_CHECK_PROG= +JPEG_DEPENDENT_TESTSCRIPTS= +endif + # Executable programs which need to be built in order to support tests -check_PROGRAMS = ascii_tag long_tag short_tag strip_rw rewrite raw_decode custom_dir +check_PROGRAMS = \ + ascii_tag long_tag short_tag strip_rw rewrite custom_dir custom_dir_EXIF_231 \ + rational_precision2double defer_strile_loading defer_strile_writing testtypes \ + $(JPEG_DEPENDENT_CHECK_PROG) # Test scripts to execute TESTSCRIPTS = \ - bmp2tiff_palette.sh \ - bmp2tiff_rgb.sh \ - gif2tiff.sh \ ppm2tiff_pbm.sh \ ppm2tiff_pgm.sh \ ppm2tiff_ppm.sh \ + fax2tiff.sh \ tiffcp-g3.sh \ tiffcp-g3-1d.sh \ tiffcp-g3-1d-fill.sh \ @@ -66,6 +85,8 @@ TESTSCRIPTS = \ tiffcp-g4.sh \ tiffcp-logluv.sh \ tiffcp-thumbnail.sh \ + tiffcp-lzw-compat.sh \ + tiffcp-lzw-scanline-decode.sh \ tiffdump.sh \ tiffinfo.sh \ tiffcp-split.sh \ @@ -115,6 +136,9 @@ TESTSCRIPTS = \ tiffcrop-R90-palette-1c-8b.sh \ tiffcrop-R90-rgb-3c-16b.sh \ tiffcrop-R90-rgb-3c-8b.sh \ + tiff2bw-palette-1c-8b.sh \ + tiff2bw-quad-lzw-compat.sh \ + tiff2bw-rgb-3c-8b.sh \ tiff2rgba-logluv-3c-16b.sh \ tiff2rgba-minisblack-1c-16b.sh \ tiff2rgba-minisblack-1c-8b.sh \ @@ -125,7 +149,19 @@ TESTSCRIPTS = \ tiff2rgba-palette-1c-8b.sh \ tiff2rgba-rgb-3c-16b.sh \ tiff2rgba-rgb-3c-8b.sh \ - tiff2rgba-quad-tile.jpg.sh + testfax4.sh \ + testdeflatelaststripextradata.sh \ + $(JPEG_DEPENDENT_TESTSCRIPTS) + +# This list should contain the references files +# from the 'refs' subdirectory +REFFILES = \ + refs/o-tiff2ps-EPS1.ps \ + refs/o-tiff2ps-PS1.ps \ + refs/o-tiff2ps-PS2.ps \ + refs/o-tiff2ps-PS3.ps \ + refs/o-testfax4.tiff \ + refs/o-deflate-last-strip-extra-data.tiff # This list should contain all of the TIFF files in the 'images' # subdirectory which are intended to be used as input images for @@ -141,18 +177,19 @@ TIFFIMAGES = \ images/palette-1c-8b.tiff \ images/rgb-3c-16b.tiff \ images/rgb-3c-8b.tiff \ - images/quad-tile.jpg.tiff - -BMPIMAGES = \ - images/palette-1c-8b.bmp \ - images/rgb-3c-8b.bmp - -GIFIMAGES = \ - images/palette-1c-8b.gif + images/quad-tile.jpg.tiff \ + images/quad-lzw-compat.tiff \ + images/lzw-single-strip.tiff \ + images/ojpeg_zackthecat_subsamp22_single_strip.tiff \ + images/ojpeg_chewey_subsamp21_multi_strip.tiff \ + images/ojpeg_single_strip_no_rowsperstrip.tiff \ + images/testfax4.tiff \ + images/deflate-last-strip-extra-data.tiff PNMIMAGES = \ images/minisblack-1c-8b.pgm \ images/miniswhite-1c-1b.pbm \ + images/rgb-3c-16b.ppm \ images/rgb-3c-8b.ppm # This list should include all of the files in the 'images' @@ -160,8 +197,7 @@ PNMIMAGES = \ # files which are not currently used by the tests. IMAGES_EXTRA_DIST = \ images/README.txt \ - $(BMPIMAGES) \ - $(GIFIMAGES) \ + images/miniswhite-1c-1b.g3 \ $(PNMIMAGES) \ $(TIFFIMAGES) @@ -181,17 +217,58 @@ raw_decode_SOURCES = raw_decode.c raw_decode_LDADD = $(LIBTIFF) custom_dir_SOURCES = custom_dir.c custom_dir_LDADD = $(LIBTIFF) +rational_precision2double_SOURCES = rational_precision2double.c +rational_precision2double_LDADD = $(LIBTIFF) +custom_dir_EXIF_231_SOURCES = custom_dir_EXIF_231.c +custom_dir_EXIF_231_LDADD = $(LIBTIFF) +defer_strile_loading_SOURCES = defer_strile_loading.c +defer_strile_loading_LDADD = $(LIBTIFF) +defer_strile_writing_SOURCES = defer_strile_writing.c +defer_strile_writing_LDADD = $(LIBTIFF) AM_CPPFLAGS = -I$(top_srcdir)/libtiff -# memcheck: valgrind's memory access checker +# memcheck: valgrind's memory access checker. +# +# The suppressions which come with valgrind are sometimes insufficient +# to handle certain system library aspects which may be reported and +# which are unrelated to libtiff. When first starting with a new +# system (or after a major system update), it is good to execute the +# test suite (known to already be passing!) like 'make memcheck +# VALGRIND_EXTRA_OPTS=--gen-suppressions=all' to create valgrind +# suppression entries in the test log. Make sure that none of the +# suppressions are due to libtiff itself. Tell valgrind about the +# suppressions by creating a .valgrindrc file with content like: +# --memcheck:suppressions=mysupp.supp memcheck: - $(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full --read-var-info=yes --track-origins=yes --num-callers=12 --quiet $(VALGRIND_EXTRA_OPTS)' check + $(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full --read-var-info=yes \ + --error-exitcode=2 --track-origins=yes --num-callers=12 \ + --quiet $(VALGRIND_EXTRA_OPTS)' check # ptrcheck: valgrind's experimental pointer checking tool. ptrcheck: $(MAKE) MEMCHECK='valgrind --tool=exp-ptrcheck --quiet $(VALGRIND_EXTRA_OPTS)' check +# tiff2bw is pretty lame so currently only the generated scripts +# tiff2bw-palette-1c-8b.sh, tiff2bw-quad-lzw-compat.sh, and +# tiff2bw-rgb-3c-8b.sh pass tests. +generate-tiff2bw-tests: + for file in $(TIFFIMAGES) ; \ + do \ + base=`basename $$file .tiff` ; \ + testscript=$(srcdir)/tiff2bw-$$base.sh ; \ + ( \ + echo "#!/bin/sh" ; \ + echo "# Generated file, master is Makefile.am" ; \ + echo ". \$${srcdir:-.}/common.sh" ; \ + echo "infile=\"\$$srcdir/$$file\"" ; \ + echo "outfile=\"o-tiff2bw-$$base.tiff\"" ; \ + echo "f_test_convert \"\$$TIFF2BW\" \$$infile \$$outfile" ; \ + echo "f_tiffinfo_validate \$$outfile" ; \ + ) > $$testscript ; \ + chmod +x $$testscript ; \ + done + generate-tiff2rgba-tests: for file in $(TIFFIMAGES) ; \ do \ @@ -288,5 +365,6 @@ generate-tiffcrop-tests: \ generate-tiffcrop-extractz14-tests generate-tests: \ + generate-tiff2bw-tests \ generate-tiff2rgba-tests \ generate-tiffcrop-tests diff --git a/thirdparty/tiff-4.0.3/test/Makefile.in b/thirdparty/tiff-4.2.0/test/Makefile.in similarity index 76% rename from thirdparty/tiff-4.0.3/test/Makefile.in rename to thirdparty/tiff-4.2.0/test/Makefile.in index 0e40087c..15b7b826 100644 --- a/thirdparty/tiff-4.0.3/test/Makefile.in +++ b/thirdparty/tiff-4.2.0/test/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -40,23 +40,61 @@ # Process this file with automake to produce Makefile.in. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -75,15 +113,15 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +TESTS = $(check_PROGRAMS) $(am__EXEEXT_3) XFAIL_TESTS = check_PROGRAMS = ascii_tag$(EXEEXT) long_tag$(EXEEXT) \ short_tag$(EXEEXT) strip_rw$(EXEEXT) rewrite$(EXEEXT) \ - raw_decode$(EXEEXT) custom_dir$(EXEEXT) + custom_dir$(EXEEXT) custom_dir_EXIF_231$(EXEEXT) \ + rational_precision2double$(EXEEXT) \ + defer_strile_loading$(EXEEXT) defer_strile_writing$(EXEEXT) \ + testtypes$(EXEEXT) $(am__EXEEXT_1) subdir = test -DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ - $(top_srcdir)/config/mkinstalldirs \ - $(top_srcdir)/config/test-driver ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -91,11 +129,14 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +@HAVE_JPEG_TRUE@am__EXEEXT_1 = raw_decode$(EXEEXT) am_ascii_tag_OBJECTS = ascii_tag.$(OBJEXT) ascii_tag_OBJECTS = $(am_ascii_tag_OBJECTS) ascii_tag_DEPENDENCIES = $(LIBTIFF) @@ -106,9 +147,23 @@ am__v_lt_1 = am_custom_dir_OBJECTS = custom_dir.$(OBJEXT) custom_dir_OBJECTS = $(am_custom_dir_OBJECTS) custom_dir_DEPENDENCIES = $(LIBTIFF) +am_custom_dir_EXIF_231_OBJECTS = custom_dir_EXIF_231.$(OBJEXT) +custom_dir_EXIF_231_OBJECTS = $(am_custom_dir_EXIF_231_OBJECTS) +custom_dir_EXIF_231_DEPENDENCIES = $(LIBTIFF) +am_defer_strile_loading_OBJECTS = defer_strile_loading.$(OBJEXT) +defer_strile_loading_OBJECTS = $(am_defer_strile_loading_OBJECTS) +defer_strile_loading_DEPENDENCIES = $(LIBTIFF) +am_defer_strile_writing_OBJECTS = defer_strile_writing.$(OBJEXT) +defer_strile_writing_OBJECTS = $(am_defer_strile_writing_OBJECTS) +defer_strile_writing_DEPENDENCIES = $(LIBTIFF) am_long_tag_OBJECTS = long_tag.$(OBJEXT) check_tag.$(OBJEXT) long_tag_OBJECTS = $(am_long_tag_OBJECTS) long_tag_DEPENDENCIES = $(LIBTIFF) +am_rational_precision2double_OBJECTS = \ + rational_precision2double.$(OBJEXT) +rational_precision2double_OBJECTS = \ + $(am_rational_precision2double_OBJECTS) +rational_precision2double_DEPENDENCIES = $(LIBTIFF) am_raw_decode_OBJECTS = raw_decode.$(OBJEXT) raw_decode_OBJECTS = $(am_raw_decode_OBJECTS) raw_decode_DEPENDENCIES = $(LIBTIFF) @@ -122,6 +177,9 @@ am_strip_rw_OBJECTS = strip_rw.$(OBJEXT) strip.$(OBJEXT) \ test_arrays.$(OBJEXT) strip_rw_OBJECTS = $(am_strip_rw_OBJECTS) strip_rw_DEPENDENCIES = $(LIBTIFF) +testtypes_SOURCES = testtypes.c +testtypes_OBJECTS = testtypes.$(OBJEXT) +testtypes_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -136,7 +194,17 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/libtiff depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/ascii_tag.Po \ + ./$(DEPDIR)/check_tag.Po ./$(DEPDIR)/custom_dir.Po \ + ./$(DEPDIR)/custom_dir_EXIF_231.Po \ + ./$(DEPDIR)/defer_strile_loading.Po \ + ./$(DEPDIR)/defer_strile_writing.Po ./$(DEPDIR)/long_tag.Po \ + ./$(DEPDIR)/rational_precision2double.Po \ + ./$(DEPDIR)/raw_decode.Po ./$(DEPDIR)/rewrite_tag.Po \ + ./$(DEPDIR)/short_tag.Po ./$(DEPDIR)/strip.Po \ + ./$(DEPDIR)/strip_rw.Po ./$(DEPDIR)/test_arrays.Po \ + ./$(DEPDIR)/testtypes.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -157,17 +225,40 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ascii_tag_SOURCES) $(custom_dir_SOURCES) \ - $(long_tag_SOURCES) $(raw_decode_SOURCES) $(rewrite_SOURCES) \ - $(short_tag_SOURCES) $(strip_rw_SOURCES) + $(custom_dir_EXIF_231_SOURCES) $(defer_strile_loading_SOURCES) \ + $(defer_strile_writing_SOURCES) $(long_tag_SOURCES) \ + $(rational_precision2double_SOURCES) $(raw_decode_SOURCES) \ + $(rewrite_SOURCES) $(short_tag_SOURCES) $(strip_rw_SOURCES) \ + testtypes.c DIST_SOURCES = $(ascii_tag_SOURCES) $(custom_dir_SOURCES) \ - $(long_tag_SOURCES) $(raw_decode_SOURCES) $(rewrite_SOURCES) \ - $(short_tag_SOURCES) $(strip_rw_SOURCES) + $(custom_dir_EXIF_231_SOURCES) $(defer_strile_loading_SOURCES) \ + $(defer_strile_writing_SOURCES) $(long_tag_SOURCES) \ + $(rational_precision2double_SOURCES) $(raw_decode_SOURCES) \ + $(rewrite_SOURCES) $(short_tag_SOURCES) $(strip_rw_SOURCES) \ + testtypes.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__tty_colors_dummy = \ @@ -354,6 +445,60 @@ am__set_TESTS_bases = \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck +@HAVE_JPEG_TRUE@am__EXEEXT_2 = tiff2rgba-quad-tile.jpg.sh \ +@HAVE_JPEG_TRUE@ tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh \ +@HAVE_JPEG_TRUE@ tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh \ +@HAVE_JPEG_TRUE@ tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh +am__EXEEXT_3 = ppm2tiff_pbm.sh ppm2tiff_pgm.sh ppm2tiff_ppm.sh \ + fax2tiff.sh tiffcp-g3.sh tiffcp-g3-1d.sh tiffcp-g3-1d-fill.sh \ + tiffcp-g3-2d.sh tiffcp-g3-2d-fill.sh tiffcp-g4.sh \ + tiffcp-logluv.sh tiffcp-thumbnail.sh tiffcp-lzw-compat.sh \ + tiffcp-lzw-scanline-decode.sh tiffdump.sh tiffinfo.sh \ + tiffcp-split.sh tiffcp-split-join.sh tiff2ps-PS1.sh \ + tiff2ps-PS2.sh tiff2ps-PS3.sh tiff2ps-EPS1.sh tiff2pdf.sh \ + tiffcrop-doubleflip-logluv-3c-16b.sh \ + tiffcrop-doubleflip-minisblack-1c-16b.sh \ + tiffcrop-doubleflip-minisblack-1c-8b.sh \ + tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh \ + tiffcrop-doubleflip-miniswhite-1c-1b.sh \ + tiffcrop-doubleflip-palette-1c-1b.sh \ + tiffcrop-doubleflip-palette-1c-4b.sh \ + tiffcrop-doubleflip-palette-1c-8b.sh \ + tiffcrop-doubleflip-rgb-3c-16b.sh \ + tiffcrop-doubleflip-rgb-3c-8b.sh \ + tiffcrop-extract-logluv-3c-16b.sh \ + tiffcrop-extract-minisblack-1c-16b.sh \ + tiffcrop-extract-minisblack-1c-8b.sh \ + tiffcrop-extract-minisblack-2c-8b-alpha.sh \ + tiffcrop-extract-miniswhite-1c-1b.sh \ + tiffcrop-extract-palette-1c-1b.sh \ + tiffcrop-extract-palette-1c-4b.sh \ + tiffcrop-extract-palette-1c-8b.sh \ + tiffcrop-extract-rgb-3c-16b.sh tiffcrop-extract-rgb-3c-8b.sh \ + tiffcrop-extractz14-logluv-3c-16b.sh \ + tiffcrop-extractz14-minisblack-1c-16b.sh \ + tiffcrop-extractz14-minisblack-1c-8b.sh \ + tiffcrop-extractz14-minisblack-2c-8b-alpha.sh \ + tiffcrop-extractz14-miniswhite-1c-1b.sh \ + tiffcrop-extractz14-palette-1c-1b.sh \ + tiffcrop-extractz14-palette-1c-4b.sh \ + tiffcrop-extractz14-palette-1c-8b.sh \ + tiffcrop-extractz14-rgb-3c-16b.sh \ + tiffcrop-extractz14-rgb-3c-8b.sh tiffcrop-R90-logluv-3c-16b.sh \ + tiffcrop-R90-minisblack-1c-16b.sh \ + tiffcrop-R90-minisblack-1c-8b.sh \ + tiffcrop-R90-minisblack-2c-8b-alpha.sh \ + tiffcrop-R90-miniswhite-1c-1b.sh tiffcrop-R90-palette-1c-1b.sh \ + tiffcrop-R90-palette-1c-4b.sh tiffcrop-R90-palette-1c-8b.sh \ + tiffcrop-R90-rgb-3c-16b.sh tiffcrop-R90-rgb-3c-8b.sh \ + tiff2bw-palette-1c-8b.sh tiff2bw-quad-lzw-compat.sh \ + tiff2bw-rgb-3c-8b.sh tiff2rgba-logluv-3c-16b.sh \ + tiff2rgba-minisblack-1c-16b.sh tiff2rgba-minisblack-1c-8b.sh \ + tiff2rgba-minisblack-2c-8b-alpha.sh \ + tiff2rgba-miniswhite-1c-1b.sh tiff2rgba-palette-1c-1b.sh \ + tiff2rgba-palette-1c-4b.sh tiff2rgba-palette-1c-8b.sh \ + tiff2rgba-rgb-3c-16b.sh tiff2rgba-rgb-3c-8b.sh testfax4.sh \ + testdeflatelaststripextradata.sh $(am__EXEEXT_2) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver @@ -374,6 +519,8 @@ TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/test-driver DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -387,6 +534,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -434,6 +582,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -531,25 +680,34 @@ TESTS_ENVIRONMENT = \ MEMCHECK="$(MEMCHECK)" EXTRA_DIST = \ + $(REFFILES) \ $(TESTSCRIPTS) \ $(IMAGES_EXTRA_DIST) \ - common.sh + CMakeLists.txt \ + common.sh \ + TiffSplitTest.cmake \ + TiffTestCommon.cmake \ + TiffTest.cmake -# All of the tests to execute via 'make check' -TESTS = $(check_PROGRAMS) $(TESTSCRIPTS) - # Extra files which should be cleaned by 'make clean' CLEANFILES = test_packbits.tif o-* +@HAVE_JPEG_FALSE@JPEG_DEPENDENT_CHECK_PROG = +@HAVE_JPEG_TRUE@JPEG_DEPENDENT_CHECK_PROG = raw_decode +@HAVE_JPEG_FALSE@JPEG_DEPENDENT_TESTSCRIPTS = +@HAVE_JPEG_TRUE@JPEG_DEPENDENT_TESTSCRIPTS = \ +@HAVE_JPEG_TRUE@ tiff2rgba-quad-tile.jpg.sh \ +@HAVE_JPEG_TRUE@ tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh \ +@HAVE_JPEG_TRUE@ tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh \ +@HAVE_JPEG_TRUE@ tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh + # Test scripts to execute TESTSCRIPTS = \ - bmp2tiff_palette.sh \ - bmp2tiff_rgb.sh \ - gif2tiff.sh \ ppm2tiff_pbm.sh \ ppm2tiff_pgm.sh \ ppm2tiff_ppm.sh \ + fax2tiff.sh \ tiffcp-g3.sh \ tiffcp-g3-1d.sh \ tiffcp-g3-1d-fill.sh \ @@ -558,6 +716,8 @@ TESTSCRIPTS = \ tiffcp-g4.sh \ tiffcp-logluv.sh \ tiffcp-thumbnail.sh \ + tiffcp-lzw-compat.sh \ + tiffcp-lzw-scanline-decode.sh \ tiffdump.sh \ tiffinfo.sh \ tiffcp-split.sh \ @@ -607,6 +767,9 @@ TESTSCRIPTS = \ tiffcrop-R90-palette-1c-8b.sh \ tiffcrop-R90-rgb-3c-16b.sh \ tiffcrop-R90-rgb-3c-8b.sh \ + tiff2bw-palette-1c-8b.sh \ + tiff2bw-quad-lzw-compat.sh \ + tiff2bw-rgb-3c-8b.sh \ tiff2rgba-logluv-3c-16b.sh \ tiff2rgba-minisblack-1c-16b.sh \ tiff2rgba-minisblack-1c-8b.sh \ @@ -617,7 +780,20 @@ TESTSCRIPTS = \ tiff2rgba-palette-1c-8b.sh \ tiff2rgba-rgb-3c-16b.sh \ tiff2rgba-rgb-3c-8b.sh \ - tiff2rgba-quad-tile.jpg.sh + testfax4.sh \ + testdeflatelaststripextradata.sh \ + $(JPEG_DEPENDENT_TESTSCRIPTS) + + +# This list should contain the references files +# from the 'refs' subdirectory +REFFILES = \ + refs/o-tiff2ps-EPS1.ps \ + refs/o-tiff2ps-PS1.ps \ + refs/o-tiff2ps-PS2.ps \ + refs/o-tiff2ps-PS3.ps \ + refs/o-testfax4.tiff \ + refs/o-deflate-last-strip-extra-data.tiff # This list should contain all of the TIFF files in the 'images' @@ -634,18 +810,19 @@ TIFFIMAGES = \ images/palette-1c-8b.tiff \ images/rgb-3c-16b.tiff \ images/rgb-3c-8b.tiff \ - images/quad-tile.jpg.tiff - -BMPIMAGES = \ - images/palette-1c-8b.bmp \ - images/rgb-3c-8b.bmp - -GIFIMAGES = \ - images/palette-1c-8b.gif + images/quad-tile.jpg.tiff \ + images/quad-lzw-compat.tiff \ + images/lzw-single-strip.tiff \ + images/ojpeg_zackthecat_subsamp22_single_strip.tiff \ + images/ojpeg_chewey_subsamp21_multi_strip.tiff \ + images/ojpeg_single_strip_no_rowsperstrip.tiff \ + images/testfax4.tiff \ + images/deflate-last-strip-extra-data.tiff PNMIMAGES = \ images/minisblack-1c-8b.pgm \ images/miniswhite-1c-1b.pbm \ + images/rgb-3c-16b.ppm \ images/rgb-3c-8b.ppm @@ -654,8 +831,7 @@ PNMIMAGES = \ # files which are not currently used by the tests. IMAGES_EXTRA_DIST = \ images/README.txt \ - $(BMPIMAGES) \ - $(GIFIMAGES) \ + images/miniswhite-1c-1b.g3 \ $(PNMIMAGES) \ $(TIFFIMAGES) @@ -674,6 +850,14 @@ raw_decode_SOURCES = raw_decode.c raw_decode_LDADD = $(LIBTIFF) custom_dir_SOURCES = custom_dir.c custom_dir_LDADD = $(LIBTIFF) +rational_precision2double_SOURCES = rational_precision2double.c +rational_precision2double_LDADD = $(LIBTIFF) +custom_dir_EXIF_231_SOURCES = custom_dir_EXIF_231.c +custom_dir_EXIF_231_LDADD = $(LIBTIFF) +defer_strile_loading_SOURCES = defer_strile_loading.c +defer_strile_loading_LDADD = $(LIBTIFF) +defer_strile_writing_SOURCES = defer_strile_writing.c +defer_strile_writing_LDADD = $(LIBTIFF) AM_CPPFLAGS = -I$(top_srcdir)/libtiff all: all-am @@ -691,14 +875,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign test/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -718,58 +901,96 @@ clean-checkPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + ascii_tag$(EXEEXT): $(ascii_tag_OBJECTS) $(ascii_tag_DEPENDENCIES) $(EXTRA_ascii_tag_DEPENDENCIES) @rm -f ascii_tag$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ascii_tag_OBJECTS) $(ascii_tag_LDADD) $(LIBS) + custom_dir$(EXEEXT): $(custom_dir_OBJECTS) $(custom_dir_DEPENDENCIES) $(EXTRA_custom_dir_DEPENDENCIES) @rm -f custom_dir$(EXEEXT) $(AM_V_CCLD)$(LINK) $(custom_dir_OBJECTS) $(custom_dir_LDADD) $(LIBS) + +custom_dir_EXIF_231$(EXEEXT): $(custom_dir_EXIF_231_OBJECTS) $(custom_dir_EXIF_231_DEPENDENCIES) $(EXTRA_custom_dir_EXIF_231_DEPENDENCIES) + @rm -f custom_dir_EXIF_231$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(custom_dir_EXIF_231_OBJECTS) $(custom_dir_EXIF_231_LDADD) $(LIBS) + +defer_strile_loading$(EXEEXT): $(defer_strile_loading_OBJECTS) $(defer_strile_loading_DEPENDENCIES) $(EXTRA_defer_strile_loading_DEPENDENCIES) + @rm -f defer_strile_loading$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(defer_strile_loading_OBJECTS) $(defer_strile_loading_LDADD) $(LIBS) + +defer_strile_writing$(EXEEXT): $(defer_strile_writing_OBJECTS) $(defer_strile_writing_DEPENDENCIES) $(EXTRA_defer_strile_writing_DEPENDENCIES) + @rm -f defer_strile_writing$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(defer_strile_writing_OBJECTS) $(defer_strile_writing_LDADD) $(LIBS) + long_tag$(EXEEXT): $(long_tag_OBJECTS) $(long_tag_DEPENDENCIES) $(EXTRA_long_tag_DEPENDENCIES) @rm -f long_tag$(EXEEXT) $(AM_V_CCLD)$(LINK) $(long_tag_OBJECTS) $(long_tag_LDADD) $(LIBS) + +rational_precision2double$(EXEEXT): $(rational_precision2double_OBJECTS) $(rational_precision2double_DEPENDENCIES) $(EXTRA_rational_precision2double_DEPENDENCIES) + @rm -f rational_precision2double$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rational_precision2double_OBJECTS) $(rational_precision2double_LDADD) $(LIBS) + raw_decode$(EXEEXT): $(raw_decode_OBJECTS) $(raw_decode_DEPENDENCIES) $(EXTRA_raw_decode_DEPENDENCIES) @rm -f raw_decode$(EXEEXT) $(AM_V_CCLD)$(LINK) $(raw_decode_OBJECTS) $(raw_decode_LDADD) $(LIBS) + rewrite$(EXEEXT): $(rewrite_OBJECTS) $(rewrite_DEPENDENCIES) $(EXTRA_rewrite_DEPENDENCIES) @rm -f rewrite$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rewrite_OBJECTS) $(rewrite_LDADD) $(LIBS) + short_tag$(EXEEXT): $(short_tag_OBJECTS) $(short_tag_DEPENDENCIES) $(EXTRA_short_tag_DEPENDENCIES) @rm -f short_tag$(EXEEXT) $(AM_V_CCLD)$(LINK) $(short_tag_OBJECTS) $(short_tag_LDADD) $(LIBS) + strip_rw$(EXEEXT): $(strip_rw_OBJECTS) $(strip_rw_DEPENDENCIES) $(EXTRA_strip_rw_DEPENDENCIES) @rm -f strip_rw$(EXEEXT) $(AM_V_CCLD)$(LINK) $(strip_rw_OBJECTS) $(strip_rw_LDADD) $(LIBS) +testtypes$(EXEEXT): $(testtypes_OBJECTS) $(testtypes_DEPENDENCIES) $(EXTRA_testtypes_DEPENDENCIES) + @rm -f testtypes$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(testtypes_OBJECTS) $(testtypes_LDADD) $(LIBS) + mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ascii_tag.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_tag.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/custom_dir.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/long_tag.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raw_decode.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rewrite_tag.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/short_tag.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strip.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strip_rw.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_arrays.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ascii_tag.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_tag.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/custom_dir.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/custom_dir_EXIF_231.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/defer_strile_loading.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/defer_strile_writing.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/long_tag.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rational_precision2double.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raw_decode.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rewrite_tag.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/short_tag.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strip.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strip_rw.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_arrays.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testtypes.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -784,26 +1005,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -815,15 +1025,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -832,9 +1038,10 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am -cscopelist: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -859,7 +1066,7 @@ distclean-tags: $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not -# exand to empty, as could happen e.g. with make check TESTS=''. +# expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: @@ -880,7 +1087,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ - else \ + elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ @@ -970,7 +1177,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) fi; \ $$success || exit 1 -check-TESTS: +check-TESTS: $(check_PROGRAMS) @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @@ -1026,13 +1233,6 @@ rewrite.log: rewrite$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -raw_decode.log: raw_decode$(EXEEXT) - @p='raw_decode$(EXEEXT)'; \ - b='raw_decode'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) custom_dir.log: custom_dir$(EXEEXT) @p='custom_dir$(EXEEXT)'; \ b='custom_dir'; \ @@ -1040,23 +1240,44 @@ custom_dir.log: custom_dir$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -bmp2tiff_palette.sh.log: bmp2tiff_palette.sh - @p='bmp2tiff_palette.sh'; \ - b='bmp2tiff_palette.sh'; \ +custom_dir_EXIF_231.log: custom_dir_EXIF_231$(EXEEXT) + @p='custom_dir_EXIF_231$(EXEEXT)'; \ + b='custom_dir_EXIF_231'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -bmp2tiff_rgb.sh.log: bmp2tiff_rgb.sh - @p='bmp2tiff_rgb.sh'; \ - b='bmp2tiff_rgb.sh'; \ +rational_precision2double.log: rational_precision2double$(EXEEXT) + @p='rational_precision2double$(EXEEXT)'; \ + b='rational_precision2double'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -gif2tiff.sh.log: gif2tiff.sh - @p='gif2tiff.sh'; \ - b='gif2tiff.sh'; \ +defer_strile_loading.log: defer_strile_loading$(EXEEXT) + @p='defer_strile_loading$(EXEEXT)'; \ + b='defer_strile_loading'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +defer_strile_writing.log: defer_strile_writing$(EXEEXT) + @p='defer_strile_writing$(EXEEXT)'; \ + b='defer_strile_writing'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +testtypes.log: testtypes$(EXEEXT) + @p='testtypes$(EXEEXT)'; \ + b='testtypes'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +raw_decode.log: raw_decode$(EXEEXT) + @p='raw_decode$(EXEEXT)'; \ + b='raw_decode'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ @@ -1082,6 +1303,13 @@ ppm2tiff_ppm.sh.log: ppm2tiff_ppm.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +fax2tiff.sh.log: fax2tiff.sh + @p='fax2tiff.sh'; \ + b='fax2tiff.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) tiffcp-g3.sh.log: tiffcp-g3.sh @p='tiffcp-g3.sh'; \ b='tiffcp-g3.sh'; \ @@ -1138,6 +1366,20 @@ tiffcp-thumbnail.sh.log: tiffcp-thumbnail.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +tiffcp-lzw-compat.sh.log: tiffcp-lzw-compat.sh + @p='tiffcp-lzw-compat.sh'; \ + b='tiffcp-lzw-compat.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tiffcp-lzw-scanline-decode.sh.log: tiffcp-lzw-scanline-decode.sh + @p='tiffcp-lzw-scanline-decode.sh'; \ + b='tiffcp-lzw-scanline-decode.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) tiffdump.sh.log: tiffdump.sh @p='tiffdump.sh'; \ b='tiffdump.sh'; \ @@ -1481,6 +1723,27 @@ tiffcrop-R90-rgb-3c-8b.sh.log: tiffcrop-R90-rgb-3c-8b.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +tiff2bw-palette-1c-8b.sh.log: tiff2bw-palette-1c-8b.sh + @p='tiff2bw-palette-1c-8b.sh'; \ + b='tiff2bw-palette-1c-8b.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tiff2bw-quad-lzw-compat.sh.log: tiff2bw-quad-lzw-compat.sh + @p='tiff2bw-quad-lzw-compat.sh'; \ + b='tiff2bw-quad-lzw-compat.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tiff2bw-rgb-3c-8b.sh.log: tiff2bw-rgb-3c-8b.sh + @p='tiff2bw-rgb-3c-8b.sh'; \ + b='tiff2bw-rgb-3c-8b.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) tiff2rgba-logluv-3c-16b.sh.log: tiff2rgba-logluv-3c-16b.sh @p='tiff2rgba-logluv-3c-16b.sh'; \ b='tiff2rgba-logluv-3c-16b.sh'; \ @@ -1551,6 +1814,20 @@ tiff2rgba-rgb-3c-8b.sh.log: tiff2rgba-rgb-3c-8b.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +testfax4.sh.log: testfax4.sh + @p='testfax4.sh'; \ + b='testfax4.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +testdeflatelaststripextradata.sh.log: testdeflatelaststripextradata.sh + @p='testdeflatelaststripextradata.sh'; \ + b='testdeflatelaststripextradata.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) tiff2rgba-quad-tile.jpg.sh.log: tiff2rgba-quad-tile.jpg.sh @p='tiff2rgba-quad-tile.jpg.sh'; \ b='tiff2rgba-quad-tile.jpg.sh'; \ @@ -1558,6 +1835,27 @@ tiff2rgba-quad-tile.jpg.sh.log: tiff2rgba-quad-tile.jpg.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh.log: tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh + @p='tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh'; \ + b='tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh.log: tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh + @p='tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh'; \ + b='tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh.log: tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh + @p='tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh'; \ + b='tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ @@ -1573,7 +1871,10 @@ tiff2rgba-quad-tile.jpg.sh.log: tiff2rgba-quad-tile.jpg.sh @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -1649,7 +1950,21 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/ascii_tag.Po + -rm -f ./$(DEPDIR)/check_tag.Po + -rm -f ./$(DEPDIR)/custom_dir.Po + -rm -f ./$(DEPDIR)/custom_dir_EXIF_231.Po + -rm -f ./$(DEPDIR)/defer_strile_loading.Po + -rm -f ./$(DEPDIR)/defer_strile_writing.Po + -rm -f ./$(DEPDIR)/long_tag.Po + -rm -f ./$(DEPDIR)/rational_precision2double.Po + -rm -f ./$(DEPDIR)/raw_decode.Po + -rm -f ./$(DEPDIR)/rewrite_tag.Po + -rm -f ./$(DEPDIR)/short_tag.Po + -rm -f ./$(DEPDIR)/strip.Po + -rm -f ./$(DEPDIR)/strip_rw.Po + -rm -f ./$(DEPDIR)/test_arrays.Po + -rm -f ./$(DEPDIR)/testtypes.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -1695,7 +2010,21 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/ascii_tag.Po + -rm -f ./$(DEPDIR)/check_tag.Po + -rm -f ./$(DEPDIR)/custom_dir.Po + -rm -f ./$(DEPDIR)/custom_dir_EXIF_231.Po + -rm -f ./$(DEPDIR)/defer_strile_loading.Po + -rm -f ./$(DEPDIR)/defer_strile_writing.Po + -rm -f ./$(DEPDIR)/long_tag.Po + -rm -f ./$(DEPDIR)/rational_precision2double.Po + -rm -f ./$(DEPDIR)/raw_decode.Po + -rm -f ./$(DEPDIR)/rewrite_tag.Po + -rm -f ./$(DEPDIR)/short_tag.Po + -rm -f ./$(DEPDIR)/strip.Po + -rm -f ./$(DEPDIR)/strip_rw.Po + -rm -f ./$(DEPDIR)/test_arrays.Po + -rm -f ./$(DEPDIR)/testtypes.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -1716,29 +2045,64 @@ uninstall-am: .MAKE: check-am install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic clean-libtool cscopelist \ - ctags distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ + check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - recheck tags uninstall uninstall-am + recheck tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile -# memcheck: valgrind's memory access checker +# memcheck: valgrind's memory access checker. +# +# The suppressions which come with valgrind are sometimes insufficient +# to handle certain system library aspects which may be reported and +# which are unrelated to libtiff. When first starting with a new +# system (or after a major system update), it is good to execute the +# test suite (known to already be passing!) like 'make memcheck +# VALGRIND_EXTRA_OPTS=--gen-suppressions=all' to create valgrind +# suppression entries in the test log. Make sure that none of the +# suppressions are due to libtiff itself. Tell valgrind about the +# suppressions by creating a .valgrindrc file with content like: +# --memcheck:suppressions=mysupp.supp memcheck: - $(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full --read-var-info=yes --track-origins=yes --num-callers=12 --quiet $(VALGRIND_EXTRA_OPTS)' check + $(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full --read-var-info=yes \ + --error-exitcode=2 --track-origins=yes --num-callers=12 \ + --quiet $(VALGRIND_EXTRA_OPTS)' check # ptrcheck: valgrind's experimental pointer checking tool. ptrcheck: $(MAKE) MEMCHECK='valgrind --tool=exp-ptrcheck --quiet $(VALGRIND_EXTRA_OPTS)' check +# tiff2bw is pretty lame so currently only the generated scripts +# tiff2bw-palette-1c-8b.sh, tiff2bw-quad-lzw-compat.sh, and +# tiff2bw-rgb-3c-8b.sh pass tests. +generate-tiff2bw-tests: + for file in $(TIFFIMAGES) ; \ + do \ + base=`basename $$file .tiff` ; \ + testscript=$(srcdir)/tiff2bw-$$base.sh ; \ + ( \ + echo "#!/bin/sh" ; \ + echo "# Generated file, master is Makefile.am" ; \ + echo ". \$${srcdir:-.}/common.sh" ; \ + echo "infile=\"\$$srcdir/$$file\"" ; \ + echo "outfile=\"o-tiff2bw-$$base.tiff\"" ; \ + echo "f_test_convert \"\$$TIFF2BW\" \$$infile \$$outfile" ; \ + echo "f_tiffinfo_validate \$$outfile" ; \ + ) > $$testscript ; \ + chmod +x $$testscript ; \ + done + generate-tiff2rgba-tests: for file in $(TIFFIMAGES) ; \ do \ @@ -1835,6 +2199,7 @@ generate-tiffcrop-tests: \ generate-tiffcrop-extractz14-tests generate-tests: \ + generate-tiff2bw-tests \ generate-tiff2rgba-tests \ generate-tiffcrop-tests diff --git a/thirdparty/tiff-4.2.0/test/TiffSplitTest.cmake b/thirdparty/tiff-4.2.0/test/TiffSplitTest.cmake new file mode 100644 index 00000000..cf31f442 --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/TiffSplitTest.cmake @@ -0,0 +1,34 @@ +# CMake tests for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +include(${CMAKE_CURRENT_LIST_DIR}/TiffTestCommon.cmake) + +string(REPLACE "^" ";" TESTFILES "${TESTFILES}") + +test_convert_multi("${TIFFCP}" "${TESTFILES}" "${CONJOINED}") +test_convert("${TIFFSPLIT}" "${CONJOINED}" "${SPLITFILE}") +if (RECONJOINED) + file(GLOB SPLITFILES "${SPLITFILE}*") + test_convert_multi("${TIFFCP}" "${SPLITFILES}" "${RECONJOINED}") +endif() diff --git a/thirdparty/tiff-4.2.0/test/TiffTest.cmake b/thirdparty/tiff-4.2.0/test/TiffTest.cmake new file mode 100644 index 00000000..c1cf4d05 --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/TiffTest.cmake @@ -0,0 +1,63 @@ +# CMake tests for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +include(${CMAKE_CURRENT_LIST_DIR}/TiffTestCommon.cmake) + +string(REPLACE "^" ";" CONVERT_COMMAND1 "${CONVERT_COMMAND1}") +string(REPLACE "^" ";" CONVERT_COMMAND2 "${CONVERT_COMMAND2}") +string(REPLACE "^" ";" CONVERT_COMMAND3 "${CONVERT_COMMAND3}") +string(REPLACE "^" ";" STDOUT_COMMAND "${STDOUT_COMMAND}") +string(REPLACE "^" ";" READER_COMMAND "${READER_COMMAND}") + +if(CONVERT_COMMAND1) + test_convert("${CONVERT_COMMAND1}" "${INFILE}" "${OUTFILE}") + if(VALIDATE) + tiffinfo_validate("${OUTFILE}") + endif() +endif() + +get_filename_component(base "${OUTFILE}" NAME) +get_filename_component(ext "${OUTFILE}" EXT) + +if(CONVERT_COMMAND2) + test_convert("${CONVERT_COMMAND2}" "${OUTFILE}" "${base}-2${ext}") + if(VALIDATE) + tiffinfo_validate("${base}-2${ext}") + endif() +endif() + +if(CONVERT_COMMAND3) + test_convert("${CONVERT_COMMAND3}" "${base}-2${ext}" "${base}-3${ext}") + if(VALIDATE) + tiffinfo_validate("${base}-3${ext}") + endif() +endif() + +if(STDOUT_COMMAND) + test_stdout("${STDOUT_COMMAND}" "${INFILE}" "${OUTFILE}") +endif() + +if(READER_COMMAND) + test_reader("${READER_COMMAND}" "${INFILE}") +endif() diff --git a/thirdparty/tiff-4.2.0/test/TiffTestCommon.cmake b/thirdparty/tiff-4.2.0/test/TiffTestCommon.cmake new file mode 100644 index 00000000..a0db6782 --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/TiffTestCommon.cmake @@ -0,0 +1,108 @@ +# CMake tests for libtiff (common functionality) +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +# +# Test a simple convert-like command. +# +# test_convert command infile outfile +macro(test_convert command infile outfile) + file(TO_NATIVE_PATH "${infile}" native_infile) + file(TO_NATIVE_PATH "${outfile}" native_outfile) + file(REMOVE "${outfile}") + message(STATUS Running "${MEMCHECK} ${command} ${native_infile} ${native_outfile}") + execute_process(COMMAND ${MEMCHECK} ${command} "${native_infile}" "${native_outfile}" + RESULT_VARIABLE TEST_STATUS) + if(TEST_STATUS) + message(FATAL_ERROR "Returned failed status ${TEST_STATUS}! Output (if any) is in \"${native_outfile}\"") + endif() +endmacro() + +# +# Test a simple convert-like command. +# +# test_convert command infile outfile +macro(test_convert_multi command infile outfile) + foreach(file ${infile}) + file(TO_NATIVE_PATH "${file}" native_file) + list(APPEND native_infile "${native_file}") + endforeach() + file(TO_NATIVE_PATH "${outfile}" native_outfile) + file(REMOVE "${outfile}") + message(STATUS Running "${MEMCHECK} ${command} ${native_infile} ${native_outfile}") + execute_process(COMMAND ${MEMCHECK} ${command} ${native_infile} "${native_outfile}" + RESULT_VARIABLE TEST_STATUS) + if(TEST_STATUS) + message(FATAL_ERROR "Returned failed status ${TEST_STATUS}! Output (if any) is in \"${native_outfile}\"") + endif() +endmacro() +# +# Test a simple command which sends output to stdout +# +# test_stdout command infile outfile +macro(test_stdout command infile outfile) + file(TO_NATIVE_PATH "${infile}" native_infile) + file(TO_NATIVE_PATH "${outfile}" native_outfile) + file(REMOVE "${outfile}") + message(STATUS "Running ${MEMCHECK} ${command} ${native_infile} > ${native_outfile}") + execute_process(COMMAND ${MEMCHECK} ${command} "${native_infile}" + OUTPUT_FILE "${outfile}" + RESULT_VARIABLE TEST_STATUS) + if(TEST_STATUS) + message(FATAL_ERROR "Returned failed status ${TEST_STATUS}! Output (if any) is in \"${native_outfile}") + endif() +endmacro() + +# +# Execute a simple command (e.g. tiffinfo) with one input file +# +# test_exec command infile +macro(test_reader command infile) + file(TO_NATIVE_PATH "${infile}" native_infile) + message(STATUS "Running ${MEMCHECK} ${command} ${native_infile}") + execute_process(COMMAND ${MEMCHECK} ${command} "${native_infile}" + RESULT_VARIABLE TEST_STATUS) + if(TEST_STATUS) + message(FATAL_ERROR "Returned failed status ${TEST_STATUS}! Output (if any) is in \"${native_outfile}") + endif() +endmacro() + +# +# Execute tiffinfo on a specified file to validate it +# +# tiffinfo_validate infile +macro(tiffinfo_validate file) + test_reader("${TIFFINFO};-D" "${file}") +endmacro() + +# Add the directory containing libtiff to the PATH (Windows only) +if(WIN32) + get_filename_component(LIBTIFF_DIR "${LIBTIFF}" DIRECTORY) + file(TO_NATIVE_PATH "${LIBTIFF_DIR}" LIBTIFF_DIR) + set(ENV{PATH} "${LIBTIFF_DIR};$ENV{PATH}") +endif() +if(CYGWIN) + get_filename_component(LIBTIFF_DIR "${LIBTIFF}" DIRECTORY) + file(TO_NATIVE_PATH "${LIBTIFF_DIR}" LIBTIFF_DIR) + set(ENV{PATH} "${LIBTIFF_DIR}:$ENV{PATH}") +endif() diff --git a/thirdparty/tiff-4.0.3/test/ascii_tag.c b/thirdparty/tiff-4.2.0/test/ascii_tag.c similarity index 97% rename from thirdparty/tiff-4.0.3/test/ascii_tag.c rename to thirdparty/tiff-4.2.0/test/ascii_tag.c index 58f02ebf..9a56d31d 100644 --- a/thirdparty/tiff-4.0.3/test/ascii_tag.c +++ b/thirdparty/tiff-4.2.0/test/ascii_tag.c @@ -1,5 +1,3 @@ -/* $Id: ascii_tag.c,v 1.7 2008/04/15 13:32:12 dron Exp $ */ - /* * Copyright (c) 2004, Andrey Kiselev * @@ -129,7 +127,7 @@ main() } /* Write dummy pixel data. */ - if (!TIFFWriteScanline(tif, buf, 0, 0) < 0) { + if (TIFFWriteScanline(tif, buf, 0, 0) == -1) { fprintf (stderr, "Can't write image data.\n"); goto failure; } diff --git a/thirdparty/tiff-4.0.3/test/check_tag.c b/thirdparty/tiff-4.2.0/test/check_tag.c similarity index 97% rename from thirdparty/tiff-4.0.3/test/check_tag.c rename to thirdparty/tiff-4.2.0/test/check_tag.c index 43011800..5750d683 100644 --- a/thirdparty/tiff-4.0.3/test/check_tag.c +++ b/thirdparty/tiff-4.2.0/test/check_tag.c @@ -1,5 +1,3 @@ -/* $Id: check_tag.c,v 1.3 2008/04/15 14:19:37 dron Exp $ */ - /* * Copyright (c) 2004, Andrey Kiselev * diff --git a/thirdparty/tiff-4.0.3/test/common.sh b/thirdparty/tiff-4.2.0/test/common.sh similarity index 90% rename from thirdparty/tiff-4.0.3/test/common.sh rename to thirdparty/tiff-4.2.0/test/common.sh index 643104b2..0219ab3a 100644 --- a/thirdparty/tiff-4.0.3/test/common.sh +++ b/thirdparty/tiff-4.2.0/test/common.sh @@ -7,15 +7,13 @@ SRCDIR=`cd $SRCDIR && pwd` TOPSRCDIR=`cd $srcdir/.. && pwd` TOOLS=`cd ../tools && pwd` IMAGES="${SRCDIR}/images" +REFS="${SRCDIR}/refs" # Aliases for built tools -BMP2TIFF=${TOOLS}/bmp2tiff FAX2PS=${TOOLS}/fax2ps FAX2TIFF=${TOOLS}/fax2tiff -GIF2TIFF=${TOOLS}/gif2tiff PAL2RGB=${TOOLS}/pal2rgb PPM2TIFF=${TOOLS}/ppm2tiff -RAS2TIFF=${TOOLS}/ras2tiff RAW2TIFF=${TOOLS}/raw2tiff RGB2YCBCR=${TOOLS}/rgb2ycbcr THUMBNAIL=${TOOLS}/thumbnail @@ -43,18 +41,16 @@ IMG_PALETTE_1C_8B=${IMAGES}/palette-1c-8b.tiff IMG_RGB_3C_16B=${IMAGES}/rgb-3c-16b.tiff IMG_RGB_3C_8B=${IMAGES}/rgb-3c-8b.tiff IMG_MINISBLACK_2C_8B_ALPHA=${IMAGES}/minisblack-2c-8b-alpha.tiff - -IMG_PALETTE_1C_8B_BMP=${IMAGES}/palette-1c-8b.bmp -IMG_RGB_3C_8B_BMP=${IMAGES}/rgb-3c-8b.bmp - -IMG_PALETTE_1C_8B_GIF=${IMAGES}/palette-1c-8b.gif +IMG_QUAD_LZW_COMPAT=${IMAGES}/quad-lzw-compat.tiff +IMG_LZW_SINGLE_STROP=${IMAGES}/lzw-single-strip.tiff IMG_MINISWHITE_1C_1B_PBM=${IMAGES}/miniswhite-1c-1b.pbm IMG_MINISBLACK_1C_8B_PGM=${IMAGES}/minisblack-1c-8b.pgm +IMG_RGB_3C_16B_PPM=${IMAGES}/rgb-3c-16b.ppm IMG_RGB_3C_8B_PPM=${IMAGES}/rgb-3c-8b.ppm # All uncompressed image files -IMG_UNCOMPRESSED="${IMG_MINISBLACK_1C_16B} ${IMG_MINISBLACK_1C_8B} ${IMG_MINISWHITE_1C_1B} ${IMG_PALETTE_1C_1B} ${IMG_PALETTE_1C_4B} ${IMG_PALETTE_1C_4B} ${IMG_PALETTE_1C_8B} ${IMG_RGB_3C_8B}" +IMG_UNCOMPRESSED="${IMG_MINISBLACK_1C_16B} ${IMG_MINISBLACK_1C_8B} ${IMG_MINISWHITE_1C_1B} ${IMG_PALETTE_1C_1B} ${IMG_PALETTE_1C_4B} ${IMG_PALETTE_1C_4B} ${IMG_PALETTE_1C_8B} ${IMG_RGB_3C_8B} ${IMG_RGB_3C_16B}" # # Test a simple convert-like command. diff --git a/thirdparty/tiff-4.0.3/test/custom_dir.c b/thirdparty/tiff-4.2.0/test/custom_dir.c similarity index 98% rename from thirdparty/tiff-4.0.3/test/custom_dir.c rename to thirdparty/tiff-4.2.0/test/custom_dir.c index 8e448306..3b3ad279 100644 --- a/thirdparty/tiff-4.0.3/test/custom_dir.c +++ b/thirdparty/tiff-4.2.0/test/custom_dir.c @@ -1,5 +1,3 @@ -/* $Id: custom_dir.c,v 1.2 2012-06-06 05:26:37 fwarmerdam Exp $ */ - /* * Copyright (c) 2012, Frank Warmerdam * @@ -108,7 +106,7 @@ main() } /* Write dummy pixel data. */ - if (!TIFFWriteScanline(tif, buf, 0, 0) < 0) { + if (TIFFWriteScanline(tif, buf, 0, 0) == -1) { fprintf (stderr, "Can't write image data.\n"); goto failure; } diff --git a/thirdparty/tiff-4.2.0/test/custom_dir_EXIF_231.c b/thirdparty/tiff-4.2.0/test/custom_dir_EXIF_231.c new file mode 100644 index 00000000..4c70e48f --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/custom_dir_EXIF_231.c @@ -0,0 +1,1398 @@ + +/* + * Copyright (c) 2012, Frank Warmerdam + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that (i) the above copyright notices and this permission notice appear in + * all copies of the software and related documentation, and (ii) the names of + * Sam Leffler and Silicon Graphics may not be used in any advertising or + * publicity relating to the software without the specific, prior written + * permission of Sam Leffler and Silicon Graphics. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR + * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF + * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +/* + * TIFF Library + * + * -- Module copied from custom_dir.c -- + *=========== Purpose =================================================================================== + * Extended and amended version for testing of EXIF 2.32, GPS and handling of custom fields. + * EXIF 2.32 and GPS are defined in amended files tif_dirinfo.c, tif_dirread.c, tiff.h, tiffio.h, tif_dir.h, tif_dir.c + * + *-- ATTENTION: After the upgrade with Rational2Double, the GPSTAG values are defined as double precision + * and need to be written and also read in double precision! + * In order to maintain this code for both cases, it is checked above if the TiffLibrary is + * compiled with the new interface with Rational2Double or still uses the old definitions, + * by setting blnIsRational2Double above. + * + */ + + +/*------------ + * This version writes the GPS and EXIF tags correctly, without additonal main-IFD and parameters! + * In contrary, custom_dir.c does write additional main-IFD and parameters to file. + -------------*/ + + +#define FOR_AUTO_TESTING +#ifdef FOR_AUTO_TESTING +/* Only for automake and CMake infrastructure the test should: + a.) delete any written testfiles when test passed (otherwise autotest will fail) + b.) goto failure, if any failure is detected, which is not necessary when test is initiated manually for debugging +*/ +#define GOTOFAILURE goto failure; +#define GOTOFAILURE_GPS goto failure; +#define GOTOFAILURE_ALL_EXIF goto failure; +#else +#define GOTOFAILURE +#define GOTOFAILURE_GPS +#define GOTOFAILURE_ALL_EXIF +#endif + + +#ifdef _MSC_VER +#pragma warning( disable : 4101) +#endif + +#include "tif_config.h" +#include +#include +#include +#include + +#ifdef HAVE_UNISTD_H +# include +#endif + +#include "tiffio.h" +#include "tiffiop.h" +#include "tif_dir.h" +#include "tifftest.h" + + + +int write_test_tiff(TIFF *tif, const char *filenameRead); + +static const char filename[] = "custom_dir_EXIF_231.tif"; +static const char filenameBigTiff[] = "custom_dir_EXIF_231_Big.tif"; + +#define SPP 3 /* Samples per pixel */ +const uint16 width = 1; +const uint16 length = 1; +const uint16 bps = 8; +const uint16 photometric = PHOTOMETRIC_RGB; +const uint16 rows_per_strip = 1; +const uint16 planarconfig = PLANARCONFIG_CONTIG; + + +int +main() +{ + TIFF *tif; + int ret, ret1, ret2; + + fprintf(stderr, "==== Test automatically if all EXIF and GPS tags are written/read correctly. ====\n"); + /* --- Test with Classic-TIFF ---*/ + /* delete file, if exists */ + ret = unlink(filename); + if (ret != 0 && errno != ENOENT) { + fprintf(stderr, "Can't delete test TIFF file %s.\n", filename); + } + + /* We write the main directory as a simple image. */ + tif = TIFFOpen(filename, "w+"); + if (!tif) { + fprintf(stderr, "Can't create test TIFF file %s.\n", filename); + return 1; + } + fprintf(stderr, "-------- Test with ClassicTIFF started ----------\n"); + ret1 = write_test_tiff(tif, filename); + + if (ret1 > 0) return(ret1); + + /*--- Test with BIG-TIFF ---*/ + /* delete file, if exists */ + ret = unlink(filenameBigTiff); + if (ret != 0 && errno != ENOENT) { + fprintf(stderr, "Can't delete test TIFF file %s.\n", filenameBigTiff); + } + + tif = TIFFOpen(filenameBigTiff, "w8"); + if (!tif) { + fprintf(stderr, "Can't create test TIFF file %s.\n", filenameBigTiff); + return 1; + } + fprintf(stderr, "\n\n-------- Test with BigTIFF started ----------\n"); + ret2 = write_test_tiff(tif, filenameBigTiff); + + if (ret2 > 0) return(ret2 + 10); else return(ret2); + +} /* main() */ + + + + + + + +int +write_test_tiff(TIFF *tif, const char *filenameRead) +{ + unsigned char buf[SPP] = { 0, 127, 255 }; + uint64 dir_offset = 0; + uint64 dir_offset_GPS = 0, dir_offset_EXIF = 0; + uint64 read_dir_offset = 0; + /*-- Additional variables --*/ + int retCode, retCode2; + unsigned char exifVersion[4] = {'0','2','3','1'}; /* EXIF 2.31 version is 4 characters of a string! */ + unsigned char gpsVersion[4] = {2,2,0,1}; /* GPS Version is 4 numbers! */ + unsigned char *pGpsVersion; + float auxFloat = 0.0f; + double auxDouble = 0.0; + char auxChar = 0; + uint32 auxUint32 = 0; + short auxShort=0; + long auxLong = 0; + void *pVoid; + int blnIsRational2Double; + + int i, j; + long nTags; + + const TIFFFieldArray* tFieldArray; + unsigned long tTag; + TIFFDataType tType; + short tWriteCount; + TIFFSetGetFieldType tSetFieldType; + char *tFieldName; + const TIFFField *fip; + + char blnFillGPSManually = 1; + +#define STRSIZE 1000 +#define N_SIZE 120 +#define VARIABLE_ARRAY_SIZE 6 + + /* -- Test data for writing -- */ + char auxCharArrayW[N_SIZE]; + short auxShortArrayW[N_SIZE]; + long auxLongArrayW[N_SIZE]; + float auxFloatArrayW[N_SIZE]; + double auxDoubleArrayW[N_SIZE]; + char auxTextArrayW[N_SIZE][STRSIZE]; + double auxDoubleArrayGPS1[3] = {1.0/7.0, 61.23456789012345, 62.0}; + double auxDoubleArrayGPS2[3] = {1.0/19.0, 88.34434, 15.12345678901234567890}; + double auxDoubleArrayGPSTime[3] = {22.0, 17.0, 15.3456789}; + double auxDoubleGPSAltitude = 3456.0; + double auxDoubleGPSDirection = 63.7; + float auxFloatArrayN1[3] = { 1.0f / 7.0f, 61.23456789012345f, 62.3f }; + float auxFloatArrayN2[3] = { -1.0f / 7.0f, -61.23456789012345f, -62.3f }; + + /* -- Variables for reading -- */ + uint16 count16 = 0; + union { + long Long; + short Short1; + short Short2[2]; + char Char[4]; + } unionLong; + union { + double dbl; + float flt1; + float flt2; + } auxDblUnion; + void *pVoidArray; + char *pAscii; + char auxCharArray[2*STRSIZE]; + short auxShortArray[2*N_SIZE]; + long auxLongArray[2*N_SIZE]; + float auxFloatArray[2*N_SIZE]; + double auxDoubleArray[2*N_SIZE]; + double dblDiff, dblDiffLimit; +#define RATIONAL_EPS (1.0/30000.0) /* reduced difference of rational values, approx 3.3e-5 */ + + /*-- Fill test data arrays for writing ----------- */ + for (i=0; iset_field_type; + if (tSetFieldType == TIFF_SETGET_DOUBLE) { + blnIsRational2Double = FALSE; + } else { + blnIsRational2Double = TRUE; + fprintf(stderr, "-- Rational2Double from TIFF tag detected --\n"); + } + +/*================== Write GPS and EXIF tags =====================*/ + + /*-- Set dummy EXIF/GPS tag in original tiff-structure in order to reserve space for final dir_offset value, */ + /* which is properly written at the end. */ + dir_offset = 0; /* Zero, in case no Custom-IFD is written */ + +#define WRITE_GPS_TAGS +#ifdef WRITE_GPS_TAGS + if (!TIFFSetField(tif, TIFFTAG_GPSIFD, dir_offset )) { + fprintf (stderr, "Can't write TIFFTAG_GPSIFD\n" ); + } +#endif + + /*------- And also do the same for the EXIF IFD tag here, because we have to save the main directory next ------*/ + /*-- Set dummy EXIF/GPS tag in original tiff-structure in order to reserve space for final dir_offset value, + * which is properly written at the end. + */ +#define WRITE_EXIF_TAGS +#ifdef WRITE_EXIF_TAGS + if (!TIFFSetField(tif, TIFFTAG_EXIFIFD, dir_offset )) { + fprintf (stderr, "Can't write TIFFTAG_EXIFIFD\n" ); + } +#endif + +#ifndef WRITEPIXELLAST + /*-- Write dummy pixel data. --*/ + if (TIFFWriteScanline(tif, buf, 0, 0) < 0) { + fprintf (stderr, "Can't write image data.\n"); + goto failure; + } +#endif + + +#ifdef WRITE_GPS_TAGS +#define READ_GPS_TAGS + /*================== Write GPS tags =====================*/ + + /*-- Save current tiff-directory to file before directory is changed. Otherwise it will be lost! */ + /* The tif-structure is overwritten/ freshly initialized by any "CreateDirectory" */ + /*retCode = TIFFCheckpointDirectory(tif);*/ /* does not cleanup Tiff-Structure */ + retCode = TIFFWriteDirectory(tif); /* cleanup Tiff-structure */ + + /*-- Now create a GPS directory. */ + if (TIFFCreateGPSDirectory(tif) != 0) { + fprintf (stderr, "TIFFCreateGPSDirectory() failed.\n" ); + goto failure; + } + + if (!TIFFSetField( tif, GPSTAG_VERSIONID, gpsVersion)) { + fprintf (stderr, "Can't write GPSTAG_VERSIONID\n" ); + goto failure; + } + + if (blnFillGPSManually) { + /*================= Write manually valid data to the GPS fields ==============*/ + if (!TIFFSetField( tif, GPSTAG_LATITUDEREF, "N\0")) { + fprintf (stderr, "Can't write GPSTAG_LATITUDEREF\n" ); + goto failure; + } + /*-- Unfortunately, Rational values are defined as SETGET_DOUBLE but are internally always stored as float. + * Single Rational values do not matter for writing, because TIFFSetField() uses va_arg() which performs "variables promotion" from type float to type double! + * However, for reading of Rational values ONLY float-variables are allowed - in contrary to the SETGET_DOUBLE specification at tiffFields[] in tif_dirinfo.c. + */ + /*-- ATTENTION: After the upgrade with Rational2Double, the GPSTAG values are defined as double precision + * and need to be written and also read in double precision! + * In order to maintain this code for both cases, it is checked above if the TiffLibrary is + * compiled with the new interface with Rational2Double or still uses the old definitions, + * by setting blnIsRational2Double above. + */ + if (blnIsRational2Double) { + fprintf(stderr, "-- GPS tags are written using Rational2Double --\n"); + } else { + fprintf(stderr, "-- GPS tags are written using standard --\n"); + } + if (!blnIsRational2Double) { + for (j = 0; j < 3; j++) auxFloatArray[j] = (float)auxDoubleArrayGPS1[j]; + if (!TIFFSetField(tif, GPSTAG_LATITUDE, auxFloatArray)) { + fprintf(stderr, "Can't write GPSTAG_LATITUDE\n"); + goto failure; + } + } else { + /* Rational2Double interface for GPSTAG */ + if (!TIFFSetField(tif, GPSTAG_LATITUDE, auxDoubleArrayGPS1)) { + fprintf(stderr, "Can't write GPSTAG_LATITUDE\n"); + goto failure; + } + } + if (!TIFFSetField( tif, GPSTAG_LONGITUDEREF, "W\0")) { + fprintf (stderr, "Can't write GPSTAG_LONGITUDEREF\n" ); + goto failure; + } + if (!blnIsRational2Double) { + for (j=0; j<3; j++) auxFloatArray[j] = (float)auxDoubleArrayGPS2[j]; + if (!TIFFSetField( tif, GPSTAG_LONGITUDE, auxFloatArray)) { + fprintf (stderr, "Can't write GPSTAG_LONGITUDE\n" ); + goto failure; + } + } else { + /* Rational2Double interface for GPSTAG */ + if (!TIFFSetField(tif, GPSTAG_LONGITUDE, auxDoubleArrayGPS2)) { + fprintf(stderr, "Can't write GPSTAG_LATITUDE\n"); + goto failure; + } + } + /*-- AltitudeRef: default is above sea level!! */ + if (!TIFFSetField( tif, GPSTAG_ALTITUDEREF, 0)) { + fprintf (stderr, "Can't write GPSTAG_ALTITUDEREF\n" ); + goto failure; + } + if (!TIFFSetField( tif, GPSTAG_ALTITUDE, auxDoubleGPSAltitude)) { + fprintf (stderr, "Can't write GPSTAG_ALTITUDE\n" ); + goto failure; + } + /*-- TimeStamp is only hh:mm:ss. See also DateTime string */ + if (!TIFFSetField( tif, GPSTAG_TIMESTAMP, auxDoubleArrayGPSTime)) { + fprintf (stderr, "Can't write GPSTAG_TIMESTAMP\n" ); + goto failure; + } + if (!TIFFSetField( tif, GPSTAG_DATESTAMP, "2012:11:04")) { + fprintf (stderr, "Can't write GPSTAG_DATESTAMP\n" ); + goto failure; + } + + if (!TIFFSetField( tif, GPSTAG_IMGDIRECTIONREF, "T\0")) { + fprintf (stderr, "Can't write GPSTAG_IMGDIRECTIONREF\n" ); + goto failure; + } + if (!TIFFSetField( tif, GPSTAG_IMGDIRECTION, auxDoubleGPSDirection)) { + fprintf (stderr, "Can't write GPSTAG_IMGDIRECTION\n" ); + goto failure; + } + + /*-- Type TIFF_UNDEFINED */ + if (!TIFFSetField( tif, GPSTAG_PROCESSINGMETHOD, 3, &auxCharArrayW[10])) { + fprintf (stderr, "Can't write GPSTAG_PROCESSINGMETHOD\n" ); + goto failure; + } + if (!TIFFSetField( tif, GPSTAG_AREAINFORMATION, 4, &auxCharArrayW[20])) { + fprintf (stderr, "Can't write GPSTAG_AREAINFORMATION\n" ); + goto failure; + } + + /*-- PSTAG_DIFFERENTIAL , 1, 1, TIFF_SHORT , 0, TIFF_SETGET_UINT16 */ + if (!TIFFSetField( tif, GPSTAG_DIFFERENTIAL, auxShortArrayW[5])) { + fprintf (stderr, "Can't write GPSTAG_DIFFERENTIAL\n" ); + goto failure; + } + + /* GPSTAG_GPSHPOSITIONINGERROR , 1, 1, TIFF_RATIONAL , 0, TIFF_SETGET_DOUBLE but here written in float-precision */ +#define GPSHPOSITIONINGERROR_VAL 0.369 + auxFloat = (float)GPSHPOSITIONINGERROR_VAL; + if (!TIFFSetField( tif, GPSTAG_GPSHPOSITIONINGERROR, auxFloat)) { + fprintf (stderr, "Can't write GPSTAG_GPSHPOSITIONINGERROR\n" ); + goto failure; + } + + } else { + /*================= Write arbitrary data to the GPS fields ==============*/ + + /*-- Get array, where GPS tag fields are defined --*/ + tFieldArray = _TIFFGetGpsFields(); + nTags = tFieldArray->count; + + /*-- TODO: fill in the for / switch part of EXIF writing, when finished and tested!! */ + + } /*-- if (blnFillGPSManually) --*/ + + + + + /*-- GPS - write custom directory GPS into file...---*/ + /* (Get back the offset of GPS directory) */ + if (!TIFFWriteCustomDirectory( tif, &dir_offset_GPS )) { + fprintf (stderr, "TIFFWriteCustomDirectory() with GPS failed.\n"); + goto failure; + } + + /*--- CheckpointDirectory at this place generates a second Main-IFD!!! */ + /* retCode = TIFFCheckpointDirectory(tif); */ + + /*-- Set / reload previously saved main directory from file ---*/ + if (!TIFFSetDirectory(tif, 0)) { + fprintf (stderr, "TIFFSetDirectory() within GPS failed.\n"); + goto failure; + } + + /*-- Write GPS tag reference / offset into GPSIFD tag in main directory --*/ + if (!TIFFSetField(tif, TIFFTAG_GPSIFD, dir_offset_GPS )) { + fprintf (stderr, "Can't write TIFFTAG_GPSIFD\n"); + goto failure; + } + + /*=============== END writing GPS tags ==========================*/ +#endif /*-- WRITE_GPS_TAGS --*/ + + +/*================== Write EXIF 2.31 tags =====================*/ + + /*-- Set dummy EXIF/GPS tag in original tiff-structure in order to reserve space for final dir_offset value, */ + /* which is properly written at the end.*/ + /*- We did this already above together with the GPS IFD-tag. Otherwise we would do this here !! --------*/ + /* if (!TIFFSetField(tif, TIFFTAG_EXIFIFD, dir_offset )) { + fprintf (stderr, "Can't write TIFFTAG_EXIFIFD\n" ); + } + */ + +#ifdef WRITE_EXIF_TAGS +#define READ_EXIF_TAGS + /*-- Save current tiff-directory to file before directory is changed. Otherwise it will be lost! + * The tif-structure is overwritten/ freshly initialized by any "CreateDirectory" + */ + + /*----- What is needed here ??? ---- + * In custom_dir.c only TIFFFreeDirectory( tif ); is used to set fields of another Sub-Directory + * TIFFFreeDirectory(tif); *-- Release storage associated with a directory, especially custom-fields. + *-- Using only TIFFFreeDirectory() here leads to an error!! + *-- Using here TIFFCheckpointDirectory() leads to an additional Main-IFD ?? + */ + /*retCode = TIFFCheckpointDirectory(tif);*/ /* does not cleanup Tiff-Structure */ + retCode = TIFFWriteDirectory(tif); /* cleanup Tiff-structure */ + + /*-- Now create an EXIF directory. */ + if (TIFFCreateEXIFDirectory(tif) != 0) { + fprintf (stderr, "TIFFCreateEXIFDirectory() failed.\n" ); + goto failure; + } + +#define WRITE_ALL_EXIF_TAGS +#ifdef WRITE_ALL_EXIF_TAGS +#define READ_ALL_EXIF_TAGS + /*================= EXIF: Write arbitrary data to the EXIF fields ==============*/ + /*-- Get array, where EXIF tag fields are defined + * EXIF tags are written automatically with the defined precision according to its tSetFieldType using the code below --*/ + tFieldArray = _TIFFGetExifFields(); + nTags = tFieldArray->count; + + for (i=0; ifields[i].field_tag; + tType = tFieldArray->fields[i].field_type; /* e.g. TIFF_RATIONAL */ + tWriteCount = tFieldArray->fields[i].field_writecount; + tSetFieldType = tFieldArray->fields[i].set_field_type; /* e.g. TIFF_SETGET_C0_FLOAT */ + tFieldName = tFieldArray->fields[i].field_name; + pVoid = NULL; + + /*-- dependent on set_field_type write value --*/ + switch (tSetFieldType) + { + case TIFF_SETGET_ASCII: + /* Either the stringlength is defined as a fixed length in .field_writecount or a NULL-terminated string is used. */ + /* Shorter strings than in auxTextArraxW need a NULL-termination. Therefore copy the string. */ + if (tWriteCount > 0) auxLong = tWriteCount-1; else auxLong = (long)strlen(auxTextArrayW[i])-1; + strncpy(auxCharArray, auxTextArrayW[i], auxLong); + auxCharArray[auxLong] = 0; + if (!TIFFSetField( tif, tTag, auxCharArray)) { + fprintf (stderr, "Can't write %s\n", tFieldArray->fields[i].field_name); + goto failure; + } + break; + case TIFF_SETGET_UINT8: + case TIFF_SETGET_UINT16: + case TIFF_SETGET_UINT32: + case TIFF_SETGET_IFD8: + case TIFF_SETGET_INT: + /*-- All those can be written with char, short or long parameter. Only value range should be in line. */ + if (!TIFFSetField( tif, tTag, auxLongArrayW[i])) { + fprintf (stderr, "Can't write %s\n", tFieldArray->fields[i].field_name); + goto failure; + } + break; + case TIFF_SETGET_SINT8: + case TIFF_SETGET_SINT16: + case TIFF_SETGET_SINT32: + /*-- All those can be written with char, short or long parameter. Only value range should be in line. */ + if (!TIFFSetField( tif, tTag, -1.0*auxLongArrayW[i])) { + fprintf (stderr, "Can't write %s\n", tFieldArray->fields[i].field_name); + goto failure; + } + break; + case TIFF_SETGET_FLOAT: + case TIFF_SETGET_DOUBLE: + if (tWriteCount == 1) { + /*-- All single values can be written with float or double parameter. Only value range should be in line. */ + if (!TIFFSetField( tif, tTag, auxDoubleArrayW[i])) { + fprintf (stderr, "Can't write %s\n", tFieldArray->fields[i].field_name); + goto failure; + } + } else { + fprintf (stderr, "WriteCount for .set_field_type %d should be 1! %s\n", tSetFieldType, tFieldArray->fields[i].field_name); + } + break; + case TIFF_SETGET_C0_FLOAT: + case TIFF_SETGET_C0_DOUBLE: + case TIFF_SETGET_C16_FLOAT: + case TIFF_SETGET_C16_DOUBLE: + case TIFF_SETGET_C32_FLOAT: + case TIFF_SETGET_C32_DOUBLE: + /* _Cxx_ just defines the size of the count parameter for the array as C0=char, C16=short or C32=long */ + /*-- Check, if it is a single parameter, a fixed array or a variable array */ + if (tWriteCount == 1) { + fprintf (stderr, "WriteCount for .set_field_type %d should be -1 or greather than 1! %s\n", tSetFieldType, tFieldArray->fields[i].field_name); + } else { + /*-- Either fix or variable array --*/ + /* For arrays, distinguishing between float or double is essential, even for writing */ + if (tSetFieldType == TIFF_SETGET_C0_FLOAT || tSetFieldType == TIFF_SETGET_C16_FLOAT || tSetFieldType == TIFF_SETGET_C32_FLOAT) + pVoid = &auxFloatArrayW[i]; else pVoid = &auxDoubleArrayW[i]; + /* Now decide between fixed or variable array */ + if (tWriteCount > 1) { + /* fixed array with needed arraysize defined in .field_writecount */ + if (!TIFFSetField( tif, tTag, pVoid)) { + fprintf (stderr, "Can't write %s\n", tFieldArray->fields[i].field_name); + goto failure; + } + } else { + /* special treatment of variable array */ + /* for test, use always arraysize of VARIABLE_ARRAY_SIZE */ + if (!TIFFSetField( tif, tTag, VARIABLE_ARRAY_SIZE, pVoid)) { + fprintf (stderr, "Can't write %s\n", tFieldArray->fields[i].field_name); + goto failure; + } + } + } + break; + case TIFF_SETGET_C0_UINT8: + case TIFF_SETGET_C0_SINT8: + case TIFF_SETGET_C16_UINT8: + case TIFF_SETGET_C16_SINT8: + case TIFF_SETGET_C32_UINT8: + case TIFF_SETGET_C32_SINT8: + /* For arrays, distinguishing between float or double is essential, even for writing */ + pVoid = &auxCharArrayW[i]; + case TIFF_SETGET_C0_UINT16: + case TIFF_SETGET_C0_SINT16: + case TIFF_SETGET_C16_UINT16: + case TIFF_SETGET_C16_SINT16: + case TIFF_SETGET_C32_UINT16: + case TIFF_SETGET_C32_SINT16: + if (pVoid == NULL) pVoid = &auxShortArrayW[i]; + case TIFF_SETGET_C0_UINT32: + case TIFF_SETGET_C0_SINT32: + case TIFF_SETGET_C16_UINT32: + case TIFF_SETGET_C16_SINT32: + case TIFF_SETGET_C32_UINT32: + case TIFF_SETGET_C32_SINT32: + if (pVoid == NULL) pVoid = &auxLongArrayW[i]; + /* _Cxx_ just defines the size of the count parameter for the array as C0=char, C16=short or C32=long */ + /*-- Check, if it is a single parameter, a fixed array or a variable array */ + if (tWriteCount == 1) { + fprintf (stderr, "WriteCount for .set_field_type %d should be -1 or greather than 1! %s\n", tSetFieldType, tFieldArray->fields[i].field_name); + } else { + /*-- Either fix or variable array --*/ + /* Now decide between fixed or variable array */ + if (tWriteCount > 1) { + /* fixed array with needed arraysize defined in .field_writecount */ + if (!TIFFSetField( tif, tTag, pVoid)) { + fprintf (stderr, "Can't write %s\n", tFieldArray->fields[i].field_name); + goto failure; + } + } else { + /* special treatment of variable array */ + /* for test, use always arraysize of VARIABLE_ARRAY_SIZE */ + if (!TIFFSetField( tif, tTag, VARIABLE_ARRAY_SIZE, pVoid)) { + fprintf (stderr, "Can't write %s\n", tFieldArray->fields[i].field_name); + goto failure; + } + } + } + break; + default: + fprintf (stderr, "SetFieldType %d not defined within writing switch for %s.\n", tSetFieldType, tFieldName); + }; /*-- switch() --*/ + } /*-- for() --*/ + /*================= EXIF: END Writing arbitrary data to the EXIF fields END END END ==============*/ +#endif /*-- WRITE_ALL_EXIF_TAGS --*/ + + /*--- Set valid EXIF version, which is a 4 byte string --*/ + if (!TIFFSetField( tif, EXIFTAG_EXIFVERSION, exifVersion)) { + fprintf (stderr, "Can't write EXIFTAG_EXIFVERSION\n" ); + goto failure; + } + + + /*-- EXIF - write custom directory EXIF into file...---*/ + /* (Get back the offset of EXIF directory) */ + if (!TIFFWriteCustomDirectory( tif, &dir_offset_EXIF )) { + fprintf (stderr, "TIFFWriteCustomDirectory() with EXIF failed.\n"); + goto failure; + } + + /*-- Go back to the first (main) directory, and set correct value of the EXIFIFD pointer. */ + /* (directory is reloaded from file!) */ + TIFFSetDirectory(tif, 0); + TIFFSetField(tif, TIFFTAG_EXIFIFD, dir_offset_EXIF ); +#endif /*-- WRITE_EXIF_TAGS --*/ + +#ifdef WRITEPIXELLAST + /*-- Write dummy pixel data. --*/ + if (TIFFWriteScanline(tif, buf, 0, 0) < 0) { + fprintf (stderr, "Can't write image data.\n"); + goto failure; + } +#endif + /*-- Write directory to file --*/ + /* Always WriteDirectory before using/creating another directory. */ + /* Not necessary before TIFFClose(), however, TIFFClose() uses TIFFReWriteDirectory(), which forces directory to be written at another location. */ + retCode = TIFFWriteDirectory(tif); + + /*-- Write File to disk and close file --*/ + /* TIFFClose() uses TIFFReWriteDirectory(), which forces directory to be written at another location. */ + /* Therefore, better use TIFFWriteDirectory() before. */ + TIFFClose(tif); + + fprintf (stderr, "-------- Continue Test ---------- reading ...\n"); + +/*========================= READING ============= READING ========================================*/ + /* Ok, now test whether we can read written values correctly. */ + tif = TIFFOpen(filenameRead, "r"); + + + /*-- Read some parameters out of the main directory --*/ + + /*-- IMAGEWIDTH and -LENGTH are defined as TIFF_SETGET_UINT32 */ + retCode = TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &auxUint32 ); + if (!retCode) { fprintf(stderr, "Can't read %s\n", "TIFFTAG_IMAGEWIDTH"); } + if (auxUint32 != width) { + fprintf (stderr, "Read value of IMAGEWIDTH %d differs from set value %d\n", auxUint32, width); + } + retCode = TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &auxUint32 ); + if (!retCode) { fprintf(stderr, "Can't read %s\n", "TIFFTAG_IMAGELENGTH"); } + if (auxUint32 != width) { + fprintf (stderr, "Read value of TIFFTAG_IMAGELENGTH %d differs from set value %d\n", auxUint32, length); + } + +#ifdef ADDITIONAL_TAGS + /*- TIFFTAG_PIXAR_FOVCOT is a FLOAT parameter of type FIELD_CUSTOM !! */ + retCode = TIFFGetField(tif, TIFFTAG_PIXAR_FOVCOT, &auxFloat ); + if (!retCode) { fprintf(stderr, "Can't read %s\n", "TIFFTAG_PIXAR_FOVCOT"); } + if (auxFloat != (float)PIXAR_FOVCOT_VAL) { + fprintf (stderr, "Read value of TIFFTAG_PIXAR_FOVCOT %f differs from set value %f\n", auxFloat, PIXAR_FOVCOT_VAL); + } + + /* - TIFFTAG_BESTQUALITYSCALE is a Rational parameter, FIELD_CUSTOM and TIFF_SETGET_FLOAT */ + retCode = TIFFGetField(tif, TIFFTAG_BESTQUALITYSCALE, &auxFloat ); + if (!retCode) { fprintf(stderr, "Can't read %s\n", "TIFFTAG_BESTQUALITYSCALE"); } + if (auxFloat != (float)BESTQUALITYSCALE_VAL) { + fprintf (stderr, "Read value of TIFFTAG_BESTQUALITYSCALE %f differs from set value %f\n", auxFloat, BESTQUALITYSCALE_VAL); + } + + /* - TIFFTAG_BASELINENOISE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT */ + retCode = TIFFGetField(tif, TIFFTAG_BASELINENOISE, &auxDblUnion.dbl); + if (!retCode) { fprintf(stderr, "Can't read %s\n", "TIFFTAG_BASELINENOISE"); } + if (auxDblUnion.flt1 != (float)BESTQUALITYSCALE_VAL) { + fprintf(stderr, "Read float value of TIFFTAG_BASELINENOISE %f differs from set value %f\n", auxDblUnion.flt1, BESTQUALITYSCALE_VAL); + } + + + /*- Variable Array: TIFFTAG_DECODE is a SRATIONAL parameter TIFF_SETGET_C16_FLOAT type FIELD_CUSTOM with passcount=1 and variable length of array. */ + retCode = TIFFGetField(tif, TIFFTAG_DECODE, &count16, &pVoidArray ); + if (!retCode) { fprintf(stderr, "Can't read %s\n", "TIFFTAG_DECODE"); } + /*- pVoidArray points to a Tiff-internal temporary memorypart. Thus, contents needs to be saved. */ + memcpy(&auxFloatArray, pVoidArray,(count16 * sizeof(auxFloatArray[0]))); + for (i=0; i fabs(dblDiffLimit)) { + fprintf (stderr, "Read value %d of TIFFTAG_DECODE Array %f differs from set value %f\n", i, auxFloatArray[i], auxFloatArrayN2[i]); + } + } + + retCode = TIFFGetField(tif, TIFFTAG_BLACKLEVEL, &count16, &pVoidArray); + if (!retCode) { fprintf(stderr, "Can't read %s\n", "TIFFTAG_BLACKLEVEL"); } + /*- pVoidArray points to a Tiff-internal temporary memorypart. Thus, contents needs to be saved. */ + memcpy(&auxFloatArray, pVoidArray, (count16 * sizeof(auxFloatArray[0]))); + for (i = 0; i fabs(dblDiffLimit)) { + fprintf(stderr, "Read value %d of TIFFTAG_BLACKLEVEL Array %f differs from set value %f\n", i, auxFloatArray[i], auxFloatArrayN1[i]); + } + } + + /*- Fixed Array: TIFFTAG_DEFAULTCROPSIZE, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT */ + retCode = TIFFGetField(tif, TIFFTAG_DEFAULTCROPSIZE, &pVoidArray); + if (!retCode) { fprintf(stderr, "Can't read %s\n", "TIFFTAG_DEFAULTCROPSIZE"); } + /*- pVoidArray points to a Tiff-internal temporary memorypart. Thus, contents needs to be saved. */ + memcpy(&auxFloatArray, pVoidArray, (2 * sizeof(auxFloatArray[0]))); + for (i = 0; i < 2; i++) { + dblDiffLimit = RATIONAL_EPS * auxFloatArrayW[i]; + dblDiff = auxFloatArray[i] - auxFloatArrayW[i]; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + fprintf(stderr, "Read value %d of TIFFTAG_DEFAULTCROPSIZE Array %f differs from set value %f\n", i, auxFloatArray[i], auxFloatArrayW[i]); + } + } + +#endif /*-- ADDITIONAL_TAGS --*/ + + +#ifdef READ_GPS_TAGS +/*================== Reading GPS tags =====================*/ + /*-- First get offset to GPS-directory and set it active (this will destroy previously main directory fields in memory!) */ + retCode = TIFFGetField(tif, TIFFTAG_GPSIFD, &read_dir_offset ); + if (!retCode) {fprintf(stderr, "Can't read %s\n", "TIFFTAG_GPSIFD"); } + retCode = TIFFReadGPSDirectory(tif, read_dir_offset); + if (!retCode) { fprintf(stderr, "Can't read %s\n", "TIFFReadGPSDirectory()"); } + + /*-- Now read some parameters from GPS-directory --*/ + + /*-- Fixed Array: GPS-Version is a fixed array (of 4 characters) */ + retCode = TIFFGetField(tif, GPSTAG_VERSIONID, &pGpsVersion); + if (!retCode) { fprintf(stderr, "Can't read %s\n", "GPSTAG_VERSIONID"); } + else { + memcpy(auxCharArray, pGpsVersion, sizeof(gpsVersion)); + for (i = 0; i < 4; i++) { + if (auxCharArray[i] != pGpsVersion[i]) { + fprintf(stderr, "Read value %d of GPSTAG_VERSIONID %d differs from set value %d\n", i, auxCharArray[i], pGpsVersion[i]); + } + } + } + /*-- LATITUDEREF is a fixed String of one character plus ending zero. */ + retCode = TIFFGetField(tif, GPSTAG_LATITUDEREF, &pAscii); + if (!retCode) { fprintf(stderr, "Can't read %s\n", "GPSTAG_LATITUDEREF"); } + retCode2 = strncmp("N", pAscii, 1); + if (retCode2 != 0) { + fprintf (stderr, "Read value %d of GPSTAG_LATITUDEREF %s differs from set value %s\n", i, "N", pAscii); + } + + /*-- Fixed Array: Latitude is an array of 3 Rational-values. TIFFGetField() returns a pointer to a temporary float-/double-array. */ + /*-- ATTENTION: After the upgrade with Rational2Double, the GPSTAG values are defined as double precision + * and need to be written and also read in double precision! + * In order to maintain this code for both cases, it is checked above if the TiffLibrary is + * compiled with the new interface with Rational2Double or still uses the old definitions, + * by setting blnIsRational2Double above. + */ + if (blnIsRational2Double) { + fprintf(stderr, "-- GPS tags are read using Rational2Double --\n"); + } else { + fprintf(stderr, "-- GPS tags are read using standard --\n"); + } + retCode = TIFFGetField(tif, GPSTAG_LATITUDE, &pVoidArray); + if (!retCode) { fprintf(stderr, "Can't read %s\n", "GPSTAG_LATITUDE"); } + if (!blnIsRational2Double) { + /* Reset arrays for debugging purpose first */ + memset(auxFloatArray, 0, sizeof(auxFloatArray)); + memcpy(auxFloatArray, pVoidArray, 3*sizeof(float)); + /* for comparison copy to doubleArray */ + for (i=0; i<3; i++) auxDoubleArray[i] = (double)auxFloatArray[i]; + } else { + /* Rational2Double interface for GPSTAG reads double array */ + memset(auxDoubleArray, 0, sizeof(auxDoubleArray)); + memcpy(auxDoubleArray, pVoidArray, 3 * sizeof(double)); + } + for (i=0; i<3; i++) { + dblDiffLimit = RATIONAL_EPS*auxDoubleArrayGPS1[i]; + dblDiff = auxDoubleArray[i] - auxDoubleArrayGPS1[i]; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + fprintf (stderr, "Read value %d of GPSTAG_LATITUDE %f differs from set value %f\n", i, auxDoubleArray[i], auxDoubleArrayGPS1[i]); + } + } + + /*-- LONGITUDEREF is a fixed String of one character plus ending zero. */ + retCode = TIFFGetField(tif, GPSTAG_LONGITUDEREF, &pAscii); + if (!retCode) { fprintf(stderr, "Can't read %s\n", "GPSTAG_LONGITUDEREF"); } + retCode2 = strncmp("W", pAscii, 1); + if (retCode2 != 0) { + fprintf(stderr, "Read value %d of GPSTAG_LONGITUDEREF %s differs from set value %s\n", i, "W", pAscii); + } + + retCode = TIFFGetField(tif, GPSTAG_LONGITUDE, &pVoidArray); + if (!retCode) { fprintf(stderr, "Can't read %s\n", "GPSTAG_LONGITUDE"); } + if (!blnIsRational2Double) { + /* Reset arrays for debugging purpose first */ + memset(auxFloatArray, 0, sizeof(auxFloatArray)); + memcpy(auxFloatArray, pVoidArray, 3 * sizeof(float)); + /* for comparison copy to doubleArray */ + for (i = 0; i < 3; i++) auxDoubleArray[i] = (double)auxFloatArray[i]; + } else { + /* Rational2Double interface for GPSTAG reads double array */ + memset(auxDoubleArray, 0, sizeof(auxDoubleArray)); + memcpy(auxDoubleArray, pVoidArray, 3 * sizeof(double)); + } + for (i = 0; i < 3; i++) { + dblDiffLimit = RATIONAL_EPS * auxDoubleArrayGPS2[i]; + dblDiff = auxDoubleArray[i] - auxDoubleArrayGPS2[i]; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + fprintf(stderr, "Read value %d of GPSTAG_LONGITUDE %f differs from set value %f\n", i, auxDoubleArray[i], auxDoubleArrayGPS2[i]); + } + } + + /* TIFF_RATIONAL, TIFF_SETGET_DOUBLE */ + if (!TIFFGetField(tif, GPSTAG_ALTITUDE, &auxDblUnion.dbl)) { + fprintf(stderr, "Can't read GPSTAG_ALTITUDE\n"); + GOTOFAILURE_GPS + } + if (blnIsRational2Double) { + /* New interface allows also double precision for TIFF_RATIONAL */ + auxDouble = auxDblUnion.dbl; + } else { + /* Old interface reads TIFF_RATIONAL defined as TIFF_SETGET_DOUBLE alwasy as FLOAT */ + auxDouble = (double)auxDblUnion.flt1; + } + /* compare read values with written ones */ + dblDiffLimit = RATIONAL_EPS * auxDoubleGPSAltitude; + dblDiff = auxDouble - auxDoubleGPSAltitude; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + fprintf(stderr, "Read value of GPSTAG_ALTITUDE %f differs from set value %f\n", auxDouble, auxDoubleGPSAltitude); + GOTOFAILURE_GPS + } + + /*-- TimeStamp is only hh:mm:ss. See also DateTime string 3, TIFF_RATIONAL, TIFF_SETGET_C0_DOUBLE */ + retCode = TIFFGetField(tif, GPSTAG_TIMESTAMP, &pVoidArray); + if (!retCode) { fprintf(stderr, "Can't read %s\n", "GPSTAG_TIMESTAMP"); } + if (!blnIsRational2Double) { + /* Reset arrays for debugging purpose first */ + memset(auxFloatArray, 0, sizeof(auxFloatArray)); + memcpy(auxFloatArray, pVoidArray, 3 * sizeof(float)); + /* for comparison copy to doubleArray */ + for (i = 0; i < 3; i++) auxDoubleArray[i] = (double)auxFloatArray[i]; + } else { + /* Rational2Double interface for GPSTAG reads double array */ + memset(auxDoubleArray, 0, sizeof(auxDoubleArray)); + memcpy(auxDoubleArray, pVoidArray, 3 * sizeof(double)); + } + for (i = 0; i < 3; i++) { + dblDiffLimit = RATIONAL_EPS * auxDoubleArrayGPSTime[i]; + dblDiff = auxDoubleArray[i] - auxDoubleArrayGPSTime[i]; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + fprintf(stderr, "Read value %d of GPSTAG_TIMESTAMP %f differs from set value %f\n", i, auxDoubleArray[i], auxDoubleArrayGPS2[i]); + GOTOFAILURE_GPS + } + } + + /* GPSTAG_IMGDIRECTION --- TIFF_RATIONAL, TIFF_SETGET_DOUBLE */ + if (!TIFFGetField(tif, GPSTAG_IMGDIRECTION, &auxDblUnion.dbl)) { + fprintf(stderr, "Can't read GPSTAG_IMGDIRECTION\n"); + GOTOFAILURE_GPS + } + if (blnIsRational2Double) { + /* New interface allows also double precision for TIFF_RATIONAL */ + auxDouble = auxDblUnion.dbl; + } else { + /* Old interface reads TIFF_RATIONAL defined as TIFF_SETGET_DOUBLE alwasy as FLOAT */ + auxDouble = (double)auxDblUnion.flt1; + } + /* compare read values with written ones */ + dblDiffLimit = RATIONAL_EPS * auxDoubleGPSDirection; + dblDiff = auxDouble - auxDoubleGPSDirection; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + fprintf(stderr, "Read value of GPSTAG_IMGDIRECTION %f differs from set value %f\n", auxDouble, auxDoubleGPSDirection); + GOTOFAILURE_GPS + } + + /*-- GPSTAG_DIFFERENTIAL , 1, 1, TIFF_SHORT , 0, TIFF_SETGET_UINT16 */ + retCode = TIFFGetField(tif, GPSTAG_DIFFERENTIAL, &auxShort); + if (!retCode) { fprintf(stderr, "Can't read %s\n", "GPSTAG_DIFFERENTIAL"); } + if (auxShort != auxShortArrayW[5]) { + fprintf(stderr, "Read value of GPSTAG_DIFFERENTIAL %d differs from set value %d\n", auxShort, auxShortArrayW[5]); + GOTOFAILURE_GPS + } + + /*-- GPSHPOSITIONINGERROR - new tag for EXIF 2.31 --*/ + if (!TIFFGetField(tif, GPSTAG_GPSHPOSITIONINGERROR, &auxDblUnion.dbl)) { + fprintf(stderr, "Can't read GPSTAG_GPSHPOSITIONINGERROR\n"); + GOTOFAILURE_GPS + } + if (blnIsRational2Double) { + /* New interface allows also double precision for TIFF_RATIONAL */ + auxDouble = auxDblUnion.dbl; + } else { + /* Old interface reads TIFF_RATIONAL defined as TIFF_SETGET_DOUBLE alwasy as FLOAT */ + auxDouble = (double)auxDblUnion.flt1; + } + /* compare read values with written ones */ + auxFloat = (float)GPSHPOSITIONINGERROR_VAL; + dblDiffLimit = RATIONAL_EPS * auxFloat; + dblDiff = auxDouble - auxFloat; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + fprintf(stderr, "Read value of GPSTAG_GPSHPOSITIONINGERROR %f differs from set value %f\n", auxDouble, auxFloat); + GOTOFAILURE_GPS + } + + /*=============== END reading GPS tags ==========================*/ +#endif /*-- READ_GPS_TAGS --*/ + + + +/*================== Reading EXIF 2.31 tags =====================*/ + + /*--- Firstly, get EXIF directory offset from main directory. */ + + /*-- Go back to the first (main) directory, and get value of the EXIFIFD directory- offset. */ + /* (directory is reloaded from file!) */ + TIFFSetDirectory(tif, 0); + retCode = TIFFGetField(tif, TIFFTAG_EXIFIFD, &read_dir_offset ); + +#ifdef READ_EXIF_TAGS + /*-- Now read EXIF directory from file into memory --*/ + retCode = TIFFReadEXIFDirectory(tif, read_dir_offset); + + /*-- Now get some parameters from EXIF-directory (already read into memory) --*/ + retCode = TIFFGetField(tif, EXIFTAG_EXIFVERSION, &pAscii); + + +#ifdef READ_ALL_EXIF_TAGS + /*-- Get array, where EXIF tag fields are defined --*/ + tFieldArray = _TIFFGetExifFields(); + nTags = tFieldArray->count; + /*-- Check, if the TiffLibrary is compiled with the new interface with Rational2Double or still uses the old definitions. */ + /* tif points to EXIF tags, so TIFFFindField() can only access the EXIF tag fields */ + fip = TIFFFindField(tif, EXIFTAG_EXPOSURETIME, TIFF_ANY); + tSetFieldType = fip->set_field_type; + if (tSetFieldType == TIFF_SETGET_DOUBLE) { + blnIsRational2Double = FALSE; + fprintf(stderr, "-- EXIF tags read with standard --\n"); + } else { + blnIsRational2Double = TRUE; + fprintf(stderr, "-- Rational2Double for reading EXIF tags detected --\n"); + } + + for (i=0; ifields[i].field_tag; + tType = tFieldArray->fields[i].field_type; /* e.g. TIFF_RATIONAL */ + tWriteCount = tFieldArray->fields[i].field_writecount; + tSetFieldType = tFieldArray->fields[i].set_field_type; /* e.g. TIFF_SETGET_C0_FLOAT */ + tFieldName = tFieldArray->fields[i].field_name; + pVoid = NULL; + + /*-- dependent on set_field_type read value --*/ + switch (tSetFieldType) + { + case TIFF_SETGET_ASCII: + /* Either the stringlength is defined as a fixed length in .field_writecount or a NULL-terminated string is used. */ + if (!TIFFGetField( tif, tTag, &pAscii)) { + fprintf (stderr, "Can't read %s\n", tFieldArray->fields[i].field_name); + GOTOFAILURE_ALL_EXIF + break; + } + /* Save string from temporary buffer and compare with written string. */ + strncpy(auxCharArray, pAscii, sizeof(auxCharArray)); + if (tWriteCount > 0) auxLong = tWriteCount-1; else auxLong = (long)strlen(auxCharArray); + retCode2 = strncmp(auxCharArray, auxTextArrayW[i], auxLong); + if (retCode2 != 0) { + fprintf (stderr, "%d:Read value of %s %s differs from set value %s\n", i, tFieldName, auxCharArray, auxTextArrayW[i]); + GOTOFAILURE_ALL_EXIF + } + break; + /*-- For reading, the parameter size is to be observed !! */ + case TIFF_SETGET_UINT8: + case TIFF_SETGET_SINT8: + if (!TIFFGetField( tif, tTag, &auxChar)) { + fprintf (stderr, "Can't read %s\n", tFieldArray->fields[i].field_name); + GOTOFAILURE_ALL_EXIF + break; + } + /* compare read values with written ones */ + auxLong = auxChar; + if (auxLong != (char)auxLongArrayW[i]) { + fprintf (stderr, "%d:Read value of %s %ld differs from set value %ld\n", i, tFieldName, auxLong, auxLongArrayW[i]); + } + break; + case TIFF_SETGET_UINT16: + case TIFF_SETGET_SINT16: + if (!TIFFGetField( tif, tTag, &auxShort)) { + fprintf (stderr, "Can't read %s\n", tFieldArray->fields[i].field_name); + GOTOFAILURE_ALL_EXIF + break; + } + /* compare read values with written ones */ + auxLong = auxShort; + if (auxLong != (short)auxLongArrayW[i]) { + fprintf (stderr, "%d:Read value of %s %ld differs from set value %ld\n", i, tFieldName, auxLong, auxLongArrayW[i]); + } + break; + case TIFF_SETGET_UINT32: + case TIFF_SETGET_SINT32: + case TIFF_SETGET_IFD8: + case TIFF_SETGET_INT: + if (!TIFFGetField( tif, tTag, &auxUint32)) { + fprintf (stderr, "Can't read %s\n", tFieldArray->fields[i].field_name); + GOTOFAILURE_ALL_EXIF + break; + } + /* compare read values with written ones */ + auxLong = auxUint32; + if (auxLong != auxLongArrayW[i]) { + fprintf (stderr, "%d:Read value of %s %ld differs from set value %ld\n", i, tFieldName, auxLong, auxLongArrayW[i]); + } + break; + case TIFF_SETGET_FLOAT: + if (!TIFFGetField( tif, tTag, &auxFloat)) { + fprintf (stderr, "Can't read %s\n", tFieldArray->fields[i].field_name); + GOTOFAILURE_ALL_EXIF + break; + } + /* compare read values with written ones */ + if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) dblDiffLimit = RATIONAL_EPS*auxDoubleArrayW[i]; else dblDiffLimit = 1e-6; + dblDiff = auxFloat - auxDoubleArrayW[i]; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + /*--: EXIFTAG_SUBJECTDISTANCE: LibTiff returns value of "-1.0" if numerator equals 4294967295 (0xFFFFFFFF) to indicate infinite distance! + * However, there are two other EXIF tags where numerator indicates a special value and six other cases where the denominator indicates special values, + * which are not treated within LibTiff!! + */ + if (!(tTag == EXIFTAG_SUBJECTDISTANCE && auxFloat == -1.0)) { + fprintf (stderr, "%d:Read value of %s %f differs from set value %f\n", i, tFieldName, auxFloat, auxDoubleArrayW[i]); + GOTOFAILURE_ALL_EXIF + } + } + break; + case TIFF_SETGET_DOUBLE: + /*-- Unfortunately, TIFF_SETGET_DOUBLE is used for TIFF_RATIONAL but those have to be read with FLOAT !!! */ + /* Only TIFFTAG_STONITS is a TIFF_DOUBLE, which has to be read as DOUBLE!! */ + /*-- ATTENTION: ---- + * Only after update with Rational2Double feature, also TIFF_RATIONAL can be read in double precision!!! + * Therefore, use a union to avoid overflow in TIFFGetField() return value + * and depending on version check for the right interface here: + * - old interface: correct value should be here a float + * - new interface: correct value should be here a double + * Interface version (old/new) is determined above. + -------------------*/ + if (!TIFFGetField(tif, tTag, &auxDblUnion.dbl)) { + fprintf(stderr, "Can't read %s\n", tFieldArray->fields[i].field_name); + GOTOFAILURE_ALL_EXIF + break; + } + if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) { + if (blnIsRational2Double) { + /* New interface allows also double precision for TIFF_RATIONAL */ + auxDouble = auxDblUnion.dbl; + } + else { + /* Old interface reads TIFF_RATIONAL defined as TIFF_SETGET_DOUBLE alwasy as FLOAT */ + auxDouble = (double)auxDblUnion.flt1; + } + } + else { + auxDouble = auxDblUnion.dbl; + } + /* compare read values with written ones */ + if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) dblDiffLimit = RATIONAL_EPS*auxDoubleArrayW[i]; else dblDiffLimit = 1e-6; + dblDiff = auxDouble - auxDoubleArrayW[i]; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + /*--: EXIFTAG_SUBJECTDISTANCE: LibTiff returns value of "-1.0" if numerator equals 4294967295 (0xFFFFFFFF) to indicate infinite distance! */ + if (!(tTag == EXIFTAG_SUBJECTDISTANCE && auxDouble == -1.0)) { + fprintf (stderr, "%d:Read value of %s %f differs from set value %f\n", i, tFieldName, auxDouble, auxDoubleArrayW[i]); + GOTOFAILURE_ALL_EXIF + } + } + break; + + case TIFF_SETGET_C0_FLOAT: + case TIFF_SETGET_C0_DOUBLE: + case TIFF_SETGET_C16_FLOAT: + case TIFF_SETGET_C16_DOUBLE: + case TIFF_SETGET_C32_FLOAT: + case TIFF_SETGET_C32_DOUBLE: + /* _Cxx_ just defines the size of the count parameter for the array as C0=char, C16=short or C32=long */ + /*-- Check, if it is a single parameter, a fixed array or a variable array */ + if (tWriteCount == 1) { + fprintf (stderr, "Reading: WriteCount for .set_field_type %d should be -1 or greather than 1! %s\n", tSetFieldType, tFieldArray->fields[i].field_name); + } else { + /*-- Either fix or variable array --*/ + /* For arrays, distinguishing between float or double is essential. */ + /* Now decide between fixed or variable array */ + if (tWriteCount > 1) { + /* fixed array with needed arraysize defined in .field_writecount */ + if (!TIFFGetField( tif, tTag, &pVoidArray)) { + fprintf (stderr, "Can't read %s\n", tFieldArray->fields[i].field_name); + GOTOFAILURE_ALL_EXIF + break; + } + /* set tWriteCount to number of read samples for next steps */ + auxLong = tWriteCount; + } else { + /* Special treatment of variable array. */ + /* Dependent on Cxx, the count parameter is char, short or long. Therefore use unionLong! */ + if (!TIFFGetField( tif, tTag, &unionLong, &pVoidArray)) { + fprintf (stderr, "Can't read %s\n", tFieldArray->fields[i].field_name); + GOTOFAILURE_ALL_EXIF + break; + } + /* set tWriteCount to number of read samples for next steps */ + auxLong = unionLong.Short1; + } + /* Save values from temporary array */ + if (tSetFieldType == TIFF_SETGET_C0_FLOAT || tSetFieldType == TIFF_SETGET_C16_FLOAT || tSetFieldType == TIFF_SETGET_C32_FLOAT) { + memcpy(&auxFloatArray, pVoidArray,(auxLong * sizeof(auxFloatArray[0]))); + /* compare read values with written ones */ + if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) dblDiffLimit = RATIONAL_EPS*auxDoubleArrayW[i]; else dblDiffLimit = 1e-6; + for (j=0; j fabs(dblDiffLimit)) { + /*if (auxFloatArray[j] != (float)auxFloatArrayW[i+j]) { */ + fprintf (stderr, "Read value %d of %s #%d %f differs from set value %f\n", i, tFieldName, j, auxFloatArray[j], auxFloatArrayW[i+j]); + GOTOFAILURE_ALL_EXIF + } + } + } else { + memcpy(&auxDoubleArray, pVoidArray,(auxLong * sizeof(auxDoubleArray[0]))); + /* compare read values with written ones */ + if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) dblDiffLimit = RATIONAL_EPS*auxDoubleArrayW[i]; else dblDiffLimit = 1e-6; + for (j=0; j fabs(dblDiffLimit)) { + /*if (auxDoubleArray[j] != auxDoubleArrayW[i+j]) { */ + fprintf (stderr, "Read value %d of %s #%d %f differs from set value %f\n", i, tFieldName, j, auxDoubleArray[j], auxDoubleArrayW[i+j]); + GOTOFAILURE_ALL_EXIF + } + } + } + } + break; + case TIFF_SETGET_C0_UINT8: + case TIFF_SETGET_C0_SINT8: + case TIFF_SETGET_C16_UINT8: + case TIFF_SETGET_C16_SINT8: + case TIFF_SETGET_C32_UINT8: + case TIFF_SETGET_C32_SINT8: + /* For arrays, distinguishing between float or double is essential, even for writing */ + pVoid = &auxCharArrayW[i]; + case TIFF_SETGET_C0_UINT16: + case TIFF_SETGET_C0_SINT16: + case TIFF_SETGET_C16_UINT16: + case TIFF_SETGET_C16_SINT16: + case TIFF_SETGET_C32_UINT16: + case TIFF_SETGET_C32_SINT16: + if (pVoid == NULL) pVoid = &auxShortArrayW[i]; + case TIFF_SETGET_C0_UINT32: + case TIFF_SETGET_C0_SINT32: + case TIFF_SETGET_C16_UINT32: + case TIFF_SETGET_C16_SINT32: + case TIFF_SETGET_C32_UINT32: + case TIFF_SETGET_C32_SINT32: + if (pVoid == NULL) pVoid = &auxLongArrayW[i]; + /* _Cxx_ just defines the size of the count parameter for the array as C0=char, C16=short or C32=long */ + /*-- Check, if it is a single parameter, a fixed array or a variable array */ + if (tWriteCount == 1) { + fprintf (stderr, "WriteCount for .set_field_type %d should be -1 or greather than 1! %s\n", tSetFieldType, tFieldArray->fields[i].field_name); + } else { + /*-- Either fix or variable array --*/ + /* Now decide between fixed or variable array */ + if (tWriteCount > 1) { + /* fixed array with needed arraysize defined in .field_writecount */ + if (!TIFFGetField( tif, tTag, &pVoidArray)) { + fprintf (stderr, "Can't read %s\n", tFieldArray->fields[i].field_name); + GOTOFAILURE_ALL_EXIF + break; + } + /* set tWriteCount to number of read samples for next steps */ + auxLong = tWriteCount; + } else { + /* special treatment of variable array */ + /* for test, use always arraysize of VARIABLE_ARRAY_SIZE */ + if (!TIFFGetField( tif, tTag, &unionLong, &pVoidArray)) { + fprintf (stderr, "Can't read %s\n", tFieldArray->fields[i].field_name); + GOTOFAILURE_ALL_EXIF + break; + } + /* set tWriteCount to number of read samples for next steps */ + auxLong = unionLong.Short1; + } + /* Save values from temporary array */ + if (tSetFieldType == TIFF_SETGET_C0_UINT8 || tSetFieldType == TIFF_SETGET_C0_SINT8 || + tSetFieldType == TIFF_SETGET_C16_UINT8 || tSetFieldType == TIFF_SETGET_C16_SINT8 || + tSetFieldType == TIFF_SETGET_C32_UINT8 || tSetFieldType == TIFF_SETGET_C32_SINT8 ) { + memcpy(&auxCharArray, pVoidArray,(auxLong * sizeof(auxCharArray[0]))); + /* Compare and check values */ + for (j=0; j + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that (i) the above copyright notices and this permission notice appear in + * all copies of the software and related documentation, and (ii) the names of + * Sam Leffler and Silicon Graphics may not be used in any advertising or + * publicity relating to the software without the specific, prior written + * permission of Sam Leffler and Silicon Graphics. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR + * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF + * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +/* + * TIFF Library + * + * Module to test 'D' and 'O' open flags + */ + +#include "tif_config.h" + +#include +#include +#include + +#ifdef HAVE_UNISTD_H +# include +#endif + +#include "tiffio.h" +#include "tifftest.h" + +int test(int classictif, int height, int tiled) +{ + const char* filename = "defer_strile_loading.tif"; + TIFF* tif; + int i; + int ret = 0; + FILE* f; + + (void)ret; + + tif = TIFFOpen(filename, classictif ? "wDO" : "w8DO"); /* O should be ignored in write mode */ + if(!tif) + { + fprintf(stderr, "cannot create %s\n", filename); + return 1; + } + ret = TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE); + assert(ret); + ret = TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, 1); + assert(ret); + ret = TIFFSetField(tif, TIFFTAG_IMAGELENGTH, height); + assert(ret); + ret = TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); + assert(ret); + ret = TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1); + assert(ret); + ret = TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); + assert(ret); + if( tiled ) + { + int j; + ret = TIFFSetField(tif, TIFFTAG_TILEWIDTH, 16); + assert( ret ); + ret = TIFFSetField(tif, TIFFTAG_TILELENGTH, 16); + assert( ret ); + for( j = 0; j < (height+15) / 16; j++ ) + { + unsigned char tilebuffer[256]; + memset(tilebuffer, (unsigned char)j, 256); + ret = TIFFWriteEncodedTile( tif, j, tilebuffer, 256 ); + assert(ret == 256); + } + } + else + { + ret = TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1); + assert(ret); + for( i = 0; i < height; i++ ) + { + unsigned char c = (unsigned char)i; + ret = TIFFWriteEncodedStrip( tif, i, &c, 1 ); + assert(ret == 1); + + if( i == 1 && height > 100000 ) + i = height - 2; + } + } + TIFFClose(tif); + + f = fopen(filename, "rb"); + if( !f ) + return 1; + + for( i = 0; i < 2; i++ ) + { + tif = TIFFOpen(filename, i == 0 ? "rD" : "rO"); + if(!tif) + { + fprintf(stderr, "cannot open %s\n", filename); + fclose(f); + return 1; + } + if( tiled ) + { + int j; + for( j = 0; j < (height+15) / 16; j++ ) + { + int retry; + unsigned char expected_c = (unsigned char)j; + + for( retry = 0; retry < 2; retry++ ) + { + unsigned char tilebuffer[256]; + memset(tilebuffer,0, 256); + ret = TIFFReadEncodedTile( tif, j, tilebuffer, 256 ); + assert(ret == 256); + if( tilebuffer[0] != expected_c || + tilebuffer[255] != expected_c ) + { + fprintf(stderr, "unexpected value at tile %d: %d %d\n", + j, tilebuffer[0], tilebuffer[255]); + TIFFClose(tif); + fclose(f); + return 1; + } + } + + { + int err = 0; + int offset, size; + unsigned char inputbuffer[256]; + unsigned char tilebuffer[256]; + + offset = TIFFGetStrileOffsetWithErr(tif, j, &err); + assert(offset != 0); + assert(err == 0); + + size = TIFFGetStrileByteCountWithErr(tif, j, &err); + (void)size; + assert(size == 256); + assert(err == 0); + + fseek(f, offset, SEEK_SET); + { + size_t nread = fread(inputbuffer, 256, 1, f); + (void)nread; + } + + memset(tilebuffer,0, 256); + ret = TIFFReadFromUserBuffer(tif, j, + inputbuffer, 256, + tilebuffer, 256 ); + assert(ret == 1); + if( tilebuffer[0] != expected_c || + tilebuffer[255] != expected_c ) + { + fprintf(stderr, "unexpected value at tile %d: %d %d\n", + j, tilebuffer[0], tilebuffer[255]); + TIFFClose(tif); + fclose(f); + return 1; + } + } + } + } + else + { + int j; + for( j = 0; j < height; j++ ) + { + int retry; + unsigned char expected_c = (unsigned char)j; + for( retry = 0; retry < 2; retry++ ) + { + unsigned char c = 0; + ret = TIFFReadEncodedStrip( tif, j, &c, 1 ); + assert(ret == 1); + if( c != expected_c ) + { + fprintf(stderr, "unexpected value at line %d: %d\n", + j, c); + TIFFClose(tif); + fclose(f); + return 1; + } + } + + { + int err = 0; + int offset, size; + unsigned char inputbuffer[1]; + unsigned char tilebuffer[1]; + + offset = TIFFGetStrileOffsetWithErr(tif, j, &err); + assert(offset != 0); + assert(err == 0); + + size = TIFFGetStrileByteCountWithErr(tif, j, &err); + (void)size; + assert(size == 1); + assert(err == 0); + + fseek(f, offset, SEEK_SET); + { + size_t nread = fread(inputbuffer, 1, 1, f); + (void)nread; + } + memset(tilebuffer,0, 1); + ret = TIFFReadFromUserBuffer(tif, j, + inputbuffer, 1, + tilebuffer, 1 ); + assert(ret == 1); + if( tilebuffer[0] != expected_c ) + { + fprintf(stderr, "unexpected value at line %d: %d\n", + j, tilebuffer[0]); + TIFFClose(tif); + fclose(f); + return 1; + } + } + + if( j == 1 && height > 100000 ) + j = height - 2; + } + + if( height > 100000 ) + { + /* Missing strip */ + int err = 0; + ret = TIFFGetStrileOffsetWithErr(tif, 2, &err); + assert(ret == 0); + assert(err == 0); + + ret = TIFFGetStrileByteCountWithErr(tif, 2, &err); + assert(ret == 0); + assert(err == 0); + + } + } + + { + int err = 0; + ret = TIFFGetStrileOffsetWithErr(tif, 0xFFFFFFFFU, &err); + assert(ret == 0); + assert(err == 1); + + ret = TIFFGetStrileByteCountWithErr(tif, 0xFFFFFFFFU, &err); + assert(ret == 0); + assert(err == 1); + } + + { + toff_t* offsets = NULL; + toff_t* bytecounts = NULL; + ret = TIFFGetField( tif, + tiled ? TIFFTAG_TILEOFFSETS : TIFFTAG_STRIPOFFSETS, &offsets ); + assert(ret); + assert(offsets); + ret = TIFFGetField( tif, + tiled ? TIFFTAG_TILEBYTECOUNTS : TIFFTAG_STRIPBYTECOUNTS, &bytecounts ); + assert(ret); + assert(bytecounts); + if( tiled ) + { + assert(bytecounts[0] == 256); + } + else + { + assert(bytecounts[0] == 1); + if( height > 1 && height <= 100000) + { + assert(offsets[1] == offsets[0] + 1); + assert(offsets[height - 1] == offsets[0] + height - 1); + } + assert(bytecounts[height - 1] == 1); + } + } + + TIFFClose(tif); + } + fclose(f); + + unlink(filename); + return 0; +} + +int +main() +{ + int is_classic; + for( is_classic = 1; is_classic >= 0; is_classic-- ) + { + int tiled; + for( tiled = 0; tiled <= 1; tiled ++ ) + { + if( test(is_classic, 1, tiled) ) + return 1; + if( test(is_classic, 8192, tiled) ) + return 1; + } + if( test(is_classic, 2000000, 0) ) + return 1; + } + return 0; +} diff --git a/thirdparty/tiff-4.2.0/test/defer_strile_writing.c b/thirdparty/tiff-4.2.0/test/defer_strile_writing.c new file mode 100644 index 00000000..4e358567 --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/defer_strile_writing.c @@ -0,0 +1,239 @@ +/* + * Copyright (c) 2019, Even Rouault + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that (i) the above copyright notices and this permission notice appear in + * all copies of the software and related documentation, and (ii) the names of + * Sam Leffler and Silicon Graphics may not be used in any advertising or + * publicity relating to the software without the specific, prior written + * permission of Sam Leffler and Silicon Graphics. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR + * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF + * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +/* + * TIFF Library + * + * Module to test TIFFDeferStrileArrayWriting and TIFFForceStrileArrayWriting + */ + +#include "tif_config.h" + +#include +#include +#include + +#ifdef HAVE_UNISTD_H +# include +#endif + +#include "tiffio.h" + +int test(const char* mode, int tiled, int height) +{ + const char* filename = "defer_strile_writing.tif"; + TIFF* tif; + int i; + int ret = 0; + (void)ret; + + tif = TIFFOpen(filename, mode); + if(!tif) + { + fprintf(stderr, "cannot create %s\n", filename); + return 1; + } + ret = TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE); + assert(ret); + ret = TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, 1); + assert(ret); + ret = TIFFSetField(tif, TIFFTAG_IMAGELENGTH, height); + assert(ret); + ret = TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); + assert(ret); + ret = TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1); + assert(ret); + ret = TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); + assert(ret); + + if( tiled ) + { + ret = TIFFSetField(tif, TIFFTAG_TILEWIDTH, 16); + assert( ret ); + ret = TIFFSetField(tif, TIFFTAG_TILELENGTH, 16); + assert( ret ); + } + else + { + ret = TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1); + assert(ret); + } + + ret = TIFFDeferStrileArrayWriting(tif); + assert(ret); + + ret = TIFFWriteCheck( tif, tiled, "test" ); + assert(ret); + + ret = TIFFWriteDirectory( tif ); + assert(ret); + + /* Create other directory */ + TIFFFreeDirectory( tif ); + TIFFCreateDirectory( tif ); + + ret = TIFFSetField( tif, TIFFTAG_SUBFILETYPE, FILETYPE_PAGE ); + assert(ret); + ret = TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE); + assert(ret); + ret = TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, 1); + assert(ret); + ret = TIFFSetField(tif, TIFFTAG_IMAGELENGTH, 1); + assert(ret); + ret = TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8); + assert(ret); + ret = TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1); + assert(ret); + ret = TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); + assert(ret); + ret = TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1); + assert(ret); + + ret = TIFFDeferStrileArrayWriting(tif); + assert(ret); + + ret = TIFFWriteCheck( tif, 0, "test" ); + assert(ret); + + ret = TIFFWriteDirectory( tif ); + assert(ret); + + /* Force writing of strile arrays */ + ret = TIFFSetDirectory( tif, 0 ); + assert(ret); + + ret = TIFFForceStrileArrayWriting(tif); + assert(ret); + + ret = TIFFSetDirectory( tif, 1 ); + assert(ret); + + ret = TIFFForceStrileArrayWriting(tif); + assert(ret); + + /* Now write data on frist directory */ + ret = TIFFSetDirectory( tif, 0 ); + assert(ret); + + if( tiled ) + { + int j; + for( j = 0; j < (height+15) / 16; j++ ) + { + unsigned char tilebuffer[256]; + memset(tilebuffer, (unsigned char)j, 256); + ret = TIFFWriteEncodedTile( tif, j, tilebuffer, 256 ); + assert(ret == 256); + } + } + else + { + for( i = 0; i < height; i++ ) + { + unsigned char c = (unsigned char)i; + ret = TIFFWriteEncodedStrip( tif, i, &c, 1 ); + assert(ret == 1); + + if( i == 1 && height > 100000 ) + i = height - 2; + } + } + + TIFFClose(tif); + + tif = TIFFOpen(filename, "r"); + if(!tif) + { + fprintf(stderr, "cannot open %s\n", filename); + return 1; + } + if( tiled ) + { + int j; + for( j = 0; j < (height+15) / 16; j++ ) + { + int retry; + for( retry = 0; retry < 2; retry++ ) + { + unsigned char tilebuffer[256]; + unsigned char expected_c = (unsigned char)j; + memset(tilebuffer,0, 256); + ret = TIFFReadEncodedTile( tif, j, tilebuffer, 256 ); + assert(ret == 256); + if( tilebuffer[0] != expected_c || + tilebuffer[255] != expected_c ) + { + fprintf(stderr, "unexpected value at tile %d: %d %d\n", + j, tilebuffer[0], tilebuffer[255]); + TIFFClose(tif); + return 1; + } + } + } + } + else + { + int j; + for( j = 0; j < height; j++ ) + { + int retry; + for( retry = 0; retry < 2; retry++ ) + { + unsigned char c = 0; + unsigned char expected_c = (unsigned char)j; + ret = TIFFReadEncodedStrip( tif, j, &c, 1 ); + assert(ret == 1); + if( c != expected_c ) + { + fprintf(stderr, "unexpected value at line %d: %d\n", + j, c); + TIFFClose(tif); + return 1; + } + } + } + } + + TIFFClose(tif); + + unlink(filename); + return 0; +} + +int +main() +{ + int tiled; + for( tiled = 0; tiled <= 1; tiled ++ ) + { + if( test("w", tiled, 1) ) + return 1; + if( test("w", tiled, 10) ) + return 1; + if( test("w8", tiled, 1) ) + return 1; + if( test("wD", tiled, 1) ) + return 1; + } + return 0; +} diff --git a/thirdparty/tiff-4.2.0/test/fax2tiff.sh b/thirdparty/tiff-4.2.0/test/fax2tiff.sh new file mode 100644 index 00000000..8806a647 --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/fax2tiff.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Basic sanity check for fax2tiff +# +. ${srcdir:-.}/common.sh +infile="${IMAGES}/miniswhite-1c-1b.g3" +outfile="o-fax2tiff.tiff" +rm -f $outfile +echo "$MEMCHECK ${FAX2TIFF} -M -o $outfile $infile" +eval $MEMCHECK ${FAX2TIFF} -M -o $outfile $infile +status=$? +if [ $status != 0 ] ; then + echo "Returned failed status $status!" + echo "Output (if any) is in \"${outfile}\"." + exit $status +fi +f_tiffinfo_validate $outfile diff --git a/thirdparty/tiff-4.0.3/test/images/README.txt b/thirdparty/tiff-4.2.0/test/images/README.txt similarity index 80% rename from thirdparty/tiff-4.0.3/test/images/README.txt rename to thirdparty/tiff-4.2.0/test/images/README.txt index 17f6292e..4a7ad829 100644 --- a/thirdparty/tiff-4.0.3/test/images/README.txt +++ b/thirdparty/tiff-4.2.0/test/images/README.txt @@ -27,3 +27,9 @@ PNM files: minisblack-1c-8b.pgm miniswhite-1c-1b.pbm rgb-3c-8b.ppm + +G3 Fax files : + miniswhite-1c-1b.g3 + +deflate-last-strip-extra-data.tiff is +https://github.com/OSGeo/gdal/blob/master/autotest/alg/data/utmsmall_near.tiff diff --git a/thirdparty/tiff-4.2.0/test/images/deflate-last-strip-extra-data.tiff b/thirdparty/tiff-4.2.0/test/images/deflate-last-strip-extra-data.tiff new file mode 100644 index 0000000000000000000000000000000000000000..e3ee9dcc07ea506251fa083cfbb11159b672be46 GIT binary patch literal 12789 zcmZv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kZQvq1dZXf_C|qJ3sq(@W)^-42dov5>nX?*Kd@3~m&K;$s zQ55)CTQxeWywPsv4B=)kXE$b^&Ls``0+h(?mAEqz++SyphMCiZmzTo5iJEh3i92KS zQM0Bd#hvLHr{>~%;?53lq2^L!iaVQZrRK6~XqL3poMB3FQd2V}a^skAC9IgnNo%$q zlvG*gB-V!e@8-hqkVe@=TpzwxwY7hr63IK%?7+Qy5#9qiOQgy~jJI_!QNlf7%%K1O G@BaZA+Ye6w literal 0 HcmV?d00001 diff --git a/thirdparty/tiff-4.0.3/test/images/miniswhite-1c-1b.pbm b/thirdparty/tiff-4.2.0/test/images/miniswhite-1c-1b.pbm similarity index 100% rename from thirdparty/tiff-4.0.3/test/images/miniswhite-1c-1b.pbm rename to thirdparty/tiff-4.2.0/test/images/miniswhite-1c-1b.pbm diff --git a/thirdparty/tiff-4.0.3/test/images/miniswhite-1c-1b.tiff b/thirdparty/tiff-4.2.0/test/images/miniswhite-1c-1b.tiff similarity index 100% rename from thirdparty/tiff-4.0.3/test/images/miniswhite-1c-1b.tiff rename to thirdparty/tiff-4.2.0/test/images/miniswhite-1c-1b.tiff diff --git a/thirdparty/tiff-4.2.0/test/images/ojpeg_chewey_subsamp21_multi_strip.tiff b/thirdparty/tiff-4.2.0/test/images/ojpeg_chewey_subsamp21_multi_strip.tiff new file mode 100644 index 0000000000000000000000000000000000000000..8b04d473dc590b36aad5be1b93e16a8c00170345 GIT binary patch literal 39752 zcmce-XIN89^f$Ug0tpDAYoZAT5;`i~geFBoLhmA?hbB!#LNB5TO~4S6Py~z-q=TR+ z2w0AwKmh3=BDQFvG*MB|W54nI&-*^_hx_5)`{B;>Oy)PU*IqL#d(X_8wbmw+bpRLu z07&2$00BTE^lt)z|HXNt2GD`Km3Q+*8lJyx^4f_=ZWaIgT((G!(~xlJO0BRBCPcvy$AvZAThv9RNnqm z5&NGp|LGSb_CK=xBWf4>4<8g^@P9NS5&$Y{|I@#>H~_%@!+|0!`5%rJVFeNWzpO;C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q;|289tfRKoogp`c@8bAR4yX%j6{&a%~!2d^m z0DBx>cNxBP0|X#20U;rnh=}NKzXsw}0E9F|+{CnE2ogG7s~hg2^y2Zk)ucR1dTk66 z)*d4Zzr)DLuQM_+v+(lWn?_YlY;V)iByo!8{N=QsfPDxEmN59R>FDNW3E_qk;zP7Hu0o(ZD^OyFH&aUpB z-qEq~iOH{1-==>qE-kODuB~tE?(HAo4v&scPVtNh@O+8EM1+L+N$-a@2$+VDTMR*~ z>rQk-+$xk#3D38USVE7U2Tzw*Qu%jSLd}9c!{0Xh!}}lF|FHg-^#8*7e^CDaoiV_U pU)daQ0f5s00IpU1SzW;OoquXVuYYQQ8b9kc@g)Rb@bdrE{{d;e1k3;c literal 0 HcmV?d00001 diff --git a/thirdparty/tiff-4.0.3/test/images/palette-1c-1b.tiff b/thirdparty/tiff-4.2.0/test/images/palette-1c-1b.tiff similarity index 100% rename from thirdparty/tiff-4.0.3/test/images/palette-1c-1b.tiff rename to thirdparty/tiff-4.2.0/test/images/palette-1c-1b.tiff diff --git a/thirdparty/tiff-4.0.3/test/images/palette-1c-4b.tiff b/thirdparty/tiff-4.2.0/test/images/palette-1c-4b.tiff similarity index 100% rename from thirdparty/tiff-4.0.3/test/images/palette-1c-4b.tiff rename to thirdparty/tiff-4.2.0/test/images/palette-1c-4b.tiff diff --git a/thirdparty/tiff-4.0.3/test/images/palette-1c-8b.tiff b/thirdparty/tiff-4.2.0/test/images/palette-1c-8b.tiff similarity index 100% rename from thirdparty/tiff-4.0.3/test/images/palette-1c-8b.tiff rename to thirdparty/tiff-4.2.0/test/images/palette-1c-8b.tiff diff --git a/thirdparty/tiff-4.2.0/test/images/quad-lzw-compat.tiff b/thirdparty/tiff-4.2.0/test/images/quad-lzw-compat.tiff new file mode 100644 index 0000000000000000000000000000000000000000..ec614bf6fbc3e595fb2e6b55064716c5ae379e1a GIT binary patch literal 214342 zcmeFZSyU5Q^#5CxIW;83Jctlx1k_?u90{O+fOb$soC6|)Q-?uCMX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S{oFaR2KR7Mlks|SFt695JjH1AOqXumP=K+%eZ zzd`X54ethkSONe6Z7)r{3=?G4*=*tL-TJ#5rBe& r>dQcZ=KWYsg8}r}g{V9_VTAQY%WL&N=>6yCp!q+(tkCcG*ZY412_Drs literal 0 HcmV?d00001 diff --git a/thirdparty/tiff-4.0.3/test/images/quad-tile.jpg.tiff b/thirdparty/tiff-4.2.0/test/images/quad-tile.jpg.tiff similarity index 100% rename from thirdparty/tiff-4.0.3/test/images/quad-tile.jpg.tiff rename to thirdparty/tiff-4.2.0/test/images/quad-tile.jpg.tiff diff --git a/thirdparty/tiff-4.2.0/test/images/rgb-3c-16b.ppm b/thirdparty/tiff-4.2.0/test/images/rgb-3c-16b.ppm new file mode 100644 index 0000000000000000000000000000000000000000..c1cd4b644c1b3fb834854ad5b60fb3243f833088 GIT binary patch literal 142305 zcmWh!Q*<0$7p;x2ZrTQ81rtr!*tTu7X>2sMZEIprFt%c=scrl3e;>}neLCx|v)A5d zpL5MHCqN>aq2BJ{-d-XeF(SJ9#%3as-l1XscY;Ku#3j+UVN;1}VNN=% zyksFvYF2i&N+En!qFKC|mQ`G}K8^2D^t0v@BbB~e=MolF-&lVq02Om>#)#^2LpH&L zX}LGHUr1*12koqgm2&Df&!(kh@iqbYJ=qI3hSM)3$hJpk4oVfM@=2=pnU>)CnM8mzSfoG7ZAqkTdQNIoMUX0EU{mp_f7ci{Bs%FgpLq_ zW4Z+$wO2^G$J!qVs_R*|&$+(zFm6SK-w$}yG#`G&w`v?)&>sDUlu&cK_yFlxy-=+V z$*3W_;WwqP=}SiyC9RR%BSaxK8g<{GhBji`G-+~8-JNLqna0-k6nc8oeA__=q6yr3 zkKx;}*_ulWsE@7-p<31JlpdrgRjcJ{kfthLCs@&sR|m&wP1fdM!uQu+3Xk;B9Lmg$ zzO}~zl_Z1?Er2WVcM6uyHjjqoE}d=`3?7(GE1dKD!+n&l=l_MOn9Um7KCB@(S2jf6ksaqR`?z8J` zM}a#kId~I6<`H)KII8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Du{zr1zx@V4U(y%+KnyM2cu(P!XVgXM$}lou@u{{Uk!)LXwJ66m=$WU>MCo%JHwiY?wXYWa|7?{U=P zD+u}_Ne_fSi~e=e1jS7>x0Aq)xpnOrK4GzZ=IyBVSn8>1+QT`wUKe`R{OE8ct!!bk MCxzN0aJ(M(f4jXn{r~^~ literal 0 HcmV?d00001 diff --git a/thirdparty/tiff-4.0.3/test/images/rgb-3c-16b.tiff b/thirdparty/tiff-4.2.0/test/images/rgb-3c-16b.tiff similarity index 100% rename from thirdparty/tiff-4.0.3/test/images/rgb-3c-16b.tiff rename to thirdparty/tiff-4.2.0/test/images/rgb-3c-16b.tiff diff --git a/thirdparty/tiff-4.0.3/test/images/rgb-3c-8b.ppm b/thirdparty/tiff-4.2.0/test/images/rgb-3c-8b.ppm similarity index 100% rename from thirdparty/tiff-4.0.3/test/images/rgb-3c-8b.ppm rename to thirdparty/tiff-4.2.0/test/images/rgb-3c-8b.ppm diff --git a/thirdparty/tiff-4.0.3/test/images/rgb-3c-8b.tiff b/thirdparty/tiff-4.2.0/test/images/rgb-3c-8b.tiff similarity index 100% rename from thirdparty/tiff-4.0.3/test/images/rgb-3c-8b.tiff rename to thirdparty/tiff-4.2.0/test/images/rgb-3c-8b.tiff diff --git a/thirdparty/tiff-4.2.0/test/images/testfax4.tiff b/thirdparty/tiff-4.2.0/test/images/testfax4.tiff new file mode 100644 index 0000000000000000000000000000000000000000..f7f2629ca11ed96e5d78b8e93e9823679dd0ac27 GIT binary patch literal 39637 zcmZs@30zF;|2R&|2s1R6Y6?x0eM!q?3+>6(f^sdz6lp~ZDqBa3L};;8LyF6^ScYV$ z(_)zvx<(CIrigo!Oj1qFH0SxhpULO@`TSn5|66m;``Nem_Pn3xSh{rjAe}*j28|v> z4bmDk7%&a^4H`UvpBxJ4Z+sd9(gtg)^Wc1%zi}b z!S#OQxPJZL`FG|F8e}+FTisSC)M@k^R{%cscYfT@X@INy3pp(YYYdtIaT?H;CE#NK zX9I2n_)NgLxY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Dgt&c*!?C6Pe?~rOWz;w7P|#q*ZdK+BEfC?ASXj>-N2n6PPgRu*@^3g z-OS=veR#K7=pVYyYjm%#V{@^6G~N01QZ??K%q=x3(ct+xn|K|RxvlDUJ*t_n!jXp+ z!sJr@m?a6ri&M;YUJyEcEijuj_{VM?-uvl}r}ibu6UOvinLec3ZIs>I7EQ-L?BeVC z9UFSOJIcp6J!PrmnSSN1ooX*{$V-Pr?YvStp-y|d?li+_t-5nxJxfO)Kbf=>3y(d& zW{C8TIL4W_&s6UfH}<;rt~YZEz{zw9s=ZUE5q0jL0SN=u*KG|~^Se7JdY9mV>BWzC MGV+x>w0iCMe|3=)6aWAK literal 0 HcmV?d00001 diff --git a/thirdparty/tiff-4.0.3/test/long_tag.c b/thirdparty/tiff-4.2.0/test/long_tag.c similarity index 97% rename from thirdparty/tiff-4.0.3/test/long_tag.c rename to thirdparty/tiff-4.2.0/test/long_tag.c index e20b15bb..4bfdf805 100644 --- a/thirdparty/tiff-4.0.3/test/long_tag.c +++ b/thirdparty/tiff-4.2.0/test/long_tag.c @@ -1,5 +1,3 @@ -/* $Id: long_tag.c,v 1.4 2008/03/28 01:42:06 bfriesen Exp $ */ - /* * Copyright (c) 2004, Andrey Kiselev * @@ -111,7 +109,7 @@ main(int argc, char **argv) } /* Write dummy pixel data. */ - if (!TIFFWriteScanline(tif, buf, 0, 0) < 0) { + if (TIFFWriteScanline(tif, buf, 0, 0) == -1) { fprintf (stderr, "Can't write image data.\n"); goto failure; } diff --git a/thirdparty/tiff-4.0.3/test/ppm2tiff_pbm.sh b/thirdparty/tiff-4.2.0/test/ppm2tiff_pbm.sh old mode 100755 new mode 100644 similarity index 81% rename from thirdparty/tiff-4.0.3/test/ppm2tiff_pbm.sh rename to thirdparty/tiff-4.2.0/test/ppm2tiff_pbm.sh index 68d9e459..fb6c3cf7 --- a/thirdparty/tiff-4.0.3/test/ppm2tiff_pbm.sh +++ b/thirdparty/tiff-4.2.0/test/ppm2tiff_pbm.sh @@ -1,5 +1,4 @@ #!/bin/sh -# Generated file, master is Makefile.am . ${srcdir:-.}/common.sh infile="$IMG_MINISWHITE_1C_1B_PBM" outfile="o-ppm2tiff_pbm.tiff" diff --git a/thirdparty/tiff-4.0.3/test/ppm2tiff_pgm.sh b/thirdparty/tiff-4.2.0/test/ppm2tiff_pgm.sh old mode 100755 new mode 100644 similarity index 81% rename from thirdparty/tiff-4.0.3/test/ppm2tiff_pgm.sh rename to thirdparty/tiff-4.2.0/test/ppm2tiff_pgm.sh index 001ec706..60352348 --- a/thirdparty/tiff-4.0.3/test/ppm2tiff_pgm.sh +++ b/thirdparty/tiff-4.2.0/test/ppm2tiff_pgm.sh @@ -1,5 +1,4 @@ #!/bin/sh -# Generated file, master is Makefile.am . ${srcdir:-.}/common.sh infile="$IMG_MINISBLACK_1C_8B_PGM" outfile="o-ppm2tiff_pgm.tiff" diff --git a/thirdparty/tiff-4.2.0/test/ppm2tiff_ppm.sh b/thirdparty/tiff-4.2.0/test/ppm2tiff_ppm.sh new file mode 100644 index 00000000..576ab3e0 --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/ppm2tiff_ppm.sh @@ -0,0 +1,10 @@ +#!/bin/sh +. ${srcdir:-.}/common.sh +infile="$IMG_RGB_3C_8B_PPM" +outfile="o-ppm2tiff_8b_ppm.tiff" +f_test_convert "$PPM2TIFF" $infile $outfile +f_tiffinfo_validate $outfile +infile="$IMG_RGB_3C_16B_PPM" +outfile="o-ppm2tiff_16b_ppm.tiff" +f_test_convert "$PPM2TIFF" $infile $outfile +f_tiffinfo_validate $outfile diff --git a/thirdparty/tiff-4.2.0/test/rational_precision2double.c b/thirdparty/tiff-4.2.0/test/rational_precision2double.c new file mode 100644 index 00000000..e33cc97d --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/rational_precision2double.c @@ -0,0 +1,972 @@ + +/* + * Copyright (c) 2012, Frank Warmerdam + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that (i) the above copyright notices and this permission notice appear in + * all copies of the software and related documentation, and (ii) the names of + * Sam Leffler and Silicon Graphics may not be used in any advertising or + * publicity relating to the software without the specific, prior written + * permission of Sam Leffler and Silicon Graphics. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR + * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF + * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +/* + * TIFF Library + * + * -- Module copied from custom_dir.c -- + *=========== Purpose =================================================================================== + * Extended and amended version for testing the TIFFSetField() / and TIFFGetField()- interface + * for custom fields of type RATIONAL when the TIFFLib internal precision is updated from FLOAT to DOUBLE! + * The external interface of already defined tags schould be kept. + * This is verified for some of those tags with this test. + * + */ + + +#define FOR_AUTO_TESTING +#ifdef FOR_AUTO_TESTING +/* Only for automake and CMake infrastructure the test should: + a.) delete any written testfiles when test passed (otherwise autotest will fail) + b.) goto failure, if any failure is detected, which is not necessary when test is initiated manually for debugging +*/ +#define GOTOFAILURE goto failure; +#else +#define GOTOFAILURE +#endif + +#ifdef _MSC_VER +#pragma warning( disable : 4101) +#endif + +#include "tif_config.h" +#include +#include +#include +#include + +#ifdef HAVE_UNISTD_H +# include +#endif + +#include "tiffio.h" +#include "tiffiop.h" +#include "tif_dir.h" +#include "tifftest.h" + + +#include "tif_dirwrite.c" + + +int write_test_tiff(TIFF *tif, const char *filenameRead, int blnAllCustomTags); + +#define SPP 3 /* Samples per pixel */ +const uint16 width = 1; +const uint16 length = 1; +const uint16 bps = 8; +const uint16 photometric = PHOTOMETRIC_RGB; +const uint16 rows_per_strip = 1; +const uint16 planarconfig = PLANARCONFIG_CONTIG; + +/*-- Additional custom TIFF tags for testing of Rational2Double precision --*/ +#define TIFFTAG_RATIONAL_DOUBLE 60000 +#define TIFFTAG_SRATIONAL_DOUBLE 60001 +#define TIFFTAG_RATIONAL_C0_DOUBLE 60002 +#define TIFFTAG_SRATIONAL_C16_DOUBLE 60003 + + +/*--- TIFFField Definition --- + field_tag: the tag number. For instance 277 for the SamplesPerPixel tag. Builtin tags will generally have a #define in tiff.h for each known tag. + field_readcount: The number of values which should be read. The special value TIFF_VARIABLE (-1) indicates that a variable number of values may be read. The special value TIFFTAG_SPP (-2) indicates that there should be one value for each sample as defined by TIFFTAG_SAMPLESPERPIXEL. The special value TIFF_VARIABLE2 (-3) is presumably similar to TIFF_VARIABLE though I am not sure what the distinction in behaviour is. This field is TIFF_VARIABLE for variable length ascii fields. + field_writecount: The number of values which should be written. Generally the same as field_readcount. A few built-in exceptions exist, but I haven't analysed why they differ. + field_type: Type of the field. One of TIFF_BYTE, TIFF_ASCII, TIFF_SHORT, TIFF_LONG, TIFF_RATIONAL, TIFF_SBYTE, TIFF_UNDEFINED, TIFF_SSHORT, TIFF_SLONG, TIFF_SRATIONAL, TIFF_FLOAT, TIFF_DOUBLE or TIFF_IFD. Note that some fields can support more than one type (for instance short and long). These fields should have multiple TIFFFieldInfos. + reserved: + set_field_type: TIFF_SETGET_DOUBLE + get_field_type: - not used - + field_bit: Built-in tags stored in special fields in the TIFF structure have assigned field numbers to distinguish them (ie. FIELD_SAMPLESPERPIXEL). New tags should generally just use FIELD_CUSTOM indicating they are stored in the generic tag list. + field_oktochange: TRUE if it is OK to change this tag value while an image is being written. FALSE for stuff that must be set once and then left unchanged (like ImageWidth, or PhotometricInterpretation for instance). + field_passcount: If TRUE, then the count value must be passed in TIFFSetField(), and TIFFGetField(), otherwise the count is not required. This should generally be TRUE for non-ascii variable count tags unless the count is implicit (such as with the colormap). + field_name: A name for the tag. Normally mixed case (studly caps) like "StripByteCounts" and relatively short. +*/ + +static const TIFFField +tifFieldInfo[] = { + { TIFFTAG_RATIONAL_DOUBLE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "Rational2Double_U_Double", NULL }, + { TIFFTAG_SRATIONAL_DOUBLE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "Rational2Double_S_Double", NULL }, + { TIFFTAG_RATIONAL_C0_DOUBLE, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "Rational2Double_C0", NULL }, + { TIFFTAG_SRATIONAL_C16_DOUBLE, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "Rational2Double_S_C16", NULL }, +}; + +#define N(a) (sizeof (a) / sizeof (a[0])) + +/*--- Add aditional Rational-Double Tags to TIFF + ref: html\addingtags.html but with new function _TIFFMergeFields(). +---*/ + +/* In libtiff 3.6.0 a new mechanism was introduced allowing libtiff to read unrecognised tags automatically. + When an unknown tags is encountered, it is automatically internally defined with a default name and a type derived from the tag value in the file. + Applications only need to predefine application specific tags if they need to be able to set them in a file, or if particular calling conventions + are desired for TIFFSetField() and TIFFGetField(). + When tags are autodefined like this the field_readcount and field_writecount values are always TIFF_VARIABLE. + The field_passcount is always TRUE, and the field_bit is FIELD_CUSTOM. The field name will be "Tag %d" where the %d is the tag number. +*/ + +/*The tags need to be defined for each TIFF file opened - and when reading they should be defined before the tags of the file are read, + yet a valid TIFF * is needed to merge the tags against. In order to get them registered at the appropriate part of the setup process, + it is necessary to register our merge function as an extender callback with libtiff. This is done with TIFFSetTagExtender(). + We also keep track of the previous tag extender (if any) so that we can call it from our extender allowing a chain of customizations to take effect. +*/ +static TIFFExtendProc _ParentExtender = NULL; +static void _XTIFFDefaultDirectory(TIFF *tif); + +static +void _XTIFFInitialize(void) +{ + static int first_time=1; + + if (! first_time) return; /* Been there. Done that. */ +first_time = 0; + +/* Grab the inherited method and install */ +_ParentExtender = TIFFSetTagExtender(_XTIFFDefaultDirectory); +} + +/* The extender callback is looks like this. +It merges in our new fields and then calls the next extender if there is one in effect. +*/ +static void +_XTIFFDefaultDirectory(TIFF *tif) +{ + uint32 n, nadded; + + /* Install the extended Tag field info */ + n = N(tifFieldInfo); + //_TIFFMergeFields(tif, const TIFFField info[], uint32 n); + nadded = _TIFFMergeFields(tif, tifFieldInfo, n); + (void)nadded; + + /* Since an XTIFF client module may have overridden + * the default directory method, we call it now to + * allow it to set up the rest of its own methods. + */ + + if (_ParentExtender) + (*_ParentExtender)(tif); +} + + +int +main() +{ + static const char filenameClassicTiff[] = "rationalPrecision2Double.tif"; + static const char filenameBigTiff[] = "rationalPrecision2Double_Big.tif"; + + TIFF *tif; + int ret; + int errorNo; + + /*-- Initialize TIFF-Extender to add additonal TIFF-Tags --*/ + _XTIFFInitialize(); + + fprintf(stderr, "==== Test if Set()/Get() interface for some custom rational tags behave as before change. ====\n"); + /* --- Test with Classic-TIFF ---*/ + /* delete file, if exists */ + ret = unlink(filenameClassicTiff); + errorNo = errno; + if (ret != 0 && errorNo != ENOENT) { + fprintf(stderr, "Can't delete test TIFF file %s.\n", filenameClassicTiff); + } + + /* We write the main directory as a simple image. */ + tif = TIFFOpen(filenameClassicTiff, "w+"); + if (!tif) { + fprintf(stderr, "Can't create test TIFF file %s.\n", filenameClassicTiff); + return 1; + } + fprintf(stderr, "-------- Test with ClassicTIFF started ----------\n"); + ret = write_test_tiff(tif, filenameClassicTiff, FALSE); + if (ret > 0) return(ret); + + /*--- Test with BIG-TIFF ---*/ + /* delete file, if exists */ + ret = unlink(filenameBigTiff); + if (ret != 0 && errorNo != ENOENT) { + fprintf(stderr, "Can't delete test TIFF file %s.\n", filenameBigTiff); + } + + tif = TIFFOpen(filenameBigTiff, "w8"); + if (!tif) { + fprintf(stderr, "Can't create test TIFF file %s.\n", filenameBigTiff); + return 1; + } + fprintf(stderr, "\n-------- Test with BigTIFF started ----------\n"); + ret = write_test_tiff(tif, filenameBigTiff, FALSE); + if (ret > 0) return(ret); + + + fprintf(stderr, "\n\n==== Test automatically, if all custom rational tags are written/read correctly. ====\n"); + /* --- Test with Classic-TIFF ---*/ + /* delete file, if exists */ + ret = unlink(filenameClassicTiff); + errorNo = errno; + if (ret != 0 && errorNo != ENOENT) { + fprintf(stderr, "Can't delete test TIFF file %s.\n", filenameClassicTiff); + } + + /* We write the main directory as a simple image. */ + tif = TIFFOpen(filenameClassicTiff, "w+"); + if (!tif) { + fprintf(stderr, "Can't create test TIFF file %s.\n", filenameClassicTiff); + return 1; + } + fprintf(stderr, "-------- Test with ClassicTIFF started ----------\n"); + ret = write_test_tiff(tif, filenameClassicTiff, TRUE); + if (ret > 0) return(ret); + + /*--- Test with BIG-TIFF ---*/ + /* delete file, if exists */ + ret = unlink(filenameBigTiff); + if (ret != 0 && errno != ENOENT) { + fprintf(stderr, "Can't delete test TIFF file %s.\n", filenameBigTiff); + } + + tif = TIFFOpen(filenameBigTiff, "w8"); + if (!tif) { + fprintf(stderr, "Can't create test TIFF file %s.\n", filenameBigTiff); + return 1; + } + fprintf(stderr, "\n-------- Test with BigTIFF started ----------\n"); + ret = write_test_tiff(tif, filenameBigTiff, TRUE); + return(ret); +} /* main() */ + + + + +int +write_test_tiff(TIFF* tif, const char* filenameRead, int blnAllCustomTags) { + unsigned char buf[SPP] = {0, 127, 255}; + /*-- Additional variables --*/ + int retCode; + float auxFloat = 0.0f; + double auxDouble = 0.0; + uint16 auxUint16 = 0; + uint32 auxUint32 = 0; + long auxLong = 0; + void* pVoid; + int blnIsRational2Double; + + int i, j; + long nTags; + + const TIFFFieldArray* tFieldArray; + unsigned long tTag; + TIFFDataType tType; + short tWriteCount; + TIFFSetGetFieldType tSetFieldType; + unsigned short tFieldBit; + const TIFFField *fip; + char* tFieldName; + + +#define STRSIZE 1000 +#define N_SIZE 200 +#define VARIABLE_ARRAY_SIZE 6 + + /* -- Test data for writing -- */ + float auxFloatArrayW[N_SIZE]; + double auxDoubleArrayW[N_SIZE]; + char auxTextArrayW[N_SIZE][STRSIZE]; + float auxFloatArrayN1[3] = {1.0f / 7.0f, 61.23456789012345f, 62.3f}; + float auxFloatArrayResolutions[4] = {5.456789f, 6.666666f, 0.0033f, 5.0f / 213.0f}; + + /* -- Variables for reading -- */ + uint16 count16 = 0; + union { + long Long; + short Short1; + short Short2[2]; + char Char[4]; + } auxLongUnion; + union { + double dbl; + float flt1; + float flt2; + } auxDblUnion; + + void* pVoidArray; + float* pFloatArray; + float auxFloatArray[2 * N_SIZE]; + double auxDoubleArray[2 * N_SIZE]; + double dblDiff, dblDiffLimit; + float fltDiff; +#define RATIONAL_EPS (1.0/30000.0) /* reduced difference of rational values, approx 3.3e-5 */ + + + /*-- Fill test data arrays for writing ----------- */ + for (i = 0; i < N_SIZE; i++) { + sprintf(auxTextArrayW[i], "N%d-String-%d_tttttttttttttttttttttttttttttx", i, i); + } + for (i = 0; i < N_SIZE; i++) { + auxFloatArrayW[i] = (float)((i + 1) * 133) / 3.3f; + } + for (i = 0; i < N_SIZE; i++) { + auxDoubleArrayW[i] = (double)((i + 1) * 3689) / 4.5697; + } + + /*-- Setup standard tags of a simple tiff file --*/ + if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) { + fprintf(stderr, "Can't set ImageWidth tag.\n"); + goto failure; + } + if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) { + fprintf(stderr, "Can't set ImageLength tag.\n"); + goto failure; + } + if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps)) { + fprintf(stderr, "Can't set BitsPerSample tag.\n"); + goto failure; + } + if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, SPP)) { + fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); + goto failure; + } + if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) { + fprintf(stderr, "Can't set SamplesPerPixel tag.\n"); + goto failure; + } + if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, planarconfig)) { + fprintf(stderr, "Can't set PlanarConfiguration tag.\n"); + goto failure; + } + if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric)) { + fprintf(stderr, "Can't set PhotometricInterpretation tag.\n"); + goto failure; + } + + /*--- Standard tags with TIFF_RATIONAL and TIFF_SETGET_DOUBLE to TIFF_SETGET_FLOAT change. --- + * They can be written either using float or double but have to be read using float. + -------------------------------------------------------------------------------------------- */ + if (!TIFFSetField(tif, TIFFTAG_XRESOLUTION, auxFloatArrayResolutions[0])) { + fprintf(stderr, "Can't set TIFFTAG_XRESOLUTION tag.\n"); + goto failure; + } + /* Test here the double input possibility */ + if (!TIFFSetField(tif, TIFFTAG_YRESOLUTION, (double)auxFloatArrayResolutions[1])) { + fprintf(stderr, "Can't set TIFFTAG_YRESOLUTION tag.\n"); + goto failure; + } + if (!TIFFSetField(tif, TIFFTAG_XPOSITION, auxFloatArrayResolutions[2])) { + fprintf(stderr, "Can't set TIFFTAG_XPOSITION tag.\n"); + goto failure; + } + if (!TIFFSetField(tif, TIFFTAG_YPOSITION, auxFloatArrayResolutions[3])) { + fprintf(stderr, "Can't set TIFFTAG_YPOSITION tag.\n"); + goto failure; + } + + /*--- Some additional FIELD_CUSTOM tags to check standard interface ---*/ + + /*- TIFFTAG_INKSET is a SHORT parameter (TIFF_SHORT, TIFF_SETGET_UINT16) with field_bit=FIELD_CUSTOM !! -*/ + if (!TIFFSetField(tif, TIFFTAG_INKSET, 34)) { + fprintf(stderr, "Can't set TIFFTAG_INKSET tag.\n"); + goto failure; + } + + /*- TIFFTAG_PIXAR_FOVCOT is a FLOAT parameter ( TIFF_FLOAT, TIFF_SETGET_FLOAT) with field_bit=FIELD_CUSTOM !! -*/ + /* - can be written with Double but has to be read with float parameter */ +#define PIXAR_FOVCOT_VAL 5.123456789123456789 + auxFloat = (float)PIXAR_FOVCOT_VAL; + /* if (!TIFFSetField(tif, TIFFTAG_PIXAR_FOVCOT, auxFloat )) { + fprintf (stderr, "Can't set TIFFTAG_PIXAR_FOVCOT tag.\n"); + goto failure; + } + */ + auxDouble = (double)PIXAR_FOVCOT_VAL; + if (!TIFFSetField(tif, TIFFTAG_PIXAR_FOVCOT, auxDouble)) { + fprintf(stderr, "Can't set TIFFTAG_PIXAR_FOVCOT tag.\n"); + goto failure; + } + /*- TIFFTAG_STONITS is a DOUBLE parameter (TIFF_DOUBLE, TIFF_SETGET_DOUBLE) with field_bit=FIELD_CUSTOM! + *-- Unfortunately, TIFF_SETGET_DOUBLE is used for TIFF_RATIONAL but those have to be read with FLOAT !!! + * Only TIFFTAG_STONITS is a TIFF_DOUBLE, which has to be read as DOUBLE!! + */ +#define STONITS_VAL 6.123456789123456789 + auxDouble = STONITS_VAL; + auxFloat = (float)auxDouble; + if (!TIFFSetField(tif, TIFFTAG_STONITS, auxDouble)) { + fprintf(stderr, "Can't set TIFFTAG_STONITS tag.\n"); + goto failure; + } + + + /*-- Additional tags to check Rational standard tags, which are also defined with field_bit=FIELD_CUSTOM */ + /* + The following standard tags have field_type = TIFF_RATIONAL with field_bit=FIELD_CUSTOM: + TIFFTAG_BASELINENOISE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE + TIFFTAG_BASELINESHARPNESS, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE + TIFFTAG_LINEARRESPONSELIMIT, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE + TIFFTAG_CHROMABLURRADIUS, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE + TIFFTAG_ANTIALIASSTRENGTH, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE + TIFFTAG_SHADOWSCALE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE + TIFFTAG_BESTQUALITYSCALE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE + and with Signed Rational: + TIFFTAG_BASELINEEXPOSURE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_DOUBLE + Due to the fact that TIFFSetField() and TIFFGetField() interface is using va_args, variable promotion is applied, + which means: + If the actual argument is of type float, it is promoted to type double when function is to be made. + - Any signed or unsigned char, short, enumerated type, or bit field is converted to either a signed or an unsigned int + using integral promotion. + - Any argument of class type is passed by value as a data structure; the copy is created by binary copying instead + of by invoking the class’s copy constructor (if one exists). + So, if your argument types are of float type, you should expect the argument retrieved to be of type double + and it is char or short, you should expect it to be signed or unsigned int. Otherwise, the code will give you wrong results. + */ + + if (!blnAllCustomTags) { + /*--- TEST: First tag is written with FLOAT and second tag is written with DOUBLE parameter ---*/ + /*- TIFFTAG_SHADOWSCALE is a Rational parameter (TIFF_RATIONAL, TIFF_SETGET_DOUBLE) with field_bit=FIELD_CUSTOM! -*/ + #define SHADOWSCALE_VAL 15.123456789123456789 + auxFloat = (float)SHADOWSCALE_VAL; + if (!TIFFSetField(tif, TIFFTAG_SHADOWSCALE, auxFloat)) { + fprintf(stderr, "Can't set TIFFTAG_SHADOWSCALE tag.\n"); + goto failure; + } + + /*- TIFFTAG_BESTQUALITYSCALE is a Rational parameter (TIFF_RATIONAL, TIFF_SETGET_DOUBLE) with field_bit=FIELD_CUSTOM! -*/ + #define BESTQUALITYSCALE_VAL 17.123456789123456789 + auxDouble = BESTQUALITYSCALE_VAL; + if (!TIFFSetField(tif, TIFFTAG_BESTQUALITYSCALE, auxDouble)) { + fprintf(stderr, "Can't set TIFFTAG_BESTQUALITYSCALE tag.\n"); + goto failure; + } + + + /*- TIFFTAG_BASELINEEXPOSURE is a Rational parameter (TIFF_SRATIONAL, TIFF_SETGET_DOUBLE) with field_bit=FIELD_CUSTOM! -*/ + #define BASELINEEXPOSURE_VAL (-3.14159265358979323846) + /* + fprintf(stderr, "(-3.14159265358979323846) as float= %.18f, double=%.18f\n", (float)BASELINEEXPOSURE_VAL, (double)BASELINEEXPOSURE_VAL, BASELINEEXPOSURE_VAL); + fprintf(stderr, "(-3.141592742098056) as float= %.18f, double=%.18f\n", (float)(-3.141592742098056), (double)(-3.141592742098056)); + */ + auxDouble = BASELINEEXPOSURE_VAL; + if (!TIFFSetField(tif, TIFFTAG_BASELINEEXPOSURE, auxDouble)) { + fprintf(stderr, "Can't set TIFFTAG_BASELINEEXPOSURE tag.\n"); + goto failure; + } + + + /*--- For static or variable ARRAYs the case is different ---*/ + + /*- Variable Array: TIFFTAG_DECODE is a SRATIONAL parameter TIFF_SETGET_C16_FLOAT type FIELD_CUSTOM with passcount=1 and variable length of array. */ + if (!TIFFSetField(tif, TIFFTAG_DECODE, 3, auxFloatArrayN1)) { /* for TIFF_SETGET_C16_DOUBLE */ + fprintf(stderr, "Can't set TIFFTAG_DECODE tag.\n"); + goto failure; + } + + /*- Varable Array: TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT */ + if (!TIFFSetField(tif, TIFFTAG_BLACKLEVEL, 3, auxFloatArrayN1)) { /* for TIFF_SETGET_C16_FLOAT */ + fprintf(stderr, "Can't set TIFFTAG_BLACKLEVEL tag.\n"); + goto failure; + } + + /*-- Check, if the TiffLibrary is compiled with the new interface with Rational2Double or still uses the old definitions. */ + /* tags to check: TIFFTAG_BESTQUALITYSCALE, TIFFTAG_BASELINENOISE, TIFFTAG_BASELINESHARPNESS, */ + fip = TIFFFindField(tif, TIFFTAG_BESTQUALITYSCALE, TIFF_ANY); + tSetFieldType = fip->set_field_type; + if (tSetFieldType == TIFF_SETGET_DOUBLE) + blnIsRational2Double = FALSE; + else + blnIsRational2Double = TRUE; + + /*--- Write now additional Rational2Double test tags ---*/ + /*--- However, this additional tags are only written as Double correctly, + if blnIsRational2Double is defined! + ------------------------------------------------------*/ + if (blnIsRational2Double) { + if (!TIFFSetField(tif, TIFFTAG_RATIONAL_DOUBLE, auxDoubleArrayW[100])) { + fprintf(stderr, "Can't set TIFFTAG_RATIONAL_DOUBLE tag.\n"); + goto failure; + } + /* test for plain integers */ + if (!TIFFSetField(tif, TIFFTAG_SRATIONAL_DOUBLE, (-1.0 ))) { + fprintf(stderr, "Can't set TIFFTAG_SRATIONAL_DOUBLE tag.\n"); + goto failure; + } + if (!TIFFSetField(tif, TIFFTAG_RATIONAL_C0_DOUBLE, &auxDoubleArrayW[110])) { + fprintf(stderr, "Can't set TIFFTAG_RATIONAL_C0_DOUBLE tag.\n"); + goto failure; + } + if (!TIFFSetField(tif, TIFFTAG_SRATIONAL_C16_DOUBLE, 2, &auxDoubleArrayW[120])) { + fprintf(stderr, "Can't set TIFFTAG_SRATIONAL_C16_DOUBLE tag.\n"); + goto failure; + } + } + + } else { /* blnAllCustomTags */ + /*==== Automatically check all custom rational tags == WRITING ===*/ + /*-- Get array, where TIFF tag fields are defined --*/ + tFieldArray = _TIFFGetFields(); + nTags = tFieldArray->count; + + for (i = 0; i < nTags; i++) { + tTag = tFieldArray->fields[i].field_tag; + tType = tFieldArray->fields[i].field_type; /* e.g. TIFF_RATIONAL */ + tWriteCount = tFieldArray->fields[i].field_writecount; + tSetFieldType = tFieldArray->fields[i].set_field_type; /* e.g. TIFF_SETGET_C0_FLOAT */ + tFieldBit = tFieldArray->fields[i].field_bit; + tFieldName = tFieldArray->fields[i].field_name; + pVoid = NULL; + + if (tType == TIFF_RATIONAL && tFieldBit == FIELD_CUSTOM) { + /*-- dependent on set_field_type write value --*/ + switch (tSetFieldType) { + case TIFF_SETGET_FLOAT: + case TIFF_SETGET_DOUBLE: + if (tWriteCount == 1) { + /*-- All single values can be written with float or double parameter. Only value range should be in line. */ + if (!TIFFSetField(tif, tTag, auxDoubleArrayW[i])) { + fprintf(stderr, "Can't write %s\n", tFieldArray->fields[i].field_name); + goto failure; + } + } else { + fprintf(stderr, "WriteCount for .set_field_type %d should be 1! %s\n", tSetFieldType, tFieldArray->fields[i].field_name); + } + break; + case TIFF_SETGET_C0_FLOAT: + case TIFF_SETGET_C0_DOUBLE: + case TIFF_SETGET_C16_FLOAT: + case TIFF_SETGET_C16_DOUBLE: + case TIFF_SETGET_C32_FLOAT: + case TIFF_SETGET_C32_DOUBLE: + /* _Cxx_ just defines the size of the count parameter for the array as C0=char, C16=short or C32=long */ + /*-- Check, if it is a single parameter, a fixed array or a variable array */ + if (tWriteCount == 1) { + fprintf(stderr, "WriteCount for .set_field_type %d should be -1 or greather than 1! %s\n", tSetFieldType, tFieldArray->fields[i].field_name); + } else { + /*-- Either fix or variable array --*/ + /* For arrays, distinguishing between float or double is essential, even for writing */ + if (tSetFieldType == TIFF_SETGET_C0_FLOAT || tSetFieldType == TIFF_SETGET_C16_FLOAT || tSetFieldType == TIFF_SETGET_C32_FLOAT) + pVoid = &auxFloatArrayW[i]; else pVoid = &auxDoubleArrayW[i]; + /* Now decide between fixed or variable array */ + if (tWriteCount > 1) { + /* fixed array with needed arraysize defined in .field_writecount */ + if (!TIFFSetField(tif, tTag, pVoid)) { + fprintf(stderr, "Can't write %s\n", tFieldArray->fields[i].field_name); + goto failure; + } + } else { + /* special treatment of variable array */ + /* for test, use always arraysize of VARIABLE_ARRAY_SIZE */ + if (!TIFFSetField(tif, tTag, VARIABLE_ARRAY_SIZE, pVoid)) { + fprintf(stderr, "Can't write %s\n", tFieldArray->fields[i].field_name); + goto failure; + } + } + } + break; + default: + fprintf(stderr, "SetFieldType %d not defined within writing switch for %s.\n", tSetFieldType, tFieldName); + }; /*-- switch() --*/ + } /* if () */ + } /*-- for() --*/ + } /* blnAllCustomTags */ /*==== END END - Automatically check all custom rational tags == WRITING END ===*/ + + /*-- Write dummy pixel data. --*/ + if (TIFFWriteScanline(tif, buf, 0, 0) < 0) { + fprintf (stderr, "Can't write image data.\n"); + goto failure; + } + + /*-- Write directory to file --*/ + /* Always WriteDirectory before using/creating another directory. */ + /* Not necessary before TIFFClose(), however, TIFFClose() uses TIFFReWriteDirectory(), which forces directory to be written at another location. */ + retCode = TIFFWriteDirectory(tif); + + /*-- Write File to disk and close file --*/ + /* TIFFClose() uses TIFFReWriteDirectory(), which forces directory to be written at another location. */ + /* Therefore, better use TIFFWriteDirectory() before. */ + TIFFClose(tif); + + fprintf (stderr, "-------- Continue Test ---------- reading ...\n"); + +/*========================= READING ============= READING ========================================*/ + /* Ok, now test whether we can read written values in the EXIF directory. */ + tif = TIFFOpen(filenameRead, "r"); + + + /*-- Read some parameters out of the main directory --*/ + + /*-- IMAGEWIDTH and -LENGTH are defined as TIFF_SETGET_UINT32 */ + retCode = TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &auxUint32 ); + if (auxUint32 != width) { + fprintf (stderr, "Read value of IMAGEWIDTH %d differs from set value %d\n", auxUint32, width); + GOTOFAILURE + } + retCode = TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &auxUint32 ); + if (auxUint32 != width) { + fprintf (stderr, "Read value of TIFFTAG_IMAGELENGTH %d differs from set value %d\n", auxUint32, length); + GOTOFAILURE + } + + /*--- Standard tags with TIFF_RATIONAL and TIFF_SETGET_DOUBLE to TIFF_SETGET_FLOAT change. --- + * They can be written either using float or double but have to be read using float. + -------------------------------------------------------------------------------------------- */ + dblDiffLimit = RATIONAL_EPS; + retCode = TIFFGetField(tif, TIFFTAG_XRESOLUTION, &auxFloat); + dblDiff = auxFloat - auxFloatArrayResolutions[0]; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + fprintf(stderr, "Read value of TIFFTAG_XRESOLUTION %f differs from set value %f\n", auxFloat, auxFloatArrayResolutions[0]); + GOTOFAILURE + } + retCode = TIFFGetField(tif, TIFFTAG_YRESOLUTION, &auxFloat); + dblDiff = auxFloat - auxFloatArrayResolutions[1]; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + fprintf(stderr, "Read value of TIFFTAG_YRESOLUTION %f differs from set value %f\n", auxFloat, auxFloatArrayResolutions[1]); + GOTOFAILURE + } + retCode = TIFFGetField(tif, TIFFTAG_XPOSITION, &auxFloat); + dblDiff = auxFloat - auxFloatArrayResolutions[2]; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + fprintf(stderr, "Read value of TIFFTAG_XPOSITION %f differs from set value %f\n", auxFloat, auxFloatArrayResolutions[2]); + GOTOFAILURE + } + retCode = TIFFGetField(tif, TIFFTAG_YPOSITION, &auxFloat); + dblDiff = auxFloat - auxFloatArrayResolutions[3]; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + fprintf(stderr, "Read value of TIFFTAG_YPOSITION %f differs from set value %f\n", auxFloat, auxFloatArrayResolutions[3]); + GOTOFAILURE + } + + + /*- TIFFTAG_INKSET is a SHORT parameter (TIFF_SHORT, TIFF_SETGET_UINT16) with field_bit=FIELD_CUSTOM !! -*/ + retCode = TIFFGetField(tif, TIFFTAG_INKSET, &auxUint16); + if (auxUint16 != 34) { + fprintf(stderr, "Read value of TIFFTAG_PIXAR_FOVCOT %d differs from set value %d\n", auxUint16, TIFFTAG_INKSET); + GOTOFAILURE + } + + /*- TIFFTAG_PIXAR_FOVCOT is a FLOAT parameter ( TIFF_FLOAT, TIFF_SETGET_FLOAT) with field_bit=FIELD_CUSTOM !! -*/ + /* - was written with Double but has to be read with Float */ + retCode = TIFFGetField(tif, TIFFTAG_PIXAR_FOVCOT, &auxFloat ); + if (auxFloat != (float)PIXAR_FOVCOT_VAL) { + fprintf (stderr, "Read value of TIFFTAG_PIXAR_FOVCOT %f differs from set value %f\n", auxFloat, PIXAR_FOVCOT_VAL); + GOTOFAILURE + } + + /*- TIFFTAG_STONITS is a DOUBLE parameter (TIFF_DOUBLE, TIFF_SETGET_DOUBLE) with field_bit=FIELD_CUSTOM!! -*/ + retCode = TIFFGetField(tif, TIFFTAG_STONITS, &auxDouble); + if (auxDouble != (double)STONITS_VAL) { + fprintf(stderr, "Read value of TIFFTAG_STONITS %f differs from set value %f\n", auxDouble, STONITS_VAL); + GOTOFAILURE + } + + + + + /*-- Check, if the TiffLibrary is compiled with the new interface with Rational2Double or still uses the old definitions. */ + /* tags to check: TIFFTAG_BESTQUALITYSCALE, TIFFTAG_BASELINENOISE, TIFFTAG_BASELINESHARPNESS, */ + fip = TIFFFindField(tif, TIFFTAG_BESTQUALITYSCALE, TIFF_ANY); + tSetFieldType = fip->set_field_type; + if (tSetFieldType == TIFF_SETGET_DOUBLE) + blnIsRational2Double = FALSE; + else + blnIsRational2Double = TRUE; + + + if (!blnAllCustomTags) { + + /*- TIFFTAG_BESTQUALITYSCALE is a Rational parameter (TIFF_RATIONAL, TIFF_SETGET_DOUBLE) with field_bit=FIELD_CUSTOM! + and written with double parameter -*/ + /*- Read into a union to test the correct precision (float or double) returned. + * Float-parameter should be correct, but double-parameter should give a wrong value + */ + auxDblUnion.dbl = 0; + retCode = TIFFGetField(tif, TIFFTAG_BESTQUALITYSCALE, &auxDblUnion.dbl); + dblDiffLimit = RATIONAL_EPS * (double)BESTQUALITYSCALE_VAL; + dblDiff = auxDblUnion.dbl - (double)BESTQUALITYSCALE_VAL; + fltDiff = auxDblUnion.flt1 - (float)BESTQUALITYSCALE_VAL; + if (!((fabs(dblDiff) > fabs(dblDiffLimit)) && !(fabs(fltDiff) > fabs(dblDiffLimit)))) { + fprintf(stderr, "Float-Read value of TIFFTAG_BESTQUALITYSCALE %.12f differs from set value %.12f too much,\n", auxDblUnion.flt1, BESTQUALITYSCALE_VAL); + fprintf(stderr, "whereas Double-Read value of TIFFTAG_BESTQUALITYSCALE %.12f is nearly equal to set value %.12f\n", auxDblUnion.dbl, BESTQUALITYSCALE_VAL); + GOTOFAILURE + } + + /*--- Now the same for a Signed Rational ---*/ + /*- TIFFTAG_BASELINEEXPOSURE is a Rational parameter (TIFF_SRATIONAL, TIFF_SETGET_DOUBLE) with field_bit=FIELD_CUSTOM! - + and written with double parameter - */ + /*- Read into a union to test the correct precision (float or double) returned. + * Float-parameter should be correct, but double-parameter should give a wrong value + */ + auxDblUnion.dbl = 0; + retCode = TIFFGetField(tif, TIFFTAG_BASELINEEXPOSURE, &auxDblUnion.dbl); + dblDiffLimit = RATIONAL_EPS * (double)BASELINEEXPOSURE_VAL; + dblDiff = auxDblUnion.dbl - (double)BASELINEEXPOSURE_VAL; + fltDiff = auxDblUnion.flt1 - (float)BASELINEEXPOSURE_VAL; + if (!((fabs(dblDiff) > fabs(dblDiffLimit)) && !(fabs(fltDiff) > fabs(dblDiffLimit)))) { + fprintf(stderr, "Float-Read value of TIFFTAG_BASELINEEXPOSURE %.12f differs from set value %.12f too much,\n", auxDblUnion.flt1, BASELINEEXPOSURE_VAL); + fprintf(stderr, "whereas Double-Read value of TIFFTAG_BESTQUALITYSCALE %.12f is nearly equal to set value %.12f\n", auxDblUnion.dbl, BASELINEEXPOSURE_VAL); + GOTOFAILURE + } + + /*- Variable Array: TIFFTAG_DECODE is a SRATIONAL parameter TIFF_SETGET_C16_FLOAT type FIELD_CUSTOM with passcount=1 and variable length of array. */ + retCode = TIFFGetField(tif, TIFFTAG_DECODE, &count16, &pVoidArray); + retCode = TIFFGetField(tif, TIFFTAG_DECODE, &count16, &pFloatArray); + /*- pVoidArray points to a Tiff-internal temporary memorypart. Thus, contents needs to be saved. */ + memcpy(&auxFloatArray, pVoidArray, (count16 * sizeof(auxFloatArray[0]))); + for (i = 0; i < count16; i++) { + dblDiffLimit = RATIONAL_EPS * auxFloatArrayN1[i]; + dblDiff = auxFloatArray[i] - auxFloatArrayN1[i]; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + fprintf(stderr, "Read value %d of TIFFTAG_DECODE Array %f differs from set value %f\n", i, auxFloatArray[i], auxFloatArrayN1[i]); + GOTOFAILURE + } + } + + retCode = TIFFGetField(tif, TIFFTAG_BLACKLEVEL, &count16, &pVoidArray); + /*- pVoidArray points to a Tiff-internal temporary memorypart. Thus, contents needs to be saved. */ + memcpy(&auxFloatArray, pVoidArray, (count16 * sizeof(auxFloatArray[0]))); + for (i = 0; i < count16; i++) { + dblDiffLimit = RATIONAL_EPS * auxFloatArrayN1[i]; + dblDiff = auxFloatArray[i] - auxFloatArrayN1[i]; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + fprintf(stderr, "Read value %d of TIFFTAG_BLACKLEVEL Array %f differs from set value %f\n", i, auxFloatArray[i], auxFloatArrayN1[i]); + GOTOFAILURE + } + } + + + /*--- Read now additional Rational2Double test tags --- + This should be now with nearly double precision + However, this additional tags are only read as Double, + if blnIsRational2Double is defined! + ------------------------------------------------------*/ + if (blnIsRational2Double) { + auxDblUnion.dbl = 0; + retCode = TIFFGetField(tif, TIFFTAG_RATIONAL_DOUBLE, &auxDblUnion.dbl); + if (!retCode) { fprintf(stderr, "Can't read %s\n", "TIFFTAG_RATIONAL_DOUBLE"); GOTOFAILURE } + dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[100]; + dblDiff = auxDblUnion.dbl - auxDoubleArrayW[100]; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + fprintf(stderr, "Read value of TIFFTAG_RATIONAL_DOUBLE %f differs from set value %f\n", auxDblUnion.dbl, auxDoubleArrayW[100]); + GOTOFAILURE + } + + auxDblUnion.dbl = 0; + retCode = TIFFGetField(tif, TIFFTAG_SRATIONAL_DOUBLE, &auxDblUnion.dbl); + if (!retCode) { fprintf(stderr, "Can't read %s\n", "TIFFTAG_SRATIONAL_DOUBLE"); GOTOFAILURE } + auxDouble = -1.0; + dblDiffLimit = RATIONAL_EPS * auxDouble; + dblDiff = auxDblUnion.dbl - auxDouble; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + fprintf(stderr, "Read value of TIFFTAG_SRATIONAL_DOUBLE %f differs from set value %f\n", auxDblUnion.dbl, auxDouble); + GOTOFAILURE + } + + /*- Fixed Array: TIFFTAG_RATIONAL_C0_DOUBLE, 3, 3, TIFF_RATIONAL, 0, TIFF_SETGET_C0_DOUBLE */ + count16 = 3; /* set fixed array length for checking */ + retCode = TIFFGetField(tif, TIFFTAG_RATIONAL_C0_DOUBLE, &pVoidArray); + /*- pVoidArray points to a Tiff-internal temporary memorypart. Thus, contents needs to be saved. */ + memcpy(&auxDoubleArray, pVoidArray, (count16 * sizeof(auxDoubleArray[0]))); + for (i = 0; i < count16; i++) { + dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[110 + i]; + dblDiff = auxDoubleArray[i] - auxDoubleArrayW[110 + i]; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + fprintf(stderr, "Read value %d of TIFFTAG_RATIONAL_C0_DOUBLE Array %f differs from set value %f\n", i, auxDoubleArray[i], auxDoubleArrayW[110 + i]); + GOTOFAILURE + } + } + + /*- Variable Array: TIFFTAG_SRATIONAL_C16_DOUBLE, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_DOUBLE */ + retCode = TIFFGetField(tif, TIFFTAG_SRATIONAL_C16_DOUBLE, &count16, &pVoidArray); + /*- pVoidArray points to a Tiff-internal temporary memorypart. Thus, contents needs to be saved. */ + memcpy(&auxDoubleArray, pVoidArray, (count16 * sizeof(auxDoubleArray[0]))); + for (i = 0; i < count16; i++) { + dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[120 + i]; + dblDiff = auxDoubleArray[i] - auxDoubleArrayW[120 + i]; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + fprintf(stderr, "Read value %d of TIFFTAG_SRATIONAL_C16_DOUBLE Array %f differs from set value %f\n", i, auxDoubleArray[i], auxDoubleArrayW[120 + i]); + GOTOFAILURE + } + } + } + + } else { /* blnAllCustomTags */ + /*==== Automatically check all custom rational tags == READING ===*/ + + /*-- Get array, where standard TIFF tag fields are defined --*/ + tFieldArray = _TIFFGetFields(); + nTags = tFieldArray->count; + + for (i = 0; i < nTags; i++) { + tTag = tFieldArray->fields[i].field_tag; + tType = tFieldArray->fields[i].field_type; /* e.g. TIFF_RATIONAL */ + tWriteCount = tFieldArray->fields[i].field_writecount; + tSetFieldType = tFieldArray->fields[i].set_field_type; /* e.g. TIFF_SETGET_C0_FLOAT */ + tFieldBit = tFieldArray->fields[i].field_bit; + tFieldName = tFieldArray->fields[i].field_name; + pVoid = NULL; + auxDblUnion.dbl = 0; + + if (tType == TIFF_RATIONAL && tFieldBit == FIELD_CUSTOM) { + /*-- dependent on set_field_type read value --*/ + switch (tSetFieldType) { + case TIFF_SETGET_FLOAT: + if (!TIFFGetField(tif, tTag, &auxFloat)) { + fprintf(stderr, "Can't read %s\n", tFieldArray->fields[i].field_name); + GOTOFAILURE + break; + } + /* compare read values with written ones */ + if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[i]; else dblDiffLimit = 1e-6; + dblDiff = auxFloat - auxDoubleArrayW[i]; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + /*--: EXIFTAG_SUBJECTDISTANCE: LibTiff returns value of "-1.0" if numerator equals 4294967295 (0xFFFFFFFF) to indicate infinite distance! + * However, there are two other EXIF tags where numerator indicates a special value and six other cases where the denominator indicates special values, + * which are not treated within LibTiff!! + */ + if (!(tTag == EXIFTAG_SUBJECTDISTANCE && auxFloat == -1.0)) { + fprintf(stderr, "%d:Read value of %s %f differs from set value %f\n", i, tFieldName, auxFloat, auxDoubleArrayW[i]); + GOTOFAILURE + } + } + break; + case TIFF_SETGET_DOUBLE: + /*-- Unfortunately, TIFF_SETGET_DOUBLE is used for TIFF_RATIONAL but those have to be read with FLOAT !!! */ + /* Only after update with Rational2Double feature, also TIFF_RATIONAL can be read in double precision!!! */ + /* Therefore, use a union to avoid overflow in TIFFGetField() return value + * and depending on version check for the right interface here: + * - old interface: correct value should be here a float + * - new interface: correct value should be here a double + * Interface version (old/new) is determined above. + */ + if (!TIFFGetField(tif, tTag, &auxDblUnion.dbl)) { + fprintf(stderr, "Can't read %s\n", tFieldArray->fields[i].field_name); + GOTOFAILURE + break; + } + if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) { + if (blnIsRational2Double) { + /* New interface allows also double precision for TIFF_RATIONAL */ + auxDouble = auxDblUnion.dbl; + } + else { + /* Old interface reads TIFF_RATIONAL defined as TIFF_SETGET_DOUBLE alwasy as FLOAT */ + auxDouble = (double)auxDblUnion.flt1; + } + } else { + auxDouble = auxDblUnion.dbl; + } + /* compare read values with written ones */ + if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[i]; else dblDiffLimit = 1e-6; + dblDiff = auxDouble - auxDoubleArrayW[i]; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + /*--: EXIFTAG_SUBJECTDISTANCE: LibTiff returns value of "-1.0" if numerator equals 4294967295 (0xFFFFFFFF) to indicate infinite distance! */ + if (!(tTag == EXIFTAG_SUBJECTDISTANCE && auxDouble == -1.0)) + fprintf(stderr, "%d:Read value of %s %f differs from set value %f\n", i, tFieldName, auxDouble, auxDoubleArrayW[i]); + GOTOFAILURE + } + break; + + case TIFF_SETGET_C0_FLOAT: + case TIFF_SETGET_C0_DOUBLE: + case TIFF_SETGET_C16_FLOAT: + case TIFF_SETGET_C16_DOUBLE: + case TIFF_SETGET_C32_FLOAT: + case TIFF_SETGET_C32_DOUBLE: + /* _Cxx_ just defines the size of the count parameter for the array as C0=char, C16=short or C32=long */ + /*-- Check, if it is a single parameter, a fixed array or a variable array */ + if (tWriteCount == 1) { + fprintf(stderr, "Reading: WriteCount for .set_field_type %d should be -1 or greather than 1! %s\n", tSetFieldType, tFieldArray->fields[i].field_name); + GOTOFAILURE + } else { + /*-- Either fix or variable array --*/ + /* For arrays, distinguishing between float or double is essential. */ + /* Now decide between fixed or variable array */ + if (tWriteCount > 1) { + /* fixed array with needed arraysize defined in .field_writecount */ + if (!TIFFGetField(tif, tTag, &pVoidArray)) { + fprintf(stderr, "Can't read %s\n", tFieldArray->fields[i].field_name); + GOTOFAILURE + break; + } + /* set tWriteCount to number of read samples for next steps */ + auxLong = tWriteCount; + } else { + /* Special treatment of variable array. */ + /* Dependent on Cxx, the count parameter is char, short or long. Therefore use unionLong! */ + if (!TIFFGetField(tif, tTag, &auxLongUnion, &pVoidArray)) { + fprintf(stderr, "Can't read %s\n", tFieldArray->fields[i].field_name); + GOTOFAILURE + break; + } + /* set tWriteCount to number of read samples for next steps */ + auxLong = auxLongUnion.Short1; + } + /* Save values from temporary array */ + if (tSetFieldType == TIFF_SETGET_C0_FLOAT || tSetFieldType == TIFF_SETGET_C16_FLOAT || tSetFieldType == TIFF_SETGET_C32_FLOAT) { + memcpy(&auxFloatArray, pVoidArray, (auxLong * sizeof(auxFloatArray[0]))); + /* compare read values with written ones */ + if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[i]; else dblDiffLimit = 1e-6; + for (j = 0; j < auxLong; j++) { + dblDiff = auxFloatArray[j] - auxFloatArrayW[i + j]; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + /*if (auxFloatArray[j] != (float)auxFloatArrayW[i+j]) { */ + fprintf(stderr, "Read value %d of %s #%d %f differs from set value %f\n", i, tFieldName, j, auxFloatArray[j], auxFloatArrayW[i + j]); + GOTOFAILURE + } + } + } else { + memcpy(&auxDoubleArray, pVoidArray, (auxLong * sizeof(auxDoubleArray[0]))); + /* compare read values with written ones */ + if (tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) dblDiffLimit = RATIONAL_EPS * auxDoubleArrayW[i]; else dblDiffLimit = 1e-6; + for (j = 0; j < auxLong; j++) { + dblDiff = auxDoubleArray[j] - auxDoubleArrayW[i + j]; + if (fabs(dblDiff) > fabs(dblDiffLimit)) { + /*if (auxDoubleArray[j] != auxDoubleArrayW[i+j]) { */ + fprintf(stderr, "Read value %d of %s #%d %f differs from set value %f\n", i, tFieldName, j, auxDoubleArray[j], auxDoubleArrayW[i + j]); + GOTOFAILURE + } + } + } + } + break; + default: + fprintf(stderr, "SetFieldType %d not defined within reading switch for %s.\n", tSetFieldType, tFieldName); + }; /*-- switch() --*/ + } /* if () */ + } /*-- for() --*/ + + + } /* blnAllCustomTags */ /*==== END END - Automatically check all custom rational tags == READING END ===*/ + + + + TIFFClose(tif); + + /* All tests passed; delete file and exit with success status. */ +#ifdef FOR_AUTO_TESTING + unlink(filenameRead); +#endif + fprintf(stderr, "-------- Test finished OK ----------\n"); + return 0; + +failure: + /* + * Something goes wrong; close file and return unsuccessful status. + * Do not remove the file for further manual investigation. + */ + TIFFClose(tif); + fprintf(stderr, "-------- Test finished with FAILURE --------\n"); + return 1; +} diff --git a/thirdparty/tiff-4.0.3/test/raw_decode.c b/thirdparty/tiff-4.2.0/test/raw_decode.c similarity index 63% rename from thirdparty/tiff-4.0.3/test/raw_decode.c rename to thirdparty/tiff-4.2.0/test/raw_decode.c index ec5c1904..a2fca03a 100644 --- a/thirdparty/tiff-4.0.3/test/raw_decode.c +++ b/thirdparty/tiff-4.2.0/test/raw_decode.c @@ -1,5 +1,3 @@ -/* $Id: raw_decode.c,v 1.4 2012-07-06 17:05:16 bfriesen Exp $ */ - /* * Copyright (c) 2012, Frank Warmerdam * @@ -42,6 +40,36 @@ #include "tiffio.h" +/* + Libjpeg's jmorecfg.h defines INT16 and INT32, but only if XMD_H is + not defined. Unfortunately, the MinGW and Borland compilers include + a typedef for INT32, which causes a conflict. MSVC does not include + a conficting typedef given the headers which are included. +*/ +#if defined(__BORLANDC__) || defined(__MINGW32__) +# define XMD_H 1 +#endif + +/* + The windows RPCNDR.H file defines boolean, but defines it with the + unsigned char size. You should compile JPEG library using appropriate + definitions in jconfig.h header, but many users compile library in wrong + way. That causes errors of the following type: + + "JPEGLib: JPEG parameter struct mismatch: library thinks size is 432, + caller expects 464" + + For such users we wil fix the problem here. See install.doc file from + the JPEG library distribution for details. +*/ + +/* Define "boolean" as unsigned char, not int, per Windows custom. */ +#if defined(__WIN32__) && !defined(__MINGW32__) +# ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ + typedef unsigned char boolean; +# endif +# define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ +#endif #include "jpeglib.h" /* Needed for JPEG_LIB_VERSION */ static unsigned char cluster_0[] = { 0, 0, 2, 0, 138, 139 }; @@ -71,33 +99,54 @@ static int check_cluster( int cluster, unsigned char *buffer, unsigned char *exp return 1; } -static int check_rgb_pixel( int pixel, int red, int green, int blue, unsigned char *buffer ) { +static int check_rgb_pixel( int pixel, + int min_red, int max_red, + int min_green, int max_green, + int min_blue, int max_blue, + unsigned char *buffer ) { unsigned char *rgb = buffer + 3 * pixel; - if( rgb[0] == red && rgb[1] == green && rgb[2] == blue ) { + if( rgb[0] >= min_red && rgb[0] <= max_red && + rgb[1] >= min_green && rgb[1] <= max_green && + rgb[2] >= min_blue && rgb[2] <= max_blue ) { return 0; } fprintf( stderr, "Pixel %d did not match expected results.\n", pixel ); - fprintf( stderr, "Expect: %3d %3d %3d\n", red, green, blue ); - fprintf( stderr, " Got: %3d %3d %3d\n", rgb[0], rgb[1], rgb[2] ); + fprintf( stderr, "Got R=%d (expected %d..%d), G=%d (expected %d..%d), B=%d (expected %d..%d)\n", + rgb[0], min_red, max_red, + rgb[1], min_green, max_green, + rgb[2], min_blue, max_blue ); return 1; } -static int check_rgba_pixel( int pixel, int red, int green, int blue, int alpha, uint32 *buffer ) { +static int check_rgba_pixel( int pixel, + int min_red, int max_red, + int min_green, int max_green, + int min_blue, int max_blue, + int min_alpha, int max_alpha, + uint32 *buffer ) { /* RGBA images are upside down - adjust for normal ordering */ int adjusted_pixel = pixel % 128 + (127 - (pixel/128)) * 128; uint32 rgba = buffer[adjusted_pixel]; - if( TIFFGetR(rgba) == (uint32) red && TIFFGetG(rgba) == (uint32) green && - TIFFGetB(rgba) == (uint32) blue && TIFFGetA(rgba) == (uint32) alpha ) { + if( TIFFGetR(rgba) >= (uint32) min_red && + TIFFGetR(rgba) <= (uint32) max_red && + TIFFGetG(rgba) >= (uint32) min_green && + TIFFGetG(rgba) <= (uint32) max_green && + TIFFGetB(rgba) >= (uint32) min_blue && + TIFFGetB(rgba) <= (uint32) max_blue && + TIFFGetA(rgba) >= (uint32) min_alpha && + TIFFGetA(rgba) <= (uint32) max_alpha ) { return 0; } fprintf( stderr, "Pixel %d did not match expected results.\n", pixel ); - fprintf( stderr, "Expect: %3d %3d %3d %3d\n", red, green, blue, alpha ); - fprintf( stderr, " Got: %3d %3d %3d %3d\n", - TIFFGetR(rgba), TIFFGetG(rgba), TIFFGetB(rgba), TIFFGetA(rgba) ); + fprintf( stderr, "Got R=%d (expected %d..%d), G=%d (expected %d..%d), B=%d (expected %d..%d), A=%d (expected %d..%d)\n", + TIFFGetR(rgba), min_red, max_red, + TIFFGetG(rgba), min_green, max_green, + TIFFGetB(rgba), min_blue, max_blue, + TIFFGetA(rgba), min_alpha, max_alpha ); return 1; } @@ -191,15 +240,17 @@ main(int argc, char **argv) return 1; } -#if JPEG_LIB_VERSION >= 70 - pixel_status |= check_rgb_pixel( 0, 18, 0, 41, buffer ); - pixel_status |= check_rgb_pixel( 64, 0, 0, 0, buffer ); - pixel_status |= check_rgb_pixel( 512, 5, 34, 196, buffer ); -#else - pixel_status |= check_rgb_pixel( 0, 15, 0, 18, buffer ); - pixel_status |= check_rgb_pixel( 64, 0, 0, 2, buffer ); - pixel_status |= check_rgb_pixel( 512, 6, 36, 182, buffer ); -#endif + /* + * JPEG decoding is inherently inexact, so we can't test for exact + * pixel values. (Well, if we knew exactly which libjpeg version + * we were using, and with what settings, we could expect specific + * values ... but it's not worth the trouble to keep track of.) + * Hence, use ranges of expected values. The ranges may need to be + * widened over time as more versions of libjpeg appear. + */ + pixel_status |= check_rgb_pixel( 0, 15, 18, 0, 0, 18, 41, buffer ); + pixel_status |= check_rgb_pixel( 64, 0, 0, 0, 0, 0, 2, buffer ); + pixel_status |= check_rgb_pixel( 512, 5, 6, 34, 36, 182, 196, buffer ); free( buffer ); @@ -224,15 +275,12 @@ main(int argc, char **argv) * accomplish it from the YCbCr subsampled buffer ourselves in which * case the results may be subtly different but similar. */ -#if JPEG_LIB_VERSION >= 70 - pixel_status |= check_rgba_pixel( 0, 18, 0, 41, 255, rgba_buffer ); - pixel_status |= check_rgba_pixel( 64, 0, 0, 0, 255, rgba_buffer ); - pixel_status |= check_rgba_pixel( 512, 5, 34, 196, 255, rgba_buffer ); -#else - pixel_status |= check_rgba_pixel( 0, 15, 0, 18, 255, rgba_buffer ); - pixel_status |= check_rgba_pixel( 64, 0, 0, 2, 255, rgba_buffer ); - pixel_status |= check_rgba_pixel( 512, 6, 36, 182, 255, rgba_buffer ); -#endif + pixel_status |= check_rgba_pixel( 0, 15, 18, 0, 0, 18, 41, 255, 255, + rgba_buffer ); + pixel_status |= check_rgba_pixel( 64, 0, 0, 0, 0, 0, 2, 255, 255, + rgba_buffer ); + pixel_status |= check_rgba_pixel( 512, 5, 6, 34, 36, 182, 196, 255, 255, + rgba_buffer ); free( rgba_buffer ); TIFFClose(tif); diff --git a/thirdparty/tiff-4.2.0/test/refs/o-deflate-last-strip-extra-data.tiff b/thirdparty/tiff-4.2.0/test/refs/o-deflate-last-strip-extra-data.tiff new file mode 100644 index 0000000000000000000000000000000000000000..5d56fe54686914a9a92d6e0483d76247f1cdb233 GIT binary patch literal 12560 zcmZ8n1zeNc`=4UNl~6#WBzL7oC><&(DblUfXoLZyQ4uKx0f`YqK|s1e7%(NI#wckR z=|&G2;i&zG*ZaHr=X1W>VS9I;_dL%z-zUy{|2`kU4FmxArmrP)JUnxk<_sxZ$vTeT z2yWp==f@DK#97`Ebb6ON>D>T#e>wH1XuhF-y+N_TG5e(NI(ZJ!!ww1Pe(|@(-LEp< zi{1wHYuwtK^NSf(KBOt%zg8Ttvnd45CEaYUQ^RPytnGD@tRu?u*GXfuW45@EWjWzyI1a3*?FqDUj0Vir&G;!Syfcw6f{3;Z7@W98q<` z?2D{gr`VuV+PxL-)`o;eRj{8*V2NB&lj`;gZ5&6wDHOYK)wMF`yg5gP{yOd)EyJ=v%R@ivx7Q{;Le@S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->SB6I)zF~z%k)6qjt z|4!^5k?ffS5Ue8$?ApcK`>z@dh|o?~yXefYcZTXJI#{7V&%4q(8D_yyYOG{K`<@hXw8yy+u zUAVg%^3YugAGd1pp15N80wM{Ad>4OF;k4-cYgdtmu1h(bQ8G zi4zc2*9Eq3B+Zpt0)C>d$fNHuvl8jKe`9!)49GtT(|9vCj3wkX6kO{s-pGUBI8DE> z{k0*76ekwG6;QIho1I)dF4ktd$g*XRYXo23$=W6@H@!vUHFtK_I;#{1R}PQo>$^#Z zb<=31BMy{c{aO7l0N@k_;1mD=*e1W6`mKNZSN{U}JBr`>=YI81enWfe4B!U&{f#gH zK=<3{^uP5Pe)Va{*D?OOo`!rq%Wv1n{npp}txx_5K$k2il?)>?q{s*-!-Nc1GAhW> zA;W+S7#T`r$dM6AhB+CQWYm%2P6n8a8Ztb{@FZiJjF)8ikugF>6d568%#rbijCe9m zk#REr6M2Nw0D$@#03h@%0C4F%0ANG@qVFOA@SG9==%)ezcrOD0NNTdKXaRsbbO1o- z6##&To_sw603dq}04QW4>xdZu=wKnwgN^(@J6R?N06@bu Q8vFpjgaCPtLIA-30Tt?o+W-In literal 0 HcmV?d00001 diff --git a/thirdparty/tiff-4.2.0/test/refs/o-testfax4.tiff b/thirdparty/tiff-4.2.0/test/refs/o-testfax4.tiff new file mode 100644 index 0000000000000000000000000000000000000000..cad450456e019b455cdd4e54dbb1b184e4367462 GIT binary patch literal 106326 zcmV(_K-9lUNh$#HodE!VKj2U}Bo++^ghF9ZxMVgR4t=m+00^X3Efzh}4I@A!OvUq7eU?f3kCe_y}n_x%6B5DWzYz>q8r z1HlkX6$QbNY#j%}5R4@W!jP;j3&Rl1H4Vd%>^%>}5e!8U#E~pb6U7lsRNxp9TPCx` z%z$wivMX$98^;mMbsfi%?0p}|5)6eQ$dW9LBgqm>l_klNY@H{{5{#uO%9558w&@aH%MICka(G zZCrs9=o$Qf#t=CxvdLQ%MTIl%EwfRv&<5#U_ECXqXuU0BD#8 zM%O59YZ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Yd_PwbBFC*b{l<_}}N z4byMuW|^;Cb+Yq!?d83;dGtXJa|TbTeP>Vnb#gv-ffw`r>sc~b|1=2ki>A-bZeNis z9870lp#@p>NYDg-gtpp4wxLTc0*KP~n55+Tj0n=ZoTtXng=R`NY8L7xT!IBX^QZzZlaAyJ7oRyn~|9y3Hz#bC(Ky z67hTy$1FY+_E6cU+HFb8A#kWtN||^0DQx6X)at5K=VT`P(v)d5*AIcOK9}r^N?Jlx z6|!BlrW{;B>alH$DvH%(tXvTvFavDq>Uy43j4~e+bkXCjU*LE8ys{H@--#!F(JJRa z7QWZ%VDI9i3tdr)e($k$lHM%%o_~bifsWe^CGcK!Cph z5cq$bNQ%dQnePVv-oN~h9r#}+!ZY!|{LfIb|JYE2{@*Xgyo+bpf5!6u%m4Vyhv)zKjvpliBESa`0pJ90FN|k8Jm1U! z0n&KBkLSC1{^z)lZ~meG->SPG?UA!Ho5ynpM=wt{4?9mg K4{tkL;Qs(H8E*~% literal 0 HcmV?d00001 diff --git a/thirdparty/tiff-4.2.0/test/refs/o-tiff2ps-EPS1.ps b/thirdparty/tiff-4.2.0/test/refs/o-tiff2ps-EPS1.ps new file mode 100644 index 00000000..9d9da8a2 --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/refs/o-tiff2ps-EPS1.ps @@ -0,0 +1,112 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: tiff2ps +%%Title: miniswhite-1c-1b.tiff +%%CreationDate: Tue Apr 2 16:33:00 2019 +%%DocumentData: Clean7Bit +%%Origin: 0 0 +%%BoundingBox: 0 0 157 151 +%%LanguageLevel: 1 +%%Pages: 1 1 +%%EndComments +%%Page: 1 1 +gsave +100 dict begin +157.000000 151.000000 scale +%ImageData: 157 151 1 1 0 1 2 "image" +/scanLine 20 string def +157 151 1 +[157 0 0 -151 0 151] +{currentfile scanLine readhexstring pop} bind +image +0204153c0bfffffffff1ffffc7e01017ff8057ff5aa2803e1ffffffe0697ffffc7e485 +dfffd77fff48aca4dfd7fffff80003ffffcffe017fffe0c7ff1101250ffbfffff0241b +ffffffff80fffff37fff29fa48abf7ffffe41221ffffafffe3fffff19fff7ff82200f7 +fdff0040803fff5ffff5ffffe17ffffffe00088bc0070008259fff7ffffdfffff0ffff +7ffe040003c0001222001fff3ffffffffff15fdfffff084003004104809493fc1dffff +ffffc1badfffff0fd000010020140009e337ffffffffc3efffffff1abc040400000502 +04c6bfffffefffc36b7ffffe1ffe0c808804009490061bffffffff82fafffffc3dff08 +080000020042a78fffffffff87f7fffffc1fff0c0010428049080c27ffffffff87feff +fffc7ffd108000e0611090103ffffffffe077dfffffdbffc340003e808020203cfffff +fffc0bd77fffe0fffc000003e10022008877fffffffc06fdff3fe35ffc780217c02808 +28000ffffffff80f5fff6bc27ff040000fc00100a20103ffffffc007f5ff5ec2ffe082 +200bc480420454a1ffffffe0065fff7fc5ff0010005f1000205a4929ffffffe003d7ff +5fe7b80008202f029804000000ffffffc003efff37e5fe0010001e0401020240917fff +ffc004effffffbf80022001f018888a429087fffff8007b7ff5ff3e00080009c002122 +2544015ffff9c01fb7ff7ef7c0100400fc8408000020981ffff0783fe97f77fbc00800 +017e009006560a4547ffd2bffbffff5fd780020000f801041000a00033fccdbb9ffeff +1ba000500003fa1024a249125025f033effffeffffc000c00042f002860800880540d0 +47ffffffff574001c80003f9803e405054411400a9bfffffff7e0003804003f00a0302 +090114800005efffffff6f0003880007fc0203a040a3522a4017ffffffff5f00034000 +1af980a884120f1f8c000adffffffffff80fc0000ff82810420a27ffa800067fffffff +fff80f400033fc010a44508fff8e000bfffffffffffc0fc0003ff9809842404fff9e20 +07ffffdff7fffe0d400003ff200220291fff9b401afffffffffffc1fe01359ff089620 +015fffaa001bffffff1ffffa3d703eeeff810b22480fff905006fffffd6ffff81fb078 +adffe40e00412fff85400d7ffff9fffff01d787fedffe08ba8185fff501007ffff925f +fff03af8e7f7fff13f81401ffe054005ffffc1fffff03ffcf5effff00fa0094754d310 +05fffb07bfff803ffdddfffff00fe0145ea503d00fffff2f5fff003abfdffffff23fd2 +000151a7d81afffe3f7f7f803bbffffffff88fe081a02a23d006fffe7fbf39403ffebf +fffff23fe408068007d00bfffeffff6bf83f7f7ffffffd1fe01004aa2ff005fffff55f +46581afde7fffff087f00151008fd0027fffe2ff75f83fdc7bfffff05ff04004600fc0 +097fffc7ff79503677fffffff90ffa0495069f9002b7ffc9bf1e403edb7bfffff94ff0 +0420005f000127f7c3ff1e201764dffffff811440106963f80001ddffc5f0000296bbf +fffff842920b0200fe0000007fffbf00003681ebfffff8096cffc094fc20001fffff5f +000001015ffffff88064dfc001f980003ffffff700000200f9fffff0130a0fc29af400 +007fffffff00000003affffff8041403c2297d1800ffffffcf00000003fdfffff000a9 +87e402d01800fffffff720300002bfbffff8299407f005a09800fffffff764000003da +fffff80001aff020040000ffffffef78c00001fbfffff0002107f020880000ffffffc7 +db000003dffffff0024c87f042100000ffffffd759000003f6fffff0100895f801400d +00ffffffc7f3000007fffffff0024137f81e781fe0dfffff8f6c000007effffff00001 +fbfc29fc37b0ffffff8748000003feffffe000017efc11de5fe06fffff07d0000007df +fffff000037bfc13ff9ff07fffff8700000007fffffff0000ffcfe227ffff837ffff1f +2000000fbbfffff0003dfffe41fffffc1fffffe75000000fffffffe00205fdff647fff +f816ffffc7a0000007dfffffe06f843dff635fffff03fdff074000000fffffffe1b3e0 +1affe9ff67ff0522ce074000000fffffffc0bfb003ffc9f27ffe0398290700000007f7 +ffff81fff00fffce4077ff04a020470000000fffffff86fff8057ffcc05fff0000000f +0000000fffffff837ffa0ffff780ffff0000000700000017bfffff0fffff0ffff601ff +ff000000470000000fffffff09dfc78bffffc22fff0000000700000007ffffff0d5bf0 +eeffff89ffff0000000f0000000fffffff0bfff87eff8f12bfff000000270000000fff +ffff0feffc27fffd055fff000004070000001f7fffff3fb6d7ffff7907fffe0000000f +0000001ffffffc3e5d476fc0dd7fffff0000200f0000000ffffffc1ffdbdf5f12bffff +ff0000015f0000001ffffffc1f97edfff05fffefff0000003f0000000ffffff839febb +5ffcabbffffe000008bf0000002ffffffc3d56bfb7ff5fffffff000084ff0000001fff +fff85bdde5fffe29ffffff000000ff0000003fffffe066baaffffebbffffff000012ff +0000001ffffff02aebf66ffe5dffffff000001ff0000001fffffd057757bffff257fff +ff00000bff0000002fffffe0ad575f5fffd5ffffff000240ff0000003fffffc05bbcfe +bfff0a7fffff000003f70000006fffffc02aeb95ffffa5ffffff000093f70000003bff +ffc0aff99df77f0a7bfffe000423f70000003fffffb0112e733ffe95ddfefe000047c7 +0000007fffffe01bf7eeedff0ab3defe00000b970000005fffff804415a9b775a54fff +ee000027c70000007fffff8036db4a3fb685ba7ffe00008787000050bffffff0080455 +e6dd5867df6c000015870000007fffff801051a06eba9abfdffe000003070000605fff +ffc006082bb7ed954976f800000c07000000ffffffc004022a757a252bf7fc00002507 +0000a07effff700568591fe55ada2e9c00000007000000bffffe400a3a24a55a656fff +bc00000587000000fffffbe000845a5df81ad59af8000020070000009fffffe0004c24 +93c85556edf400000007000000ffffbf8000b25b2dbd1aa57bbc00000007000001ffff +ffa000491466e0035c5ffc00001407000001bfffffc000248b0bb86497db7000000007 +000000ffffff4000122a35390a26effc000000070000007fffff8000498782e454d579 +7c00000007000001bfffffc000210953ba89495ff400000007000001fbffffc0002892 +a968256ebde800000007000001ffffffc000858581f914dbfb7c00000007000003bfff +ff00002142649887699dfc00000007000001bfffff00004a80a961296dffe802000007 +000002dfffff00001191489822b757f800000007400001bfffff00001004a9a85576fb +d8000000077e2007ffffff0000038141500a97afb8000000077658077bffff00000611 +aca951ee79d000000007ffa207effffe0000008a51500c556ff000000007ffc907ffff +fe0000028141c80467e77000000007ff74065ffffe00000126ac50005cbfe000000007 +ffe80dfffffc0000008155a00017efc000000007fffe075ffffc000002a4aa58012937 +4000000007fffc0efffffc00000003ad50002acd8500000007fffd19dffffc000000a0 +62a000077f8058000007fffa0dfffffc00000084d9a800157501f0000007fffe06bfff +fc000000216450006dce023f000007fffc06bffff0000000601a400015d801ff500007 +fff009e7fff000000000418000057001ffb28007ffe0037fffe0000000c0a000000240 +07fffe8007fff0011bffe000000010010000007b21ffffe007ffffffffffe000000000 +000000007f82fffffc07ffffffffffc000000000000000007fc1ffffff07ffffffffff +c900000000000000006c04fffffb07ffffffffffffa0000000000000000c027ffff847 +ffffffffffffffc00000000000000001affffa27fffffffffffffff000000000000000 +04005ffc07fffffffffffffffd0000000000000000000000075fffffffffffffffc000 +000000000000220180ef1ffffffffffffffffe00000000000002000883ff1fffffffff +ffffffff00001800000000000009ff3fffffffffffffffff0000000001418000003bff +2fffffffffffffffff00010000027000901207ff7fffffffffffffffff7e00010037f8 +0018000fff7fffffffffffffffffff00a44007fc0030423fff7fffffffffffffffffff +c043002ffc003000afff +end +grestore +showpage +%%Trailer +%%EOF diff --git a/thirdparty/tiff-4.2.0/test/refs/o-tiff2ps-PS1.ps b/thirdparty/tiff-4.2.0/test/refs/o-tiff2ps-PS1.ps new file mode 100644 index 00000000..62c3e4bb --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/refs/o-tiff2ps-PS1.ps @@ -0,0 +1,115 @@ +%!PS-Adobe-3.0 +%%Creator: tiff2ps +%%Title: miniswhite-1c-1b.tiff +%%CreationDate: Tue Apr 2 16:33:00 2019 +%%DocumentData: Clean7Bit +%%Origin: 0 0 +%%BoundingBox: 0 0 157 151 +%%LanguageLevel: 1 +%%Pages: (atend) +%%EndComments +%%BeginSetup +%%EndSetup +%%Page: 1 1 +gsave +100 dict begin +157.000000 151.000000 scale +%ImageData: 157 151 1 1 0 1 2 "image" +/scanLine 20 string def +157 151 1 +[157 0 0 -151 0 151] +{currentfile scanLine readhexstring pop} bind +image +0204153c0bfffffffff1ffffc7e01017ff8057ff5aa2803e1ffffffe0697ffffc7e485 +dfffd77fff48aca4dfd7fffff80003ffffcffe017fffe0c7ff1101250ffbfffff0241b +ffffffff80fffff37fff29fa48abf7ffffe41221ffffafffe3fffff19fff7ff82200f7 +fdff0040803fff5ffff5ffffe17ffffffe00088bc0070008259fff7ffffdfffff0ffff +7ffe040003c0001222001fff3ffffffffff15fdfffff084003004104809493fc1dffff +ffffc1badfffff0fd000010020140009e337ffffffffc3efffffff1abc040400000502 +04c6bfffffefffc36b7ffffe1ffe0c808804009490061bffffffff82fafffffc3dff08 +080000020042a78fffffffff87f7fffffc1fff0c0010428049080c27ffffffff87feff +fffc7ffd108000e0611090103ffffffffe077dfffffdbffc340003e808020203cfffff +fffc0bd77fffe0fffc000003e10022008877fffffffc06fdff3fe35ffc780217c02808 +28000ffffffff80f5fff6bc27ff040000fc00100a20103ffffffc007f5ff5ec2ffe082 +200bc480420454a1ffffffe0065fff7fc5ff0010005f1000205a4929ffffffe003d7ff +5fe7b80008202f029804000000ffffffc003efff37e5fe0010001e0401020240917fff +ffc004effffffbf80022001f018888a429087fffff8007b7ff5ff3e00080009c002122 +2544015ffff9c01fb7ff7ef7c0100400fc8408000020981ffff0783fe97f77fbc00800 +017e009006560a4547ffd2bffbffff5fd780020000f801041000a00033fccdbb9ffeff +1ba000500003fa1024a249125025f033effffeffffc000c00042f002860800880540d0 +47ffffffff574001c80003f9803e405054411400a9bfffffff7e0003804003f00a0302 +090114800005efffffff6f0003880007fc0203a040a3522a4017ffffffff5f00034000 +1af980a884120f1f8c000adffffffffff80fc0000ff82810420a27ffa800067fffffff +fff80f400033fc010a44508fff8e000bfffffffffffc0fc0003ff9809842404fff9e20 +07ffffdff7fffe0d400003ff200220291fff9b401afffffffffffc1fe01359ff089620 +015fffaa001bffffff1ffffa3d703eeeff810b22480fff905006fffffd6ffff81fb078 +adffe40e00412fff85400d7ffff9fffff01d787fedffe08ba8185fff501007ffff925f +fff03af8e7f7fff13f81401ffe054005ffffc1fffff03ffcf5effff00fa0094754d310 +05fffb07bfff803ffdddfffff00fe0145ea503d00fffff2f5fff003abfdffffff23fd2 +000151a7d81afffe3f7f7f803bbffffffff88fe081a02a23d006fffe7fbf39403ffebf +fffff23fe408068007d00bfffeffff6bf83f7f7ffffffd1fe01004aa2ff005fffff55f +46581afde7fffff087f00151008fd0027fffe2ff75f83fdc7bfffff05ff04004600fc0 +097fffc7ff79503677fffffff90ffa0495069f9002b7ffc9bf1e403edb7bfffff94ff0 +0420005f000127f7c3ff1e201764dffffff811440106963f80001ddffc5f0000296bbf +fffff842920b0200fe0000007fffbf00003681ebfffff8096cffc094fc20001fffff5f +000001015ffffff88064dfc001f980003ffffff700000200f9fffff0130a0fc29af400 +007fffffff00000003affffff8041403c2297d1800ffffffcf00000003fdfffff000a9 +87e402d01800fffffff720300002bfbffff8299407f005a09800fffffff764000003da +fffff80001aff020040000ffffffef78c00001fbfffff0002107f020880000ffffffc7 +db000003dffffff0024c87f042100000ffffffd759000003f6fffff0100895f801400d +00ffffffc7f3000007fffffff0024137f81e781fe0dfffff8f6c000007effffff00001 +fbfc29fc37b0ffffff8748000003feffffe000017efc11de5fe06fffff07d0000007df +fffff000037bfc13ff9ff07fffff8700000007fffffff0000ffcfe227ffff837ffff1f +2000000fbbfffff0003dfffe41fffffc1fffffe75000000fffffffe00205fdff647fff +f816ffffc7a0000007dfffffe06f843dff635fffff03fdff074000000fffffffe1b3e0 +1affe9ff67ff0522ce074000000fffffffc0bfb003ffc9f27ffe0398290700000007f7 +ffff81fff00fffce4077ff04a020470000000fffffff86fff8057ffcc05fff0000000f +0000000fffffff837ffa0ffff780ffff0000000700000017bfffff0fffff0ffff601ff +ff000000470000000fffffff09dfc78bffffc22fff0000000700000007ffffff0d5bf0 +eeffff89ffff0000000f0000000fffffff0bfff87eff8f12bfff000000270000000fff +ffff0feffc27fffd055fff000004070000001f7fffff3fb6d7ffff7907fffe0000000f +0000001ffffffc3e5d476fc0dd7fffff0000200f0000000ffffffc1ffdbdf5f12bffff +ff0000015f0000001ffffffc1f97edfff05fffefff0000003f0000000ffffff839febb +5ffcabbffffe000008bf0000002ffffffc3d56bfb7ff5fffffff000084ff0000001fff +fff85bdde5fffe29ffffff000000ff0000003fffffe066baaffffebbffffff000012ff +0000001ffffff02aebf66ffe5dffffff000001ff0000001fffffd057757bffff257fff +ff00000bff0000002fffffe0ad575f5fffd5ffffff000240ff0000003fffffc05bbcfe +bfff0a7fffff000003f70000006fffffc02aeb95ffffa5ffffff000093f70000003bff +ffc0aff99df77f0a7bfffe000423f70000003fffffb0112e733ffe95ddfefe000047c7 +0000007fffffe01bf7eeedff0ab3defe00000b970000005fffff804415a9b775a54fff +ee000027c70000007fffff8036db4a3fb685ba7ffe00008787000050bffffff0080455 +e6dd5867df6c000015870000007fffff801051a06eba9abfdffe000003070000605fff +ffc006082bb7ed954976f800000c07000000ffffffc004022a757a252bf7fc00002507 +0000a07effff700568591fe55ada2e9c00000007000000bffffe400a3a24a55a656fff +bc00000587000000fffffbe000845a5df81ad59af8000020070000009fffffe0004c24 +93c85556edf400000007000000ffffbf8000b25b2dbd1aa57bbc00000007000001ffff +ffa000491466e0035c5ffc00001407000001bfffffc000248b0bb86497db7000000007 +000000ffffff4000122a35390a26effc000000070000007fffff8000498782e454d579 +7c00000007000001bfffffc000210953ba89495ff400000007000001fbffffc0002892 +a968256ebde800000007000001ffffffc000858581f914dbfb7c00000007000003bfff +ff00002142649887699dfc00000007000001bfffff00004a80a961296dffe802000007 +000002dfffff00001191489822b757f800000007400001bfffff00001004a9a85576fb +d8000000077e2007ffffff0000038141500a97afb8000000077658077bffff00000611 +aca951ee79d000000007ffa207effffe0000008a51500c556ff000000007ffc907ffff +fe0000028141c80467e77000000007ff74065ffffe00000126ac50005cbfe000000007 +ffe80dfffffc0000008155a00017efc000000007fffe075ffffc000002a4aa58012937 +4000000007fffc0efffffc00000003ad50002acd8500000007fffd19dffffc000000a0 +62a000077f8058000007fffa0dfffffc00000084d9a800157501f0000007fffe06bfff +fc000000216450006dce023f000007fffc06bffff0000000601a400015d801ff500007 +fff009e7fff000000000418000057001ffb28007ffe0037fffe0000000c0a000000240 +07fffe8007fff0011bffe000000010010000007b21ffffe007ffffffffffe000000000 +000000007f82fffffc07ffffffffffc000000000000000007fc1ffffff07ffffffffff +c900000000000000006c04fffffb07ffffffffffffa0000000000000000c027ffff847 +ffffffffffffffc00000000000000001affffa27fffffffffffffff000000000000000 +04005ffc07fffffffffffffffd0000000000000000000000075fffffffffffffffc000 +000000000000220180ef1ffffffffffffffffe00000000000002000883ff1fffffffff +ffffffff00001800000000000009ff3fffffffffffffffff0000000001418000003bff +2fffffffffffffffff00010000027000901207ff7fffffffffffffffff7e00010037f8 +0018000fff7fffffffffffffffffff00a44007fc0030423fff7fffffffffffffffffff +c043002ffc003000afff +end +grestore +showpage +%%Trailer +%%Pages: 1 +%%EOF diff --git a/thirdparty/tiff-4.2.0/test/refs/o-tiff2ps-PS2.ps b/thirdparty/tiff-4.2.0/test/refs/o-tiff2ps-PS2.ps new file mode 100644 index 00000000..e7fe4339 --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/refs/o-tiff2ps-PS2.ps @@ -0,0 +1,104 @@ +%!PS-Adobe-3.0 +%%Creator: tiff2ps +%%Title: miniswhite-1c-1b.tiff +%%CreationDate: Tue Apr 2 16:33:00 2019 +%%DocumentData: Clean7Bit +%%Origin: 0 0 +%%BoundingBox: 0 0 157 151 +%%LanguageLevel: 2 +%%Pages: (atend) +%%EndComments +%%BeginSetup +gsave newpath clippath pathbbox grestore + 4 2 roll 2 copy translate + exch 3 1 roll sub 3 1 roll sub exch + currentpagedevice /PageSize get aload pop + exch 3 1 roll div 3 1 roll div abs exch abs + 2 copy gt { exch } if pop + dup 1 lt { dup scale } { pop } ifelse +%%EndSetup +%%Page: 1 1 +%%PageOrientation: Landscape +%%PageBoundingBox: 0 0 157 151 +1 dict begin /PageSize [ 157.000000 151.000000 ] def currentdict end setpagedevice +<< + /Policies << + /PageSize 3 + >> +>> setpagedevice +gsave +100 dict begin +157.000000 151.000000 scale +% PostScript Level 2 only. +/DeviceGray setcolorspace +{ % exec + /im_stream currentfile /ASCII85Decode filter def + << + /ImageType 1 + /Width 157 + /Height 151 + /ImageMatrix [ 157 0 0 -151 0 151 ] + /BitsPerComponent 1 + /Interpolate true + /Decode [1 0] + /DataSource im_stream + >> image + im_stream status { im_stream flushfile } if +} +exec +rVPltoDejk!"Ju/3$7VQ!.UpIV-SSehuE`Xq.Ka.3#d/d!%7!!%KK!"=AXeciN^#QOiDmG7gC:]MI8!"NB:J-Xp1#Qb#+^OO$!TE#cC5^]4?7!"PYE!!)c.r;XM.Iqrj&iW&rY!'Wgo +!!)LAs8N&Uli6Yua8c2?!'Cem!!)+JqtpEnqYg:O5QCcq!'HKr!!2!Yo7(u]s(cQKj8]/[!.>"N +!!C(cF4GB[9BpOE5DJ+uP7 +TF;qBJ,a$YhVHntrh'5q5N#'4JI"L/qu6bFp](9NBA`b#LVO[UL]fs:s8ITLDu$C*]!q_l5Qh&e +TI>_qS+\nzW5&)'a +!+Fd[!!",I!!2Z*s82lSrSQ2a!+`k+z!!D.$m%sdWC#Ao_!*0'[!!!#W!!U6#_%?Zro\I"G!,o(: +!!!(^!!hFXLJe*knc->M!.)ENJ,fcR!"\(EJ._i(FB@Xu!3bkd!!$l/!"[$R(^L*O^ja&V!W'S- +!!#1_!"ZjI$4m1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8W*!!!'e6mFBA!p"9lYs8W,os8W+L!!%NK[Wm3>X"&jVs8W,os8W'`!!#7`hY+$>G.+%O +s8W,os8W'$!!#7`f54QTg6"]qj84]s8W,o!/pZG!!3-"rn15Rs._h$s8W,o!#P2+!!E9$s*gtTs6("Y +s8W,o!!2kf!!E9$rEE:"rmo0*s8W,o!!D`k!!E9$s85cus4&lNs8W,o!!;:*!!E9$s'M=(s7h+o +VuQel!!Von!!E9$s*H(os6>L@&-)\)!!2m\!!E9$s5'6Ks,o,8_#OH0!!E$^!"],0s.ADfs6;!2 +!3cFt!"\c?!"],0s8Tf_s8%fU!)7tVm8huE`Wz!WW3"s8W,ts7^m@huE`Wz!<<)^s8W-!s8Vcm^]4?7 +z!<<*!s8K`^s8U";ci=%Gz!<<&us8A#YDsd<"J,fQLz!.k1Ls2YHFkPt#OJ,fQLz!!*%'^\@p2 +cb7*oJ,fQLz!!#6rs3LlJci6fA~> +end +grestore +showpage +%%Trailer +%%Pages: 1 +%%EOF diff --git a/thirdparty/tiff-4.2.0/test/refs/o-tiff2ps-PS3.ps b/thirdparty/tiff-4.2.0/test/refs/o-tiff2ps-PS3.ps new file mode 100644 index 00000000..6ec22b9b --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/refs/o-tiff2ps-PS3.ps @@ -0,0 +1,104 @@ +%!PS-Adobe-3.0 +%%Creator: tiff2ps +%%Title: miniswhite-1c-1b.tiff +%%CreationDate: Tue Apr 2 16:33:00 2019 +%%DocumentData: Clean7Bit +%%Origin: 0 0 +%%BoundingBox: 0 0 157 151 +%%LanguageLevel: 3 +%%Pages: (atend) +%%EndComments +%%BeginSetup +gsave newpath clippath pathbbox grestore + 4 2 roll 2 copy translate + exch 3 1 roll sub 3 1 roll sub exch + currentpagedevice /PageSize get aload pop + exch 3 1 roll div 3 1 roll div abs exch abs + 2 copy gt { exch } if pop + dup 1 lt { dup scale } { pop } ifelse +%%EndSetup +%%Page: 1 1 +%%PageOrientation: Landscape +%%PageBoundingBox: 0 0 157 151 +1 dict begin /PageSize [ 157.000000 151.000000 ] def currentdict end setpagedevice +<< + /Policies << + /PageSize 3 + >> +>> setpagedevice +gsave +100 dict begin +157.000000 151.000000 scale +% PostScript Level 2 only. +/DeviceGray setcolorspace +{ % exec + /im_stream currentfile /ASCII85Decode filter def + << + /ImageType 1 + /Width 157 + /Height 151 + /ImageMatrix [ 157 0 0 -151 0 151 ] + /BitsPerComponent 1 + /Interpolate true + /Decode [1 0] + /DataSource im_stream + >> image + im_stream status { im_stream flushfile } if +} +exec +rVPltoDejk!"Ju/3$7VQ!.UpIV-SSehuE`Xq.Ka.3#d/d!%7!!%KK!"=AXeciN^#QOiDmG7gC:]MI8!"NB:J-Xp1#Qb#+^OO$!TE#cC5^]4?7!"PYE!!)c.r;XM.Iqrj&iW&rY!'Wgo +!!)LAs8N&Uli6Yua8c2?!'Cem!!)+JqtpEnqYg:O5QCcq!'HKr!!2!Yo7(u]s(cQKj8]/[!.>"N +!!C(cF4GB[9BpOE5DJ+uP7 +TF;qBJ,a$YhVHntrh'5q5N#'4JI"L/qu6bFp](9NBA`b#LVO[UL]fs:s8ITLDu$C*]!q_l5Qh&e +TI>_qS+\nzW5&)'a +!+Fd[!!",I!!2Z*s82lSrSQ2a!+`k+z!!D.$m%sdWC#Ao_!*0'[!!!#W!!U6#_%?Zro\I"G!,o(: +!!!(^!!hFXLJe*knc->M!.)ENJ,fcR!"\(EJ._i(FB@Xu!3bkd!!$l/!"[$R(^L*O^ja&V!W'S- +!!#1_!"ZjI$4m1Jn6bn!X"<`9!!N'^!.Vcc+ohTRn/pti>5U&C!!(B=!<:#'+92BN^b,TcY#m(5 +!!0lcJ:GL&!!!!(E$'O9e_DhR!!.U8`kT:i5QCcn^`3%DJ+t\h!!*'"PR#!SJ,fQNi#hFb)=J,hP/L9J^T!!!!'n-/](q-\.> +8,tP5iP32SKE(uVYRgWgs.KDkfEaS>iSWjg+92BHm^rJoBu#5uiZJ>rs8UZ75QCch]l!E?rrN0" +s*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L@&-)\)!!2m\!!E9$s5'6Ks,o,8_#OH0!!E$^!"],0s.ADfs6;!2 +!3cFt!"\c?!"],0s8Tf_s8%fU!)7tVm8huE`Wz!WW3"s8W,ts7^m@huE`Wz!<<)^s8W-!s8Vcm^]4?7 +z!<<*!s8K`^s8U";ci=%Gz!<<&us8A#YDsd<"J,fQLz!.k1Ls2YHFkPt#OJ,fQLz!!*%'^\@p2 +cb7*oJ,fQLz!!#6rs3LlJci6fA~> +end +grestore +showpage +%%Trailer +%%Pages: 1 +%%EOF diff --git a/thirdparty/tiff-4.0.3/test/rewrite_tag.c b/thirdparty/tiff-4.2.0/test/rewrite_tag.c similarity index 89% rename from thirdparty/tiff-4.0.3/test/rewrite_tag.c rename to thirdparty/tiff-4.2.0/test/rewrite_tag.c index 1023f166..1708b024 100644 --- a/thirdparty/tiff-4.0.3/test/rewrite_tag.c +++ b/thirdparty/tiff-4.2.0/test/rewrite_tag.c @@ -1,5 +1,3 @@ -/* $Id: rewrite_tag.c,v 1.5 2012-06-13 04:38:55 fwarmerdam Exp $ */ - /* * Copyright (c) 2007, Frank Warmerdam * @@ -32,6 +30,7 @@ #include "tif_config.h" #include +#include #ifdef HAVE_UNISTD_H # include @@ -40,7 +39,6 @@ #include "tiffio.h" #include "tiffiop.h" -const uint32 width = 10; const uint32 length = 40; const uint32 rows_per_strip = 1; @@ -51,6 +49,7 @@ int test_packbits() int i; unsigned char buf[10] = {0,0,0,0,0,0,0,0,0,0}; + uint32 width = 10; int length = 20; const char *filename = "test_packbits.tif"; @@ -138,17 +137,20 @@ int test_packbits() /************************************************************************/ /* rewrite_test() */ /************************************************************************/ -int rewrite_test( const char *filename, int length, int bigtiff, +int rewrite_test( const char *filename, uint32 width, int length, int bigtiff, uint64 base_value ) { TIFF *tif; int i; - unsigned char buf[10] = {5,6,7,8,9,10,11,12,13,14}; + unsigned char *buf; uint64 *rowoffset, *rowbytes; uint64 *upd_rowoffset; uint64 *upd_bytecount; + buf = calloc(1, width); + assert(buf); + /* Test whether we can write tags. */ if( bigtiff ) tif = TIFFOpen(filename, "w8"); @@ -157,6 +159,7 @@ int rewrite_test( const char *filename, int length, int bigtiff, if (!tif) { fprintf (stderr, "Can't create test TIFF file %s.\n", filename); + free(buf); return 1; } @@ -191,7 +194,7 @@ int rewrite_test( const char *filename, int length, int bigtiff, for (i = 0; i < length; i++ ) { - if( !TIFFWriteScanline( tif, buf, i, 0 ) ) + if( TIFFWriteScanline( tif, buf, i, 0 ) == -1 ) { fprintf (stderr, "Can't write image data.\n"); goto failure; @@ -204,6 +207,7 @@ int rewrite_test( const char *filename, int length, int bigtiff, tif = TIFFOpen(filename, "r+"); if (!tif) { fprintf (stderr, "Can't open test TIFF file %s.\n", filename); + free(buf); return 1; } @@ -221,7 +225,7 @@ int rewrite_test( const char *filename, int length, int bigtiff, upd_rowoffset = (uint64 *) _TIFFmalloc(sizeof(uint64) * length); for( i = 0; i < length; i++ ) - upd_rowoffset[i] = base_value + i*10; + upd_rowoffset[i] = base_value + i*width; if( !_TIFFRewriteField( tif, TIFFTAG_STRIPOFFSETS, TIFF_LONG8, length, upd_rowoffset ) ) @@ -234,7 +238,7 @@ int rewrite_test( const char *filename, int length, int bigtiff, upd_bytecount = (uint64 *) _TIFFmalloc(sizeof(uint64) * length); for( i = 0; i < length; i++ ) - upd_bytecount[i] = 100 + i*10; + upd_bytecount[i] = 100 + i*width; if( !_TIFFRewriteField( tif, TIFFTAG_STRIPBYTECOUNTS, TIFF_LONG8, length, upd_bytecount ) ) @@ -252,6 +256,7 @@ int rewrite_test( const char *filename, int length, int bigtiff, tif = TIFFOpen(filename, "r"); if (!tif) { fprintf (stderr, "Can't open test TIFF file %s.\n", filename); + free(buf); return 1; } @@ -263,7 +268,7 @@ int rewrite_test( const char *filename, int length, int bigtiff, for( i = 0; i < length; i++ ) { - uint64 expect = base_value + i*10; + uint64 expect = base_value + i*width; if( rowoffset[i] != expect ) { @@ -286,7 +291,7 @@ int rewrite_test( const char *filename, int length, int bigtiff, for( i = 0; i < length; i++ ) { - uint64 expect = 100 + i*10; + uint64 expect = 100 + i*width; if( rowbytes[i] != expect ) { @@ -302,6 +307,7 @@ int rewrite_test( const char *filename, int length, int bigtiff, } TIFFClose( tif ); + free(buf); /* All tests passed; delete file and exit with success status. */ unlink(filename); @@ -310,6 +316,7 @@ int rewrite_test( const char *filename, int length, int bigtiff, failure: /* Something goes wrong; close file and return unsuccessful status. */ TIFFClose(tif); + free(buf); /* unlink(filename); */ return 1; @@ -320,25 +327,27 @@ int rewrite_test( const char *filename, int length, int bigtiff, /* main() */ /************************************************************************/ int -main(int argc, char **argv) +main(void) { - (void) argc; - (void) argv; int failure = 0; failure |= test_packbits(); /* test fairly normal use */ - failure |= rewrite_test( "rewrite1.tif", 10, 0, 100 ); - failure |= rewrite_test( "rewrite2.tif", 10, 1, 100 ); + failure |= rewrite_test( "rewrite1.tif", 10, 10, 0, 100 ); + failure |= rewrite_test( "rewrite2.tif", 10, 10, 1, 100 ); /* test case of fitting all in directory entry */ - failure |= rewrite_test( "rewrite3.tif", 1, 0, 100 ); - failure |= rewrite_test( "rewrite4.tif", 1, 1, 100 ); + failure |= rewrite_test( "rewrite3.tif", 10, 1, 0, 100 ); + failure |= rewrite_test( "rewrite4.tif", 10, 1, 1, 100 ); /* test with very large values that don't fit in 4bytes (bigtiff only) */ - failure |= rewrite_test( "rewrite5.tif", 1000, 1, 0x6000000000ULL ); - failure |= rewrite_test( "rewrite6.tif", 1, 1, 0x6000000000ULL ); + failure |= rewrite_test( "rewrite5.tif", 10, 1000, 1, 0x6000000000ULL ); + failure |= rewrite_test( "rewrite6.tif", 10, 1, 1, 0x6000000000ULL ); + + /* StripByteCounts on LONG */ + failure |= rewrite_test( "rewrite7.tif", 65536, 1, 0, 100 ); + failure |= rewrite_test( "rewrite8.tif", 65536, 2, 0, 100 ); return failure; } diff --git a/thirdparty/tiff-4.0.3/test/short_tag.c b/thirdparty/tiff-4.2.0/test/short_tag.c similarity index 98% rename from thirdparty/tiff-4.0.3/test/short_tag.c rename to thirdparty/tiff-4.2.0/test/short_tag.c index 7d5a07cc..75e7f5d5 100644 --- a/thirdparty/tiff-4.0.3/test/short_tag.c +++ b/thirdparty/tiff-4.2.0/test/short_tag.c @@ -1,5 +1,3 @@ -/* $Id: short_tag.c,v 1.8 2008/04/15 14:20:30 dron Exp $ */ - /* * Copyright (c) 2004, Andrey Kiselev * @@ -140,7 +138,7 @@ main() } /* Write dummy pixel data. */ - if (!TIFFWriteScanline(tif, buf, 0, 0) < 0) { + if (TIFFWriteScanline(tif, buf, 0, 0) == -1) { fprintf (stderr, "Can't write image data.\n"); goto failure; } diff --git a/thirdparty/tiff-4.0.3/test/strip.c b/thirdparty/tiff-4.2.0/test/strip.c similarity index 98% rename from thirdparty/tiff-4.0.3/test/strip.c rename to thirdparty/tiff-4.2.0/test/strip.c index 447cb49f..f2cb7735 100644 --- a/thirdparty/tiff-4.0.3/test/strip.c +++ b/thirdparty/tiff-4.2.0/test/strip.c @@ -1,5 +1,3 @@ -/* $Id: strip.c,v 1.4 2008/03/28 01:42:06 bfriesen Exp $ */ - /* * Copyright (c) 2004, Andrey Kiselev * @@ -277,7 +275,7 @@ write_scanlines(TIFF *tif, const tdata_t array, const tsize_t size) } for (offset = 0, row = 0; row < length; offset+=scanlinesize, row++) { - if (TIFFWriteScanline(tif, (char *)array + offset, row, 0) < 0) { + if (TIFFWriteScanline(tif, (char *)array + offset, row, 0) == -1) { fprintf (stderr, "Can't write image data at row %lu.\n", (long) row); return -1; diff --git a/thirdparty/tiff-4.0.3/test/strip_rw.c b/thirdparty/tiff-4.2.0/test/strip_rw.c similarity index 98% rename from thirdparty/tiff-4.0.3/test/strip_rw.c rename to thirdparty/tiff-4.2.0/test/strip_rw.c index 5247c0b3..bcf7d735 100644 --- a/thirdparty/tiff-4.0.3/test/strip_rw.c +++ b/thirdparty/tiff-4.2.0/test/strip_rw.c @@ -1,5 +1,3 @@ -/* $Id: strip_rw.c,v 1.6 2008/03/28 01:42:07 bfriesen Exp $ */ - /* * Copyright (c) 2004, Andrey Kiselev * diff --git a/thirdparty/tiff-4.0.3/test/test_arrays.c b/thirdparty/tiff-4.2.0/test/test_arrays.c similarity index 99% rename from thirdparty/tiff-4.0.3/test/test_arrays.c rename to thirdparty/tiff-4.2.0/test/test_arrays.c index 83767662..226e9d0c 100644 --- a/thirdparty/tiff-4.0.3/test/test_arrays.c +++ b/thirdparty/tiff-4.2.0/test/test_arrays.c @@ -1,5 +1,3 @@ -/* $Id: test_arrays.c,v 1.3 2006/03/23 14:54:02 dron Exp $ */ - /* * Copyright (c) 2004, Andrey Kiselev * diff --git a/thirdparty/tiff-4.0.3/test/test_arrays.h b/thirdparty/tiff-4.2.0/test/test_arrays.h similarity index 96% rename from thirdparty/tiff-4.0.3/test/test_arrays.h rename to thirdparty/tiff-4.2.0/test/test_arrays.h index 5131b231..62e1d33c 100644 --- a/thirdparty/tiff-4.0.3/test/test_arrays.h +++ b/thirdparty/tiff-4.2.0/test/test_arrays.h @@ -1,5 +1,3 @@ -/* $Id: test_arrays.h,v 1.3 2006/03/23 14:54:02 dron Exp $ */ - /* * Copyright (c) 2004, Andrey Kiselev * diff --git a/thirdparty/tiff-4.2.0/test/testdeflatelaststripextradata.sh b/thirdparty/tiff-4.2.0/test/testdeflatelaststripextradata.sh new file mode 100644 index 00000000..115eb226 --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/testdeflatelaststripextradata.sh @@ -0,0 +1,43 @@ +#!/bin/sh +# +# check decoding of a deflate compressed file whose last strip which should +# contain data for only 4 lines has more in it. +. ${srcdir:-.}/common.sh +infile="${IMAGES}/deflate-last-strip-extra-data.tiff" +outfile="o-deflate-last-strip-extra-data.tiff" +rm -f $outfile +echo "$MEMCHECK ${TIFFCP} -c zip $infile $outfile" +eval "$MEMCHECK ${TIFFCP} -c zip $infile $outfile" +status=$? +if [ $status != 0 ] ; then + echo "Returned failed status $status!" + echo "Output (if any) is in \"${outfile}\"." + exit $status +fi +echo "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/$outfile" +eval "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/$outfile" +status=$? +if [ $status != 0 ] ; then + echo "Returned failed status $status!" + echo "\"${outfile}\" differs from reference file." + exit $status +fi + +outfile="o-deflate-last-strip-extra-data-tiled.tiff" +rm -f $outfile +echo "$MEMCHECK ${TIFFCP} -c zip -t -w 256 -l 256 $infile $outfile" +eval "$MEMCHECK ${TIFFCP} -c zip -t -w 256 -l 256 $infile $outfile" +status=$? +if [ $status != 0 ] ; then + echo "Returned failed status $status!" + echo "Output (if any) is in \"${outfile}\"." + exit $status +fi +echo "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/o-deflate-last-strip-extra-data.tiff" +eval "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/o-deflate-last-strip-extra-data.tiff" +status=$? +if [ $status != 0 ] ; then + echo "Returned failed status $status!" + echo "\"${outfile}\" differs from reference file." + exit $status +fi diff --git a/thirdparty/tiff-4.2.0/test/testfax4.sh b/thirdparty/tiff-4.2.0/test/testfax4.sh new file mode 100644 index 00000000..6f465e8f --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/testfax4.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# +# check decoding of a CCITT Group 4 encoded TIFF +# with 0 length runs +. ${srcdir:-.}/common.sh +infile="${IMAGES}/testfax4.tiff" +outfile="o-testfax4.tiff" +rm -f $outfile +echo "$MEMCHECK ${TIFFCP} -c lzw $infile $outfile" +eval "$MEMCHECK ${TIFFCP} -c lzw $infile $outfile" +status=$? +if [ $status != 0 ] ; then + echo "Returned failed status $status!" + echo "Output (if any) is in \"${outfile}\"." + exit $status +fi +echo "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/$outfile" +eval "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/$outfile" +status=$? +if [ $status != 0 ] ; then + echo "Returned failed status $status!" + echo "\"${outfile}\" differs from reference file." + exit $status +fi diff --git a/thirdparty/tiff-4.2.0/test/testtypes.c b/thirdparty/tiff-4.2.0/test/testtypes.c new file mode 100644 index 00000000..a36d21e5 --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/testtypes.c @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2019, Thomas Bernard + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that (i) the above copyright notices and this permission notice appear in + * all copies of the software and related documentation, and (ii) the names of + * Sam Leffler and Silicon Graphics may not be used in any advertising or + * publicity relating to the software without the specific, prior written + * permission of Sam Leffler and Silicon Graphics. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR + * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF + * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +/* + * TIFF Library + * + * Module to test ASCII tags read/write functions. + */ + +#include "tif_config.h" + +#include + +#include "tiffio.h" + +#define CHECK_TYPE(t, s) \ + if (sizeof(t) != s) { \ + fprintf(stderr, "sizeof(" # t ")=%d, it should be %d\n", (int)sizeof(t), (int)s); \ + return 1; \ + } + +int +main() +{ + CHECK_TYPE(TIFF_INT8_T, 1) + CHECK_TYPE(TIFF_INT16_T, 2) + CHECK_TYPE(TIFF_INT32_T, 4) + CHECK_TYPE(TIFF_INT64_T, 8) + CHECK_TYPE(TIFF_UINT8_T, 1) + CHECK_TYPE(TIFF_UINT16_T, 2) + CHECK_TYPE(TIFF_UINT32_T, 4) + CHECK_TYPE(TIFF_UINT64_T, 8) + CHECK_TYPE(TIFF_SIZE_T, sizeof(size_t)) + CHECK_TYPE(TIFF_SSIZE_T, sizeof(size_t)) + return 0; +} + +/* vim: set ts=8 sts=8 sw=8 noet: */ diff --git a/thirdparty/tiff-4.2.0/test/tiff2bw-palette-1c-8b.sh b/thirdparty/tiff-4.2.0/test/tiff2bw-palette-1c-8b.sh new file mode 100644 index 00000000..45fe63bd --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/tiff2bw-palette-1c-8b.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# Generated file, master is Makefile.am +. ${srcdir:-.}/common.sh +infile="$srcdir/images/palette-1c-8b.tiff" +outfile="o-tiff2bw-palette-1c-8b.tiff" +f_test_convert "$TIFF2BW" $infile $outfile +f_tiffinfo_validate $outfile diff --git a/thirdparty/tiff-4.2.0/test/tiff2bw-quad-lzw-compat.sh b/thirdparty/tiff-4.2.0/test/tiff2bw-quad-lzw-compat.sh new file mode 100644 index 00000000..bf5d5c94 --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/tiff2bw-quad-lzw-compat.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# Generated file, master is Makefile.am +. ${srcdir:-.}/common.sh +infile="$srcdir/images/quad-lzw-compat.tiff" +outfile="o-tiff2bw-quad-lzw-compat.tiff" +f_test_convert "$TIFF2BW" $infile $outfile +f_tiffinfo_validate $outfile diff --git a/thirdparty/tiff-4.2.0/test/tiff2bw-rgb-3c-8b.sh b/thirdparty/tiff-4.2.0/test/tiff2bw-rgb-3c-8b.sh new file mode 100644 index 00000000..8379f5a7 --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/tiff2bw-rgb-3c-8b.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# Generated file, master is Makefile.am +. ${srcdir:-.}/common.sh +infile="$srcdir/images/rgb-3c-8b.tiff" +outfile="o-tiff2bw-rgb-3c-8b.tiff" +f_test_convert "$TIFF2BW" $infile $outfile +f_tiffinfo_validate $outfile diff --git a/thirdparty/tiff-4.0.3/test/tiff2pdf.sh b/thirdparty/tiff-4.2.0/test/tiff2pdf.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiff2pdf.sh rename to thirdparty/tiff-4.2.0/test/tiff2pdf.sh diff --git a/thirdparty/tiff-4.2.0/test/tiff2ps-EPS1.sh b/thirdparty/tiff-4.2.0/test/tiff2ps-EPS1.sh new file mode 100644 index 00000000..150039ef --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/tiff2ps-EPS1.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# +# Basic sanity check for tiffps with PostScript Level 1 encapsulated output +# +PSFILE=o-tiff2ps-EPS1.ps +. ${srcdir:-.}/common.sh +f_test_stdout "${TIFF2PS} -e -1" "${IMG_MINISWHITE_1C_1B}" "${PSFILE}" +diff -I '%%CreationDate:.*' -I '%%Title:.*' -u "${REFS}/${PSFILE}" "${PSFILE}" || exit 1 diff --git a/thirdparty/tiff-4.2.0/test/tiff2ps-PS1.sh b/thirdparty/tiff-4.2.0/test/tiff2ps-PS1.sh new file mode 100644 index 00000000..ef08b13b --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/tiff2ps-PS1.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# +# Basic sanity check for tiffps with PostScript Level 1 output +# +PSFILE="o-tiff2ps-PS1.ps" +. ${srcdir:-.}/common.sh +f_test_stdout "${TIFF2PS} -a -p -1" "${IMG_MINISWHITE_1C_1B}" "${PSFILE}" +#diff -I '%%(CreationDate|Title):.*' -u "${REFS}/${PSFILE}" "${PSFILE}" || exit 1 +diff -I '%%CreationDate:.*' -I '%%Title:.*' -u "${REFS}/${PSFILE}" "${PSFILE}" || exit 1 diff --git a/thirdparty/tiff-4.2.0/test/tiff2ps-PS2.sh b/thirdparty/tiff-4.2.0/test/tiff2ps-PS2.sh new file mode 100644 index 00000000..b130b08c --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/tiff2ps-PS2.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# +# Basic sanity check for tiffps with PostScript Level 2 output +# +PSFILE=o-tiff2ps-PS2.ps +. ${srcdir:-.}/common.sh +f_test_stdout "${TIFF2PS} -a -p -2" "${IMG_MINISWHITE_1C_1B}" "${PSFILE}" +diff -I '%%CreationDate:.*' -I '%%Title:.*' -u "${REFS}/${PSFILE}" "${PSFILE}" || exit 1 diff --git a/thirdparty/tiff-4.2.0/test/tiff2ps-PS3.sh b/thirdparty/tiff-4.2.0/test/tiff2ps-PS3.sh new file mode 100644 index 00000000..d22be09a --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/tiff2ps-PS3.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# +# Basic sanity check for tiffps with PostScript Level 3 output +# +PSFILE=o-tiff2ps-PS3.ps +. ${srcdir:-.}/common.sh +f_test_stdout "${TIFF2PS} -a -p -3" "${IMG_MINISWHITE_1C_1B}" "${PSFILE}" +diff -I '%%CreationDate:.*' -I '%%Title:.*' -u "${REFS}/${PSFILE}" "${PSFILE}" || exit 1 diff --git a/thirdparty/tiff-4.0.3/test/tiff2rgba-logluv-3c-16b.sh b/thirdparty/tiff-4.2.0/test/tiff2rgba-logluv-3c-16b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiff2rgba-logluv-3c-16b.sh rename to thirdparty/tiff-4.2.0/test/tiff2rgba-logluv-3c-16b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiff2rgba-minisblack-1c-16b.sh b/thirdparty/tiff-4.2.0/test/tiff2rgba-minisblack-1c-16b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiff2rgba-minisblack-1c-16b.sh rename to thirdparty/tiff-4.2.0/test/tiff2rgba-minisblack-1c-16b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiff2rgba-minisblack-1c-8b.sh b/thirdparty/tiff-4.2.0/test/tiff2rgba-minisblack-1c-8b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiff2rgba-minisblack-1c-8b.sh rename to thirdparty/tiff-4.2.0/test/tiff2rgba-minisblack-1c-8b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiff2rgba-minisblack-2c-8b-alpha.sh b/thirdparty/tiff-4.2.0/test/tiff2rgba-minisblack-2c-8b-alpha.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiff2rgba-minisblack-2c-8b-alpha.sh rename to thirdparty/tiff-4.2.0/test/tiff2rgba-minisblack-2c-8b-alpha.sh diff --git a/thirdparty/tiff-4.0.3/test/tiff2rgba-miniswhite-1c-1b.sh b/thirdparty/tiff-4.2.0/test/tiff2rgba-miniswhite-1c-1b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiff2rgba-miniswhite-1c-1b.sh rename to thirdparty/tiff-4.2.0/test/tiff2rgba-miniswhite-1c-1b.sh diff --git a/thirdparty/tiff-4.2.0/test/tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh b/thirdparty/tiff-4.2.0/test/tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh new file mode 100644 index 00000000..d1225c94 --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# Generated file, master is Makefile.am +. ${srcdir:-.}/common.sh +infile="$srcdir/images/ojpeg_chewey_subsamp21_multi_strip.tiff" +outfile="o-tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.tiff" +f_test_convert "$TIFF2RGBA" $infile $outfile +f_tiffinfo_validate $outfile diff --git a/thirdparty/tiff-4.2.0/test/tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh b/thirdparty/tiff-4.2.0/test/tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh new file mode 100644 index 00000000..d69c99dc --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# Generated file, master is Makefile.am +. ${srcdir:-.}/common.sh +infile="$srcdir/images/ojpeg_single_strip_no_rowsperstrip.tiff" +outfile="o-tiff2rgba-ojpeg_single_strip_no_rowsperstrip.tiff" +f_test_convert "$TIFF2RGBA" $infile $outfile +f_tiffinfo_validate $outfile diff --git a/thirdparty/tiff-4.2.0/test/tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh b/thirdparty/tiff-4.2.0/test/tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh new file mode 100644 index 00000000..ca23a12d --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# Generated file, master is Makefile.am +. ${srcdir:-.}/common.sh +infile="$srcdir/images/ojpeg_zackthecat_subsamp22_single_strip.tiff" +outfile="o-tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.tiff" +f_test_convert "$TIFF2RGBA" $infile $outfile +f_tiffinfo_validate $outfile diff --git a/thirdparty/tiff-4.0.3/test/tiff2rgba-palette-1c-1b.sh b/thirdparty/tiff-4.2.0/test/tiff2rgba-palette-1c-1b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiff2rgba-palette-1c-1b.sh rename to thirdparty/tiff-4.2.0/test/tiff2rgba-palette-1c-1b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiff2rgba-palette-1c-4b.sh b/thirdparty/tiff-4.2.0/test/tiff2rgba-palette-1c-4b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiff2rgba-palette-1c-4b.sh rename to thirdparty/tiff-4.2.0/test/tiff2rgba-palette-1c-4b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiff2rgba-palette-1c-8b.sh b/thirdparty/tiff-4.2.0/test/tiff2rgba-palette-1c-8b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiff2rgba-palette-1c-8b.sh rename to thirdparty/tiff-4.2.0/test/tiff2rgba-palette-1c-8b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiff2rgba-quad-tile.jpg.sh b/thirdparty/tiff-4.2.0/test/tiff2rgba-quad-tile.jpg.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiff2rgba-quad-tile.jpg.sh rename to thirdparty/tiff-4.2.0/test/tiff2rgba-quad-tile.jpg.sh diff --git a/thirdparty/tiff-4.0.3/test/tiff2rgba-rgb-3c-16b.sh b/thirdparty/tiff-4.2.0/test/tiff2rgba-rgb-3c-16b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiff2rgba-rgb-3c-16b.sh rename to thirdparty/tiff-4.2.0/test/tiff2rgba-rgb-3c-16b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiff2rgba-rgb-3c-8b.sh b/thirdparty/tiff-4.2.0/test/tiff2rgba-rgb-3c-8b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiff2rgba-rgb-3c-8b.sh rename to thirdparty/tiff-4.2.0/test/tiff2rgba-rgb-3c-8b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcp-g3-1d-fill.sh b/thirdparty/tiff-4.2.0/test/tiffcp-g3-1d-fill.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcp-g3-1d-fill.sh rename to thirdparty/tiff-4.2.0/test/tiffcp-g3-1d-fill.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcp-g3-1d.sh b/thirdparty/tiff-4.2.0/test/tiffcp-g3-1d.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcp-g3-1d.sh rename to thirdparty/tiff-4.2.0/test/tiffcp-g3-1d.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcp-g3-2d-fill.sh b/thirdparty/tiff-4.2.0/test/tiffcp-g3-2d-fill.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcp-g3-2d-fill.sh rename to thirdparty/tiff-4.2.0/test/tiffcp-g3-2d-fill.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcp-g3-2d.sh b/thirdparty/tiff-4.2.0/test/tiffcp-g3-2d.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcp-g3-2d.sh rename to thirdparty/tiff-4.2.0/test/tiffcp-g3-2d.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcp-g3.sh b/thirdparty/tiff-4.2.0/test/tiffcp-g3.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcp-g3.sh rename to thirdparty/tiff-4.2.0/test/tiffcp-g3.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcp-g4.sh b/thirdparty/tiff-4.2.0/test/tiffcp-g4.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcp-g4.sh rename to thirdparty/tiff-4.2.0/test/tiffcp-g4.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcp-logluv.sh b/thirdparty/tiff-4.2.0/test/tiffcp-logluv.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcp-logluv.sh rename to thirdparty/tiff-4.2.0/test/tiffcp-logluv.sh diff --git a/thirdparty/tiff-4.2.0/test/tiffcp-lzw-compat.sh b/thirdparty/tiff-4.2.0/test/tiffcp-lzw-compat.sh new file mode 100644 index 00000000..bfc8d841 --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/tiffcp-lzw-compat.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# +# Basic sanity check for tiffcp with LZW Old-LZW decompression +# +. ${srcdir:-.}/common.sh +f_test_convert "${TIFFCP} -c none" "${IMG_QUAD_LZW_COMPAT}" "o-tiffcp-lzw-compat.tiff" \ No newline at end of file diff --git a/thirdparty/tiff-4.2.0/test/tiffcp-lzw-scanline-decode.sh b/thirdparty/tiff-4.2.0/test/tiffcp-lzw-scanline-decode.sh new file mode 100644 index 00000000..11654d19 --- /dev/null +++ b/thirdparty/tiff-4.2.0/test/tiffcp-lzw-scanline-decode.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# +# Basic sanity check for tiffcp with LZW decompression +# +. ${srcdir:-.}/common.sh +f_test_convert "${TIFFCP} -c none -r 1" "${IMG_LZW_SINGLE_STROP}" "o-tiffcp-lzw-scanline-decode.tiff" \ No newline at end of file diff --git a/thirdparty/tiff-4.0.3/test/tiffcp-split-join.sh b/thirdparty/tiff-4.2.0/test/tiffcp-split-join.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcp-split-join.sh rename to thirdparty/tiff-4.2.0/test/tiffcp-split-join.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcp-split.sh b/thirdparty/tiff-4.2.0/test/tiffcp-split.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcp-split.sh rename to thirdparty/tiff-4.2.0/test/tiffcp-split.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcp-thumbnail.sh b/thirdparty/tiff-4.2.0/test/tiffcp-thumbnail.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcp-thumbnail.sh rename to thirdparty/tiff-4.2.0/test/tiffcp-thumbnail.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-R90-logluv-3c-16b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-R90-logluv-3c-16b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-R90-logluv-3c-16b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-R90-logluv-3c-16b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-R90-minisblack-1c-16b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-R90-minisblack-1c-16b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-R90-minisblack-1c-16b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-R90-minisblack-1c-16b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-R90-minisblack-1c-8b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-R90-minisblack-1c-8b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-R90-minisblack-1c-8b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-R90-minisblack-1c-8b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-R90-minisblack-2c-8b-alpha.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-R90-minisblack-2c-8b-alpha.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-R90-minisblack-2c-8b-alpha.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-R90-minisblack-2c-8b-alpha.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-R90-miniswhite-1c-1b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-R90-miniswhite-1c-1b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-R90-miniswhite-1c-1b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-R90-miniswhite-1c-1b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-R90-palette-1c-1b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-R90-palette-1c-1b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-R90-palette-1c-1b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-R90-palette-1c-1b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-R90-palette-1c-4b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-R90-palette-1c-4b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-R90-palette-1c-4b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-R90-palette-1c-4b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-R90-palette-1c-8b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-R90-palette-1c-8b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-R90-palette-1c-8b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-R90-palette-1c-8b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-R90-rgb-3c-16b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-R90-rgb-3c-16b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-R90-rgb-3c-16b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-R90-rgb-3c-16b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-R90-rgb-3c-8b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-R90-rgb-3c-8b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-R90-rgb-3c-8b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-R90-rgb-3c-8b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-logluv-3c-16b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-logluv-3c-16b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-logluv-3c-16b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-logluv-3c-16b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-minisblack-1c-16b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-minisblack-1c-16b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-minisblack-1c-16b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-minisblack-1c-16b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-minisblack-1c-8b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-minisblack-1c-8b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-minisblack-1c-8b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-minisblack-1c-8b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-miniswhite-1c-1b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-miniswhite-1c-1b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-miniswhite-1c-1b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-miniswhite-1c-1b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-palette-1c-1b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-palette-1c-1b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-palette-1c-1b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-palette-1c-1b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-palette-1c-4b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-palette-1c-4b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-palette-1c-4b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-palette-1c-4b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-palette-1c-8b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-palette-1c-8b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-palette-1c-8b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-palette-1c-8b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-rgb-3c-16b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-rgb-3c-16b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-rgb-3c-16b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-rgb-3c-16b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-rgb-3c-8b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-rgb-3c-8b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-doubleflip-rgb-3c-8b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-doubleflip-rgb-3c-8b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extract-logluv-3c-16b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extract-logluv-3c-16b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extract-logluv-3c-16b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extract-logluv-3c-16b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extract-minisblack-1c-16b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extract-minisblack-1c-16b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extract-minisblack-1c-16b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extract-minisblack-1c-16b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extract-minisblack-1c-8b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extract-minisblack-1c-8b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extract-minisblack-1c-8b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extract-minisblack-1c-8b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extract-minisblack-2c-8b-alpha.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extract-minisblack-2c-8b-alpha.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extract-minisblack-2c-8b-alpha.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extract-minisblack-2c-8b-alpha.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extract-miniswhite-1c-1b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extract-miniswhite-1c-1b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extract-miniswhite-1c-1b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extract-miniswhite-1c-1b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extract-palette-1c-1b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extract-palette-1c-1b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extract-palette-1c-1b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extract-palette-1c-1b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extract-palette-1c-4b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extract-palette-1c-4b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extract-palette-1c-4b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extract-palette-1c-4b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extract-palette-1c-8b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extract-palette-1c-8b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extract-palette-1c-8b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extract-palette-1c-8b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extract-rgb-3c-16b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extract-rgb-3c-16b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extract-rgb-3c-16b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extract-rgb-3c-16b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extract-rgb-3c-8b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extract-rgb-3c-8b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extract-rgb-3c-8b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extract-rgb-3c-8b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-logluv-3c-16b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-logluv-3c-16b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-logluv-3c-16b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-logluv-3c-16b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-minisblack-1c-16b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-minisblack-1c-16b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-minisblack-1c-16b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-minisblack-1c-16b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-minisblack-1c-8b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-minisblack-1c-8b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-minisblack-1c-8b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-minisblack-1c-8b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-miniswhite-1c-1b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-miniswhite-1c-1b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-miniswhite-1c-1b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-miniswhite-1c-1b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-palette-1c-1b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-palette-1c-1b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-palette-1c-1b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-palette-1c-1b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-palette-1c-4b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-palette-1c-4b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-palette-1c-4b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-palette-1c-4b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-palette-1c-8b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-palette-1c-8b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-palette-1c-8b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-palette-1c-8b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-rgb-3c-16b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-rgb-3c-16b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-rgb-3c-16b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-rgb-3c-16b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-rgb-3c-8b.sh b/thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-rgb-3c-8b.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffcrop-extractz14-rgb-3c-8b.sh rename to thirdparty/tiff-4.2.0/test/tiffcrop-extractz14-rgb-3c-8b.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffdump.sh b/thirdparty/tiff-4.2.0/test/tiffdump.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffdump.sh rename to thirdparty/tiff-4.2.0/test/tiffdump.sh diff --git a/thirdparty/tiff-4.0.3/test/tiffinfo.sh b/thirdparty/tiff-4.2.0/test/tiffinfo.sh old mode 100755 new mode 100644 similarity index 100% rename from thirdparty/tiff-4.0.3/test/tiffinfo.sh rename to thirdparty/tiff-4.2.0/test/tiffinfo.sh diff --git a/thirdparty/tiff-4.0.3/test/tifftest.h b/thirdparty/tiff-4.2.0/test/tifftest.h similarity index 96% rename from thirdparty/tiff-4.0.3/test/tifftest.h rename to thirdparty/tiff-4.2.0/test/tifftest.h index 33052064..391b0f64 100644 --- a/thirdparty/tiff-4.0.3/test/tifftest.h +++ b/thirdparty/tiff-4.2.0/test/tifftest.h @@ -1,5 +1,3 @@ -/* $Id: tifftest.h,v 1.1 2008/04/15 14:18:36 dron Exp $ */ - /* * Copyright (c) 2008, Andrey Kiselev * diff --git a/thirdparty/tiff-4.2.0/tools/CMakeLists.txt b/thirdparty/tiff-4.2.0/tools/CMakeLists.txt new file mode 100644 index 00000000..ff2a1ddc --- /dev/null +++ b/thirdparty/tiff-4.2.0/tools/CMakeLists.txt @@ -0,0 +1,152 @@ +# CMake build for libtiff +# +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Written by Roger Leigh +# +# Permission to use, copy, modify, distribute, and sell this software and +# its documentation for any purpose is hereby granted without fee, provided +# that (i) the above copyright notices and this permission notice appear in +# all copies of the software and related documentation, and (ii) the names of +# Sam Leffler and Silicon Graphics may not be used in any advertising or +# publicity relating to the software without the specific, prior written +# permission of Sam Leffler and Silicon Graphics. +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# +# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# OF THIS SOFTWARE. + +extra_dist(Makefile.vc) + +include_directories(${PROJECT_SOURCE_DIR}/libtiff + ${PROJECT_BINARY_DIR}/libtiff + ${PROJECT_SOURCE_DIR}/port + ${CMAKE_CURRENT_BINARY_DIR}) + +add_executable(fax2ps fax2ps.c) +target_link_libraries(fax2ps tiff port) + +add_executable(fax2tiff fax2tiff.c) +target_link_libraries(fax2tiff tiff port) + +add_executable(pal2rgb pal2rgb.c) +target_link_libraries(pal2rgb tiff port) + +add_executable(ppm2tiff ppm2tiff.c) +target_link_libraries(ppm2tiff tiff port) + +add_executable(raw2tiff raw2tiff.c) +target_link_libraries(raw2tiff tiff port) + +add_executable(rgb2ycbcr rgb2ycbcr.c) +target_link_libraries(rgb2ycbcr tiff port) + +add_executable(thumbnail thumbnail.c) +target_link_libraries(thumbnail tiff port) + +add_executable(tiff2bw tiff2bw.c) +target_link_libraries(tiff2bw tiff port) + +add_executable(tiff2pdf tiff2pdf.c) +target_link_libraries(tiff2pdf tiff port) + +add_executable(tiff2ps tiff2ps.c) +target_link_libraries(tiff2ps tiff port) + +add_executable(tiff2rgba tiff2rgba.c) +target_link_libraries(tiff2rgba tiff port) + +add_executable(tiffcmp tiffcmp.c) +target_link_libraries(tiffcmp tiff port) + +add_executable(tiffcp tiffcp.c) +target_link_libraries(tiffcp tiff port) + +add_executable(tiffcrop tiffcrop.c) +target_link_libraries(tiffcrop tiff port) + +add_executable(tiffdither tiffdither.c) +target_link_libraries(tiffdither tiff port) + +add_executable(tiffdump tiffdump.c) +target_link_libraries(tiffdump tiff port) + +add_executable(tiffinfo tiffinfo.c) +target_link_libraries(tiffinfo tiff port) + +add_executable(tiffmedian tiffmedian.c) +target_link_libraries(tiffmedian tiff port) + +add_executable(tiffset tiffset.c) +target_link_libraries(tiffset tiff port) + +add_executable(tiffsplit tiffsplit.c) +target_link_libraries(tiffsplit tiff port) + +install(TARGETS fax2ps + fax2tiff + pal2rgb + ppm2tiff + raw2tiff + tiff2bw + tiff2pdf + tiff2ps + tiff2rgba + tiffcmp + tiffcp + tiffcrop + tiffdither + tiffdump + tiffinfo + tiffmedian + tiffset + tiffsplit + RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}") + +if(HAVE_OPENGL) + if(OPENGL_INCLUDE_DIR) + include_directories(${OPENGL_INCLUDE_DIR}) + endif() + if(GLUT_INCLUDE_DIR) + include_directories(${GLUT_INCLUDE_DIR}) + endif() + + add_executable(tiffgt tiffgt.c) + target_link_libraries(tiffgt tiff port ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES}) + + install(TARGETS tiffgt + RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}") +endif() + +if(WEBP_SUPPORT AND EMSCRIPTEN) + # Emscripten is pretty finnicky about linker flags. + # It needs --shared-memory if and only if atomics or bulk-memory is used. + foreach(target fax2ps + fax2tiff + pal2rgb + ppm2tiff + raw2tiff + rgb2ycbcr + thumbnail + tiff2bw + tiff2pdf + tiff2ps + tiff2rgba + tiffcmp + tiffcp + tiffcrop + tiffdither + tiffdump + tiffinfo + tiffmedian + tiffset + tiffsplit) + target_link_options(${target} PUBLIC "-Wl,--shared-memory") + endforeach() +endif() diff --git a/thirdparty/tiff-4.0.3/tools/Makefile.am b/thirdparty/tiff-4.2.0/tools/Makefile.am similarity index 90% rename from thirdparty/tiff-4.0.3/tools/Makefile.am rename to thirdparty/tiff-4.2.0/tools/Makefile.am index 6497f2dc..3054bee3 100644 --- a/thirdparty/tiff-4.0.3/tools/Makefile.am +++ b/thirdparty/tiff-4.2.0/tools/Makefile.am @@ -26,19 +26,16 @@ LIBPORT = $(top_builddir)/port/libport.la LIBTIFF = $(top_builddir)/libtiff/libtiff.la -EXTRA_DIST = Makefile.vc +EXTRA_DIST = \ + CMakeLists.txt \ + Makefile.vc bin_PROGRAMS = \ - bmp2tiff \ fax2ps \ fax2tiff \ - gif2tiff \ pal2rgb \ ppm2tiff \ - ras2tiff \ raw2tiff \ - rgb2ycbcr \ - thumbnail \ tiff2bw \ tiff2pdf \ tiff2ps \ @@ -56,33 +53,29 @@ if HAVE_OPENGL bin_PROGRAMS += tiffgt endif -EXTRA_PROGRAMS = sgi2tiff sgisv ycbcr +EXTRA_PROGRAMS = rgb2ycbcr thumbnail + +# Executable programs which need to be built in order to support tests +check_PROGRAMS = \ + rgb2ycbcr \ + thumbnail if HAVE_RPATH AM_LDFLAGS = $(LIBDIR) endif -bmp2tiff_SOURCES = bmp2tiff.c -bmp2tiff_LDADD = $(LIBTIFF) $(LIBPORT) - fax2ps_SOURCES = fax2ps.c fax2ps_LDADD = $(LIBTIFF) $(LIBPORT) fax2tiff_SOURCES = fax2tiff.c fax2tiff_LDADD = $(LIBTIFF) $(LIBPORT) -gif2tiff_SOURCES = gif2tiff.c -gif2tiff_LDADD = $(LIBTIFF) $(LIBPORT) - pal2rgb_SOURCES = pal2rgb.c pal2rgb_LDADD = $(LIBTIFF) $(LIBPORT) ppm2tiff_SOURCES = ppm2tiff.c ppm2tiff_LDADD = $(LIBTIFF) $(LIBPORT) -ras2tiff_SOURCES = ras2tiff.c rasterfile.h -ras2tiff_LDADD = $(LIBTIFF) $(LIBPORT) - raw2tiff_SOURCES = raw2tiff.c raw2tiff_LDADD = $(LIBTIFF) $(LIBPORT) diff --git a/thirdparty/tiff-4.0.3/tools/Makefile.in b/thirdparty/tiff-4.2.0/tools/Makefile.in similarity index 78% rename from thirdparty/tiff-4.0.3/tools/Makefile.in rename to thirdparty/tiff-4.2.0/tools/Makefile.in index b49b1f15..8b1a2460 100644 --- a/thirdparty/tiff-4.0.3/tools/Makefile.in +++ b/thirdparty/tiff-4.2.0/tools/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.4 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -40,23 +40,61 @@ # Process this file with automake to produce Makefile.in. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -75,20 +113,17 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = bmp2tiff$(EXEEXT) fax2ps$(EXEEXT) fax2tiff$(EXEEXT) \ - gif2tiff$(EXEEXT) pal2rgb$(EXEEXT) ppm2tiff$(EXEEXT) \ - ras2tiff$(EXEEXT) raw2tiff$(EXEEXT) rgb2ycbcr$(EXEEXT) \ - thumbnail$(EXEEXT) tiff2bw$(EXEEXT) tiff2pdf$(EXEEXT) \ - tiff2ps$(EXEEXT) tiff2rgba$(EXEEXT) tiffcmp$(EXEEXT) \ - tiffcp$(EXEEXT) tiffcrop$(EXEEXT) tiffdither$(EXEEXT) \ - tiffdump$(EXEEXT) tiffinfo$(EXEEXT) tiffmedian$(EXEEXT) \ - tiffset$(EXEEXT) tiffsplit$(EXEEXT) $(am__EXEEXT_1) +bin_PROGRAMS = fax2ps$(EXEEXT) fax2tiff$(EXEEXT) pal2rgb$(EXEEXT) \ + ppm2tiff$(EXEEXT) raw2tiff$(EXEEXT) tiff2bw$(EXEEXT) \ + tiff2pdf$(EXEEXT) tiff2ps$(EXEEXT) tiff2rgba$(EXEEXT) \ + tiffcmp$(EXEEXT) tiffcp$(EXEEXT) tiffcrop$(EXEEXT) \ + tiffdither$(EXEEXT) tiffdump$(EXEEXT) tiffinfo$(EXEEXT) \ + tiffmedian$(EXEEXT) tiffset$(EXEEXT) tiffsplit$(EXEEXT) \ + $(am__EXEEXT_1) @HAVE_OPENGL_TRUE@am__append_1 = tiffgt -EXTRA_PROGRAMS = sgi2tiff$(EXEEXT) sgisv$(EXEEXT) ycbcr$(EXEEXT) +EXTRA_PROGRAMS = rgb2ycbcr$(EXEEXT) thumbnail$(EXEEXT) +check_PROGRAMS = rgb2ycbcr$(EXEEXT) thumbnail$(EXEEXT) subdir = tools -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/depcomp \ - $(top_srcdir)/config/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -96,7 +131,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \ $(top_builddir)/libtiff/tiffconf.h CONFIG_CLEAN_FILES = @@ -104,43 +140,28 @@ CONFIG_CLEAN_VPATH_FILES = @HAVE_OPENGL_TRUE@am__EXEEXT_1 = tiffgt$(EXEEXT) am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) -am_bmp2tiff_OBJECTS = bmp2tiff.$(OBJEXT) -bmp2tiff_OBJECTS = $(am_bmp2tiff_OBJECTS) -bmp2tiff_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) +am_fax2ps_OBJECTS = fax2ps.$(OBJEXT) +fax2ps_OBJECTS = $(am_fax2ps_OBJECTS) +fax2ps_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = -am_fax2ps_OBJECTS = fax2ps.$(OBJEXT) -fax2ps_OBJECTS = $(am_fax2ps_OBJECTS) -fax2ps_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) am_fax2tiff_OBJECTS = fax2tiff.$(OBJEXT) fax2tiff_OBJECTS = $(am_fax2tiff_OBJECTS) fax2tiff_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_gif2tiff_OBJECTS = gif2tiff.$(OBJEXT) -gif2tiff_OBJECTS = $(am_gif2tiff_OBJECTS) -gif2tiff_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) am_pal2rgb_OBJECTS = pal2rgb.$(OBJEXT) pal2rgb_OBJECTS = $(am_pal2rgb_OBJECTS) pal2rgb_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) am_ppm2tiff_OBJECTS = ppm2tiff.$(OBJEXT) ppm2tiff_OBJECTS = $(am_ppm2tiff_OBJECTS) ppm2tiff_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -am_ras2tiff_OBJECTS = ras2tiff.$(OBJEXT) -ras2tiff_OBJECTS = $(am_ras2tiff_OBJECTS) -ras2tiff_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) am_raw2tiff_OBJECTS = raw2tiff.$(OBJEXT) raw2tiff_OBJECTS = $(am_raw2tiff_OBJECTS) raw2tiff_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) am_rgb2ycbcr_OBJECTS = rgb2ycbcr.$(OBJEXT) rgb2ycbcr_OBJECTS = $(am_rgb2ycbcr_OBJECTS) rgb2ycbcr_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -sgi2tiff_SOURCES = sgi2tiff.c -sgi2tiff_OBJECTS = sgi2tiff.$(OBJEXT) -sgi2tiff_LDADD = $(LDADD) -sgisv_SOURCES = sgisv.c -sgisv_OBJECTS = sgisv.$(OBJEXT) -sgisv_LDADD = $(LDADD) am_thumbnail_OBJECTS = thumbnail.$(OBJEXT) thumbnail_OBJECTS = $(am_thumbnail_OBJECTS) thumbnail_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) @@ -191,9 +212,6 @@ tiffset_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) am_tiffsplit_OBJECTS = tiffsplit.$(OBJEXT) tiffsplit_OBJECTS = $(am_tiffsplit_OBJECTS) tiffsplit_DEPENDENCIES = $(LIBTIFF) $(LIBPORT) -ycbcr_SOURCES = ycbcr.c -ycbcr_OBJECTS = ycbcr.$(OBJEXT) -ycbcr_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -208,7 +226,18 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/libtiff depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/fax2ps.Po ./$(DEPDIR)/fax2tiff.Po \ + ./$(DEPDIR)/pal2rgb.Po ./$(DEPDIR)/ppm2tiff.Po \ + ./$(DEPDIR)/raw2tiff.Po ./$(DEPDIR)/rgb2ycbcr.Po \ + ./$(DEPDIR)/thumbnail.Po ./$(DEPDIR)/tiff2bw.Po \ + ./$(DEPDIR)/tiff2pdf.Po ./$(DEPDIR)/tiff2ps.Po \ + ./$(DEPDIR)/tiff2rgba.Po ./$(DEPDIR)/tiffcmp.Po \ + ./$(DEPDIR)/tiffcp.Po ./$(DEPDIR)/tiffcrop.Po \ + ./$(DEPDIR)/tiffdither.Po ./$(DEPDIR)/tiffdump.Po \ + ./$(DEPDIR)/tiffgt-tiffgt.Po ./$(DEPDIR)/tiffinfo.Po \ + ./$(DEPDIR)/tiffmedian.Po ./$(DEPDIR)/tiffset.Po \ + ./$(DEPDIR)/tiffsplit.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -228,31 +257,46 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = $(bmp2tiff_SOURCES) $(fax2ps_SOURCES) $(fax2tiff_SOURCES) \ - $(gif2tiff_SOURCES) $(pal2rgb_SOURCES) $(ppm2tiff_SOURCES) \ - $(ras2tiff_SOURCES) $(raw2tiff_SOURCES) $(rgb2ycbcr_SOURCES) \ - sgi2tiff.c sgisv.c $(thumbnail_SOURCES) $(tiff2bw_SOURCES) \ +SOURCES = $(fax2ps_SOURCES) $(fax2tiff_SOURCES) $(pal2rgb_SOURCES) \ + $(ppm2tiff_SOURCES) $(raw2tiff_SOURCES) $(rgb2ycbcr_SOURCES) \ + $(thumbnail_SOURCES) $(tiff2bw_SOURCES) $(tiff2pdf_SOURCES) \ + $(tiff2ps_SOURCES) $(tiff2rgba_SOURCES) $(tiffcmp_SOURCES) \ + $(tiffcp_SOURCES) $(tiffcrop_SOURCES) $(tiffdither_SOURCES) \ + $(tiffdump_SOURCES) $(tiffgt_SOURCES) $(tiffinfo_SOURCES) \ + $(tiffmedian_SOURCES) $(tiffset_SOURCES) $(tiffsplit_SOURCES) +DIST_SOURCES = $(fax2ps_SOURCES) $(fax2tiff_SOURCES) \ + $(pal2rgb_SOURCES) $(ppm2tiff_SOURCES) $(raw2tiff_SOURCES) \ + $(rgb2ycbcr_SOURCES) $(thumbnail_SOURCES) $(tiff2bw_SOURCES) \ $(tiff2pdf_SOURCES) $(tiff2ps_SOURCES) $(tiff2rgba_SOURCES) \ $(tiffcmp_SOURCES) $(tiffcp_SOURCES) $(tiffcrop_SOURCES) \ $(tiffdither_SOURCES) $(tiffdump_SOURCES) $(tiffgt_SOURCES) \ $(tiffinfo_SOURCES) $(tiffmedian_SOURCES) $(tiffset_SOURCES) \ - $(tiffsplit_SOURCES) ycbcr.c -DIST_SOURCES = $(bmp2tiff_SOURCES) $(fax2ps_SOURCES) \ - $(fax2tiff_SOURCES) $(gif2tiff_SOURCES) $(pal2rgb_SOURCES) \ - $(ppm2tiff_SOURCES) $(ras2tiff_SOURCES) $(raw2tiff_SOURCES) \ - $(rgb2ycbcr_SOURCES) sgi2tiff.c sgisv.c $(thumbnail_SOURCES) \ - $(tiff2bw_SOURCES) $(tiff2pdf_SOURCES) $(tiff2ps_SOURCES) \ - $(tiff2rgba_SOURCES) $(tiffcmp_SOURCES) $(tiffcp_SOURCES) \ - $(tiffcrop_SOURCES) $(tiffdither_SOURCES) $(tiffdump_SOURCES) \ - $(tiffgt_SOURCES) $(tiffinfo_SOURCES) $(tiffmedian_SOURCES) \ - $(tiffset_SOURCES) $(tiffsplit_SOURCES) ycbcr.c + $(tiffsplit_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -266,6 +310,7 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CMAKE = @CMAKE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -313,6 +358,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -402,22 +448,19 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ LIBPORT = $(top_builddir)/port/libport.la LIBTIFF = $(top_builddir)/libtiff/libtiff.la -EXTRA_DIST = Makefile.vc +EXTRA_DIST = \ + CMakeLists.txt \ + Makefile.vc + @HAVE_RPATH_TRUE@AM_LDFLAGS = $(LIBDIR) -bmp2tiff_SOURCES = bmp2tiff.c -bmp2tiff_LDADD = $(LIBTIFF) $(LIBPORT) fax2ps_SOURCES = fax2ps.c fax2ps_LDADD = $(LIBTIFF) $(LIBPORT) fax2tiff_SOURCES = fax2tiff.c fax2tiff_LDADD = $(LIBTIFF) $(LIBPORT) -gif2tiff_SOURCES = gif2tiff.c -gif2tiff_LDADD = $(LIBTIFF) $(LIBPORT) pal2rgb_SOURCES = pal2rgb.c pal2rgb_LDADD = $(LIBTIFF) $(LIBPORT) ppm2tiff_SOURCES = ppm2tiff.c ppm2tiff_LDADD = $(LIBTIFF) $(LIBPORT) -ras2tiff_SOURCES = ras2tiff.c rasterfile.h -ras2tiff_LDADD = $(LIBTIFF) $(LIBPORT) raw2tiff_SOURCES = raw2tiff.c raw2tiff_LDADD = $(LIBTIFF) $(LIBPORT) rgb2ycbcr_SOURCES = rgb2ycbcr.c @@ -470,14 +513,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign tools/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -497,10 +539,12 @@ install-binPROGRAMS: $(bin_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -521,7 +565,8 @@ uninstall-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -534,87 +579,99 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -bmp2tiff$(EXEEXT): $(bmp2tiff_OBJECTS) $(bmp2tiff_DEPENDENCIES) $(EXTRA_bmp2tiff_DEPENDENCIES) - @rm -f bmp2tiff$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(bmp2tiff_OBJECTS) $(bmp2tiff_LDADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + fax2ps$(EXEEXT): $(fax2ps_OBJECTS) $(fax2ps_DEPENDENCIES) $(EXTRA_fax2ps_DEPENDENCIES) @rm -f fax2ps$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fax2ps_OBJECTS) $(fax2ps_LDADD) $(LIBS) + fax2tiff$(EXEEXT): $(fax2tiff_OBJECTS) $(fax2tiff_DEPENDENCIES) $(EXTRA_fax2tiff_DEPENDENCIES) @rm -f fax2tiff$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fax2tiff_OBJECTS) $(fax2tiff_LDADD) $(LIBS) -gif2tiff$(EXEEXT): $(gif2tiff_OBJECTS) $(gif2tiff_DEPENDENCIES) $(EXTRA_gif2tiff_DEPENDENCIES) - @rm -f gif2tiff$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(gif2tiff_OBJECTS) $(gif2tiff_LDADD) $(LIBS) + pal2rgb$(EXEEXT): $(pal2rgb_OBJECTS) $(pal2rgb_DEPENDENCIES) $(EXTRA_pal2rgb_DEPENDENCIES) @rm -f pal2rgb$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pal2rgb_OBJECTS) $(pal2rgb_LDADD) $(LIBS) + ppm2tiff$(EXEEXT): $(ppm2tiff_OBJECTS) $(ppm2tiff_DEPENDENCIES) $(EXTRA_ppm2tiff_DEPENDENCIES) @rm -f ppm2tiff$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ppm2tiff_OBJECTS) $(ppm2tiff_LDADD) $(LIBS) -ras2tiff$(EXEEXT): $(ras2tiff_OBJECTS) $(ras2tiff_DEPENDENCIES) $(EXTRA_ras2tiff_DEPENDENCIES) - @rm -f ras2tiff$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(ras2tiff_OBJECTS) $(ras2tiff_LDADD) $(LIBS) + raw2tiff$(EXEEXT): $(raw2tiff_OBJECTS) $(raw2tiff_DEPENDENCIES) $(EXTRA_raw2tiff_DEPENDENCIES) @rm -f raw2tiff$(EXEEXT) $(AM_V_CCLD)$(LINK) $(raw2tiff_OBJECTS) $(raw2tiff_LDADD) $(LIBS) + rgb2ycbcr$(EXEEXT): $(rgb2ycbcr_OBJECTS) $(rgb2ycbcr_DEPENDENCIES) $(EXTRA_rgb2ycbcr_DEPENDENCIES) @rm -f rgb2ycbcr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rgb2ycbcr_OBJECTS) $(rgb2ycbcr_LDADD) $(LIBS) -sgi2tiff$(EXEEXT): $(sgi2tiff_OBJECTS) $(sgi2tiff_DEPENDENCIES) $(EXTRA_sgi2tiff_DEPENDENCIES) - @rm -f sgi2tiff$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(sgi2tiff_OBJECTS) $(sgi2tiff_LDADD) $(LIBS) -sgisv$(EXEEXT): $(sgisv_OBJECTS) $(sgisv_DEPENDENCIES) $(EXTRA_sgisv_DEPENDENCIES) - @rm -f sgisv$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(sgisv_OBJECTS) $(sgisv_LDADD) $(LIBS) + thumbnail$(EXEEXT): $(thumbnail_OBJECTS) $(thumbnail_DEPENDENCIES) $(EXTRA_thumbnail_DEPENDENCIES) @rm -f thumbnail$(EXEEXT) $(AM_V_CCLD)$(LINK) $(thumbnail_OBJECTS) $(thumbnail_LDADD) $(LIBS) + tiff2bw$(EXEEXT): $(tiff2bw_OBJECTS) $(tiff2bw_DEPENDENCIES) $(EXTRA_tiff2bw_DEPENDENCIES) @rm -f tiff2bw$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tiff2bw_OBJECTS) $(tiff2bw_LDADD) $(LIBS) + tiff2pdf$(EXEEXT): $(tiff2pdf_OBJECTS) $(tiff2pdf_DEPENDENCIES) $(EXTRA_tiff2pdf_DEPENDENCIES) @rm -f tiff2pdf$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tiff2pdf_OBJECTS) $(tiff2pdf_LDADD) $(LIBS) + tiff2ps$(EXEEXT): $(tiff2ps_OBJECTS) $(tiff2ps_DEPENDENCIES) $(EXTRA_tiff2ps_DEPENDENCIES) @rm -f tiff2ps$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tiff2ps_OBJECTS) $(tiff2ps_LDADD) $(LIBS) + tiff2rgba$(EXEEXT): $(tiff2rgba_OBJECTS) $(tiff2rgba_DEPENDENCIES) $(EXTRA_tiff2rgba_DEPENDENCIES) @rm -f tiff2rgba$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tiff2rgba_OBJECTS) $(tiff2rgba_LDADD) $(LIBS) + tiffcmp$(EXEEXT): $(tiffcmp_OBJECTS) $(tiffcmp_DEPENDENCIES) $(EXTRA_tiffcmp_DEPENDENCIES) @rm -f tiffcmp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tiffcmp_OBJECTS) $(tiffcmp_LDADD) $(LIBS) + tiffcp$(EXEEXT): $(tiffcp_OBJECTS) $(tiffcp_DEPENDENCIES) $(EXTRA_tiffcp_DEPENDENCIES) @rm -f tiffcp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tiffcp_OBJECTS) $(tiffcp_LDADD) $(LIBS) + tiffcrop$(EXEEXT): $(tiffcrop_OBJECTS) $(tiffcrop_DEPENDENCIES) $(EXTRA_tiffcrop_DEPENDENCIES) @rm -f tiffcrop$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tiffcrop_OBJECTS) $(tiffcrop_LDADD) $(LIBS) + tiffdither$(EXEEXT): $(tiffdither_OBJECTS) $(tiffdither_DEPENDENCIES) $(EXTRA_tiffdither_DEPENDENCIES) @rm -f tiffdither$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tiffdither_OBJECTS) $(tiffdither_LDADD) $(LIBS) + tiffdump$(EXEEXT): $(tiffdump_OBJECTS) $(tiffdump_DEPENDENCIES) $(EXTRA_tiffdump_DEPENDENCIES) @rm -f tiffdump$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tiffdump_OBJECTS) $(tiffdump_LDADD) $(LIBS) + tiffgt$(EXEEXT): $(tiffgt_OBJECTS) $(tiffgt_DEPENDENCIES) $(EXTRA_tiffgt_DEPENDENCIES) @rm -f tiffgt$(EXEEXT) $(AM_V_CCLD)$(tiffgt_LINK) $(tiffgt_OBJECTS) $(tiffgt_LDADD) $(LIBS) + tiffinfo$(EXEEXT): $(tiffinfo_OBJECTS) $(tiffinfo_DEPENDENCIES) $(EXTRA_tiffinfo_DEPENDENCIES) @rm -f tiffinfo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tiffinfo_OBJECTS) $(tiffinfo_LDADD) $(LIBS) + tiffmedian$(EXEEXT): $(tiffmedian_OBJECTS) $(tiffmedian_DEPENDENCIES) $(EXTRA_tiffmedian_DEPENDENCIES) @rm -f tiffmedian$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tiffmedian_OBJECTS) $(tiffmedian_LDADD) $(LIBS) + tiffset$(EXEEXT): $(tiffset_OBJECTS) $(tiffset_DEPENDENCIES) $(EXTRA_tiffset_DEPENDENCIES) @rm -f tiffset$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tiffset_OBJECTS) $(tiffset_LDADD) $(LIBS) + tiffsplit$(EXEEXT): $(tiffsplit_OBJECTS) $(tiffsplit_DEPENDENCIES) $(EXTRA_tiffsplit_DEPENDENCIES) @rm -f tiffsplit$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tiffsplit_OBJECTS) $(tiffsplit_LDADD) $(LIBS) -ycbcr$(EXEEXT): $(ycbcr_OBJECTS) $(ycbcr_DEPENDENCIES) $(EXTRA_ycbcr_DEPENDENCIES) - @rm -f ycbcr$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(ycbcr_OBJECTS) $(ycbcr_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -622,47 +679,47 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bmp2tiff.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fax2ps.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fax2tiff.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gif2tiff.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pal2rgb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppm2tiff.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ras2tiff.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raw2tiff.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rgb2ycbcr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgi2tiff.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgisv.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thumbnail.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff2bw.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff2pdf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff2ps.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff2rgba.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffcmp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffcp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffcrop.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffdither.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffdump.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffgt-tiffgt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffinfo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffmedian.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffset.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffsplit.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ycbcr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fax2ps.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fax2tiff.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pal2rgb.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppm2tiff.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raw2tiff.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rgb2ycbcr.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thumbnail.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff2bw.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff2pdf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff2ps.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff2rgba.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffcmp.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffcp.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffcrop.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffdither.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffdump.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffgt-tiffgt.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffinfo.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffmedian.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffset.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffsplit.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -691,26 +748,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -722,15 +768,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -739,9 +781,10 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am -cscopelist: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -757,7 +800,10 @@ cscopelist: $(HEADERS) $(SOURCES) $(LISP) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -788,6 +834,7 @@ distdir: $(DISTFILES) fi; \ done check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) check: check-am all-am: Makefile $(PROGRAMS) installdirs: @@ -826,10 +873,31 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am +clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ + clean-libtool mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/fax2ps.Po + -rm -f ./$(DEPDIR)/fax2tiff.Po + -rm -f ./$(DEPDIR)/pal2rgb.Po + -rm -f ./$(DEPDIR)/ppm2tiff.Po + -rm -f ./$(DEPDIR)/raw2tiff.Po + -rm -f ./$(DEPDIR)/rgb2ycbcr.Po + -rm -f ./$(DEPDIR)/thumbnail.Po + -rm -f ./$(DEPDIR)/tiff2bw.Po + -rm -f ./$(DEPDIR)/tiff2pdf.Po + -rm -f ./$(DEPDIR)/tiff2ps.Po + -rm -f ./$(DEPDIR)/tiff2rgba.Po + -rm -f ./$(DEPDIR)/tiffcmp.Po + -rm -f ./$(DEPDIR)/tiffcp.Po + -rm -f ./$(DEPDIR)/tiffcrop.Po + -rm -f ./$(DEPDIR)/tiffdither.Po + -rm -f ./$(DEPDIR)/tiffdump.Po + -rm -f ./$(DEPDIR)/tiffgt-tiffgt.Po + -rm -f ./$(DEPDIR)/tiffinfo.Po + -rm -f ./$(DEPDIR)/tiffmedian.Po + -rm -f ./$(DEPDIR)/tiffset.Po + -rm -f ./$(DEPDIR)/tiffsplit.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -875,7 +943,27 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/fax2ps.Po + -rm -f ./$(DEPDIR)/fax2tiff.Po + -rm -f ./$(DEPDIR)/pal2rgb.Po + -rm -f ./$(DEPDIR)/ppm2tiff.Po + -rm -f ./$(DEPDIR)/raw2tiff.Po + -rm -f ./$(DEPDIR)/rgb2ycbcr.Po + -rm -f ./$(DEPDIR)/thumbnail.Po + -rm -f ./$(DEPDIR)/tiff2bw.Po + -rm -f ./$(DEPDIR)/tiff2pdf.Po + -rm -f ./$(DEPDIR)/tiff2ps.Po + -rm -f ./$(DEPDIR)/tiff2rgba.Po + -rm -f ./$(DEPDIR)/tiffcmp.Po + -rm -f ./$(DEPDIR)/tiffcp.Po + -rm -f ./$(DEPDIR)/tiffcrop.Po + -rm -f ./$(DEPDIR)/tiffdither.Po + -rm -f ./$(DEPDIR)/tiffdump.Po + -rm -f ./$(DEPDIR)/tiffgt-tiffgt.Po + -rm -f ./$(DEPDIR)/tiffinfo.Po + -rm -f ./$(DEPDIR)/tiffmedian.Po + -rm -f ./$(DEPDIR)/tiffset.Po + -rm -f ./$(DEPDIR)/tiffsplit.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -894,10 +982,11 @@ ps-am: uninstall-am: uninstall-binPROGRAMS -.MAKE: install-am install-strip +.MAKE: check-am install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool cscopelist ctags distclean \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ + clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ @@ -908,7 +997,9 @@ uninstall-am: uninstall-binPROGRAMS installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS + +.PRECIOUS: Makefile echo: diff --git a/thirdparty/tiff-4.0.3/tools/Makefile.vc b/thirdparty/tiff-4.2.0/tools/Makefile.vc similarity index 87% rename from thirdparty/tiff-4.0.3/tools/Makefile.vc rename to thirdparty/tiff-4.2.0/tools/Makefile.vc index c8d69cdd..453db43e 100644 --- a/thirdparty/tiff-4.0.3/tools/Makefile.vc +++ b/thirdparty/tiff-4.2.0/tools/Makefile.vc @@ -1,4 +1,3 @@ -# $Id: Makefile.vc,v 1.15 2009-01-22 20:53:07 fwarmerdam Exp $ # # Copyright (C) 2004, Andrey Kiselev # @@ -28,9 +27,9 @@ !INCLUDE ..\nmake.opt -TARGETS = bmp2tiff.exe tiffinfo.exe tiffdump.exe fax2tiff.exe \ - fax2ps.exe gif2tiff.exe pal2rgb.exe ppm2tiff.exe \ - rgb2ycbcr.exe thumbnail.exe ras2tiff.exe raw2tiff.exe \ +TARGETS = tiffinfo.exe tiffdump.exe fax2tiff.exe \ + fax2ps.exe pal2rgb.exe ppm2tiff.exe \ + rgb2ycbcr.exe thumbnail.exe raw2tiff.exe \ tiff2bw.exe tiff2rgba.exe tiff2pdf.exe tiff2ps.exe \ tiffcmp.exe tiffcp.exe tiffcrop.exe tiffdither.exe \ tiffmedian.exe tiffset.exe tiffsplit.exe diff --git a/thirdparty/tiff-4.0.3/tools/fax2ps.c b/thirdparty/tiff-4.2.0/tools/fax2ps.c similarity index 92% rename from thirdparty/tiff-4.0.3/tools/fax2ps.c rename to thirdparty/tiff-4.2.0/tools/fax2ps.c index b8cdf89f..f59f4921 100644 --- a/thirdparty/tiff-4.0.3/tools/fax2ps.c +++ b/thirdparty/tiff-4.2.0/tools/fax2ps.c @@ -1,5 +1,3 @@ -/* $Id: fax2ps.c,v 1.27 2011-04-02 19:30:20 bfriesen Exp $" */ - /* * Copyright (c) 1991-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -47,8 +45,16 @@ # include "libport.h" #endif +#include "tiffiop.h" #include "tiffio.h" +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + float defxres = 204.; /* default x resolution (pixels/inch) */ float defyres = 98.; /* default y resolution (lines/inch) */ const float half = 0.5; @@ -323,13 +329,15 @@ static void usage(int code); int main(int argc, char** argv) { +#if !HAVE_DECL_OPTARG extern int optind; extern char* optarg; +#endif uint16 *pages = NULL, npages = 0, pageNumber; int c, dowarnings = 0; /* if 1, enable library warnings */ TIFF* tif; - while ((c = getopt(argc, argv, "l:p:x:y:W:H:wS")) != -1) + while ((c = getopt(argc, argv, "l:p:x:y:W:H:wSh")) != -1) switch (c) { case 'H': /* page height */ pageHeight = (float)atof(optarg); @@ -346,6 +354,11 @@ main(int argc, char** argv) pages = (uint16*) realloc(pages, (npages+1)*sizeof(uint16)); else pages = (uint16*) malloc(sizeof(uint16)); + if( pages == NULL ) + { + fprintf(stderr, "Out of memory\n"); + exit(EXIT_FAILURE); + } pages[npages++] = pageNumber; break; case 'w': @@ -360,8 +373,10 @@ main(int argc, char** argv) case 'l': maxline = atoi(optarg); break; + case 'h': + usage(EXIT_SUCCESS); case '?': - usage(-1); + usage(EXIT_FAILURE); } if (npages > 0) qsort(pages, npages, sizeof(uint16), pcompar); @@ -385,14 +400,20 @@ main(int argc, char** argv) fd = tmpfile(); if (fd == NULL) { fprintf(stderr, "Could not obtain temporary file.\n"); - exit(-2); + exit(EXIT_FAILURE); } #if defined(HAVE_SETMODE) && defined(O_BINARY) setmode(fileno(stdin), O_BINARY); #endif - while ((n = read(fileno(stdin), buf, sizeof (buf))) > 0) - write(fileno(fd), buf, n); - lseek(fileno(fd), 0, SEEK_SET); + while ((n = read(fileno(stdin), buf, sizeof (buf))) > 0) { + if (write(fileno(fd), buf, n) != n) { + fclose(fd); + fprintf(stderr, + "Could not copy stdin to temporary file.\n"); + exit(EXIT_FAILURE); + } + } + _TIFF_lseek_f(fileno(fd), 0, SEEK_SET); #if defined(_WIN32) && defined(USE_WIN32_FILEIO) tif = TIFFFdOpen(_get_osfhandle(fileno(fd)), "temp", "r"); #else @@ -409,10 +430,10 @@ main(int argc, char** argv) printf("%%%%Pages: %u\n", totalPages); printf("%%%%EOF\n"); - return (0); + return (EXIT_SUCCESS); } -char* stuff[] = { +const char* stuff[] = { "usage: fax2ps [options] [input.tif ...]", "where options are:", " -w suppress warning messages", @@ -429,13 +450,12 @@ NULL static void usage(int code) { - char buf[BUFSIZ]; int i; + FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; - setbuf(stderr, buf); - fprintf(stderr, "%s\n\n", TIFFGetVersion()); + fprintf(out, "%s\n\n", TIFFGetVersion()); for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); + fprintf(out, "%s\n", stuff[i]); exit(code); } diff --git a/thirdparty/tiff-4.0.3/tools/fax2tiff.c b/thirdparty/tiff-4.2.0/tools/fax2tiff.c similarity index 93% rename from thirdparty/tiff-4.0.3/tools/fax2tiff.c rename to thirdparty/tiff-4.2.0/tools/fax2tiff.c index 8881e5fc..eecb41e3 100644 --- a/thirdparty/tiff-4.0.3/tools/fax2tiff.c +++ b/thirdparty/tiff-4.2.0/tools/fax2tiff.c @@ -1,5 +1,3 @@ -/* $Id: fax2tiff.c,v 1.22 2010-03-10 18:56:49 bfriesen Exp $ */ - /* * Copyright (c) 1990-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -70,13 +68,24 @@ uint16 badfaxrun; uint32 badfaxlines; int copyFaxFile(TIFF* tifin, TIFF* tifout); -static void usage(void); +static void usage(int code); + +/* + Struct to carry client data. Note that it does not appear that the client + data is actually used in this program. +*/ +typedef union _FAX_Client_Data +{ + thandle_t fh; /* Operating system file handle */ + int fd; /* Integer file descriptor */ +} FAX_Client_Data; int main(int argc, char* argv[]) { FILE *in; TIFF *out = NULL; + FAX_Client_Data client_data; TIFFErrorHandler whandler = NULL; int compression_in = COMPRESSION_CCITTFAX3; int compression_out = COMPRESSION_CCITTFAX3; @@ -95,11 +104,13 @@ main(int argc, char* argv[]) int c; int pn, npages; float resY = 196.0; + +#if !HAVE_DECL_OPTARG extern int optind; extern char* optarg; +#endif - - while ((c = getopt(argc, argv, "R:X:o:1234ABLMPUW5678abcflmprsuvwz?")) != -1) + while ((c = getopt(argc, argv, "R:X:o:r:1234ABLMPUW5678abcflmprsuvwzh")) != -1) switch (c) { /* input-related options */ case '3': /* input is g3-encoded */ @@ -205,13 +216,15 @@ main(int argc, char* argv[]) case 'v': /* -v for info */ verbose++; break; + case 'h': + usage(EXIT_SUCCESS); case '?': - usage(); + usage(EXIT_FAILURE); /*NOTREACHED*/ } npages = argc - optind; if (npages < 1) - usage(); + usage(EXIT_FAILURE); rowbuf = _TIFFmalloc(TIFFhowmany8(xsize)); refbuf = _TIFFmalloc(TIFFhowmany8(xsize)); @@ -265,10 +278,11 @@ main(int argc, char* argv[]) continue; } #if defined(_WIN32) && defined(USE_WIN32_FILEIO) - TIFFSetClientdata(faxTIFF, (thandle_t)_get_osfhandle(fileno(in))); + client_data.fh = (thandle_t)_get_osfhandle(fileno(in)); #else - TIFFSetClientdata(faxTIFF, (thandle_t)fileno(in)); + client_data.fd = fileno(in); #endif + TIFFSetClientdata(faxTIFF, client_data.fh); TIFFSetFileName(faxTIFF, (const char*)argv[optind]); TIFFSetField(out, TIFFTAG_IMAGEWIDTH, xsize); TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 1); @@ -352,6 +366,10 @@ copyFaxFile(TIFF* tifin, TIFF* tifout) int ok; tifin->tif_rawdatasize = (tmsize_t)TIFFGetFileSize(tifin); + if (tifin->tif_rawdatasize == 0) { + TIFFError(tifin->tif_name, "Empty input file"); + return (0); + } tifin->tif_rawdata = _TIFFmalloc(tifin->tif_rawdatasize); if (tifin->tif_rawdata == NULL) { TIFFError(tifin->tif_name, "Not enough memory"); @@ -410,7 +428,7 @@ copyFaxFile(TIFF* tifin, TIFF* tifout) return (row); } -char* stuff[] = { +const char* stuff[] = { "usage: fax2tiff [options] input.raw...", "where options are:", " -3 input data is G3-encoded [default]", @@ -447,16 +465,15 @@ NULL }; static void -usage(void) +usage(int code) { - char buf[BUFSIZ]; int i; + FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; - setbuf(stderr, buf); - fprintf(stderr, "%s\n\n", TIFFGetVersion()); + fprintf(out, "%s\n\n", TIFFGetVersion()); for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); - exit(EXIT_FAILURE); + fprintf(out, "%s\n", stuff[i]); + exit(code); } /* vim: set ts=8 sts=8 sw=8 noet: */ diff --git a/thirdparty/tiff-4.0.3/tools/pal2rgb.c b/thirdparty/tiff-4.2.0/tools/pal2rgb.c similarity index 84% rename from thirdparty/tiff-4.0.3/tools/pal2rgb.c rename to thirdparty/tiff-4.2.0/tools/pal2rgb.c index 8608aad1..bf95cb37 100644 --- a/thirdparty/tiff-4.0.3/tools/pal2rgb.c +++ b/thirdparty/tiff-4.2.0/tools/pal2rgb.c @@ -1,5 +1,3 @@ -/* $Id: pal2rgb.c,v 1.13 2010-07-02 12:02:56 dron Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -41,10 +39,17 @@ #include "tiffio.h" +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + #define streq(a,b) (strcmp(a,b) == 0) #define strneq(a,b,n) (strncmp(a,b,n) == 0) -static void usage(void); +static void usage(int code); static void cpTags(TIFF* in, TIFF* out); static int @@ -81,17 +86,20 @@ main(int argc, char* argv[]) int cmap = -1; TIFF *in, *out; int c; + +#if !HAVE_DECL_OPTARG extern int optind; extern char* optarg; +#endif - while ((c = getopt(argc, argv, "C:c:p:r:")) != -1) + while ((c = getopt(argc, argv, "C:c:p:r:h")) != -1) switch (c) { case 'C': /* force colormap interpretation */ cmap = atoi(optarg); break; case 'c': /* compression scheme */ if (!processCompressOptions(optarg)) - usage(); + usage(EXIT_FAILURE); break; case 'p': /* planar configuration */ if (streq(optarg, "separate")) @@ -99,42 +107,49 @@ main(int argc, char* argv[]) else if (streq(optarg, "contig")) config = PLANARCONFIG_CONTIG; else - usage(); + usage(EXIT_FAILURE); break; case 'r': /* rows/strip */ rowsperstrip = atoi(optarg); break; + case 'h': + usage(EXIT_SUCCESS); case '?': - usage(); + usage(EXIT_FAILURE); /*NOTREACHED*/ } if (argc - optind != 2) - usage(); + usage(EXIT_FAILURE); in = TIFFOpen(argv[optind], "r"); if (in == NULL) - return (-1); + return (EXIT_FAILURE); if (!TIFFGetField(in, TIFFTAG_PHOTOMETRIC, &shortv) || shortv != PHOTOMETRIC_PALETTE) { fprintf(stderr, "%s: Expecting a palette image.\n", argv[optind]); - return (-1); + (void) TIFFClose(in); + return (EXIT_FAILURE); } if (!TIFFGetField(in, TIFFTAG_COLORMAP, &rmap, &gmap, &bmap)) { fprintf(stderr, "%s: No colormap (not a valid palette image).\n", argv[optind]); - return (-1); + (void) TIFFClose(in); + return (EXIT_FAILURE); } bitspersample = 0; TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bitspersample); if (bitspersample != 8) { fprintf(stderr, "%s: Sorry, can only handle 8-bit images.\n", argv[optind]); - return (-1); + (void) TIFFClose(in); + return (EXIT_FAILURE); } out = TIFFOpen(argv[optind+1], "w"); - if (out == NULL) - return (-2); + if (out == NULL) { + (void) TIFFClose(in); + return (EXIT_FAILURE); + } cpTags(in, out); TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &imagewidth); TIFFGetField(in, TIFFTAG_IMAGELENGTH, &imagelength); @@ -181,8 +196,21 @@ main(int argc, char* argv[]) { unsigned char *ibuf, *obuf; register unsigned char* pp; register uint32 x; - ibuf = (unsigned char*)_TIFFmalloc(TIFFScanlineSize(in)); - obuf = (unsigned char*)_TIFFmalloc(TIFFScanlineSize(out)); + tmsize_t tss_in = TIFFScanlineSize(in); + tmsize_t tss_out = TIFFScanlineSize(out); + if (tss_out / tss_in < 3) { + /* + * BUG 2750: The following code does not know about chroma + * subsampling of JPEG data. It assumes that the output buffer is 3x + * the length of the input buffer due to exploding the palette into + * RGB tuples. If this assumption is incorrect, it could lead to a + * buffer overflow. Go ahead and fail now to prevent that. + */ + fprintf(stderr, "Could not determine correct image size for output. Exiting.\n"); + return EXIT_FAILURE; + } + ibuf = (unsigned char*)_TIFFmalloc(tss_in); + obuf = (unsigned char*)_TIFFmalloc(tss_out); switch (config) { case PLANARCONFIG_CONTIG: for (row = 0; row < imagelength; row++) { @@ -223,7 +251,7 @@ main(int argc, char* argv[]) done: (void) TIFFClose(in); (void) TIFFClose(out); - return (0); + return (EXIT_SUCCESS); } static int @@ -244,7 +272,7 @@ processCompressOptions(char* opt) else if (cp[1] == 'r' ) jpegcolormode = JPEGCOLORMODE_RAW; else - usage(); + usage(EXIT_FAILURE); cp = strchr(cp+1,':'); } @@ -372,7 +400,7 @@ static struct cpTag { { TIFFTAG_CLEANFAXDATA, 1, TIFF_SHORT }, { TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG }, { TIFFTAG_INKSET, 1, TIFF_SHORT }, - { TIFFTAG_INKNAMES, 1, TIFF_ASCII }, + /*{ TIFFTAG_INKNAMES, 1, TIFF_ASCII },*/ /* Needs much more complicated logic. See tiffcp */ { TIFFTAG_DOTRANGE, 2, TIFF_SHORT }, { TIFFTAG_TARGETPRINTER, 1, TIFF_ASCII }, { TIFFTAG_SAMPLEFORMAT, 1, TIFF_SHORT }, @@ -388,11 +416,27 @@ cpTags(TIFF* in, TIFF* out) { struct cpTag *p; for (p = tags; p < &tags[NTAGS]; p++) - cpTag(in, out, p->tag, p->count, p->type); + { + if( p->tag == TIFFTAG_GROUP3OPTIONS ) + { + uint16 compression; + if( !TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) || + compression != COMPRESSION_CCITTFAX3 ) + continue; + } + if( p->tag == TIFFTAG_GROUP4OPTIONS ) + { + uint16 compression; + if( !TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) || + compression != COMPRESSION_CCITTFAX4 ) + continue; + } + cpTag(in, out, p->tag, p->count, p->type); + } } #undef NTAGS -char* stuff[] = { +const char* stuff[] = { "usage: pal2rgb [options] input.tif output.tif", "where options are:", " -p contig pack samples contiguously (e.g. RGBRGB...)", @@ -413,16 +457,15 @@ NULL }; static void -usage(void) +usage(int code) { - char buf[BUFSIZ]; int i; + FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; - setbuf(stderr, buf); - fprintf(stderr, "%s\n\n", TIFFGetVersion()); + fprintf(out, "%s\n\n", TIFFGetVersion()); for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); - exit(-1); + fprintf(out, "%s\n", stuff[i]); + exit(code); } /* vim: set ts=8 sts=8 sw=8 noet: */ diff --git a/thirdparty/tiff-4.0.3/tools/ppm2tiff.c b/thirdparty/tiff-4.2.0/tools/ppm2tiff.c similarity index 65% rename from thirdparty/tiff-4.0.3/tools/ppm2tiff.c rename to thirdparty/tiff-4.2.0/tools/ppm2tiff.c index f78d5d4e..c6332439 100644 --- a/thirdparty/tiff-4.0.3/tools/ppm2tiff.c +++ b/thirdparty/tiff-4.2.0/tools/ppm2tiff.c @@ -1,5 +1,3 @@ -/* $Id: ppm2tiff.c,v 1.16 2010-04-10 19:22:34 bfriesen Exp $ */ - /* * Copyright (c) 1991-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -50,7 +48,14 @@ #include "tiffio.h" #ifndef HAVE_GETOPT -extern int getopt(int, char**, char*); +extern int getopt(int argc, char * const argv[], const char *optstring); +#endif + +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 #endif #define streq(a,b) (strcmp(a,b) == 0) @@ -62,14 +67,121 @@ static int quality = 75; /* JPEG quality */ static int jpegcolormode = JPEGCOLORMODE_RGB; static uint32 g3opts; -static void usage(void); +static void usage(int code); static int processCompressOptions(char*); +static void +pack_none (unsigned char *buf, unsigned int smpls, uint16 bps) +{ + (void)buf; + (void)smpls; + (void)bps; + return; +} + +static void +pack_swab (unsigned char *buf, unsigned int smpls, uint16 bps) +{ + unsigned int s; + unsigned char h; + unsigned char l; + (void)bps; + + for (s = 0; smpls > s; s++) { + + h = buf [s * 2 + 0]; + l = buf [s * 2 + 1]; + + buf [s * 2 + 0] = l; + buf [s * 2 + 1] = h; + } + return; +} + +static void +pack_bytes (unsigned char *buf, unsigned int smpls, uint16 bps) +{ + unsigned int s; + unsigned int in; + unsigned int out; + int bits; + uint16 t; + + in = 0; + out = 0; + bits = 0; + t = 0; + + for (s = 0; smpls > s; s++) { + + t <<= bps; + t |= (uint16) buf [in++]; + + bits += bps; + + if (8 <= bits) { + bits -= 8; + buf [out++] = (t >> bits) & 0xFF; + } + } + if (0 != bits) + buf [out] = (t << (8 - bits)) & 0xFF; +} + +static void +pack_words (unsigned char *buf, unsigned int smpls, uint16 bps) +{ + unsigned int s; + unsigned int in; + unsigned int out; + int bits; + uint32 t; + + in = 0; + out = 0; + bits = 0; + t = 0; + + for (s = 0; smpls > s; s++) { + + t <<= bps; + t |= (uint32) buf [in++] << 8; + t |= (uint32) buf [in++] << 0; + + bits += bps; + + if (16 <= bits) { + + bits -= 16; + buf [out++] = (t >> (bits + 8)); + buf [out++] = (t >> (bits + 0)); + } + } + if (0 != bits) { + t <<= 16 - bits; + + buf [out++] = (t >> (16 + 8)); + buf [out++] = (t >> (16 + 0)); + } +} + static void BadPPM(char* file) { fprintf(stderr, "%s: Not a PPM file.\n", file); - exit(-2); + exit(EXIT_FAILURE); +} + + +#define TIFF_SIZE_T_MAX ((size_t) ~ ((size_t)0)) +#define TIFF_TMSIZE_T_MAX (tmsize_t)(TIFF_SIZE_T_MAX >> 1) + +static tmsize_t +multiply_ms(tmsize_t m1, tmsize_t m2) +{ + if( m1 == 0 || m2 > TIFF_TMSIZE_T_MAX / m1 ) + return 0; + return m1 * m2; } int @@ -79,26 +191,31 @@ main(int argc, char* argv[]) uint32 rowsperstrip = (uint32) -1; double resolution = -1; unsigned char *buf = NULL; - tsize_t linebytes = 0; + tmsize_t linebytes = 0; + int pbm; uint16 spp = 1; uint16 bpp = 8; + void (*pack_func) (unsigned char *buf, unsigned int smpls, uint16 bps); TIFF *out; FILE *in; unsigned int w, h, prec, row; char *infile; int c; +#if !HAVE_DECL_OPTARG extern int optind; extern char* optarg; +#endif + tmsize_t scanline_size; if (argc < 2) { fprintf(stderr, "%s: Too few arguments\n", argv[0]); - usage(); + usage(EXIT_FAILURE); } - while ((c = getopt(argc, argv, "c:r:R:")) != -1) + while ((c = getopt(argc, argv, "c:r:R:h")) != -1) switch (c) { case 'c': /* compression scheme */ if (!processCompressOptions(optarg)) - usage(); + usage(EXIT_FAILURE); break; case 'r': /* rows/strip */ rowsperstrip = atoi(optarg); @@ -106,14 +223,16 @@ main(int argc, char* argv[]) case 'R': /* resolution */ resolution = atof(optarg); break; + case 'h': + usage(EXIT_SUCCESS); case '?': - usage(); + usage(EXIT_FAILURE); /*NOTREACHED*/ } if (optind + 2 < argc) { fprintf(stderr, "%s: Too many arguments\n", argv[0]); - usage(); + usage(EXIT_FAILURE); } /* @@ -125,7 +244,7 @@ main(int argc, char* argv[]) in = fopen(infile, "rb"); if (in == NULL) { fprintf(stderr, "%s: Can not open.\n", infile); - return (-1); + return (EXIT_FAILURE); } } else { infile = ""; @@ -139,17 +258,17 @@ main(int argc, char* argv[]) BadPPM(infile); switch (fgetc(in)) { case '4': /* it's a PBM file */ - bpp = 1; + pbm = !0; spp = 1; photometric = PHOTOMETRIC_MINISWHITE; break; case '5': /* it's a PGM file */ - bpp = 8; + pbm = 0; spp = 1; photometric = PHOTOMETRIC_MINISBLACK; break; case '6': /* it's a PPM file */ - bpp = 8; + pbm = 0; spp = 3; photometric = PHOTOMETRIC_RGB; if (compression == COMPRESSION_JPEG && @@ -180,23 +299,56 @@ main(int argc, char* argv[]) ungetc(c, in); break; } - switch (bpp) { - case 1: + if (pbm) { if (fscanf(in, " %u %u", &w, &h) != 2) BadPPM(infile); if (fgetc(in) != '\n') BadPPM(infile); - break; - case 8: + bpp = 1; + pack_func = pack_none; + } else { if (fscanf(in, " %u %u %u", &w, &h, &prec) != 3) BadPPM(infile); - if (fgetc(in) != '\n' || prec != 255) + if (fgetc(in) != '\n' || 0 == prec || 65535 < prec) BadPPM(infile); - break; + + if (0 != (prec & (prec + 1))) { + fprintf(stderr, "%s: unsupported maxval %u.\n", + infile, prec); + exit(EXIT_FAILURE); + } + bpp = 0; + if ((prec + 1) & 0xAAAAAAAA) bpp |= 1; + if ((prec + 1) & 0xCCCCCCCC) bpp |= 2; + if ((prec + 1) & 0xF0F0F0F0) bpp |= 4; + if ((prec + 1) & 0xFF00FF00) bpp |= 8; + if ((prec + 1) & 0xFFFF0000) bpp |= 16; + + switch (bpp) { + case 8: + pack_func = pack_none; + break; + case 16: + { + const unsigned short i = 0x0100; + + if (0 == *(unsigned char*) &i) + pack_func = pack_swab; + else + pack_func = pack_none; + } + break; + default: + if (8 >= bpp) + pack_func = pack_bytes; + else + pack_func = pack_words; + break; + } } out = TIFFOpen(argv[optind], "w"); if (out == NULL) - return (-4); + return (EXIT_FAILURE); TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32) w); TIFFSetField(out, TIFFTAG_IMAGELENGTH, (uint32) h); TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); @@ -219,26 +371,40 @@ main(int argc, char* argv[]) TIFFSetField(out, TIFFTAG_GROUP3OPTIONS, g3opts); break; } - switch (bpp) { - case 1: - linebytes = (spp * w + (8 - 1)) / 8; - if (rowsperstrip == (uint32) -1) { - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, h); - } else { - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, - TIFFDefaultStripSize(out, rowsperstrip)); - } - break; - case 8: - linebytes = spp * w; - TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, - TIFFDefaultStripSize(out, rowsperstrip)); - break; + if (pbm) { + /* if round-up overflows, result will be zero, OK */ + linebytes = (multiply_ms(spp, w) + (8 - 1)) / 8; + } else if (bpp <= 8) { + linebytes = multiply_ms(spp, w); + } else { + linebytes = multiply_ms(2 * spp, w); } - if (TIFFScanlineSize(out) > linebytes) + if (rowsperstrip == (uint32) -1) { + TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, h); + } else { + TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, + TIFFDefaultStripSize(out, rowsperstrip)); + } + if (linebytes == 0) { + fprintf(stderr, "%s: scanline size overflow\n", infile); + (void) TIFFClose(out); + exit(EXIT_FAILURE); + } + scanline_size = TIFFScanlineSize(out); + if (scanline_size == 0) { + /* overflow - TIFFScanlineSize already printed a message */ + (void) TIFFClose(out); + exit(EXIT_FAILURE); + } + if (scanline_size < linebytes) buf = (unsigned char *)_TIFFmalloc(linebytes); else - buf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out)); + buf = (unsigned char *)_TIFFmalloc(scanline_size); + if (buf == NULL) { + fprintf(stderr, "%s: Not enough memory\n", infile); + (void) TIFFClose(out); + exit(EXIT_FAILURE); + } if (resolution > 0) { TIFFSetField(out, TIFFTAG_XRESOLUTION, resolution); TIFFSetField(out, TIFFTAG_YRESOLUTION, resolution); @@ -250,13 +416,16 @@ main(int argc, char* argv[]) infile, (unsigned long) row); break; } + pack_func (buf, w * spp, bpp); if (TIFFWriteScanline(out, buf, row, 0) < 0) break; } + if (in != stdin) + fclose(in); (void) TIFFClose(out); if (buf) _TIFFfree(buf); - return (0); + return (EXIT_SUCCESS); } static void @@ -273,7 +442,7 @@ processG3Options(char* cp) else if (strneq(cp, "fill", 4)) g3opts |= GROUP3OPT_FILLBITS; else - usage(); + usage(EXIT_FAILURE); } while( (cp = strchr(cp, ':')) ); } } @@ -296,7 +465,7 @@ processCompressOptions(char* opt) else if (cp[1] == 'r' ) jpegcolormode = JPEGCOLORMODE_RAW; else - usage(); + usage(EXIT_FAILURE); cp = strchr(cp+1,':'); } @@ -320,7 +489,7 @@ processCompressOptions(char* opt) return (1); } -char* stuff[] = { +const char* stuff[] = { "usage: ppm2tiff [options] input.ppm output.tif", "where options are:", " -r # make each strip have no more than # rows", @@ -344,16 +513,15 @@ NULL }; static void -usage(void) +usage(int code) { - char buf[BUFSIZ]; int i; + FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; - setbuf(stderr, buf); - fprintf(stderr, "%s\n\n", TIFFGetVersion()); + fprintf(out, "%s\n\n", TIFFGetVersion()); for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); - exit(-1); + fprintf(out, "%s\n", stuff[i]); + exit(code); } /* vim: set ts=8 sts=8 sw=8 noet: */ diff --git a/thirdparty/tiff-4.0.3/tools/raw2tiff.c b/thirdparty/tiff-4.2.0/tools/raw2tiff.c similarity index 76% rename from thirdparty/tiff-4.0.3/tools/raw2tiff.c rename to thirdparty/tiff-4.2.0/tools/raw2tiff.c index 9ab980e5..8bbdc045 100644 --- a/thirdparty/tiff-4.0.3/tools/raw2tiff.c +++ b/thirdparty/tiff-4.2.0/tools/raw2tiff.c @@ -1,5 +1,4 @@ -/* $Id: raw2tiff.c,v 1.25 2010-03-10 18:56:49 bfriesen Exp $ - * +/* * Project: libtiff tools * Purpose: Convert raw byte sequences in TIFF images * Author: Andrey Kiselev, dron@ak4719.spb.edu @@ -57,10 +56,18 @@ # include "libport.h" #endif +#include "tiffiop.h" #include "tiffio.h" +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + #ifndef HAVE_GETOPT -extern int getopt(int, char**, char*); +extern int getopt(int argc, char * const argv[], const char *optstring); #endif #ifndef O_BINARY @@ -78,10 +85,10 @@ static int quality = 75; /* JPEG quality */ static uint16 predictor = 0; static void swapBytesInScanline(void *, uint32, TIFFDataType); -static int guessSize(int, TIFFDataType, off_t, uint32, int, +static int guessSize(int, TIFFDataType, _TIFF_off_t, uint32, int, uint32 *, uint32 *); static double correlation(void *, void *, uint32, TIFFDataType); -static void usage(void); +static void usage(int); static int processCompressOptions(char*); int @@ -89,7 +96,7 @@ main(int argc, char* argv[]) { uint32 width = 0, length = 0, linebytes, bufsize; uint32 nbands = 1; /* number of bands in input image*/ - off_t hdr_size = 0; /* size of the header to skip */ + _TIFF_off_t hdr_size = 0; /* size of the header to skip */ TIFFDataType dtype = TIFF_BYTE; int16 depth = 1; /* bytes per pixel in input image */ int swab = 0; /* byte swapping flag */ @@ -105,14 +112,16 @@ main(int argc, char* argv[]) uint32 row, col, band; int c; unsigned char *buf = NULL, *buf1 = NULL; +#if !HAVE_DECL_OPTARG extern int optind; extern char* optarg; +#endif while ((c = getopt(argc, argv, "c:r:H:w:l:b:d:LMp:si:o:h")) != -1) { switch (c) { case 'c': /* compression scheme */ if (!processCompressOptions(optarg)) - usage(); + usage(EXIT_FAILURE); break; case 'r': /* rows/strip */ rowsperstrip = atoi(optarg); @@ -191,24 +200,24 @@ main(int argc, char* argv[]) outfilename = optarg; break; case 'h': - usage(); + usage(EXIT_SUCCESS); default: break; } } if (argc - optind < 2) - usage(); + usage(EXIT_FAILURE); fd = open(argv[optind], O_RDONLY|O_BINARY, 0); if (fd < 0) { fprintf(stderr, "%s: %s: Cannot open input file.\n", argv[0], argv[optind]); - return (-1); + return (EXIT_FAILURE); } if (guessSize(fd, dtype, hdr_size, nbands, swab, &width, &length) < 0) - return 1; + return EXIT_FAILURE; if (outfilename == NULL) outfilename = argv[optind+1]; @@ -216,7 +225,7 @@ main(int argc, char* argv[]) if (out == NULL) { fprintf(stderr, "%s: %s: Cannot open file for output.\n", argv[0], outfilename); - return (-1); + return (EXIT_FAILURE); } TIFFSetField(out, TIFFTAG_IMAGEWIDTH, width); TIFFSetField(out, TIFFTAG_IMAGELENGTH, length); @@ -281,20 +290,26 @@ main(int argc, char* argv[]) } TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip ); - lseek(fd, hdr_size, SEEK_SET); /* Skip the file header */ + _TIFF_lseek_f(fd, hdr_size, SEEK_SET); /* Skip the file header */ for (row = 0; row < length; row++) { switch(interleaving) { case BAND: /* band interleaved data */ for (band = 0; band < nbands; band++) { - lseek(fd, - hdr_size + (length*band+row)*linebytes, - SEEK_SET); + if (_TIFF_lseek_f(fd, + hdr_size + (length*band+row)*linebytes, + SEEK_SET) == (_TIFF_off_t)-1) { + fprintf(stderr, + "%s: %s: scanline %lu: seek error.\n", + argv[0], argv[optind], + (unsigned long) row); + break; + } if (read(fd, buf, linebytes) < 0) { fprintf(stderr, - "%s: %s: scanline %lu: Read error.\n", - argv[0], argv[optind], - (unsigned long) row); - break; + "%s: %s: scanline %lu: Read error.\n", + argv[0], argv[optind], + (unsigned long) row); + break; } if (swab) /* Swap bytes if needed */ swapBytesInScanline(buf, width, dtype); @@ -328,7 +343,7 @@ main(int argc, char* argv[]) if (buf1) _TIFFfree(buf1); TIFFClose(out); - return (0); + return (EXIT_SUCCESS); } static void @@ -356,17 +371,20 @@ swapBytesInScanline(void *buf, uint32 width, TIFFDataType dtype) } static int -guessSize(int fd, TIFFDataType dtype, off_t hdr_size, uint32 nbands, +guessSize(int fd, TIFFDataType dtype, _TIFF_off_t hdr_size, uint32 nbands, int swab, uint32 *width, uint32 *length) { const float longt = 40.0; /* maximum possible height/width ratio */ char *buf1, *buf2; - struct stat filestat; + _TIFF_stat_s filestat; uint32 w, h, scanlinesize, imagesize; uint32 depth = TIFFDataWidth(dtype); - float cor_coef = 0, tmp; + double cor_coef = 0, tmp; - fstat(fd, &filestat); + if (_TIFF_fstat_f(fd, &filestat) == -1) { + fprintf(stderr, "Failed to obtain file size.\n"); + return -1; + } if (filestat.st_size < hdr_size) { fprintf(stderr, "Too large header size specified.\n"); @@ -394,43 +412,80 @@ guessSize(int fd, TIFFDataType dtype, off_t hdr_size, uint32 nbands, return 1; } else if (*width == 0 && *length == 0) { + unsigned int fail = 0; fprintf(stderr, "Image width and height are not specified.\n"); + w = (uint32) sqrt(imagesize / longt); + if( w == 0 ) + { + fprintf(stderr, "Too small image size.\n"); + return -1; + } - for (w = (uint32) sqrt(imagesize / longt); + for (; w < sqrt(imagesize * longt); w++) { if (imagesize % w == 0) { scanlinesize = w * depth; + h = imagesize / w; + if (h < 2) + continue; + /* reads 2 lines at the middle of the image and calculate their correlation. + * it works for h >= 2. (in this case it will compare line 0 and line 1 */ buf1 = _TIFFmalloc(scanlinesize); buf2 = _TIFFmalloc(scanlinesize); - h = imagesize / w; - lseek(fd, hdr_size + (int)(h/2)*scanlinesize, - SEEK_SET); - read(fd, buf1, scanlinesize); - read(fd, buf2, scanlinesize); - if (swab) { - swapBytesInScanline(buf1, w, dtype); - swapBytesInScanline(buf2, w, dtype); - } - tmp = (float) fabs(correlation(buf1, buf2, - w, dtype)); - if (tmp > cor_coef) { - cor_coef = tmp; - *width = w, *length = h; - } + do { + if (_TIFF_lseek_f(fd, hdr_size + (int)((h - 1)/2)*scanlinesize, + SEEK_SET) == (_TIFF_off_t)-1) { + fprintf(stderr, "seek error.\n"); + fail=1; + break; + } + /* read line (h-1)/2 */ + if (read(fd, buf1, scanlinesize) != + (long) scanlinesize) { + fprintf(stderr, "read error.\n"); + fail=1; + break; + } + /* read line ((h-1)/2)+1 */ + if (read(fd, buf2, scanlinesize) != + (long) scanlinesize) { + fprintf(stderr, "read error.\n"); + fail=1; + break; + } + if (swab) { + swapBytesInScanline(buf1, w, dtype); + swapBytesInScanline(buf2, w, dtype); + } + if (0 == memcmp(buf1, buf2, scanlinesize)) { + *width = w, *length = h; + } else { + tmp = fabs(correlation(buf1, buf2, + w, dtype)); + if (tmp > cor_coef) { + cor_coef = tmp; + *width = w, *length = h; + } + } + } while (0); - _TIFFfree(buf1); + _TIFFfree(buf1); _TIFFfree(buf2); } } + if (fail) { + return -1; + } + fprintf(stderr, "Width is guessed as %lu, height is guessed as %lu.\n", (unsigned long)*width, (unsigned long)*length); return 1; } else { - if (filestat.st_size<(off_t)(hdr_size+(*width)*(*length)*nbands*depth)) { + if (filestat.st_size<(_TIFF_off_t)(hdr_size+(*width)*(*length)*nbands*depth)) { fprintf(stderr, "Input file too small.\n"); return -1; } @@ -526,6 +581,7 @@ correlation(void *buf1, void *buf2, uint32 n_elem, TIFFDataType dtype) M2 /= n_elem; D1 -= M1 * M1 * n_elem; D2 -= M2 * M2 * n_elem; + if (D1 * D2 == 0.0) return 0.0; /* avoid divide by zero */ K = (K - M1 * M2 * n_elem) / sqrt(D1 * D2); return K; @@ -549,7 +605,7 @@ processCompressOptions(char* opt) else if (cp[1] == 'r' ) jpegcolormode = JPEGCOLORMODE_RAW; else - usage(); + usage(EXIT_FAILURE); cp = strchr(cp+1,':'); } @@ -568,7 +624,7 @@ processCompressOptions(char* opt) return (1); } -static char* stuff[] = { +static const char* stuff[] = { "raw2tiff --- tool for converting raw byte sequences in TIFF images", "usage: raw2tiff [options] input.raw output.tif", "where options are:", @@ -629,16 +685,15 @@ NULL }; static void -usage(void) +usage(int code) { - char buf[BUFSIZ]; int i; + FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; - setbuf(stderr, buf); - fprintf(stderr, "%s\n\n", TIFFGetVersion()); + fprintf(out, "%s\n\n", TIFFGetVersion()); for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); - exit(-1); + fprintf(out, "%s\n", stuff[i]); + exit(code); } /* vim: set ts=8 sts=8 sw=8 noet: */ diff --git a/thirdparty/tiff-4.0.3/tools/rgb2ycbcr.c b/thirdparty/tiff-4.2.0/tools/rgb2ycbcr.c similarity index 93% rename from thirdparty/tiff-4.0.3/tools/rgb2ycbcr.c rename to thirdparty/tiff-4.2.0/tools/rgb2ycbcr.c index 162aac10..482cc5b4 100644 --- a/thirdparty/tiff-4.0.3/tools/rgb2ycbcr.c +++ b/thirdparty/tiff-4.2.0/tools/rgb2ycbcr.c @@ -1,5 +1,3 @@ -/* $Id: rgb2ycbcr.c,v 1.14 2011-05-31 17:03:16 bfriesen Exp $ */ - /* * Copyright (c) 1991-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -41,6 +39,13 @@ #include "tiffiop.h" #include "tiffio.h" +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + #define streq(a,b) (strcmp(a,b) == 0) #define CopyField(tag, v) \ if (TIFFGetField(in, tag, &v)) TIFFSetField(out, tag, v) @@ -72,8 +77,10 @@ main(int argc, char* argv[]) { TIFF *in, *out; int c; +#if !HAVE_DECL_OPTARG extern int optind; extern char *optarg; +#endif while ((c = getopt(argc, argv, "c:h:r:v:z")) != -1) switch (c) { @@ -89,13 +96,17 @@ main(int argc, char* argv[]) else if (streq(optarg, "zip")) compression = COMPRESSION_ADOBE_DEFLATE; else - usage(-1); + usage(EXIT_FAILURE); break; case 'h': horizSubSampling = atoi(optarg); + if( horizSubSampling != 1 && horizSubSampling != 2 && horizSubSampling != 4 ) + usage(EXIT_FAILURE); break; case 'v': vertSubSampling = atoi(optarg); + if( vertSubSampling != 1 && vertSubSampling != 2 && vertSubSampling != 4 ) + usage(EXIT_FAILURE); break; case 'r': rowsperstrip = atoi(optarg); @@ -109,14 +120,14 @@ main(int argc, char* argv[]) refBlackWhite[5] = 240.; break; case '?': - usage(0); + usage(EXIT_FAILURE); /*NOTREACHED*/ } if (argc - optind < 2) - usage(-1); + usage(EXIT_FAILURE); out = TIFFOpen(argv[argc-1], "w"); if (out == NULL) - return (-2); + return (EXIT_FAILURE); setupLumaTables(); for (; optind < argc-1; optind++) { in = TIFFOpen(argv[optind], "r"); @@ -125,6 +136,7 @@ main(int argc, char* argv[]) if (!tiffcvt(in, out) || !TIFFWriteDirectory(out)) { (void) TIFFClose(out); + (void) TIFFClose(in); return (1); } } while (TIFFReadDirectory(in)); @@ -132,7 +144,7 @@ main(int argc, char* argv[]) } } (void) TIFFClose(out); - return (0); + return (EXIT_SUCCESS); } float *lumaRed; @@ -332,7 +344,8 @@ tiffcvt(TIFF* in, TIFF* out) TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); { char buf[2048]; char *cp = strrchr(TIFFFileName(in), '/'); - sprintf(buf, "YCbCr conversion of %s", cp ? cp+1 : TIFFFileName(in)); + snprintf(buf, sizeof(buf), "YCbCr conversion of %s", + cp ? cp+1 : TIFFFileName(in)); TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, buf); } TIFFSetField(out, TIFFTAG_SOFTWARE, TIFFGetVersion()); @@ -351,7 +364,7 @@ tiffcvt(TIFF* in, TIFF* out) return result; } -char* stuff[] = { +const char* stuff[] = { "usage: rgb2ycbcr [-c comp] [-r rows] [-h N] [-v N] input... output\n", "where comp is one of the following compression algorithms:\n", " jpeg\t\tJPEG encoding\n", @@ -369,14 +382,12 @@ char* stuff[] = { static void usage(int code) { - char buf[BUFSIZ]; int i; + FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; - setbuf(stderr, buf); - - fprintf(stderr, "%s\n\n", TIFFGetVersion()); + fprintf(out, "%s\n\n", TIFFGetVersion()); for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); + fprintf(out, "%s\n", stuff[i]); exit(code); } diff --git a/thirdparty/tiff-4.0.3/tools/thumbnail.c b/thirdparty/tiff-4.2.0/tools/thumbnail.c similarity index 88% rename from thirdparty/tiff-4.0.3/tools/thumbnail.c rename to thirdparty/tiff-4.2.0/tools/thumbnail.c index fd1cba57..edb69983 100644 --- a/thirdparty/tiff-4.0.3/tools/thumbnail.c +++ b/thirdparty/tiff-4.2.0/tools/thumbnail.c @@ -1,5 +1,3 @@ -/* $Id: thumbnail.c,v 1.16 2010-07-02 12:02:56 dron Exp $ */ - /* * Copyright (c) 1994-1997 Sam Leffler * Copyright (c) 1994-1997 Silicon Graphics, Inc. @@ -41,8 +39,15 @@ #include "tiffio.h" +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + #ifndef HAVE_GETOPT -extern int getopt(int, char**, char*); +extern int getopt(int argc, char * const argv[], const char *optstring); #endif #define streq(a,b) (strcmp(a,b) == 0) @@ -69,10 +74,12 @@ static uint8* thumbnail; static int cpIFD(TIFF*, TIFF*); static int generateThumbnail(TIFF*, TIFF*); static void initScale(); -static void usage(void); +static void usage(int code); +#if !HAVE_DECL_OPTARG extern char* optarg; extern int optind; +#endif int main(int argc, char* argv[]) @@ -94,11 +101,11 @@ main(int argc, char* argv[]) streq(optarg, "linear")? LINEAR : EXP; break; - default: usage(); + default: usage(EXIT_FAILURE); } } if (argc-optind != 2) - usage(); + usage(EXIT_FAILURE); out = TIFFOpen(argv[optind+1], "w"); if (out == NULL) @@ -111,7 +118,7 @@ main(int argc, char* argv[]) if (!thumbnail) { TIFFError(TIFFFileName(in), "Can't allocate space for thumbnail buffer."); - return 1; + return EXIT_FAILURE; } if (in != NULL) { @@ -125,10 +132,10 @@ main(int argc, char* argv[]) (void) TIFFClose(in); } (void) TIFFClose(out); - return 0; + return EXIT_SUCCESS; bad: (void) TIFFClose(out); - return 1; + return EXIT_FAILURE; } #define CopyField(tag, v) \ @@ -257,7 +264,7 @@ static struct cpTag { { TIFFTAG_CLEANFAXDATA, 1, TIFF_SHORT }, { TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG }, { TIFFTAG_INKSET, 1, TIFF_SHORT }, - { TIFFTAG_INKNAMES, 1, TIFF_ASCII }, + /*{ TIFFTAG_INKNAMES, 1, TIFF_ASCII },*/ /* Needs much more complicated logic. See tiffcp */ { TIFFTAG_DOTRANGE, 2, TIFF_SHORT }, { TIFFTAG_TARGETPRINTER, 1, TIFF_ASCII }, { TIFFTAG_SAMPLEFORMAT, 1, TIFF_SHORT }, @@ -274,7 +281,26 @@ cpTags(TIFF* in, TIFF* out) { struct cpTag *p; for (p = tags; p < &tags[NTAGS]; p++) - cpTag(in, out, p->tag, p->count, p->type); + { + /* Horrible: but TIFFGetField() expects 2 arguments to be passed */ + /* if we request a tag that is defined in a codec, but that codec */ + /* isn't used */ + if( p->tag == TIFFTAG_GROUP3OPTIONS ) + { + uint16 compression; + if( !TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) || + compression != COMPRESSION_CCITTFAX3 ) + continue; + } + if( p->tag == TIFFTAG_GROUP4OPTIONS ) + { + uint16 compression; + if( !TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) || + compression != COMPRESSION_CCITTFAX4 ) + continue; + } + cpTag(in, out, p->tag, p->count, p->type); + } } #undef NTAGS @@ -506,15 +532,15 @@ setrow(uint8* row, uint32 nrows, const uint8* rows[]) default: for (i = fw; i > 8; i--) acc += bits[*src++]; - /* fall thru... */ - case 8: acc += bits[*src++]; - case 7: acc += bits[*src++]; - case 6: acc += bits[*src++]; - case 5: acc += bits[*src++]; - case 4: acc += bits[*src++]; - case 3: acc += bits[*src++]; - case 2: acc += bits[*src++]; - case 1: acc += bits[*src++]; + /* fall through... */ + case 8: acc += bits[*src++]; /* fall through */ + case 7: acc += bits[*src++]; /* fall through */ + case 6: acc += bits[*src++]; /* fall through */ + case 5: acc += bits[*src++]; /* fall through */ + case 4: acc += bits[*src++]; /* fall through */ + case 3: acc += bits[*src++]; /* fall through */ + case 2: acc += bits[*src++]; /* fall through */ + case 1: acc += bits[*src++]; /* fall through */ case 0: break; } acc += bits[*src & mask1]; @@ -549,7 +575,13 @@ setImage1(const uint8* br, uint32 rw, uint32 rh) err -= limit; sy++; if (err >= limit) - rows[nrows++] = br + bpr*sy; + { + /* We should perhaps error loudly, but I can't make sense of that */ + /* code... */ + if( nrows == 256 ) + break; + rows[nrows++] = br + bpr*sy; + } } setrow(row, nrows, rows); row += tnw; @@ -585,12 +617,17 @@ generateThumbnail(TIFF* in, TIFF* out) rowsize = TIFFScanlineSize(in); rastersize = sh * rowsize; fprintf(stderr, "rastersize=%u\n", (unsigned int)rastersize); - raster = (unsigned char*)_TIFFmalloc(rastersize); + /* +3 : add a few guard bytes since setrow() can read a bit */ + /* outside buffer */ + raster = (unsigned char*)_TIFFmalloc(rastersize+3); if (!raster) { TIFFError(TIFFFileName(in), "Can't allocate space for raster buffer."); return 0; } + raster[rastersize] = 0; + raster[rastersize+1] = 0; + raster[rastersize+2] = 0; rp = raster; for (s = 0; s < ns; s++) { (void) TIFFReadEncodedStrip(in, s, rp, -1); @@ -620,7 +657,7 @@ generateThumbnail(TIFF* in, TIFF* out) TIFFWriteDirectory(out) != -1); } -char* stuff[] = { +const char* stuff[] = { "usage: thumbnail [options] input.tif output.tif", "where options are:", " -h # specify thumbnail image height (default is 274)", @@ -637,16 +674,15 @@ NULL }; static void -usage(void) +usage(int code) { - char buf[BUFSIZ]; int i; + FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; - setbuf(stderr, buf); - fprintf(stderr, "%s\n\n", TIFFGetVersion()); + fprintf(out, "%s\n\n", TIFFGetVersion()); for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); - exit(-1); + fprintf(out, "%s\n", stuff[i]); + exit(code); } /* vim: set ts=8 sts=8 sw=8 noet: */ diff --git a/thirdparty/tiff-4.0.3/tools/tiff2bw.c b/thirdparty/tiff-4.2.0/tools/tiff2bw.c similarity index 80% rename from thirdparty/tiff-4.0.3/tools/tiff2bw.c rename to thirdparty/tiff-4.2.0/tools/tiff2bw.c index bda754a0..654bd324 100644 --- a/thirdparty/tiff-4.0.3/tools/tiff2bw.c +++ b/thirdparty/tiff-4.2.0/tools/tiff2bw.c @@ -1,5 +1,3 @@ -/* $Id: tiff2bw.c,v 1.15 2010-07-02 12:02:56 dron Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -40,17 +38,22 @@ #endif #include "tiffio.h" +#include "tiffiop.h" -#define streq(a,b) (strcmp((a),(b)) == 0) -#define strneq(a,b,n) (strncmp(a,b,n) == 0) +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif /* x% weighting -> fraction of full color */ -#define PCT(x) (((x)*255+127)/100) +#define PCT(x) (((x)*256+50)/100) int RED = PCT(30); /* 30% */ int GREEN = PCT(59); /* 59% */ int BLUE = PCT(11); /* 11% */ -static void usage(void); +static void usage(int code); static int processCompressOptions(char*); static void @@ -127,14 +130,21 @@ main(int argc, char* argv[]) unsigned char *inbuf, *outbuf; char thing[1024]; int c; +#if !HAVE_DECL_OPTARG extern int optind; extern char *optarg; +#endif + + in = (TIFF *) NULL; + out = (TIFF *) NULL; + inbuf = (unsigned char *) NULL; + outbuf = (unsigned char *) NULL; - while ((c = getopt(argc, argv, "c:r:R:G:B:")) != -1) + while ((c = getopt(argc, argv, "c:r:R:G:B:h")) != -1) switch (c) { case 'c': /* compression scheme */ if (!processCompressOptions(optarg)) - usage(); + usage(EXIT_FAILURE); break; case 'r': /* rows/strip */ rowsperstrip = atoi(optarg); @@ -148,34 +158,41 @@ main(int argc, char* argv[]) case 'B': BLUE = PCT(atoi(optarg)); break; + case 'h': + usage(EXIT_SUCCESS); case '?': - usage(); + usage(EXIT_FAILURE); /*NOTREACHED*/ } if (argc - optind < 2) - usage(); + usage(EXIT_FAILURE); in = TIFFOpen(argv[optind], "r"); if (in == NULL) - return (-1); + return (EXIT_FAILURE); photometric = 0; TIFFGetField(in, TIFFTAG_PHOTOMETRIC, &photometric); if (photometric != PHOTOMETRIC_RGB && photometric != PHOTOMETRIC_PALETTE ) { fprintf(stderr, "%s: Bad photometric; can only handle RGB and Palette images.\n", argv[optind]); - return (-1); + goto tiff2bw_error; } TIFFGetField(in, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); if (samplesperpixel != 1 && samplesperpixel != 3) { fprintf(stderr, "%s: Bad samples/pixel %u.\n", argv[optind], samplesperpixel); - return (-1); + goto tiff2bw_error; + } + if( photometric == PHOTOMETRIC_RGB && samplesperpixel != 3) { + fprintf(stderr, "%s: Bad samples/pixel %u for PHOTOMETRIC_RGB.\n", + argv[optind], samplesperpixel); + goto tiff2bw_error; } TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bitspersample); if (bitspersample != 8) { fprintf(stderr, " %s: Sorry, only handle 8-bit samples.\n", argv[optind]); - return (-1); + goto tiff2bw_error; } TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &w); TIFFGetField(in, TIFFTAG_IMAGELENGTH, &h); @@ -183,7 +200,9 @@ main(int argc, char* argv[]) out = TIFFOpen(argv[optind+1], "w"); if (out == NULL) - return (-1); + { + goto tiff2bw_error; + } TIFFSetField(out, TIFFTAG_IMAGEWIDTH, w); TIFFSetField(out, TIFFTAG_IMAGELENGTH, h); TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 8); @@ -205,10 +224,15 @@ main(int argc, char* argv[]) } } TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK); - sprintf(thing, "B&W version of %s", argv[optind]); + snprintf(thing, sizeof(thing), "B&W version of %s", argv[optind]); TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing); TIFFSetField(out, TIFFTAG_SOFTWARE, "tiff2bw"); outbuf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out)); + if( !outbuf ) + { + fprintf(stderr, "Out of memory\n"); + goto tiff2bw_error; + } TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, TIFFDefaultStripSize(out, rowsperstrip)); @@ -232,6 +256,11 @@ main(int argc, char* argv[]) #undef CVT } inbuf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(in)); + if( !inbuf ) + { + fprintf(stderr, "Out of memory\n"); + goto tiff2bw_error; + } for (row = 0; row < h; row++) { if (TIFFReadScanline(in, inbuf, row, 0) < 0) break; @@ -242,6 +271,11 @@ main(int argc, char* argv[]) break; case pack(PHOTOMETRIC_RGB, PLANARCONFIG_CONTIG): inbuf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(in)); + if( !inbuf ) + { + fprintf(stderr, "Out of memory\n"); + goto tiff2bw_error; + } for (row = 0; row < h; row++) { if (TIFFReadScanline(in, inbuf, row, 0) < 0) break; @@ -251,23 +285,48 @@ main(int argc, char* argv[]) } break; case pack(PHOTOMETRIC_RGB, PLANARCONFIG_SEPARATE): + { + tmsize_t inbufsize; rowsize = TIFFScanlineSize(in); - inbuf = (unsigned char *)_TIFFmalloc(3*rowsize); + inbufsize = TIFFSafeMultiply(tmsize_t, 3, rowsize); + inbuf = (unsigned char *)_TIFFmalloc(inbufsize); + if( !inbuf ) + { + fprintf(stderr, "Out of memory\n"); + goto tiff2bw_error; + } for (row = 0; row < h; row++) { for (s = 0; s < 3; s++) if (TIFFReadScanline(in, inbuf+s*rowsize, row, s) < 0) - return (-1); + goto tiff2bw_error; compresssep(outbuf, inbuf, inbuf+rowsize, inbuf+2*rowsize, w); if (TIFFWriteScanline(out, outbuf, row, 0) < 0) break; } break; + } } #undef pack + if (inbuf) + _TIFFfree(inbuf); + if (outbuf) + _TIFFfree(outbuf); + TIFFClose(in); TIFFClose(out); - return (0); + return (EXIT_SUCCESS); + + tiff2bw_error: + if (inbuf) + _TIFFfree(inbuf); + if (outbuf) + _TIFFfree(outbuf); + if (out) + TIFFClose(out); + if (in) + TIFFClose(in); + return (EXIT_FAILURE); } static int @@ -288,7 +347,7 @@ processCompressOptions(char* opt) else if (cp[1] == 'r' ) jpegcolormode = JPEGCOLORMODE_RAW; else - usage(); + usage(EXIT_FAILURE); cp = strchr(cp+1,':'); } @@ -422,11 +481,27 @@ cpTags(TIFF* in, TIFF* out) { struct cpTag *p; for (p = tags; p < &tags[NTAGS]; p++) - cpTag(in, out, p->tag, p->count, p->type); + { + if( p->tag == TIFFTAG_GROUP3OPTIONS ) + { + uint16 compression; + if( !TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) || + compression != COMPRESSION_CCITTFAX3 ) + continue; + } + if( p->tag == TIFFTAG_GROUP4OPTIONS ) + { + uint16 compression; + if( !TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) || + compression != COMPRESSION_CCITTFAX4 ) + continue; + } + cpTag(in, out, p->tag, p->count, p->type); + } } #undef NTAGS -char* stuff[] = { +const char* stuff[] = { "usage: tiff2bw [options] input.tif output.tif", "where options are:", " -R % use #% from red channel", @@ -449,16 +524,15 @@ NULL }; static void -usage(void) +usage(int code) { - char buf[BUFSIZ]; int i; + FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; - setbuf(stderr, buf); - fprintf(stderr, "%s\n\n", TIFFGetVersion()); + fprintf(out, "%s\n\n", TIFFGetVersion()); for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); - exit(-1); + fprintf(out, "%s\n", stuff[i]); + exit(code); } /* vim: set ts=8 sts=8 sw=8 noet: */ diff --git a/thirdparty/tiff-4.0.3/tools/tiff2pdf.c b/thirdparty/tiff-4.2.0/tools/tiff2pdf.c similarity index 81% rename from thirdparty/tiff-4.0.3/tools/tiff2pdf.c rename to thirdparty/tiff-4.2.0/tools/tiff2pdf.c index 356328c1..acaef0d6 100644 --- a/thirdparty/tiff-4.0.3/tools/tiff2pdf.c +++ b/thirdparty/tiff-4.2.0/tools/tiff2pdf.c @@ -1,4 +1,4 @@ -/* $Id: tiff2pdf.c,v 1.69 2012-07-19 15:43:41 tgl Exp $ +/* * * tiff2pdf - converts a TIFF image to a PDF document * @@ -32,6 +32,7 @@ #include #include #include +#include #if HAVE_UNISTD_H # include @@ -53,7 +54,7 @@ #include "tiffio.h" #ifndef HAVE_GETOPT -extern int getopt(int, char**, char*); +extern int getopt(int argc, char * const argv[], const char *optstring); #endif #ifndef EXIT_SUCCESS @@ -67,6 +68,10 @@ extern int getopt(int, char**, char*); #define PS_UNIT_SIZE 72.0F +#define TIFF_DIR_MAX 65534 + +#define DEFAULT_MAX_MALLOC (256 * 1024 * 1024) + /* This type is of PDF color spaces. */ typedef enum { T2P_CS_BILEVEL = 0x01, /* Bilevel, black and white */ @@ -173,6 +178,7 @@ typedef struct { uint16 tiff_orientation; toff_t tiff_dataoffset; tsize_t tiff_datasize; + tsize_t tiff_maxdatasize; uint16 tiff_resunit; uint16 pdf_centimeters; uint16 pdf_overrideres; @@ -204,14 +210,19 @@ typedef struct { char pdf_datetime[TIFF2PDF_DATETIME_SIZE]; #define TIFF2PDF_CREATOR_SIZE 512 char pdf_creator[TIFF2PDF_CREATOR_SIZE]; + int pdf_creator_set; #define TIFF2PDF_AUTHOR_SIZE 512 char pdf_author[TIFF2PDF_AUTHOR_SIZE]; + int pdf_author_set; #define TIFF2PDF_TITLE_SIZE 512 char pdf_title[TIFF2PDF_TITLE_SIZE]; + int pdf_title_set; #define TIFF2PDF_SUBJECT_SIZE 512 char pdf_subject[TIFF2PDF_SUBJECT_SIZE]; + int pdf_subject_set; #define TIFF2PDF_KEYWORDS_SIZE 512 char pdf_keywords[TIFF2PDF_KEYWORDS_SIZE]; + int pdf_keywords_set; t2p_cs_t pdf_colorspace; uint16 pdf_colorspace_invert; uint16 pdf_switchdecode; @@ -221,7 +232,7 @@ typedef struct { t2p_compress_t pdf_defaultcompression; uint16 pdf_defaultcompressionquality; t2p_compress_t pdf_compression; - uint16 pdf_compressionquality; + uint16 pdf_compressionquality; /* for deflate : 100 * zipquality + predictor */ uint16 pdf_nopassthrough; t2p_transcode_t pdf_transcode; t2p_sample_t pdf_sample; @@ -236,7 +247,7 @@ typedef struct { float tiff_whitechromaticities[2]; float tiff_primarychromaticities[6]; float tiff_referenceblackwhite[2]; - float* tiff_transferfunction[3]; + uint16* tiff_transferfunction[3]; int pdf_image_interpolate; /* 0 (default) : do not interpolate, 1 : interpolate */ uint16 tiff_transferfunctioncount; @@ -252,7 +263,7 @@ typedef struct { /* These functions are called by main. */ -void tiff2pdf_usage(void); +static void tiff2pdf_usage(int); int tiff2pdf_match_paper_size(float*, float*, char*); /* These functions are used to generate a PDF from a TIFF. */ @@ -285,7 +296,7 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P*, TIFF*, TIFF*, ttile_t); int t2p_process_ojpeg_tables(T2P*, TIFF*); #endif #ifdef JPEG_SUPPORT -int t2p_process_jpeg_strip(unsigned char*, tsize_t*, unsigned char*, tsize_t*, tstrip_t, uint32); +int t2p_process_jpeg_strip(unsigned char*, tsize_t*, unsigned char*, tsize_t, tsize_t*, tstrip_t, uint32); #endif void t2p_tile_collapse_left(tdata_t, tsize_t, uint32, uint32, uint32); void t2p_write_advance_directory(T2P*, TIFF*); @@ -298,8 +309,8 @@ tsize_t t2p_sample_lab_signed_to_unsigned(tdata_t, uint32); tsize_t t2p_write_pdf_header(T2P*, TIFF*); tsize_t t2p_write_pdf_obj_start(uint32, TIFF*); tsize_t t2p_write_pdf_obj_end(TIFF*); -tsize_t t2p_write_pdf_name(unsigned char*, TIFF*); -tsize_t t2p_write_pdf_string(char*, TIFF*); +tsize_t t2p_write_pdf_name(const unsigned char*, TIFF*); +tsize_t t2p_write_pdf_string(const char*, TIFF*); tsize_t t2p_write_pdf_stream(tdata_t, tsize_t, TIFF*); tsize_t t2p_write_pdf_stream_start(TIFF*); tsize_t t2p_write_pdf_stream_end(TIFF*); @@ -332,6 +343,13 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t, T2P*, TIFF*); tsize_t t2p_write_pdf_xreftable(T2P*, TIFF*); tsize_t t2p_write_pdf_trailer(T2P*, TIFF*); +#define check_snprintf_ret(t2p, rv, buf) do { \ + if ((rv) < 0) rv = 0; \ + else if((rv) >= (int)sizeof(buf)) (rv) = sizeof(buf) - 1; \ + else break; \ + if ((t2p) != NULL) (t2p)->t2p_error = T2P_ERR_ERROR; \ +} while(0) + static void t2p_disable(TIFF *tif) { @@ -350,6 +368,7 @@ t2p_enable(TIFF *tif) * Procs for TIFFClientOpen */ +#ifdef OJPEG_SUPPORT static tmsize_t t2pReadFile(TIFF *tif, tdata_t data, tmsize_t size) { @@ -359,6 +378,7 @@ t2pReadFile(TIFF *tif, tdata_t data, tmsize_t size) return proc(client, data, size); return -1; } +#endif /* OJPEG_SUPPORT */ static tmsize_t t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size) @@ -404,15 +424,15 @@ t2p_seekproc(thandle_t handle, uint64 offset, int whence) { T2P *t2p = (T2P*) handle; if (t2p->outputdisable <= 0 && t2p->outputfile) - return fseek(t2p->outputfile, (long) offset, whence); + return _TIFF_fseek_f(t2p->outputfile, (_TIFF_off_t) offset, whence); return offset; } static int t2p_closeproc(thandle_t handle) { - (void) handle; - return 0; + T2P *t2p = (T2P*) handle; + return fclose(t2p->outputfile); } static uint64 @@ -435,12 +455,13 @@ t2p_unmapproc(thandle_t handle, void *data, toff_t offset) (void) handle, (void) data, (void) offset; } +#if defined(OJPEG_SUPPORT) || defined(JPEG_SUPPORT) static uint64 checkAdd64(uint64 summand1, uint64 summand2, T2P* t2p) { uint64 bytes = summand1 + summand2; - if (bytes - summand1 != summand2) { + if (bytes < summand1) { TIFFError(TIFF2PDF_MODULE, "Integer overflow"); t2p->t2p_error = T2P_ERR_ERROR; bytes = 0; @@ -448,6 +469,7 @@ checkAdd64(uint64 summand1, uint64 summand2, T2P* t2p) return bytes; } +#endif /* defined(OJPEG_SUPPORT) || defined(JPEG_SUPPORT) */ static uint64 checkMultiply64(uint64 first, uint64 second, T2P* t2p) @@ -585,9 +607,10 @@ checkMultiply64(uint64 first, uint64 second, T2P* t2p) */ int main(int argc, char** argv){ - +#if !HAVE_DECL_OPTARG extern char *optarg; extern int optind; +#endif const char *outfilename = NULL; T2P *t2p = NULL; TIFF *input = NULL, *output = NULL; @@ -602,8 +625,11 @@ int main(int argc, char** argv){ while (argv && (c = getopt(argc, argv, - "o:q:u:x:y:w:l:r:p:e:c:a:t:s:k:jzndifbhF")) != -1){ + "m:o:q:u:x:y:w:l:r:p:e:c:a:t:s:k:jzndifbhF")) != -1){ switch (c) { + case 'm': + t2p->tiff_maxdatasize = (tsize_t)strtoul(optarg, NULL, 0) << 20; + break; case 'o': outfilename = optarg; break; @@ -703,31 +729,37 @@ int main(int argc, char** argv){ case 'c': strncpy(t2p->pdf_creator, optarg, sizeof(t2p->pdf_creator) - 1); t2p->pdf_creator[sizeof(t2p->pdf_creator) - 1] = '\0'; + t2p->pdf_creator_set = 1; break; case 'a': strncpy(t2p->pdf_author, optarg, sizeof(t2p->pdf_author) - 1); t2p->pdf_author[sizeof(t2p->pdf_author) - 1] = '\0'; + t2p->pdf_author_set = 1; break; case 't': strncpy(t2p->pdf_title, optarg, sizeof(t2p->pdf_title) - 1); t2p->pdf_title[sizeof(t2p->pdf_title) - 1] = '\0'; + t2p->pdf_title_set = 1; break; case 's': strncpy(t2p->pdf_subject, optarg, sizeof(t2p->pdf_subject) - 1); t2p->pdf_subject[sizeof(t2p->pdf_subject) - 1] = '\0'; + t2p->pdf_subject_set = 1; break; case 'k': strncpy(t2p->pdf_keywords, optarg, sizeof(t2p->pdf_keywords) - 1); t2p->pdf_keywords[sizeof(t2p->pdf_keywords) - 1] = '\0'; + t2p->pdf_keywords_set = 1; break; case 'b': t2p->pdf_image_interpolate = 1; break; - case 'h': - case '?': - tiff2pdf_usage(); + case 'h': + tiff2pdf_usage(EXIT_SUCCESS); goto success; - break; + case '?': + tiff2pdf_usage(EXIT_FAILURE); + goto fail; } } @@ -744,21 +776,21 @@ int main(int argc, char** argv){ } } else { TIFFError(TIFF2PDF_MODULE, "No input file specified"); - tiff2pdf_usage(); + tiff2pdf_usage(EXIT_FAILURE); goto fail; } if(argc > optind) { TIFFError(TIFF2PDF_MODULE, "No support for multiple input files"); - tiff2pdf_usage(); + tiff2pdf_usage(EXIT_FAILURE); goto fail; } /* * Output */ - t2p->outputdisable = 0; + t2p->outputdisable = 1; if (outfilename) { t2p->outputfile = fopen(outfilename, "wb"); if (t2p->outputfile == NULL) { @@ -776,6 +808,7 @@ int main(int argc, char** argv){ t2p_readproc, t2p_writeproc, t2p_seekproc, t2p_closeproc, t2p_sizeproc, t2p_mapproc, t2p_unmapproc); + t2p->outputdisable = 0; if (output == NULL) { TIFFError(TIFF2PDF_MODULE, "Can't initialize output descriptor"); @@ -812,8 +845,8 @@ success: } -void tiff2pdf_usage(){ - char* lines[]={ +static void tiff2pdf_usage(int code) { + static const char* lines[]={ "usage: tiff2pdf [options] input.tiff", "options:", " -o: output to file name", @@ -834,7 +867,7 @@ void tiff2pdf_usage(){ " -l: length in units", " -r: 'd' for resolution default, 'o' for resolution override", " -p: paper size, eg \"letter\", \"legal\", \"A4\"", - " -F: make the tiff fill the PDF page", + " -F: make the tiff fill the PDF page", " -f: set PDF \"Fit Window\" user preference", " -e: date, overrides image or current date/time default, YYYYMMDDHHMMSS", " -c: sets document creator, overrides image software default", @@ -843,14 +876,16 @@ void tiff2pdf_usage(){ " -s: sets document subject, overrides image image description default", " -k: sets document keywords", " -b: set PDF \"Interpolate\" user preference", + " -m: set memory allocation limit (in MiB). set to 0 to disable limit", " -h: usage", NULL }; int i=0; + FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; - fprintf(stderr, "%s\n\n", TIFFGetVersion()); + fprintf(out, "%s\n\n", TIFFGetVersion()); for (i=0;lines[i]!=NULL;i++){ - fprintf(stderr, "%s\n", lines[i]); + fprintf(out, "%s\n", lines[i]); } return; @@ -903,7 +938,7 @@ int tiff2pdf_match_paper_size(float* width, float* length, char* papersize){ len=strlen(papersize); for(i=0;ipdf_defaultpagewidth=612.0; t2p->pdf_defaultpagelength=792.0; t2p->pdf_xrefcount=3; /* Catalog, Info, Pages */ + t2p->tiff_maxdatasize = DEFAULT_MAX_MALLOC; return(t2p); } @@ -996,14 +1032,14 @@ void t2p_validate(T2P* t2p){ #endif #ifdef ZIP_SUPPORT if(t2p->pdf_defaultcompression==T2P_COMPRESS_ZIP){ - uint16 m=t2p->pdf_defaultcompressionquality%100; - if(t2p->pdf_defaultcompressionquality/100 > 9 || - (m>1 && m<10) || m>15){ - t2p->pdf_defaultcompressionquality=0; + uint16 m=t2p->pdf_defaultcompressionquality%100; + if(t2p->pdf_defaultcompressionquality/100 > 9 || + (m>1 && m<10) || m>15){ + t2p->pdf_defaultcompressionquality=0; } if(t2p->pdf_defaultcompressionquality%100 !=0){ - t2p->pdf_defaultcompressionquality/=100; - t2p->pdf_defaultcompressionquality*=100; + t2p->pdf_defaultcompressionquality/=100; + t2p->pdf_defaultcompressionquality*=100; TIFFError( TIFF2PDF_MODULE, "PNG Group predictor differencing not implemented, assuming compression quality %u", @@ -1033,25 +1069,35 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){ uint16 pagen=0; uint16 paged=0; uint16 xuint16=0; + uint16 tiff_transferfunctioncount=0; + uint16* tiff_transferfunction[3]; directorycount=TIFFNumberOfDirectories(input); - t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(directorycount * sizeof(T2P_PAGE)); + if(directorycount > TIFF_DIR_MAX) { + TIFFError( + TIFF2PDF_MODULE, + "TIFF contains too many directories, %s", + TIFFFileName(input)); + t2p->t2p_error = T2P_ERR_ERROR; + return; + } + t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,directorycount,sizeof(T2P_PAGE))); if(t2p->tiff_pages==NULL){ TIFFError( TIFF2PDF_MODULE, - "Can't allocate %lu bytes of memory for tiff_pages array, %s", - (unsigned long) directorycount * sizeof(T2P_PAGE), + "Can't allocate " TIFF_SIZE_FORMAT " bytes of memory for tiff_pages array, %s", + (TIFF_SIZE_T) directorycount * sizeof(T2P_PAGE), TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return; } _TIFFmemset( t2p->tiff_pages, 0x00, directorycount * sizeof(T2P_PAGE)); - t2p->tiff_tiles = (T2P_TILES*) _TIFFmalloc(directorycount * sizeof(T2P_TILES)); + t2p->tiff_tiles = (T2P_TILES*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,directorycount,sizeof(T2P_TILES))); if(t2p->tiff_tiles==NULL){ TIFFError( TIFF2PDF_MODULE, - "Can't allocate %lu bytes of memory for tiff_tiles array, %s", - (unsigned long) directorycount * sizeof(T2P_TILES), + "Can't allocate " TIFF_SIZE_FORMAT " bytes of memory for tiff_tiles array, %s", + (TIFF_SIZE_T) directorycount * sizeof(T2P_TILES), TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return; @@ -1133,24 +1179,48 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){ } #endif if (TIFFGetField(input, TIFFTAG_TRANSFERFUNCTION, - &(t2p->tiff_transferfunction[0]), - &(t2p->tiff_transferfunction[1]), - &(t2p->tiff_transferfunction[2]))) { - if(t2p->tiff_transferfunction[1] != - t2p->tiff_transferfunction[0]) { - t2p->tiff_transferfunctioncount = 3; - t2p->tiff_pages[i].page_extra += 4; - t2p->pdf_xrefcount += 4; - } else { - t2p->tiff_transferfunctioncount = 1; - t2p->tiff_pages[i].page_extra += 2; - t2p->pdf_xrefcount += 2; - } - if(t2p->pdf_minorversion < 2) - t2p->pdf_minorversion = 2; + &(tiff_transferfunction[0]), + &(tiff_transferfunction[1]), + &(tiff_transferfunction[2]))) { + + if((tiff_transferfunction[1] != (uint16*) NULL) && + (tiff_transferfunction[2] != (uint16*) NULL) + ) { + tiff_transferfunctioncount=3; + } else { + tiff_transferfunctioncount=1; + } } else { - t2p->tiff_transferfunctioncount=0; + tiff_transferfunctioncount=0; } + + if (i > 0){ + if (tiff_transferfunctioncount != t2p->tiff_transferfunctioncount){ + TIFFError( + TIFF2PDF_MODULE, + "Different transfer function on page %d", + i); + t2p->t2p_error = T2P_ERR_ERROR; + return; + } + } + + t2p->tiff_transferfunctioncount = tiff_transferfunctioncount; + t2p->tiff_transferfunction[0] = tiff_transferfunction[0]; + t2p->tiff_transferfunction[1] = tiff_transferfunction[1]; + t2p->tiff_transferfunction[2] = tiff_transferfunction[2]; + if(tiff_transferfunctioncount == 3){ + t2p->tiff_pages[i].page_extra += 4; + t2p->pdf_xrefcount += 4; + if(t2p->pdf_minorversion < 2) + t2p->pdf_minorversion = 2; + } else if (tiff_transferfunctioncount == 1){ + t2p->tiff_pages[i].page_extra += 2; + t2p->pdf_xrefcount += 2; + if(t2p->pdf_minorversion < 2) + t2p->pdf_minorversion = 2; + } + if( TIFFGetField( input, TIFFTAG_ICCPROFILE, @@ -1164,7 +1234,24 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){ t2p->tiff_pages[i].page_tilecount; if( (TIFFGetField(input, TIFFTAG_PLANARCONFIG, &xuint16) != 0) && (xuint16 == PLANARCONFIG_SEPARATE ) ){ - TIFFGetField(input, TIFFTAG_SAMPLESPERPIXEL, &xuint16); + if( !TIFFGetField(input, TIFFTAG_SAMPLESPERPIXEL, &xuint16) ) + { + TIFFError( + TIFF2PDF_MODULE, + "Missing SamplesPerPixel, %s", + TIFFFileName(input)); + t2p->t2p_error = T2P_ERR_ERROR; + return; + } + if( (t2p->tiff_tiles[i].tiles_tilecount % xuint16) != 0 ) + { + TIFFError( + TIFF2PDF_MODULE, + "Invalid tile count, %s", + TIFFFileName(input)); + t2p->t2p_error = T2P_ERR_ERROR; + return; + } t2p->tiff_tiles[i].tiles_tilecount/= xuint16; } if( t2p->tiff_tiles[i].tiles_tilecount > 0){ @@ -1177,14 +1264,13 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){ TIFFTAG_TILELENGTH, &( t2p->tiff_tiles[i].tiles_tilelength) ); t2p->tiff_tiles[i].tiles_tiles = - (T2P_TILE*) _TIFFmalloc( - t2p->tiff_tiles[i].tiles_tilecount - * sizeof(T2P_TILE) ); + (T2P_TILE*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,t2p->tiff_tiles[i].tiles_tilecount, + sizeof(T2P_TILE)) ); if( t2p->tiff_tiles[i].tiles_tiles == NULL){ TIFFError( TIFF2PDF_MODULE, - "Can't allocate %lu bytes of memory for t2p_read_tiff_init, %s", - (unsigned long) t2p->tiff_tiles[i].tiles_tilecount * sizeof(T2P_TILE), + "Can't allocate " TIFF_SIZE_FORMAT " bytes of memory for t2p_read_tiff_init, %s", + (TIFF_SIZE_T) t2p->tiff_tiles[i].tiles_tilecount * sizeof(T2P_TILE), TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return; @@ -1197,12 +1283,18 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){ /* * This function is used by qsort to sort a T2P_PAGE* array of page structures - * by page number. + * by page number. If the page numbers are the same, we fall back to comparing + * directory numbers to preserve the order of the input file. */ int t2p_cmp_t2p_page(const void* e1, const void* e2){ - return( ((T2P_PAGE*)e1)->page_number - ((T2P_PAGE*)e2)->page_number ); + int d; + d = (int32)(((T2P_PAGE*)e1)->page_number) - (int32)(((T2P_PAGE*)e2)->page_number); + if(d == 0){ + d = (int32)(((T2P_PAGE*)e1)->page_directory) - (int32)(((T2P_PAGE*)e2)->page_directory); + } + return d; } /* @@ -1220,10 +1312,10 @@ int t2p_cmp_t2p_page(const void* e1, const void* e2){ void t2p_read_tiff_data(T2P* t2p, TIFF* input){ int i=0; - uint16* r; - uint16* g; - uint16* b; - uint16* a; + uint16* r = NULL; + uint16* g = NULL; + uint16* b = NULL; + uint16* a = NULL; uint16 xuint16; uint16* xuint16p; float* xfloatp; @@ -1380,10 +1472,28 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){ &xuint16, &xuint16p) && xuint16 == 1) { if(xuint16p[0] == EXTRASAMPLE_ASSOCALPHA){ + if( t2p->tiff_bitspersample != 8 ) + { + TIFFError( + TIFF2PDF_MODULE, + "No support for BitsPerSample=%d for RGBA", + t2p->tiff_bitspersample); + t2p->t2p_error = T2P_ERR_ERROR; + return; + } t2p->pdf_sample=T2P_SAMPLE_RGBAA_TO_RGB; break; } if(xuint16p[0] == EXTRASAMPLE_UNASSALPHA){ + if( t2p->tiff_bitspersample != 8 ) + { + TIFFError( + TIFF2PDF_MODULE, + "No support for BitsPerSample=%d for RGBA", + t2p->tiff_bitspersample); + t2p->t2p_error = T2P_ERR_ERROR; + return; + } t2p->pdf_sample=T2P_SAMPLE_RGBA_TO_RGB; break; } @@ -1432,18 +1542,25 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){ t2p->pdf_palettesize=0x0001<tiff_bitspersample; if(!TIFFGetField(input, TIFFTAG_COLORMAP, &r, &g, &b)){ TIFFError( - TIFF2PDF_MODULE, - "Palettized image %s has no color map", + TIFF2PDF_MODULE, + "Palettized image %s has no color map", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return; - } + } + if(r == NULL || g == NULL || b == NULL){ + TIFFError( + TIFF2PDF_MODULE, + "Error getting 3 components from color map"); + t2p->t2p_error = T2P_ERR_ERROR; + return; + } if(t2p->pdf_palette != NULL){ _TIFFfree(t2p->pdf_palette); t2p->pdf_palette=NULL; } t2p->pdf_palette = (unsigned char*) - _TIFFmalloc(t2p->pdf_palettesize*3); + _TIFFmalloc(TIFFSafeMultiply(tmsize_t,t2p->pdf_palettesize,3)); if(t2p->pdf_palette==NULL){ TIFFError( TIFF2PDF_MODULE, @@ -1501,18 +1618,25 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){ t2p->pdf_palettesize=0x0001<tiff_bitspersample; if(!TIFFGetField(input, TIFFTAG_COLORMAP, &r, &g, &b, &a)){ TIFFError( - TIFF2PDF_MODULE, - "Palettized image %s has no color map", + TIFF2PDF_MODULE, + "Palettized image %s has no color map", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return; - } + } + if(r == NULL || g == NULL || b == NULL || a == NULL){ + TIFFError( + TIFF2PDF_MODULE, + "Error getting 4 components from color map"); + t2p->t2p_error = T2P_ERR_ERROR; + return; + } if(t2p->pdf_palette != NULL){ _TIFFfree(t2p->pdf_palette); t2p->pdf_palette=NULL; } t2p->pdf_palette = (unsigned char*) - _TIFFmalloc(t2p->pdf_palettesize*4); + _TIFFmalloc(TIFFSafeMultiply(tmsize_t,t2p->pdf_palettesize,4)); if(t2p->pdf_palette==NULL){ TIFFError( TIFF2PDF_MODULE, @@ -1545,6 +1669,22 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){ #endif break; case PHOTOMETRIC_CIELAB: + if( t2p->tiff_samplesperpixel != 3){ + TIFFError( + TIFF2PDF_MODULE, + "Unsupported samplesperpixel = %d for CIELAB", + t2p->tiff_samplesperpixel); + t2p->t2p_error = T2P_ERR_ERROR; + return; + } + if( t2p->tiff_bitspersample != 8){ + TIFFError( + TIFF2PDF_MODULE, + "Invalid bitspersample = %d for CIELAB", + t2p->tiff_bitspersample); + t2p->t2p_error = T2P_ERR_ERROR; + return; + } t2p->pdf_labrange[0]= -127; t2p->pdf_labrange[1]= 127; t2p->pdf_labrange[2]= -127; @@ -1560,6 +1700,22 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){ t2p->pdf_colorspace=T2P_CS_LAB; break; case PHOTOMETRIC_ITULAB: + if( t2p->tiff_samplesperpixel != 3){ + TIFFError( + TIFF2PDF_MODULE, + "Unsupported samplesperpixel = %d for ITULAB", + t2p->tiff_samplesperpixel); + t2p->t2p_error = T2P_ERR_ERROR; + return; + } + if( t2p->tiff_bitspersample != 8){ + TIFFError( + TIFF2PDF_MODULE, + "Invalid bitspersample = %d for ITULAB", + t2p->tiff_bitspersample); + t2p->t2p_error = T2P_ERR_ERROR; + return; + } t2p->pdf_labrange[0]=-85; t2p->pdf_labrange[1]=85; t2p->pdf_labrange[2]=-75; @@ -1645,9 +1801,16 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){ } t2p_compose_pdf_page(t2p); + if( t2p->t2p_error == T2P_ERR_ERROR ) + return; t2p->pdf_transcode = T2P_TRANSCODE_ENCODE; - if(t2p->pdf_nopassthrough==0){ + /* It seems that T2P_TRANSCODE_RAW mode doesn't support separate->contig */ + /* conversion. At least t2p_read_tiff_size and t2p_read_tiff_size_tile */ + /* do not take into account the number of samples, and thus */ + /* that can cause heap buffer overflows such as in */ + /* http://bugzilla.maptools.org/show_bug.cgi?id=2715 */ + if(t2p->pdf_nopassthrough==0 && t2p->tiff_planar!=PLANARCONFIG_SEPARATE){ #ifdef CCITT_SUPPORT if(t2p->tiff_compression==COMPRESSION_CCITTFAX4 ){ @@ -1661,8 +1824,12 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){ if(t2p->tiff_compression== COMPRESSION_ADOBE_DEFLATE || t2p->tiff_compression==COMPRESSION_DEFLATE){ if(TIFFIsTiled(input) || (TIFFNumberOfStrips(input)==1) ){ + uint16 predictor; t2p->pdf_transcode = T2P_TRANSCODE_RAW; t2p->pdf_compression=T2P_COMPRESS_ZIP; + TIFFGetField(input, TIFFTAG_PREDICTOR, &predictor); + t2p->pdf_compressionquality = predictor; + /* TIFFTAG_ZIPQUALITY is always Z_DEFAULT_COMPRESSION on reading */ } } #endif @@ -1732,8 +1899,9 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){ &(t2p->tiff_transferfunction[0]), &(t2p->tiff_transferfunction[1]), &(t2p->tiff_transferfunction[2]))) { - if(t2p->tiff_transferfunction[1] != - t2p->tiff_transferfunction[0]) { + if((t2p->tiff_transferfunction[1] != (uint16*) NULL) && + (t2p->tiff_transferfunction[2] != (uint16*) NULL) + ) { t2p->tiff_transferfunctioncount=3; } else { t2p->tiff_transferfunctioncount=1; @@ -1811,6 +1979,10 @@ void t2p_read_tiff_size(T2P* t2p, TIFF* input){ #ifdef CCITT_SUPPORT if(t2p->pdf_compression == T2P_COMPRESS_G4 ){ TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc); + if (sbc[0] != (uint64)(tmsize_t)sbc[0]) { + TIFFError(TIFF2PDF_MODULE, "Integer overflow"); + t2p->t2p_error = T2P_ERR_ERROR; + } t2p->tiff_datasize=(tmsize_t)sbc[0]; return; } @@ -1818,6 +1990,10 @@ void t2p_read_tiff_size(T2P* t2p, TIFF* input){ #ifdef ZIP_SUPPORT if(t2p->pdf_compression == T2P_COMPRESS_ZIP){ TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc); + if (sbc[0] != (uint64)(tmsize_t)sbc[0]) { + TIFFError(TIFF2PDF_MODULE, "Integer overflow"); + t2p->t2p_error = T2P_ERR_ERROR; + } t2p->tiff_datasize=(tmsize_t)sbc[0]; return; } @@ -1896,9 +2072,11 @@ void t2p_read_tiff_size(T2P* t2p, TIFF* input){ } for(i=0;itiff_datasize = (tsize_t) k; if ((uint64) t2p->tiff_datasize != k) { TIFFError(TIFF2PDF_MODULE, "Integer overflow"); @@ -1909,9 +2087,17 @@ void t2p_read_tiff_size(T2P* t2p, TIFF* input){ #endif (void) 0; } - k = checkMultiply64(TIFFScanlineSize(input), t2p->tiff_length, t2p); - if(t2p->tiff_planar==PLANARCONFIG_SEPARATE){ - k = checkMultiply64(k, t2p->tiff_samplesperpixel, t2p); +#ifdef JPEG_SUPPORT + if(t2p->pdf_compression == T2P_COMPRESS_JPEG + && t2p->tiff_photometric == PHOTOMETRIC_YCBCR) { + k = checkMultiply64(TIFFNumberOfStrips(input), TIFFStripSize(input), t2p); + } else +#endif + { + k = checkMultiply64(TIFFScanlineSize(input), t2p->tiff_length, t2p); + if(t2p->tiff_planar==PLANARCONFIG_SEPARATE){ + k = checkMultiply64(k, t2p->tiff_samplesperpixel, t2p); + } } if (k == 0) { /* Assume we had overflow inside TIFFScanlineSize */ @@ -1961,7 +2147,7 @@ void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){ k=tbc[tile]; #ifdef OJPEG_SUPPORT if(t2p->tiff_compression==COMPRESSION_OJPEG){ - k = checkAdd64(k, 2048, t2p); + k = checkAdd64(k, 2048, t2p); } #endif #ifdef JPEG_SUPPORT @@ -2051,6 +2237,9 @@ int t2p_tile_is_corner_edge(T2P_TILES tiles, ttile_t tile){ return(t2p_tile_is_right_edge(tiles, tile) & t2p_tile_is_bottom_edge(tiles, tile) ); } +#if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT) +static const unsigned char jpeg_eof_marker[] = { 0xff, 0xd9 }; +#endif /* This function reads the raster image data from the input TIFF for an image and writes @@ -2078,7 +2267,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){ uint16 v_samp=1; uint16 ri=1; uint32 rows=0; -#endif +#endif /* ifdef OJPEG_SUPPORT */ #ifdef JPEG_SUPPORT unsigned char* jpt; float* xfloatp; @@ -2086,7 +2275,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){ unsigned char* stripbuffer; tsize_t striplength=0; uint32 max_striplength=0; -#endif +#endif /* ifdef JPEG_SUPPORT */ /* Fail if prior error (in particular, can't trust tiff_datasize) */ if (t2p->t2p_error != T2P_ERR_OK) @@ -2098,15 +2287,22 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){ buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if (buffer == NULL) { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s", - (unsigned long) t2p->tiff_datasize, + TIFFError(TIFF2PDF_MODULE, + "Can't allocate %lu bytes of memory for " + "t2p_readwrite_pdf_image, %s", + (unsigned long) t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } - TIFFReadRawStrip(input, 0, (tdata_t) buffer, - t2p->tiff_datasize); + memset(buffer, 0, t2p->tiff_datasize); + if (TIFFReadRawStrip(input, 0, (tdata_t) buffer, + t2p->tiff_datasize) < 0) { + TIFFError(TIFF2PDF_MODULE, + "TIFFReadRawStrip() failed"); + _TIFFfree(buffer); + return(0); + } if (t2p->tiff_fillorder==FILLORDER_LSB2MSB){ /* * make sure is lsb-to-msb @@ -2120,22 +2316,27 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){ _TIFFfree(buffer); return(t2p->tiff_datasize); } -#endif +#endif /* ifdef CCITT_SUPPORT */ #ifdef ZIP_SUPPORT if (t2p->pdf_compression == T2P_COMPRESS_ZIP) { buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(buffer == NULL){ - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s", - (unsigned long) t2p->tiff_datasize, + TIFFError(TIFF2PDF_MODULE, + "Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s", + (unsigned long) t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } - memset(buffer, 0, t2p->tiff_datasize); - TIFFReadRawStrip(input, 0, (tdata_t) buffer, - t2p->tiff_datasize); + memset(buffer, 0, t2p->tiff_datasize); + if (TIFFReadRawStrip(input, 0, (tdata_t) buffer, + t2p->tiff_datasize) < 0) { + TIFFError(TIFF2PDF_MODULE, + "TIFFReadRawStrip() failed"); + _TIFFfree(buffer); + return(0); + } if (t2p->tiff_fillorder==FILLORDER_LSB2MSB) { TIFFReverseBits(buffer, t2p->tiff_datasize); @@ -2145,7 +2346,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){ _TIFFfree(buffer); return(t2p->tiff_datasize); } -#endif +#endif /* ifdef ZIP_SUPPORT */ #ifdef OJPEG_SUPPORT if(t2p->tiff_compression == COMPRESSION_OJPEG) { @@ -2153,14 +2354,14 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){ buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(buffer == NULL) { - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s", - (unsigned long) t2p->tiff_datasize, + TIFFError(TIFF2PDF_MODULE, + "Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s", + (unsigned long) t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } - memset(buffer, 0, t2p->tiff_datasize); + memset(buffer, 0, t2p->tiff_datasize); if(t2p->pdf_ojpegiflength==0){ inputoffset=t2pSeekFile(input, 0, SEEK_CUR); @@ -2220,8 +2421,8 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){ } } else { if(! t2p->pdf_ojpegdata){ - TIFFError(TIFF2PDF_MODULE, - "No support for OJPEG image %s with bad tables", + TIFFError(TIFF2PDF_MODULE, + "No support for OJPEG image %s with bad tables", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); @@ -2229,57 +2430,70 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){ buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(buffer==NULL){ - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s", - (unsigned long) t2p->tiff_datasize, + TIFFError(TIFF2PDF_MODULE, + "Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s", + (unsigned long) t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } - memset(buffer, 0, t2p->tiff_datasize); + memset(buffer, 0, t2p->tiff_datasize); _TIFFmemcpy(buffer, t2p->pdf_ojpegdata, t2p->pdf_ojpegdatalength); bufferoffset=t2p->pdf_ojpegdatalength; stripcount=TIFFNumberOfStrips(input); for(i=0;it2p_error = T2P_ERR_ERROR; + return(0); + } + bufferoffset += retTIFFReadRawStrip; } t2pWriteFile(output, (tdata_t) buffer, bufferoffset); + if( ! ( (buffer[bufferoffset-1]==0xd9) && (buffer[bufferoffset-2]==0xff) ) ){ + t2pWriteFile(output, (tdata_t) jpeg_eof_marker, sizeof(jpeg_eof_marker)); + } _TIFFfree(buffer); return(bufferoffset); +#if 0 + /* + This hunk of code removed code is clearly + mis-placed and we are not sure where it + should be (if anywhere) + */ TIFFError(TIFF2PDF_MODULE, "No support for OJPEG image %s with no JPEG File Interchange offset", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); - } - return(t2p->tiff_datasize); - } #endif + } + } +#endif /* ifdef OJPEG_SUPPORT */ #ifdef JPEG_SUPPORT if(t2p->tiff_compression == COMPRESSION_JPEG) { uint32 count = 0; buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(buffer==NULL){ - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s", - (unsigned long) t2p->tiff_datasize, + TIFFError(TIFF2PDF_MODULE, + "Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s", + (unsigned long) t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } - memset(buffer, 0, t2p->tiff_datasize); + memset(buffer, 0, t2p->tiff_datasize); if (TIFFGetField(input, TIFFTAG_JPEGTABLES, &count, &jpt) != 0) { if(count > 4) { _TIFFmemcpy(buffer, jpt, count); @@ -2294,20 +2508,29 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){ stripbuffer = (unsigned char*) _TIFFmalloc(max_striplength); if(stripbuffer==NULL){ - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", - max_striplength, + TIFFError(TIFF2PDF_MODULE, + "Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", + max_striplength, TIFFFileName(input)); _TIFFfree(buffer); t2p->t2p_error = T2P_ERR_ERROR; return(0); } + memset(stripbuffer, 0, max_striplength); for(i=0;it2p_error = T2P_ERR_ERROR; + return(0); + } if(!t2p_process_jpeg_strip( stripbuffer, &striplength, - buffer, + buffer, + t2p->tiff_datasize, &bufferoffset, i, t2p->tiff_length)){ @@ -2320,28 +2543,27 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){ return(0); } } - buffer[bufferoffset++]=0xff; - buffer[bufferoffset++]=0xd9; t2pWriteFile(output, (tdata_t) buffer, bufferoffset); + t2pWriteFile(output, (tdata_t) jpeg_eof_marker, sizeof(jpeg_eof_marker)); _TIFFfree(stripbuffer); _TIFFfree(buffer); return(bufferoffset); } -#endif +#endif /* ifdef JPEG_SUPPORT */ (void)0; } if(t2p->pdf_sample==T2P_SAMPLE_NOTHING){ buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(buffer==NULL){ - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s", - (unsigned long) t2p->tiff_datasize, + TIFFError(TIFF2PDF_MODULE, + "Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s", + (unsigned long) t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } - memset(buffer, 0, t2p->tiff_datasize); + memset(buffer, 0, t2p->tiff_datasize); stripsize=TIFFStripSize(input); stripcount=TIFFNumberOfStrips(input); for(i=0;itiff_datasize - bufferoffset)); if(read==-1){ TIFFError(TIFF2PDF_MODULE, "Error on decoding strip %u of %s", @@ -2372,21 +2594,22 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){ buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(buffer==NULL){ - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s", - (unsigned long) t2p->tiff_datasize, + TIFFError(TIFF2PDF_MODULE, + "Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s", + (unsigned long) t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } - memset(buffer, 0, t2p->tiff_datasize); + memset(buffer, 0, t2p->tiff_datasize); samplebuffer = (unsigned char*) _TIFFmalloc(stripsize); if(samplebuffer==NULL){ - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s", - (unsigned long) t2p->tiff_datasize, + TIFFError(TIFF2PDF_MODULE, + "Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s", + (unsigned long) t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; + _TIFFfree(buffer); return(0); } for(i=0;it2p_error=T2P_ERR_ERROR; @@ -2421,14 +2644,14 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){ buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(buffer==NULL){ - TIFFError(TIFF2PDF_MODULE, - "Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s", - (unsigned long) t2p->tiff_datasize, + TIFFError(TIFF2PDF_MODULE, + "Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s", + (unsigned long) t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } - memset(buffer, 0, t2p->tiff_datasize); + memset(buffer, 0, t2p->tiff_datasize); stripsize=TIFFStripSize(input); stripcount=TIFFNumberOfStrips(input); for(i=0;itiff_datasize - bufferoffset)); if(read==-1){ TIFFError(TIFF2PDF_MODULE, "Error on decoding strip %u of %s", @@ -2461,7 +2684,8 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){ (unsigned long) t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; - _TIFFfree(buffer); + _TIFFfree(buffer); + return(0); } else { buffer=samplebuffer; t2p->tiff_datasize *= t2p->tiff_samplesperpixel; @@ -2542,7 +2766,7 @@ dataready: case T2P_COMPRESS_G4: TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_CCITTFAX4); break; -#endif +#endif /* ifdef CCITT_SUPPORT */ #ifdef JPEG_SUPPORT case T2P_COMPRESS_JPEG: if(t2p->tiff_photometric==PHOTOMETRIC_YCBCR) { @@ -2588,7 +2812,7 @@ dataready: } break; -#endif +#endif /* ifdef JPEG_SUPPORT */ #ifdef ZIP_SUPPORT case T2P_COMPRESS_ZIP: TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE); @@ -2603,7 +2827,7 @@ dataready: (t2p->pdf_defaultcompressionquality / 100)); } break; -#endif +#endif /* ifdef ZIP_SUPPORT */ default: break; } @@ -2617,7 +2841,7 @@ dataready: buffer, stripsize * stripcount); } else -#endif +#endif /* ifdef JPEG_SUPPORT */ { bufferoffset = TIFFWriteEncodedStrip(output, (tstrip_t)0, buffer, @@ -2657,7 +2881,7 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_ tsize_t read=0; uint16 i=0; ttile_t tilecount=0; - tsize_t tilesize=0; + /* tsize_t tilesize=0; */ ttile_t septilecount=0; tsize_t septilesize=0; #ifdef JPEG_SUPPORT @@ -2691,7 +2915,14 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_ t2p->t2p_error = T2P_ERR_ERROR; return(0); } - TIFFReadRawTile(input, tile, (tdata_t) buffer, t2p->tiff_datasize); + memset(buffer, 0, t2p->tiff_datasize); + if (TIFFReadRawTile(input, tile, (tdata_t) buffer, t2p->tiff_datasize) < 0) { + TIFFError(TIFF2PDF_MODULE, + "TIFFReadRawTile() failed"); + _TIFFfree(buffer); + t2p->t2p_error = T2P_ERR_ERROR; + return(0); + } if (t2p->tiff_fillorder==FILLORDER_LSB2MSB){ TIFFReverseBits(buffer, t2p->tiff_datasize); } @@ -2712,7 +2943,14 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_ t2p->t2p_error = T2P_ERR_ERROR; return(0); } - TIFFReadRawTile(input, tile, (tdata_t) buffer, t2p->tiff_datasize); + memset(buffer, 0, t2p->tiff_datasize); + if (TIFFReadRawTile(input, tile, (tdata_t) buffer, t2p->tiff_datasize) < 0) { + TIFFError(TIFF2PDF_MODULE, + "TIFFReadRawTile() failed"); + _TIFFfree(buffer); + t2p->t2p_error = T2P_ERR_ERROR; + return(0); + } if (t2p->tiff_fillorder==FILLORDER_LSB2MSB){ TIFFReverseBits(buffer, t2p->tiff_datasize); } @@ -2723,6 +2961,7 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_ #endif #ifdef OJPEG_SUPPORT if(t2p->tiff_compression == COMPRESSION_OJPEG){ + tsize_t retTIFFReadRawTile; if(! t2p->pdf_ojpegdata){ TIFFError(TIFF2PDF_MODULE, "No support for OJPEG image %s with " @@ -2741,6 +2980,7 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_ t2p->t2p_error = T2P_ERR_ERROR; return(0); } + memset(buffer, 0, t2p->tiff_datasize); _TIFFmemcpy(buffer, t2p->pdf_ojpegdata, t2p->pdf_ojpegdatalength); if(edge!=0){ if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile)){ @@ -2756,14 +2996,20 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_ (t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth ) & 0xff; } } - bufferoffset=t2p->pdf_ojpegdatalength; - bufferoffset+=TIFFReadRawTile(input, + bufferoffset = t2p->pdf_ojpegdatalength; + retTIFFReadRawTile = TIFFReadRawTile(input, tile, (tdata_t) &(((unsigned char*)buffer)[bufferoffset]), -1); - ((unsigned char*)buffer)[bufferoffset++]=0xff; - ((unsigned char*)buffer)[bufferoffset++]=0xd9; + if (retTIFFReadRawTile < 0) { + TIFFError(TIFF2PDF_MODULE, "TIFFReadRawTile() failed"); + _TIFFfree(buffer); + t2p->t2p_error = T2P_ERR_ERROR; + return(0); + } + bufferoffset += retTIFFReadRawTile; t2pWriteFile(output, (tdata_t) buffer, bufferoffset); + t2pWriteFile(output, (tdata_t) jpeg_eof_marker, sizeof(jpeg_eof_marker)); _TIFFfree(buffer); return(bufferoffset); } @@ -2775,35 +3021,41 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_ buffer= (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(buffer==NULL){ TIFFError(TIFF2PDF_MODULE, - "Can't allocate %lu bytes of memory " + "Can't allocate " TIFF_SIZE_FORMAT " bytes of memory " "for t2p_readwrite_pdf_image_tile, %s", - t2p->tiff_datasize, + (TIFF_SIZE_T) t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } + memset(buffer, 0, t2p->tiff_datasize); if(TIFFGetField(input, TIFFTAG_JPEGTABLES, &count, &jpt) != 0) { - if (count > 0) { - _TIFFmemcpy(buffer, jpt, count); + if (count > 4) { + tsize_t retTIFFReadRawTile; + /* Ignore EOI marker of JpegTables */ + _TIFFmemcpy(buffer, jpt, count - 2); bufferoffset += count - 2; + /* Store last 2 bytes of the JpegTables */ table_end[0] = buffer[bufferoffset-2]; table_end[1] = buffer[bufferoffset-1]; - } - if (count > 0) { xuint32 = bufferoffset; - bufferoffset += TIFFReadRawTile( - input, - tile, - (tdata_t) &(((unsigned char*)buffer)[bufferoffset-2]), - -1); - buffer[xuint32-2]=table_end[0]; - buffer[xuint32-1]=table_end[1]; - } else { - bufferoffset += TIFFReadRawTile( + bufferoffset -= 2; + retTIFFReadRawTile = TIFFReadRawTile( input, tile, (tdata_t) &(((unsigned char*)buffer)[bufferoffset]), -1); + if( retTIFFReadRawTile < 0 ) + { + _TIFFfree(buffer); + t2p->t2p_error = T2P_ERR_ERROR; + return(0); + } + bufferoffset += retTIFFReadRawTile; + /* Overwrite SOI marker of image scan with previously */ + /* saved end of JpegTables */ + buffer[xuint32-2]=table_end[0]; + buffer[xuint32-1]=table_end[1]; } } t2pWriteFile(output, (tdata_t) buffer, bufferoffset); @@ -2825,6 +3077,7 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_ t2p->t2p_error = T2P_ERR_ERROR; return(0); } + memset(buffer, 0, t2p->tiff_datasize); read = TIFFReadEncodedTile( input, @@ -2846,28 +3099,31 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_ if(t2p->pdf_sample == T2P_SAMPLE_PLANAR_SEPARATE_TO_CONTIG){ septilesize=TIFFTileSize(input); septilecount=TIFFNumberOfTiles(input); - tilesize=septilesize*t2p->tiff_samplesperpixel; + /* tilesize=septilesize*t2p->tiff_samplesperpixel; */ tilecount=septilecount/t2p->tiff_samplesperpixel; buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(buffer==NULL){ - TIFFError(TIFF2PDF_MODULE, + TIFFError(TIFF2PDF_MODULE, "Can't allocate %lu bytes of memory " - "for t2p_readwrite_pdf_image_tile, %s", - (unsigned long) t2p->tiff_datasize, + "for t2p_readwrite_pdf_image_tile, %s", + (unsigned long) t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } + memset(buffer, 0, t2p->tiff_datasize); samplebuffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(samplebuffer==NULL){ - TIFFError(TIFF2PDF_MODULE, + TIFFError(TIFF2PDF_MODULE, "Can't allocate %lu bytes of memory " - "for t2p_readwrite_pdf_image_tile, %s", - (unsigned long) t2p->tiff_datasize, + "for t2p_readwrite_pdf_image_tile, %s", + (unsigned long) t2p->tiff_datasize, TIFFFileName(input)); + _TIFFfree(buffer); t2p->t2p_error = T2P_ERR_ERROR; return(0); } + memset(samplebuffer, 0, t2p->tiff_datasize); samplebufferoffset=0; for(i=0;itiff_samplesperpixel;i++){ read = @@ -2899,23 +3155,24 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_ if(buffer==NULL){ buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(buffer==NULL){ - TIFFError(TIFF2PDF_MODULE, + TIFFError(TIFF2PDF_MODULE, "Can't allocate %lu bytes of memory " - "for t2p_readwrite_pdf_image_tile, %s", - (unsigned long) t2p->tiff_datasize, + "for t2p_readwrite_pdf_image_tile, %s", + (unsigned long) t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } + memset(buffer, 0, t2p->tiff_datasize); read = TIFFReadEncodedTile( input, tile, (tdata_t) &buffer[bufferoffset], t2p->tiff_datasize); if(read==-1){ - TIFFError(TIFF2PDF_MODULE, - "Error on decoding tile %u of %s", - tile, + TIFFError(TIFF2PDF_MODULE, + "Error on decoding tile %u of %s", + tile, TIFFFileName(input)); _TIFFfree(buffer); t2p->t2p_error=T2P_ERR_ERROR; @@ -2938,8 +3195,8 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_ } if(t2p->pdf_sample & T2P_SAMPLE_YCBCR_TO_RGB){ - TIFFError(TIFF2PDF_MODULE, - "No support for YCbCr to RGB in tile for %s", + TIFFError(TIFF2PDF_MODULE, + "No support for YCbCr to RGB in tile for %s", TIFFFileName(input)); _TIFFfree(buffer); t2p->t2p_error = T2P_ERR_ERROR; @@ -2948,19 +3205,26 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_ if(t2p->pdf_sample & T2P_SAMPLE_LAB_SIGNED_TO_UNSIGNED){ t2p->tiff_datasize=t2p_sample_lab_signed_to_unsigned( - (tdata_t)buffer, + (tdata_t)buffer, t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth *t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); } } if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile) != 0){ - t2p_tile_collapse_left( - buffer, - TIFFTileRowSize(input), - t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth, - t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth, - t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); + if ((uint64)t2p->tiff_datasize < (uint64)TIFFTileRowSize(input) * (uint64)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength) { + /* we don't know how to handle PLANARCONFIG_CONTIG, PHOTOMETRIC_YCBCR with 3 samples per pixel */ + TIFFWarning( + TIFF2PDF_MODULE, + "Don't know how to collapse tile to the left"); + } else { + t2p_tile_collapse_left( + buffer, + TIFFTileRowSize(input), + t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth, + t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth, + t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); + } } @@ -3065,18 +3329,26 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_ break; } + if (TIFFStripSize(output) > t2p->tiff_datasize) { + TIFFError(TIFF2PDF_MODULE, + "Size mismatch input %ld, output %ld", + t2p->tiff_datasize, TIFFStripSize(output)); + _TIFFfree(buffer); + t2p->t2p_error = T2P_ERR_ERROR; + return(0); + } t2p_enable(output); t2p->outputwritten = 0; bufferoffset = TIFFWriteEncodedStrip(output, (tstrip_t) 0, buffer, - TIFFStripSize(output)); + TIFFStripSize(output)); if (buffer != NULL) { _TIFFfree(buffer); buffer = NULL; } if (bufferoffset == -1) { - TIFFError(TIFF2PDF_MODULE, - "Error writing encoded tile to output PDF %s", - TIFFFileName(output)); + TIFFError(TIFF2PDF_MODULE, + "Error writing encoded tile to output PDF %s", + TIFFFileName(output)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } @@ -3336,38 +3608,70 @@ int t2p_process_jpeg_strip( unsigned char* strip, tsize_t* striplength, unsigned char* buffer, + tsize_t buffersize, tsize_t* bufferoffset, tstrip_t no, uint32 height){ tsize_t i=0; - uint16 ri =0; - uint16 v_samp=1; - uint16 h_samp=1; - int j=0; - - i++; - - while(i<(*striplength)){ + + while (i < *striplength) { + tsize_t datalen; + uint16 ri; + uint16 v_samp; + uint16 h_samp; + int j; + int ncomp; + + /* marker header: one or more FFs */ + if (strip[i] != 0xff) + return(0); + i++; + while (i < *striplength && strip[i] == 0xff) + i++; + if (i >= *striplength) + return(0); + /* SOI is the only pre-SOS marker without a length word */ + if (strip[i] == 0xd8) + datalen = 0; + else { + if ((*striplength - i) <= 2) + return(0); + datalen = (strip[i+1] << 8) | strip[i+2]; + if (datalen < 2 || datalen >= (*striplength - i)) + return(0); + } switch( strip[i] ){ - case 0xd8: - /* SOI - start of image */ + case 0xd8: /* SOI - start of image */ + if( *bufferoffset + 2 > buffersize ) + return(0); _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), 2); *bufferoffset+=2; - i+=2; break; - case 0xc0: - case 0xc1: - case 0xc3: - case 0xc9: - case 0xca: + case 0xc0: /* SOF0 */ + case 0xc1: /* SOF1 */ + case 0xc3: /* SOF3 */ + case 0xc9: /* SOF9 */ + case 0xca: /* SOF10 */ if(no==0){ - _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2); - for(j=0;j>4) > h_samp) - h_samp = (buffer[*bufferoffset+11+(2*j)]>>4); - if( (buffer[*bufferoffset+11+(2*j)] & 0x0f) > v_samp) - v_samp = (buffer[*bufferoffset+11+(2*j)] & 0x0f); + if( *bufferoffset + datalen + 2 + 6 > buffersize ) + return(0); + _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), datalen+2); + if( *bufferoffset + 9 >= buffersize ) + return(0); + ncomp = buffer[*bufferoffset+9]; + if (ncomp < 1 || ncomp > 4) + return(0); + v_samp=1; + h_samp=1; + if( *bufferoffset + 11 + 3*(ncomp-1) >= buffersize ) + return(0); + for(j=0;j>4) > h_samp) + h_samp = (samp>>4); + if( (samp & 0x0f) > v_samp) + v_samp = (samp & 0x0f); } v_samp*=8; h_samp*=8; @@ -3381,45 +3685,51 @@ int t2p_process_jpeg_strip( (unsigned char) ((height>>8) & 0xff); buffer[*bufferoffset+6]= (unsigned char) (height & 0xff); - *bufferoffset+=strip[i+2]+2; - i+=strip[i+2]+2; - + *bufferoffset+=datalen+2; + /* insert a DRI marker */ buffer[(*bufferoffset)++]=0xff; buffer[(*bufferoffset)++]=0xdd; buffer[(*bufferoffset)++]=0x00; buffer[(*bufferoffset)++]=0x04; buffer[(*bufferoffset)++]=(ri >> 8) & 0xff; buffer[(*bufferoffset)++]= ri & 0xff; - } else { - i+=strip[i+2]+2; } break; - case 0xc4: - case 0xdb: - _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2); - *bufferoffset+=strip[i+2]+2; - i+=strip[i+2]+2; + case 0xc4: /* DHT */ + case 0xdb: /* DQT */ + if( *bufferoffset + datalen + 2 > buffersize ) + return(0); + _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), datalen+2); + *bufferoffset+=datalen+2; break; - case 0xda: + case 0xda: /* SOS */ if(no==0){ - _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2); - *bufferoffset+=strip[i+2]+2; - i+=strip[i+2]+2; + if( *bufferoffset + datalen + 2 > buffersize ) + return(0); + _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), datalen+2); + *bufferoffset+=datalen+2; } else { + if( *bufferoffset + 2 > buffersize ) + return(0); buffer[(*bufferoffset)++]=0xff; buffer[(*bufferoffset)++]= (unsigned char)(0xd0 | ((no-1)%8)); - i+=strip[i+2]+2; } - _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), (*striplength)-i-1); - *bufferoffset+=(*striplength)-i-1; + i += datalen + 1; + /* copy remainder of strip */ + if( *bufferoffset + *striplength - i > buffersize ) + return(0); + _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i]), *striplength - i); + *bufferoffset+= *striplength - i; return(1); default: - i+=strip[i+2]+2; + /* ignore any other marker */ + break; } + i += datalen + 1; } - + /* failed to find SOS marker */ return(0); } #endif @@ -3440,7 +3750,8 @@ void t2p_tile_collapse_left( edgescanwidth = (scanwidth * edgetilewidth + (tilewidth - 1))/ tilewidth; for(i=0;itiff_width*t2p->tiff_length; component_count=t2p->tiff_samplesperpixel; + data_size=TIFFSafeMultiply(size_t,sample_count,component_count); + if( (data_size == 0U) || (t2p->tiff_datasize < 0) || + (data_size > (size_t) t2p->tiff_datasize) ) + { + TIFFError(TIFF2PDF_MODULE, + "Error: sample_count * component_count > t2p->tiff_datasize"); + t2p->t2p_error = T2P_ERR_ERROR; + return 1; + } for(i=sample_count;i>0;i--){ palette_offset=buffer[i-1] * component_count; sample_offset= (i-1) * component_count; + if(palette_offset + component_count > t2p->pdf_palettesize){ + TIFFError(TIFF2PDF_MODULE, + "Error: palette_offset + component_count > t2p->pdf_palettesize"); + return 1; + } for(j=0;jpdf_palette[palette_offset+j]; } @@ -3542,8 +3868,14 @@ tsize_t t2p_sample_rgbaa_to_rgb(tdata_t data, uint32 samplecount) { uint32 i; - - for(i = 0; i < samplecount; i++) + + /* For the 3 first samples, there is overlap between source and + * destination, so use memmove(). + * See http://bugzilla.maptools.org/show_bug.cgi?id=2577 + */ + for(i = 0; i < 3 && i < samplecount; i++) + memmove((uint8*)data + i * 3, (uint8*)data + i * 4, 3); + for(; i < samplecount; i++) memcpy((uint8*)data + i * 3, (uint8*)data + i * 4, 3); return(i * 3); @@ -3560,7 +3892,7 @@ t2p_sample_rgba_to_rgb(tdata_t data, uint32 samplecount) uint32 i = 0; uint32 sample = 0; uint8 alpha = 0; - + for (i = 0; i < samplecount; i++) { sample=((uint32*)data)[i]; alpha=(uint8)((255 - ((sample >> 24) & 0xff))); @@ -3609,7 +3941,10 @@ tsize_t t2p_write_pdf_header(T2P* t2p, TIFF* output){ char buffer[16]; int buflen=0; - buflen=sprintf(buffer, "%%PDF-%u.%u ", t2p->pdf_majorversion&0xff, t2p->pdf_minorversion&0xff); + buflen = snprintf(buffer, sizeof(buffer), "%%PDF-%u.%u ", + t2p->pdf_majorversion&0xff, + t2p->pdf_minorversion&0xff); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t)"\n%\342\343\317\323\n", 7); @@ -3623,10 +3958,11 @@ tsize_t t2p_write_pdf_header(T2P* t2p, TIFF* output){ tsize_t t2p_write_pdf_obj_start(uint32 number, TIFF* output){ tsize_t written=0; - char buffer[16]; + char buffer[32]; int buflen=0; - buflen=sprintf(buffer, "%lu", (unsigned long)number); + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)number); + check_snprintf_ret((T2P*)NULL, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen ); written += t2pWriteFile(output, (tdata_t) " 0 obj\n", 7); @@ -3650,7 +3986,7 @@ tsize_t t2p_write_pdf_obj_end(TIFF* output){ This function writes a PDF name object to output. */ -tsize_t t2p_write_pdf_name(unsigned char* name, TIFF* output){ +tsize_t t2p_write_pdf_name(const unsigned char* name, TIFF* output){ tsize_t written=0; uint32 i=0; @@ -3665,13 +4001,13 @@ tsize_t t2p_write_pdf_name(unsigned char* name, TIFF* output){ written += t2pWriteFile(output, (tdata_t) "/", 1); for (i=0;i 0x7E){ - sprintf(buffer, "#%.2X", name[i]); + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); buffer[sizeof(buffer) - 1] = '\0'; written += t2pWriteFile(output, (tdata_t) buffer, 3); nextchar=1; @@ -3679,57 +4015,57 @@ tsize_t t2p_write_pdf_name(unsigned char* name, TIFF* output){ if (nextchar==0){ switch (name[i]){ case 0x23: - sprintf(buffer, "#%.2X", name[i]); + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); buffer[sizeof(buffer) - 1] = '\0'; written += t2pWriteFile(output, (tdata_t) buffer, 3); break; case 0x25: - sprintf(buffer, "#%.2X", name[i]); + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); buffer[sizeof(buffer) - 1] = '\0'; written += t2pWriteFile(output, (tdata_t) buffer, 3); break; case 0x28: - sprintf(buffer, "#%.2X", name[i]); + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); buffer[sizeof(buffer) - 1] = '\0'; written += t2pWriteFile(output, (tdata_t) buffer, 3); break; case 0x29: - sprintf(buffer, "#%.2X", name[i]); + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); buffer[sizeof(buffer) - 1] = '\0'; written += t2pWriteFile(output, (tdata_t) buffer, 3); break; case 0x2F: - sprintf(buffer, "#%.2X", name[i]); + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); buffer[sizeof(buffer) - 1] = '\0'; written += t2pWriteFile(output, (tdata_t) buffer, 3); break; case 0x3C: - sprintf(buffer, "#%.2X", name[i]); + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); buffer[sizeof(buffer) - 1] = '\0'; written += t2pWriteFile(output, (tdata_t) buffer, 3); break; case 0x3E: - sprintf(buffer, "#%.2X", name[i]); + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); buffer[sizeof(buffer) - 1] = '\0'; written += t2pWriteFile(output, (tdata_t) buffer, 3); break; case 0x5B: - sprintf(buffer, "#%.2X", name[i]); + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); buffer[sizeof(buffer) - 1] = '\0'; written += t2pWriteFile(output, (tdata_t) buffer, 3); break; case 0x5D: - sprintf(buffer, "#%.2X", name[i]); + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); buffer[sizeof(buffer) - 1] = '\0'; written += t2pWriteFile(output, (tdata_t) buffer, 3); break; case 0x7B: - sprintf(buffer, "#%.2X", name[i]); + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); buffer[sizeof(buffer) - 1] = '\0'; written += t2pWriteFile(output, (tdata_t) buffer, 3); break; case 0x7D: - sprintf(buffer, "#%.2X", name[i]); + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); buffer[sizeof(buffer) - 1] = '\0'; written += t2pWriteFile(output, (tdata_t) buffer, 3); break; @@ -3748,7 +4084,7 @@ tsize_t t2p_write_pdf_name(unsigned char* name, TIFF* output){ * This function writes a PDF string object to output. */ -tsize_t t2p_write_pdf_string(char* pdfstr, TIFF* output) +tsize_t t2p_write_pdf_string(const char* pdfstr, TIFF* output) { tsize_t written = 0; uint32 i = 0; @@ -3844,14 +4180,15 @@ tsize_t t2p_write_pdf_stream_end(TIFF* output){ tsize_t t2p_write_pdf_stream_dict(tsize_t len, uint32 number, TIFF* output){ tsize_t written=0; - char buffer[16]; + char buffer[32]; int buflen=0; written += t2pWriteFile(output, (tdata_t) "/Length ", 8); if(len!=0){ written += t2p_write_pdf_stream_length(len, output); } else { - buflen=sprintf(buffer, "%lu", (unsigned long)number); + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)number); + check_snprintf_ret((T2P*)NULL, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6); } @@ -3892,10 +4229,11 @@ tsize_t t2p_write_pdf_stream_dict_end(TIFF* output){ tsize_t t2p_write_pdf_stream_length(tsize_t len, TIFF* output){ tsize_t written=0; - char buffer[16]; + char buffer[32]; int buflen=0; - buflen=sprintf(buffer, "%lu", (unsigned long)len); + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)len); + check_snprintf_ret((T2P*)NULL, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) "\n", 1); @@ -3909,13 +4247,14 @@ tsize_t t2p_write_pdf_stream_length(tsize_t len, TIFF* output){ tsize_t t2p_write_pdf_catalog(T2P* t2p, TIFF* output) { tsize_t written = 0; - char buffer[16]; + char buffer[32]; int buflen = 0; written += t2pWriteFile(output, (tdata_t)"<< \n/Type /Catalog \n/Pages ", 27); buflen = snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_pages); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, TIFFmin((size_t)buflen, sizeof(buffer) - 1)); written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6); @@ -3936,7 +4275,7 @@ tsize_t t2p_write_pdf_catalog(T2P* t2p, TIFF* output) tsize_t t2p_write_pdf_info(T2P* t2p, TIFF* input, TIFF* output) { tsize_t written = 0; - char* info; + const char* info; char buffer[512]; if(t2p->pdf_datetime[0] == '\0') @@ -3948,64 +4287,54 @@ tsize_t t2p_write_pdf_info(T2P* t2p, TIFF* input, TIFF* output) written += t2p_write_pdf_string(t2p->pdf_datetime, output); } written += t2pWriteFile(output, (tdata_t) "\n/Producer ", 11); - _TIFFmemset((tdata_t)buffer, 0x00, sizeof(buffer)); snprintf(buffer, sizeof(buffer), "libtiff / tiff2pdf - %d", TIFFLIB_VERSION); written += t2p_write_pdf_string(buffer, output); written += t2pWriteFile(output, (tdata_t) "\n", 1); + if (!t2p->pdf_creator_set) { + if (TIFFGetField(input, TIFFTAG_SOFTWARE, &info) != 0 && info) { + strncpy(t2p->pdf_creator, info, sizeof(t2p->pdf_creator) - 1); + t2p->pdf_creator[sizeof(t2p->pdf_creator) - 1] = '\0'; + } + } if (t2p->pdf_creator[0] != '\0') { written += t2pWriteFile(output, (tdata_t) "/Creator ", 9); written += t2p_write_pdf_string(t2p->pdf_creator, output); written += t2pWriteFile(output, (tdata_t) "\n", 1); - } else { - if (TIFFGetField(input, TIFFTAG_SOFTWARE, &info) != 0 && info) { - if(strlen(info) >= sizeof(t2p->pdf_creator)) - info[sizeof(t2p->pdf_creator) - 1] = '\0'; - written += t2pWriteFile(output, (tdata_t) "/Creator ", 9); - written += t2p_write_pdf_string(info, output); - written += t2pWriteFile(output, (tdata_t) "\n", 1); + } + if (!t2p->pdf_author_set) { + if ((TIFFGetField(input, TIFFTAG_ARTIST, &info) != 0 + || TIFFGetField(input, TIFFTAG_COPYRIGHT, &info) != 0) + && info) { + strncpy(t2p->pdf_author, info, sizeof(t2p->pdf_author) - 1); + t2p->pdf_author[sizeof(t2p->pdf_author) - 1] = '\0'; } } if (t2p->pdf_author[0] != '\0') { written += t2pWriteFile(output, (tdata_t) "/Author ", 8); written += t2p_write_pdf_string(t2p->pdf_author, output); written += t2pWriteFile(output, (tdata_t) "\n", 1); - } else { - if ((TIFFGetField(input, TIFFTAG_ARTIST, &info) != 0 - || TIFFGetField(input, TIFFTAG_COPYRIGHT, &info) != 0) - && info) { - if (strlen(info) >= sizeof(t2p->pdf_author)) - info[sizeof(t2p->pdf_author) - 1] = '\0'; - written += t2pWriteFile(output, (tdata_t) "/Author ", 8); - written += t2p_write_pdf_string(info, output); - written += t2pWriteFile(output, (tdata_t) "\n", 1); + } + if (!t2p->pdf_title_set) { + if (TIFFGetField(input, TIFFTAG_DOCUMENTNAME, &info) != 0 && info) { + strncpy(t2p->pdf_title, info, sizeof(t2p->pdf_title) - 1); + t2p->pdf_title[sizeof(t2p->pdf_title) - 1] = '\0'; } } if (t2p->pdf_title[0] != '\0') { written += t2pWriteFile(output, (tdata_t) "/Title ", 7); written += t2p_write_pdf_string(t2p->pdf_title, output); written += t2pWriteFile(output, (tdata_t) "\n", 1); - } else { - if (TIFFGetField(input, TIFFTAG_DOCUMENTNAME, &info) != 0){ - if(strlen(info) > 511) { - info[512] = '\0'; - } - written += t2pWriteFile(output, (tdata_t) "/Title ", 7); - written += t2p_write_pdf_string(info, output); - written += t2pWriteFile(output, (tdata_t) "\n", 1); + } + if (!t2p->pdf_subject_set) { + if (TIFFGetField(input, TIFFTAG_IMAGEDESCRIPTION, &info) != 0 && info) { + strncpy(t2p->pdf_subject, info, sizeof(t2p->pdf_subject) - 1); + t2p->pdf_subject[sizeof(t2p->pdf_subject) - 1] = '\0'; } } if (t2p->pdf_subject[0] != '\0') { written += t2pWriteFile(output, (tdata_t) "/Subject ", 9); written += t2p_write_pdf_string(t2p->pdf_subject, output); written += t2pWriteFile(output, (tdata_t) "\n", 1); - } else { - if (TIFFGetField(input, TIFFTAG_IMAGEDESCRIPTION, &info) != 0 && info) { - if (strlen(info) >= sizeof(t2p->pdf_subject)) - info[sizeof(t2p->pdf_subject) - 1] = '\0'; - written += t2pWriteFile(output, (tdata_t) "/Subject ", 9); - written += t2p_write_pdf_string(info, output); - written += t2pWriteFile(output, (tdata_t) "\n", 1); - } } if (t2p->pdf_keywords[0] != '\0') { written += t2pWriteFile(output, (tdata_t) "/Keywords ", 10); @@ -4035,13 +4364,13 @@ void t2p_pdf_currenttime(T2P* t2p) currenttime = localtime(&timenow); snprintf(t2p->pdf_datetime, sizeof(t2p->pdf_datetime), - "D:%.4d%.2d%.2d%.2d%.2d%.2d", - (currenttime->tm_year + 1900) % 65536, - (currenttime->tm_mon + 1) % 256, - (currenttime->tm_mday) % 256, - (currenttime->tm_hour) % 256, - (currenttime->tm_min) % 256, - (currenttime->tm_sec) % 256); + "D:%.4u%.2u%.2u%.2u%.2u%.2u", + TIFFmin((unsigned) currenttime->tm_year + 1900U,9999U), + TIFFmin((unsigned) currenttime->tm_mon + 1U,12U), /* 0-11 + 1 */ + TIFFmin((unsigned) currenttime->tm_mday,31U), /* 1-31 */ + TIFFmin((unsigned) currenttime->tm_hour,23U), /* 0-23 */ + TIFFmin((unsigned) currenttime->tm_min,59U), /* 0-59 */ + TIFFmin((unsigned) (currenttime->tm_sec),60U)); /* 0-60 */ return; } @@ -4089,7 +4418,7 @@ tsize_t t2p_write_pdf_pages(T2P* t2p, TIFF* output) { tsize_t written=0; tdir_t i=0; - char buffer[16]; + char buffer[32]; int buflen=0; int page=0; @@ -4097,7 +4426,8 @@ tsize_t t2p_write_pdf_pages(T2P* t2p, TIFF* output) (tdata_t) "<< \n/Type /Pages \n/Kids [ ", 26); page = t2p->pdf_pages+1; for (i=0;itiff_pagecount;i++){ - buflen=sprintf(buffer, "%d", page); + buflen=snprintf(buffer, sizeof(buffer), "%d", page); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); if ( ((i+1)%8)==0 ) { @@ -4112,8 +4442,8 @@ tsize_t t2p_write_pdf_pages(T2P* t2p, TIFF* output) } } written += t2pWriteFile(output, (tdata_t) "] \n/Count ", 10); - _TIFFmemset(buffer, 0x00, 16); - buflen=sprintf(buffer, "%d", t2p->tiff_pagecount); + buflen=snprintf(buffer, sizeof(buffer), "%d", t2p->tiff_pagecount); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " \n>> \n", 6); @@ -4128,28 +4458,34 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){ unsigned int i=0; tsize_t written=0; - char buffer[16]; + char buffer[256]; int buflen=0; written += t2pWriteFile(output, (tdata_t) "<<\n/Type /Page \n/Parent ", 24); - buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_pages); + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_pages); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6); written += t2pWriteFile(output, (tdata_t) "/MediaBox [", 11); - buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x1); + buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.x1); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " ", 1); - buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y1); + buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.y1); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " ", 1); - buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x2); + buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.x2); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " ", 1); - buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y2); + buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.y2); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) "] \n", 3); written += t2pWriteFile(output, (tdata_t) "/Contents ", 10); - buflen=sprintf(buffer, "%lu", (unsigned long)(object + 1)); + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(object + 1)); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6); written += t2pWriteFile(output, (tdata_t) "/Resources << \n", 15); @@ -4157,16 +4493,17 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){ written += t2pWriteFile(output, (tdata_t) "/XObject <<\n", 12); for(i=0;itiff_tiles[t2p->pdf_page].tiles_tilecount;i++){ written += t2pWriteFile(output, (tdata_t) "/Im", 3); - buflen = sprintf(buffer, "%u", t2p->pdf_page+1); + buflen = snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) "_", 1); - buflen = sprintf(buffer, "%u", i+1); + buflen = snprintf(buffer, sizeof(buffer), "%u", i+1); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " ", 1); - buflen = sprintf( - buffer, - "%lu", + buflen = snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra)); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); if(i%4==3){ @@ -4177,13 +4514,13 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){ } else { written += t2pWriteFile(output, (tdata_t) "/XObject <<\n", 12); written += t2pWriteFile(output, (tdata_t) "/Im", 3); - buflen = sprintf(buffer, "%u", t2p->pdf_page+1); + buflen = snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " ", 1); - buflen = sprintf( - buffer, - "%lu", + buflen = snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra)); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); written += t2pWriteFile(output, (tdata_t) ">>\n", 3); @@ -4191,17 +4528,16 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){ if(t2p->tiff_transferfunctioncount != 0) { written += t2pWriteFile(output, (tdata_t) "/ExtGState <<", 13); t2pWriteFile(output, (tdata_t) "/GS1 ", 5); - buflen = sprintf( - buffer, - "%lu", + buflen = snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(object + 3)); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); written += t2pWriteFile(output, (tdata_t) ">> \n", 4); } written += t2pWriteFile(output, (tdata_t) "/ProcSet [ ", 11); - if(t2p->pdf_colorspace == T2P_CS_BILEVEL - || t2p->pdf_colorspace == T2P_CS_GRAY + if(t2p->pdf_colorspace & T2P_CS_BILEVEL + || t2p->pdf_colorspace & T2P_CS_GRAY ){ written += t2pWriteFile(output, (tdata_t) "/ImageB ", 8); } else { @@ -4297,6 +4633,15 @@ void t2p_compose_pdf_page(T2P* t2p){ } else { tilewidth=(t2p->tiff_tiles[t2p->pdf_page]).tiles_tilewidth; tilelength=(t2p->tiff_tiles[t2p->pdf_page]).tiles_tilelength; + if( tilewidth > INT_MAX || + tilelength > INT_MAX || + t2p->tiff_width > INT_MAX - tilewidth || + t2p->tiff_length > INT_MAX - tilelength ) + { + TIFFError(TIFF2PDF_MODULE, "Integer overflow"); + t2p->t2p_error = T2P_ERR_ERROR; + return; + } tilecountx=(t2p->tiff_width + tilewidth -1)/ tilewidth; @@ -4566,7 +4911,7 @@ tsize_t t2p_write_pdf_page_content_stream(T2P* t2p, TIFF* output){ if(t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount>0){ for(i=0;itiff_tiles[t2p->pdf_page].tiles_tilecount; i++){ box=t2p->tiff_tiles[t2p->pdf_page].tiles_tiles[i].tile_box; - buflen=sprintf(buffer, + buflen=snprintf(buffer, sizeof(buffer), "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d_%ld Do Q\n", t2p->tiff_transferfunctioncount?"/GS1 gs ":"", box.mat[0], @@ -4577,11 +4922,12 @@ tsize_t t2p_write_pdf_page_content_stream(T2P* t2p, TIFF* output){ box.mat[7], t2p->pdf_page + 1, (long)(i + 1)); + check_snprintf_ret(t2p, buflen, buffer); written += t2p_write_pdf_stream(buffer, buflen, output); } } else { box=t2p->pdf_imagebox; - buflen=sprintf(buffer, + buflen=snprintf(buffer, sizeof(buffer), "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d Do Q\n", t2p->tiff_transferfunctioncount?"/GS1 gs ":"", box.mat[0], @@ -4591,6 +4937,7 @@ tsize_t t2p_write_pdf_page_content_stream(T2P* t2p, TIFF* output){ box.mat[6], box.mat[7], t2p->pdf_page+1); + check_snprintf_ret(t2p, buflen, buffer); written += t2p_write_pdf_stream(buffer, buflen, output); } @@ -4606,59 +4953,53 @@ tsize_t t2p_write_pdf_xobject_stream_dict(ttile_t tile, TIFF* output){ tsize_t written=0; - char buffer[16]; + char buffer[32]; int buflen=0; written += t2p_write_pdf_stream_dict(0, t2p->pdf_xrefcount+1, output); written += t2pWriteFile(output, (tdata_t) "/Type /XObject \n/Subtype /Image \n/Name /Im", 42); - buflen=sprintf(buffer, "%u", t2p->pdf_page+1); + buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); if(tile != 0){ written += t2pWriteFile(output, (tdata_t) "_", 1); - buflen=sprintf(buffer, "%lu", (unsigned long)tile); + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)tile); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); } written += t2pWriteFile(output, (tdata_t) "\n/Width ", 8); - _TIFFmemset((tdata_t)buffer, 0x00, 16); if(tile==0){ - buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_width); + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_width); } else { if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){ - buflen=sprintf( - buffer, - "%lu", + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth); } else { - buflen=sprintf( - buffer, - "%lu", + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth); } } + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) "\n/Height ", 9); - _TIFFmemset((tdata_t)buffer, 0x00, 16); if(tile==0){ - buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_length); + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_length); } else { if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){ - buflen=sprintf( - buffer, - "%lu", + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength); } else { - buflen=sprintf( - buffer, - "%lu", + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); } } + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) "\n/BitsPerComponent ", 19); - _TIFFmemset((tdata_t)buffer, 0x00, 16); - buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample); + buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_bitspersample); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) "\n/ColorSpace ", 13); written += t2p_write_pdf_xobject_cs(t2p, output); @@ -4667,7 +5008,7 @@ tsize_t t2p_write_pdf_xobject_stream_dict(ttile_t tile, (tdata_t) "\n/Interpolate true", 18); if( (t2p->pdf_switchdecode != 0) #ifdef CCITT_SUPPORT - && ! (t2p->pdf_colorspace == T2P_CS_BILEVEL + && ! (t2p->pdf_colorspace & T2P_CS_BILEVEL && t2p->pdf_compression == T2P_COMPRESS_G4) #endif ){ @@ -4678,8 +5019,18 @@ tsize_t t2p_write_pdf_xobject_stream_dict(ttile_t tile, return(written); } + +/* used to normalize the White Point */ +#define normalizePoint(x,y,z) do { \ + if (y != 0.0F) { \ + x /= y; \ + z /= y; \ + y = 1.0F; \ + } \ +} while(0) + /* - * This function writes a PDF Image XObject Colorspace name to output. + * This function writes a PDF Image XObject Colorspace name to output. */ @@ -4702,11 +5053,12 @@ tsize_t t2p_write_pdf_xobject_cs(T2P* t2p, TIFF* output){ t2p->pdf_colorspace ^= T2P_CS_PALETTE; written += t2p_write_pdf_xobject_cs(t2p, output); t2p->pdf_colorspace |= T2P_CS_PALETTE; - buflen=sprintf(buffer, "%u", (0x0001 << t2p->tiff_bitspersample)-1 ); + buflen=snprintf(buffer, sizeof(buffer), "%u", (0x0001 << t2p->tiff_bitspersample)-1 ); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " ", 1); - _TIFFmemset(buffer, 0x00, 16); - buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_palettecs ); + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_palettecs ); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " 0 R ]\n", 7); return(written); @@ -4737,17 +5089,17 @@ tsize_t t2p_write_pdf_xobject_cs(T2P* t2p, TIFF* output){ X_W = t2p->tiff_whitechromaticities[0]; Y_W = t2p->tiff_whitechromaticities[1]; Z_W = 1.0F - (X_W + Y_W); - X_W /= Y_W; - Z_W /= Y_W; - Y_W = 1.0F; - buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W); + normalizePoint(X_W, Y_W, Z_W); + buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) "/Range ", 7); - buflen=sprintf(buffer, "[%d %d %d %d] \n", + buflen=snprintf(buffer, sizeof(buffer), "[%d %d %d %d] \n", t2p->pdf_labrange[0], t2p->pdf_labrange[1], t2p->pdf_labrange[2], t2p->pdf_labrange[3]); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) ">>] \n", 5); @@ -4759,27 +5111,31 @@ tsize_t t2p_write_pdf_xobject_cs(T2P* t2p, TIFF* output){ tsize_t t2p_write_pdf_transfer(T2P* t2p, TIFF* output){ tsize_t written=0; - char buffer[16]; + char buffer[32]; int buflen=0; written += t2pWriteFile(output, (tdata_t) "<< /Type /ExtGState \n/TR ", 25); if(t2p->tiff_transferfunctioncount == 1){ - buflen=sprintf(buffer, "%lu", + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount + 1)); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); } else { written += t2pWriteFile(output, (tdata_t) "[ ", 2); - buflen=sprintf(buffer, "%lu", + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount + 1)); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); - buflen=sprintf(buffer, "%lu", + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount + 2)); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); - buflen=sprintf(buffer, "%lu", + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount + 3)); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); written += t2pWriteFile(output, (tdata_t) "/Identity ] ", 12); @@ -4800,7 +5156,8 @@ tsize_t t2p_write_pdf_transfer_dict(T2P* t2p, TIFF* output, uint16 i){ written += t2pWriteFile(output, (tdata_t) "/FunctionType 0 \n", 17); written += t2pWriteFile(output, (tdata_t) "/Domain [0.0 1.0] \n", 19); written += t2pWriteFile(output, (tdata_t) "/Range [0.0 1.0] \n", 18); - buflen=sprintf(buffer, "/Size [%u] \n", (1<tiff_bitspersample)); + buflen=snprintf(buffer, sizeof(buffer), "/Size [%u] \n", (1<tiff_bitspersample)); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) "/BitsPerSample 16 \n", 19); written += t2p_write_pdf_stream_dict(((tsize_t)1)<<(t2p->tiff_bitspersample+1), 0, output); @@ -4827,7 +5184,7 @@ tsize_t t2p_write_pdf_transfer_stream(T2P* t2p, TIFF* output, uint16 i){ tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){ tsize_t written=0; - char buffer[128]; + char buffer[256]; int buflen=0; float X_W=0.0; @@ -4861,9 +5218,7 @@ tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){ X_W = t2p->tiff_whitechromaticities[0]; Y_W = t2p->tiff_whitechromaticities[1]; Z_W = 1.0F - (X_W + Y_W); - X_W /= Y_W; - Z_W /= Y_W; - Y_W = 1.0F; + normalizePoint(X_W, Y_W, Z_W); } if(t2p->pdf_colorspace & T2P_CS_CALRGB){ written += t2pWriteFile(output, (tdata_t) "/CalRGB ", 8); @@ -4888,26 +5243,27 @@ tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){ X_W = (X_R * R) + (X_G * G) + (X_B * B); Y_W = (Y_R * R) + (Y_G * G) + (Y_B * B); Z_W = (Z_R * R) + (Z_G * G) + (Z_B * B); - X_W /= Y_W; - Z_W /= Y_W; - Y_W = 1.0; + normalizePoint(X_W, Y_W, Z_W); } written += t2pWriteFile(output, (tdata_t) "<< \n", 4); if(t2p->pdf_colorspace & T2P_CS_CALGRAY){ written += t2pWriteFile(output, (tdata_t) "/WhitePoint ", 12); - buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W); + buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) "/Gamma 2.2 \n", 12); } if(t2p->pdf_colorspace & T2P_CS_CALRGB){ written += t2pWriteFile(output, (tdata_t) "/WhitePoint ", 12); - buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W); + buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) "/Matrix ", 8); - buflen=sprintf(buffer, "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \n", + buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \n", X_R, Y_R, Z_R, X_G, Y_G, Z_G, X_B, Y_B, Z_B); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) "/Gamma [2.2 2.2 2.2] \n", 22); } @@ -4923,11 +5279,12 @@ tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){ tsize_t t2p_write_pdf_xobject_icccs(T2P* t2p, TIFF* output){ tsize_t written=0; - char buffer[16]; + char buffer[32]; int buflen=0; written += t2pWriteFile(output, (tdata_t) "[/ICCBased ", 11); - buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_icccs); + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_icccs); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " 0 R] \n", 7); @@ -4937,11 +5294,12 @@ tsize_t t2p_write_pdf_xobject_icccs(T2P* t2p, TIFF* output){ tsize_t t2p_write_pdf_xobject_icccs_dict(T2P* t2p, TIFF* output){ tsize_t written=0; - char buffer[16]; + char buffer[32]; int buflen=0; written += t2pWriteFile(output, (tdata_t) "/N ", 3); - buflen=sprintf(buffer, "%u \n", t2p->tiff_samplesperpixel); + buflen=snprintf(buffer, sizeof(buffer), "%u \n", t2p->tiff_samplesperpixel); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) "/Alternate ", 11); t2p->pdf_colorspace ^= T2P_CS_ICCBASED; @@ -5006,7 +5364,7 @@ tsize_t t2p_write_pdf_xobject_decode(T2P* t2p, TIFF* output){ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output){ tsize_t written=0; - char buffer[16]; + char buffer[32]; int buflen=0; if(t2p->pdf_compression==T2P_COMPRESS_NONE){ @@ -5021,42 +5379,40 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output written += t2pWriteFile(output, (tdata_t) "<< /K -1 ", 9); if(tile==0){ written += t2pWriteFile(output, (tdata_t) "/Columns ", 9); - buflen=sprintf(buffer, "%lu", + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_width); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " /Rows ", 7); - buflen=sprintf(buffer, "%lu", + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_length); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); } else { if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){ written += t2pWriteFile(output, (tdata_t) "/Columns ", 9); - buflen=sprintf( - buffer, - "%lu", + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); } else { written += t2pWriteFile(output, (tdata_t) "/Columns ", 9); - buflen=sprintf( - buffer, - "%lu", + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); } if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){ written += t2pWriteFile(output, (tdata_t) " /Rows ", 7); - buflen=sprintf( - buffer, - "%lu", + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); } else { written += t2pWriteFile(output, (tdata_t) " /Rows ", 7); - buflen=sprintf( - buffer, - "%lu", + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); } } @@ -5072,7 +5428,7 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output if(t2p->tiff_photometric != PHOTOMETRIC_YCBCR) { written += t2pWriteFile(output, (tdata_t) "/DecodeParms ", 13); - written += t2pWriteFile(output, (tdata_t) "<< /ColorTransform 0 >>\n", 24); + written += t2pWriteFile(output, (tdata_t) "<< /ColorTransform 1 >>\n", 24); } break; #endif @@ -5082,21 +5438,21 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output if(t2p->pdf_compressionquality%100){ written += t2pWriteFile(output, (tdata_t) "/DecodeParms ", 13); written += t2pWriteFile(output, (tdata_t) "<< /Predictor ", 14); - _TIFFmemset(buffer, 0x00, 16); - buflen=sprintf(buffer, "%u", t2p->pdf_compressionquality%100); + buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_compressionquality%100); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " /Columns ", 10); - _TIFFmemset(buffer, 0x00, 16); - buflen = sprintf(buffer, "%lu", + buflen = snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_width); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " /Colors ", 9); - _TIFFmemset(buffer, 0x00, 16); - buflen=sprintf(buffer, "%u", t2p->tiff_samplesperpixel); + buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_samplesperpixel); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " /BitsPerComponent ", 19); - _TIFFmemset(buffer, 0x00, 16); - buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample); + buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_bitspersample); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) ">>\n", 3); } @@ -5116,16 +5472,17 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output tsize_t t2p_write_pdf_xreftable(T2P* t2p, TIFF* output){ tsize_t written=0; - char buffer[21]; + char buffer[64]; int buflen=0; uint32 i=0; written += t2pWriteFile(output, (tdata_t) "xref\n0 ", 7); - buflen=sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount + 1)); + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount + 1)); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); written += t2pWriteFile(output, (tdata_t) " \n0000000000 65535 f \n", 22); for (i=0;ipdf_xrefcount;i++){ - sprintf(buffer, "%.10lu 00000 n \n", + snprintf(buffer, sizeof(buffer), "%.10lu 00000 n \n", (unsigned long)t2p->pdf_xrefoffsets[i]); written += t2pWriteFile(output, (tdata_t) buffer, 20); } @@ -5149,17 +5506,17 @@ tsize_t t2p_write_pdf_trailer(T2P* t2p, TIFF* output) snprintf(t2p->pdf_fileid + i, 9, "%.8X", rand()); written += t2pWriteFile(output, (tdata_t) "trailer\n<<\n/Size ", 17); - buflen = sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount+1)); + buflen = snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount+1)); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); - _TIFFmemset(buffer, 0x00, 32); written += t2pWriteFile(output, (tdata_t) "\n/Root ", 7); - buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_catalog); + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_catalog); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); - _TIFFmemset(buffer, 0x00, 32); written += t2pWriteFile(output, (tdata_t) " 0 R \n/Info ", 12); - buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_info); + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_info); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); - _TIFFmemset(buffer, 0x00, 32); written += t2pWriteFile(output, (tdata_t) " 0 R \n/ID[<", 11); written += t2pWriteFile(output, (tdata_t) t2p->pdf_fileid, sizeof(t2p->pdf_fileid) - 1); @@ -5167,9 +5524,9 @@ tsize_t t2p_write_pdf_trailer(T2P* t2p, TIFF* output) written += t2pWriteFile(output, (tdata_t) t2p->pdf_fileid, sizeof(t2p->pdf_fileid) - 1); written += t2pWriteFile(output, (tdata_t) ">]\n>>\nstartxref\n", 16); - buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_startxref); + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_startxref); + check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t) buffer, buflen); - _TIFFmemset(buffer, 0x00, 32); written += t2pWriteFile(output, (tdata_t) "\n%%EOF\n", 7); return(written); @@ -5224,7 +5581,7 @@ tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){ t2p_read_tiff_init(t2p, input); if(t2p->t2p_error!=T2P_ERR_OK){return(0);} - t2p->pdf_xrefoffsets= (uint32*) _TIFFmalloc(t2p->pdf_xrefcount * sizeof(uint32) ); + t2p->pdf_xrefoffsets= (uint32*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,t2p->pdf_xrefcount,sizeof(uint32)) ); if(t2p->pdf_xrefoffsets==NULL){ TIFFError( TIFF2PDF_MODULE, @@ -5287,9 +5644,9 @@ tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){ written += t2p_write_pdf_transfer_dict(t2p, output, i); written += t2p_write_pdf_stream_dict_end(output); written += t2p_write_pdf_stream_start(output); - streamlen=written; + /* streamlen=written; */ /* value not used */ written += t2p_write_pdf_transfer_stream(t2p, output, i); - streamlen=written-streamlen; + /* streamlen=written-streamlen; */ /* value not used */ written += t2p_write_pdf_stream_end(output); written += t2p_write_pdf_obj_end(output); } @@ -5302,9 +5659,9 @@ tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){ written += t2p_write_pdf_stream_dict(t2p->pdf_palettesize, 0, output); written += t2p_write_pdf_stream_dict_end(output); written += t2p_write_pdf_stream_start(output); - streamlen=written; + /* streamlen=written; */ /* value not used */ written += t2p_write_pdf_xobject_palettecs_stream(t2p, output); - streamlen=written-streamlen; + /* streamlen=written-streamlen; */ /* value not used */ written += t2p_write_pdf_stream_end(output); written += t2p_write_pdf_obj_end(output); } @@ -5316,9 +5673,9 @@ tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){ written += t2p_write_pdf_xobject_icccs_dict(t2p, output); written += t2p_write_pdf_stream_dict_end(output); written += t2p_write_pdf_stream_start(output); - streamlen=written; + /* streamlen=written; */ /* value not used */ written += t2p_write_pdf_xobject_icccs_stream(t2p, output); - streamlen=written-streamlen; + /* streamlen=written-streamlen; */ /* value not used */ written += t2p_write_pdf_stream_end(output); written += t2p_write_pdf_obj_end(output); } @@ -5335,6 +5692,13 @@ tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){ written += t2p_write_pdf_stream_start(output); streamlen=written; t2p_read_tiff_size_tile(t2p, input, i2); + if (t2p->tiff_maxdatasize && (t2p->tiff_datasize > t2p->tiff_maxdatasize)) { + TIFFError(TIFF2PDF_MODULE, + "Allocation of " TIFF_UINT64_FORMAT " bytes is forbidden. Limit is " TIFF_UINT64_FORMAT ". Use -m option to change limit", + (uint64)t2p->tiff_datasize, (uint64)t2p->tiff_maxdatasize); + t2p->t2p_error = T2P_ERR_ERROR; + return (0); + } written += t2p_readwrite_pdf_image_tile(t2p, input, output, i2); t2p_write_advance_directory(t2p, output); if(t2p->t2p_error!=T2P_ERR_OK){return(0);} @@ -5358,6 +5722,13 @@ tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){ written += t2p_write_pdf_stream_start(output); streamlen=written; t2p_read_tiff_size(t2p, input); + if (t2p->tiff_maxdatasize && (t2p->tiff_datasize > t2p->tiff_maxdatasize)) { + TIFFError(TIFF2PDF_MODULE, + "Allocation of " TIFF_UINT64_FORMAT " bytes is forbidden. Limit is " TIFF_UINT64_FORMAT ". Use -m option to change limit", + (uint64)t2p->tiff_datasize, (uint64)t2p->tiff_maxdatasize); + t2p->t2p_error = T2P_ERR_ERROR; + return (0); + } written += t2p_readwrite_pdf_image(t2p, input, output); t2p_write_advance_directory(t2p, output); if(t2p->t2p_error!=T2P_ERR_OK){return(0);} diff --git a/thirdparty/tiff-4.0.3/tools/tiff2ps.c b/thirdparty/tiff-4.2.0/tools/tiff2ps.c similarity index 94% rename from thirdparty/tiff-4.0.3/tools/tiff2ps.c rename to thirdparty/tiff-4.2.0/tools/tiff2ps.c index 372230a9..4ed5eba2 100644 --- a/thirdparty/tiff-4.0.3/tools/tiff2ps.c +++ b/thirdparty/tiff-4.2.0/tools/tiff2ps.c @@ -1,5 +1,3 @@ -/* $Id: tiff2ps.c,v 1.49 2011-05-31 17:10:18 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -42,8 +40,20 @@ #include "tiffio.h" +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + /* * Revision history + * 2013-Jan-21 + * Richard Nolde: Fix bug in auto rotate option code. Once a + * rotation angle was set by the auto rotate check, it was + * retained for all pages that followed instead of being + * retested for each page. * * 2010-Sep-17 * Richard Nolde: Reinstate code from Feb 2009 that never got @@ -58,7 +68,7 @@ * if not specified on the command line. * Add new command line option to specify document creator * as an alterntive to the string "tiff2ps" following model - * of patch submitted by Thomas Jarosch for specifiying a + * of patch submitted by Thomas Jarosch for specifying a * document title which is also supported now. * * 2009-Feb-11 @@ -68,7 +78,7 @@ * or landscape) if -h or -w is specified. Rotation is in * degrees counterclockwise since that is how Postscript does * it. The auto opption rotates the image 90 degrees ccw to - * produce landscape if that is a better fit than portait. + * produce landscape if that is a better fit than portrait. * * Cleaned up code in TIFF2PS and broke into smaller functions * to simplify rotations. @@ -171,6 +181,12 @@ #define FALSE 0 #endif +#define DEFAULT_MAX_MALLOC (256 * 1024 * 1024) + +/* malloc size limit (in bytes) + * disabled when set to 0 */ +static tmsize_t maxMalloc = DEFAULT_MAX_MALLOC; + int ascii85 = FALSE; /* use ASCII85 encoding */ int interpolate = TRUE; /* interpolate level2 image */ int level2 = FALSE; /* generate PostScript level 2 */ @@ -231,6 +247,20 @@ tsize_t Ascii85EncodeBlock( uint8 * ascii85_p, unsigned f_eod, const uint8 * raw static void usage(int); +/** + * This custom malloc function enforce a maximum allocation size + */ +static void* limitMalloc(tmsize_t s) +{ + if (maxMalloc && (s > maxMalloc)) { + fprintf(stderr, "MemoryLimitError: allocation of " TIFF_UINT64_FORMAT " bytes is forbidden. Limit is " TIFF_UINT64_FORMAT ".\n", + (uint64)s, (uint64)maxMalloc); + fprintf(stderr, " use -M option to change limit.\n"); + return NULL; + } + return _TIFFmalloc(s); +} + int main(int argc, char* argv[]) { @@ -241,23 +271,28 @@ main(int argc, char* argv[]) double pageWidth = 0; double pageHeight = 0; uint32 diroff = 0; +#if !HAVE_DECL_OPTARG extern char *optarg; extern int optind; +#endif FILE* output = stdout; pageOrientation[0] = '\0'; - while ((c = getopt(argc, argv, "b:d:h:H:W:L:i:w:l:o:O:P:C:r:t:acemxyzps1238DT")) != -1) + while ((c = getopt(argc, argv, "b:d:h:H:W:L:M:i:w:l:o:O:P:C:r:t:acemxyzps1238DT")) != -1) switch (c) { + case 'M': + maxMalloc = (tmsize_t)strtoul(optarg, NULL, 0) << 20; + break; case 'b': bottommargin = atof(optarg); break; case 'c': centered = 1; break; - case 'C': - creator = optarg; - break; + case 'C': + creator = optarg; + break; case 'd': /* without -a, this only processes one image at this IFD */ dirnum = atoi(optarg); break; @@ -304,7 +339,7 @@ main(int argc, char* argv[]) case '9': diroff = (uint32) strtoul(optarg, NULL, 0); break; default: TIFFError ("-o", "Offset must be a numeric value."); - exit (1); + exit (EXIT_FAILURE); } break; case 'O': /* XXX too bad -o is already taken */ @@ -313,21 +348,21 @@ main(int argc, char* argv[]) fprintf(stderr, "%s: %s: Cannot open output file.\n", argv[0], optarg); - exit(-2); + exit (EXIT_FAILURE); } break; case 'P': - switch (optarg[0]) - { - case 'l': - case 'L': strcpy (pageOrientation, "Landscape"); - break; - case 'p': - case 'P': strcpy (pageOrientation, "Portrait"); - break; - default: TIFFError ("-P", "Page orientation must be Landscape or Portrait"); - exit (-1); - } + switch (optarg[0]) + { + case 'l': + case 'L': strcpy (pageOrientation, "Landscape"); + break; + case 'p': + case 'P': strcpy (pageOrientation, "Portrait"); + break; + default: TIFFError ("-P", "Page orientation must be Landscape or Portrait"); + exit (EXIT_FAILURE); + } break; case 'l': leftmargin = atof(optarg); @@ -358,7 +393,7 @@ main(int argc, char* argv[]) break; default: fprintf (stderr, "Rotation angle must be 90, 180, 270 (degrees ccw) or auto\n"); - exit (-1); + exit (EXIT_FAILURE); } break; case 's': @@ -396,7 +431,7 @@ main(int argc, char* argv[]) res_unit = RESUNIT_INCH; break; case '?': - usage(-1); + usage(EXIT_FAILURE); } if (useImagemask == TRUE) @@ -404,38 +439,33 @@ main(int argc, char* argv[]) if ((level2 == FALSE) && (level3 == FALSE)) { TIFFError ("-m "," imagemask operator requres Postscript Level2 or Level3"); - exit (1); + exit (EXIT_FAILURE); } } if (pageWidth && (maxPageWidth > pageWidth)) { TIFFError ("-W", "Max viewport width cannot exceed page width"); - exit (1); - } - - if (pageHeight && (maxPageHeight > pageHeight)) - { - TIFFError ("-H", "Max viewport height cannot exceed page height"); - exit (1); + exit (EXIT_FAILURE); } /* auto rotate requires a specified page width and height */ if (auto_rotate == TRUE) { + /* if ((pageWidth == 0) || (pageHeight == 0)) TIFFWarning ("-r auto", " requires page height and width specified with -h and -w"); - + */ if ((maxPageWidth > 0) || (maxPageHeight > 0)) { TIFFError ("-r auto", " is incompatible with maximum page width/height specified by -H or -W"); - exit (1); + exit (EXIT_FAILURE); } } if ((maxPageWidth > 0) && (maxPageHeight > 0)) { TIFFError ("-H and -W", " Use only one of -H or -W to define a viewport"); - exit (1); + exit (EXIT_FAILURE); } if ((generateEPSF == TRUE) && (printAll == TRUE)) @@ -464,10 +494,16 @@ main(int argc, char* argv[]) if (tif != NULL) { if (dirnum != -1 && !TIFFSetDirectory(tif, (tdir_t)dirnum)) - return (-1); + { + TIFFClose(tif); + return (EXIT_FAILURE); + } else if (diroff != 0 && !TIFFSetSubDirectory(tif, diroff)) - return (-1); + { + TIFFClose(tif); + return (EXIT_FAILURE); + } np = TIFF2PS(output, tif, pageWidth, pageHeight, leftmargin, bottommargin, centered); if (np < 0) @@ -480,10 +516,10 @@ main(int argc, char* argv[]) if (np) PSTail(output, np); else - usage(-1); + usage(EXIT_FAILURE); if (output != stdout) fclose(output); - return (0); + return (EXIT_SUCCESS); } static uint16 samplesperpixel; @@ -512,7 +548,7 @@ checkImage(TIFF* tif) "PhotometricInterpretation=YCbCr"); return (0); } - /* fall thru... */ + /* fall through... */ case PHOTOMETRIC_RGB: if (alpha && bitspersample != 8) { TIFFError(filename, @@ -520,7 +556,7 @@ checkImage(TIFF* tif) bitspersample); return (0); } - /* fall thru... */ + /* fall through... */ case PHOTOMETRIC_SEPARATED: case PHOTOMETRIC_PALETTE: case PHOTOMETRIC_MINISBLACK: @@ -544,7 +580,7 @@ checkImage(TIFF* tif) bitspersample = 8; break; case PHOTOMETRIC_CIELAB: - /* fall thru... */ + /* fall through... */ default: TIFFError(filename, "Can not handle image with PhotometricInterpretation=%d", @@ -676,8 +712,8 @@ isCCITTCompression(TIFF* tif) static tsize_t tf_bytesperrow; static tsize_t ps_bytesperrow; -static tsize_t tf_rowsperstrip; -static tsize_t tf_numberstrips; +static uint32 tf_rowsperstrip; +static uint32 tf_numberstrips; static char *hex = "0123456789abcdef"; /* @@ -858,6 +894,9 @@ int exportMaskedImage(FILE *fp, double pagewidth, double pageheight, { if (splitheight < imageheight) /* More than one vertical image segments */ { + /* Intra2net: Keep correct apspect ratio */ + xscale = (imagewidth + overlap) * (pageheight / splitheight) * scale; + xtran = -1.0 * column * (pagewidth - overlap); subimage_height = imageheight - ((splitheight - overlap) * row); ytran = pageheight - subimage_height * (pageheight / splitheight); @@ -889,6 +928,14 @@ int exportMaskedImage(FILE *fp, double pagewidth, double pageheight, xtran = 0; } } + + if (imagewidth <= pagewidth) { + /* Intra2net: Crop page at the bottom instead of the top (-> output starts at the top). + Only do this in non-page-split mode */ + if (imageheight <= splitheight) { + ytran = pageheight - imageheight; /* Note: Will be negative for images longer than page size */ + } + } bott_offset += ytran / (center ? 2 : 1); left_offset += xtran / (center ? 2 : 1); break; @@ -1393,7 +1440,10 @@ int get_viewport (double pgwidth, double pgheight, double pswidth, double psheig /* Only one of maxPageHeight or maxPageWidth can be specified */ if (maxPageHeight != 0) /* Clip the viewport to maxPageHeight on each page */ { - *view_height = maxPageHeight * PS_UNIT_SIZE; + if (pgheight != 0 && pgheight < maxPageHeight) + *view_height = pgheight * PS_UNIT_SIZE; + else + *view_height = maxPageHeight * PS_UNIT_SIZE; /* * if (res_unit == RESUNIT_CENTIMETER) * *view_height /= 2.54F; @@ -1423,7 +1473,10 @@ int get_viewport (double pgwidth, double pgheight, double pswidth, double psheig if (maxPageWidth != 0) /* Clip the viewport to maxPageWidth on each page */ { - *view_width = maxPageWidth * PS_UNIT_SIZE; + if (pgwidth != 0 && pgwidth < maxPageWidth) + *view_width = pgwidth * PS_UNIT_SIZE; + else + *view_width = maxPageWidth * PS_UNIT_SIZE; /* if (res_unit == RESUNIT_CENTIMETER) * *view_width /= 2.54F; */ @@ -1592,6 +1645,8 @@ int TIFF2PS(FILE* fd, TIFF* tif, double pgwidth, double pgheight, double lm, dou } if (generateEPSF) break; + if (auto_rotate) + rotation = 0.0; TIFFGetFieldDefaulted(tif, TIFFTAG_SUBFILETYPE, &subfiletype); } while (((subfiletype & FILETYPE_PAGE) || printAll) && TIFFReadDirectory(tif)); @@ -1773,7 +1828,7 @@ PS_Lvl2ImageDict(FILE* fd, TIFF* tif, uint32 w, uint32 h) int use_rawdata; uint32 tile_width, tile_height; uint16 predictor, minsamplevalue, maxsamplevalue; - int repeat_count; + uint32 repeat_count; char im_h[64], im_x[64], im_y[64]; char * imageOp = "image"; @@ -1781,8 +1836,8 @@ PS_Lvl2ImageDict(FILE* fd, TIFF* tif, uint32 w, uint32 h) imageOp = "imagemask"; (void)strcpy(im_x, "0"); - (void)sprintf(im_y, "%lu", (long) h); - (void)sprintf(im_h, "%lu", (long) h); + (void)snprintf(im_y, sizeof(im_y), "%lu", (long) h); + (void)snprintf(im_h, sizeof(im_h), "%lu", (long) h); tile_width = w; tile_height = h; if (TIFFIsTiled(tif)) { @@ -1803,7 +1858,7 @@ PS_Lvl2ImageDict(FILE* fd, TIFF* tif, uint32 w, uint32 h) } if (tile_height < h) { fputs("/im_y 0 def\n", fd); - (void)sprintf(im_y, "%lu im_y sub", (unsigned long) h); + (void)snprintf(im_y, sizeof(im_y), "%lu im_y sub", (unsigned long) h); } } else { repeat_count = tf_numberstrips; @@ -1815,7 +1870,7 @@ PS_Lvl2ImageDict(FILE* fd, TIFF* tif, uint32 w, uint32 h) fprintf(fd, "/im_h %lu def\n", (unsigned long) tile_height); (void)strcpy(im_h, "im_h"); - (void)sprintf(im_y, "%lu im_y sub", (unsigned long) h); + (void)snprintf(im_y, sizeof(im_y), "%lu im_y sub", (unsigned long) h); } } @@ -1825,7 +1880,7 @@ PS_Lvl2ImageDict(FILE* fd, TIFF* tif, uint32 w, uint32 h) fputs("{ % exec\n", fd); if (repeat_count > 1) - fprintf(fd, "%d { %% repeat\n", repeat_count); + fprintf(fd, "%u { %% repeat\n", repeat_count); /* * Output filter options and image dictionary. @@ -2162,7 +2217,7 @@ PS_Lvl2page(FILE* fd, TIFF* tif, uint32 w, uint32 h) else chunk_size = TIFFStripSize(tif); } - buf_data = (unsigned char *)_TIFFmalloc(chunk_size); + buf_data = (unsigned char *)limitMalloc(chunk_size); if (!buf_data) { TIFFError(filename, "Can't alloc %lu bytes for %s.", (unsigned long) chunk_size, tiled_image ? "tiles" : "strips"); @@ -2180,7 +2235,7 @@ PS_Lvl2page(FILE* fd, TIFF* tif, uint32 w, uint32 h) * 5*chunk_size/4. */ - ascii85_p = _TIFFmalloc( (chunk_size+(chunk_size/2)) + 8 ); + ascii85_p = limitMalloc( (chunk_size+(chunk_size/2)) + 8 ); if ( !ascii85_p ) { _TIFFfree( buf_data ); @@ -2239,7 +2294,7 @@ PS_Lvl2page(FILE* fd, TIFF* tif, uint32 w, uint32 h) if (alpha) { int adjust, i, j = 0; int ncomps = samplesperpixel - extrasamples; - for (i = 0; i < byte_count; i+=samplesperpixel) { + for (i = 0; (i + ncomps) < byte_count; i+=samplesperpixel) { adjust = 255 - buf_data[i + ncomps]; switch (ncomps) { case 1: @@ -2419,7 +2474,12 @@ PSDataColorContig(FILE* fd, TIFF* tif, uint32 w, uint32 h, int nc) unsigned char *cp, c; (void) w; - tf_buf = (unsigned char *) _TIFFmalloc(tf_bytesperrow); + if( es < 0 ) + { + TIFFError(filename, "Inconsistent value of es: %d (samplesperpixel=%u, nc=%d)", es, samplesperpixel, nc); + return; + } + tf_buf = (unsigned char *) limitMalloc(tf_bytesperrow); if (tf_buf == NULL) { TIFFError(filename, "No space for scanline buffer"); return; @@ -2437,8 +2497,10 @@ PSDataColorContig(FILE* fd, TIFF* tif, uint32 w, uint32 h, int nc) } if (alpha) { int adjust; - cc = 0; - for (; cc < tf_bytesperrow; cc += samplesperpixel) { + /* + * the code inside this loop reads nc bytes + 1 extra byte (for adjust) + */ + for (cc = 0; (cc + nc) < tf_bytesperrow; cc += samplesperpixel) { DOBREAK(breaklen, nc, fd); /* * For images with alpha, matte against @@ -2456,8 +2518,10 @@ PSDataColorContig(FILE* fd, TIFF* tif, uint32 w, uint32 h, int nc) cp += es; } } else { - cc = 0; - for (; cc < tf_bytesperrow; cc += samplesperpixel) { + /* + * the code inside this loop reads nc bytes per iteration + */ + for (cc = 0; (cc + nc) <= tf_bytesperrow; cc += samplesperpixel) { DOBREAK(breaklen, nc, fd); switch (nc) { case 4: c = *cp++; PUTHEX(c,fd); @@ -2483,7 +2547,7 @@ PSDataColorSeparate(FILE* fd, TIFF* tif, uint32 w, uint32 h, int nc) unsigned char *cp, c; (void) w; - tf_buf = (unsigned char *) _TIFFmalloc(tf_bytesperrow); + tf_buf = (unsigned char *) limitMalloc(tf_bytesperrow); if (tf_buf == NULL) { TIFFError(filename, "No space for scanline buffer"); return; @@ -2529,7 +2593,7 @@ PSDataPalette(FILE* fd, TIFF* tif, uint32 w, uint32 h) return; } nc = 3 * (8 / bitspersample); - tf_buf = (unsigned char *) _TIFFmalloc(tf_bytesperrow); + tf_buf = (unsigned char *) limitMalloc(tf_bytesperrow); if (tf_buf == NULL) { TIFFError(filename, "No space for scanline buffer"); return; @@ -2594,7 +2658,7 @@ PSDataBW(FILE* fd, TIFF* tif, uint32 w, uint32 h) #endif (void) w; (void) h; - tf_buf = (unsigned char *) _TIFFmalloc(stripsize); + tf_buf = (unsigned char *) limitMalloc(stripsize); if (tf_buf == NULL) { TIFFError(filename, "No space for scanline buffer"); return; @@ -2614,7 +2678,7 @@ PSDataBW(FILE* fd, TIFF* tif, uint32 w, uint32 h) * 5*stripsize/4. */ - ascii85_p = _TIFFmalloc( (stripsize+(stripsize/2)) + 8 ); + ascii85_p = limitMalloc( (stripsize+(stripsize/2)) + 8 ); if ( !ascii85_p ) { _TIFFfree( tf_buf ); @@ -2651,7 +2715,7 @@ PSDataBW(FILE* fd, TIFF* tif, uint32 w, uint32 h) #if defined( EXP_ASCII85ENCODER ) if (alpha) { int adjust, i; - for (i = 0; i < cc; i+=2) { + for (i = 0; i < (cc - 1); i+=2) { adjust = 255 - cp[i + 1]; cp[i / 2] = cp[i] + adjust; } @@ -2671,7 +2735,7 @@ PSDataBW(FILE* fd, TIFF* tif, uint32 w, uint32 h) if (alpha) { int adjust; - while (cc-- > 0) { + while (cc-- > 1) { DOBREAK(breaklen, 1, fd); /* * For images with alpha, matte against @@ -2736,12 +2800,12 @@ PSRawDataBW(FILE* fd, TIFF* tif, uint32 w, uint32 h) bufsize = (uint32) bc[0]; - for ( s = 0; ++s < (tstrip_t)tf_numberstrips; ) { + for ( s = 0; ++s < tf_numberstrips; ) { if ( bc[s] > bufsize ) bufsize = (uint32) bc[s]; } - tf_buf = (unsigned char*) _TIFFmalloc(bufsize); + tf_buf = (unsigned char*) limitMalloc(bufsize); if (tf_buf == NULL) { TIFFError(filename, "No space for strip buffer"); return; @@ -2758,7 +2822,7 @@ PSRawDataBW(FILE* fd, TIFF* tif, uint32 w, uint32 h) * 5*bufsize/4. */ - ascii85_p = _TIFFmalloc( (bufsize+(bufsize/2)) + 8 ); + ascii85_p = limitMalloc( (bufsize+(bufsize/2)) + 8 ); if ( !ascii85_p ) { _TIFFfree( tf_buf ); @@ -2769,7 +2833,7 @@ PSRawDataBW(FILE* fd, TIFF* tif, uint32 w, uint32 h) } #endif - for (s = 0; s < (tstrip_t) tf_numberstrips; s++) { + for (s = 0; s < tf_numberstrips; s++) { cc = TIFFReadRawStrip(tif, s, tf_buf, (tmsize_t) bc[s]); if (cc < 0) { TIFFError(filename, "Can't read strip"); @@ -2936,10 +3000,10 @@ tsize_t Ascii85EncodeBlock( uint8 * ascii85_p, unsigned f_eod, const uint8 * raw for ( ; raw_l > 3; raw_l -= 4 ) { - val32 = *(++raw_p) << 24; - val32 += *(++raw_p) << 16; - val32 += *(++raw_p) << 8; - val32 += *(++raw_p); + val32 = (uint32)*(++raw_p) << 24; + val32 += (uint32)*(++raw_p) << 16; + val32 += (uint32)*(++raw_p) << 8; + val32 += (uint32)*(++raw_p); if ( val32 == 0 ) /* Special case */ { @@ -2984,7 +3048,7 @@ tsize_t Ascii85EncodeBlock( uint8 * ascii85_p, unsigned f_eod, const uint8 * raw tsize_t len; /* Output this many bytes */ len = raw_l + 1; - val32 = *++raw_p << 24; /* Prime the pump */ + val32 = (uint32)*++raw_p << 24; /* Prime the pump */ if ( --raw_l > 0 ) val32 += *(++raw_p) << 16; if ( --raw_l > 0 ) val32 += *(++raw_p) << 8; @@ -3023,7 +3087,7 @@ tsize_t Ascii85EncodeBlock( uint8 * ascii85_p, unsigned f_eod, const uint8 * raw #endif /* EXP_ASCII85ENCODER */ -char* stuff[] = { +const char* stuff[] = { "usage: tiff2ps [options] input.tif ...", "where options are:", " -1 generate PostScript Level 1 (default)", @@ -3033,21 +3097,23 @@ char* stuff[] = { " -a convert all directories in file (default is first), Not EPS", " -b # set the bottom margin to # inches", " -c center image (-b and -l still add to this)", +" -C name set postscript document creator name", " -d # set initial directory to # counting from zero", " -D enable duplex printing (two pages per sheet of paper)", " -e generate Encapsulated PostScript (EPS) (implies -z)", " -h # set printed page height to # inches (no default)", " -w # set printed page width to # inches (no default)", " -H # split image if height is more than # inches", -" -P L or P set optional PageOrientation DSC comment to Landscape or Portrait", " -W # split image if width is more than # inches", " -L # overLap split images by # inches", " -i # enable/disable (Nz/0) pixel interpolation (default: enable)", " -l # set the left margin to # inches", " -m use \"imagemask\" operator instead of \"image\"", +" -M size set the memory allocation limit in MiB. 0 to disable limit", " -o # convert directory at file offset # bytes", " -O file write PostScript to file instead of standard output", -" -p generate regular PostScript", +" -p generate regular (non-encapsulated) PostScript", +" -P L or P set optional PageOrientation DSC comment to Landscape or Portrait", " -r # or auto rotate by 90, 180, 270 degrees or auto", " -s generate PostScript for a single image", " -t name set postscript document title. Otherwise the filename is used", @@ -3061,13 +3127,12 @@ NULL static void usage(int code) { - char buf[BUFSIZ]; int i; + FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; - setbuf(stderr, buf); - fprintf(stderr, "%s\n\n", TIFFGetVersion()); + fprintf(out, "%s\n\n", TIFFGetVersion()); for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); + fprintf(out, "%s\n", stuff[i]); exit(code); } diff --git a/thirdparty/tiff-4.0.3/tools/tiff2rgba.c b/thirdparty/tiff-4.2.0/tools/tiff2rgba.c similarity index 83% rename from thirdparty/tiff-4.0.3/tools/tiff2rgba.c rename to thirdparty/tiff-4.2.0/tools/tiff2rgba.c index 737167c7..764395f6 100644 --- a/thirdparty/tiff-4.0.3/tools/tiff2rgba.c +++ b/thirdparty/tiff-4.2.0/tools/tiff2rgba.c @@ -1,5 +1,3 @@ -/* $Id: tiff2rgba.c,v 1.19 2011-02-23 21:46:09 fwarmerdam Exp $ */ - /* * Copyright (c) 1991-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -41,6 +39,13 @@ #include "tiffiop.h" #include "tiffio.h" +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + #define streq(a,b) (strcmp(a,b) == 0) #define CopyField(tag, v) \ if (TIFFGetField(in, tag, &v)) TIFFSetField(out, tag, v) @@ -55,6 +60,10 @@ uint32 rowsperstrip = (uint32) -1; int process_by_block = 0; /* default is whole image at once */ int no_alpha = 0; int bigtiff_output = 0; +#define DEFAULT_MAX_MALLOC (256 * 1024 * 1024) +/* malloc size limit (in bytes) + * disabled when set to 0 */ +static tmsize_t maxMalloc = DEFAULT_MAX_MALLOC; static int tiffcvt(TIFF* in, TIFF* out); @@ -65,11 +74,16 @@ main(int argc, char* argv[]) { TIFF *in, *out; int c; +#if !HAVE_DECL_OPTARG extern int optind; extern char *optarg; +#endif - while ((c = getopt(argc, argv, "c:r:t:bn8")) != -1) + while ((c = getopt(argc, argv, "c:r:t:bn8hM:")) != -1) switch (c) { + case 'M': + maxMalloc = (tmsize_t)strtoul(optarg, NULL, 0) << 20; + break; case 'b': process_by_block = 1; break; @@ -86,7 +100,7 @@ main(int argc, char* argv[]) else if (streq(optarg, "zip")) compression = COMPRESSION_DEFLATE; else - usage(-1); + usage(EXIT_FAILURE); break; case 'r': @@ -105,17 +119,20 @@ main(int argc, char* argv[]) bigtiff_output = 1; break; + case 'h': + usage(EXIT_SUCCESS); + /*NOTREACHED*/ case '?': - usage(0); + usage(EXIT_FAILURE); /*NOTREACHED*/ } if (argc - optind < 2) - usage(-1); + usage(EXIT_FAILURE); out = TIFFOpen(argv[argc-1], bigtiff_output?"w8":"w"); if (out == NULL) - return (-2); + return (EXIT_FAILURE); for (; optind < argc-1; optind++) { in = TIFFOpen(argv[optind], "r"); @@ -132,7 +149,7 @@ main(int argc, char* argv[]) } } (void) TIFFClose(out); - return (0); + return (EXIT_SUCCESS); } static int @@ -145,6 +162,7 @@ cvt_by_tile( TIFF *in, TIFF *out ) uint32 row, col; uint32 *wrk_line; int ok = 1; + uint32 rastersize, wrk_linesize; TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width); TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height); @@ -161,7 +179,13 @@ cvt_by_tile( TIFF *in, TIFF *out ) /* * Allocate tile buffer */ - raster = (uint32*)_TIFFmalloc(tile_width * tile_height * sizeof (uint32)); + rastersize = tile_width * tile_height * sizeof (uint32); + if (tile_width != (rastersize / tile_height) / sizeof( uint32)) + { + TIFFError(TIFFFileName(in), "Integer overflow when calculating raster buffer"); + exit(EXIT_FAILURE); + } + raster = (uint32*)_TIFFmalloc(rastersize); if (raster == 0) { TIFFError(TIFFFileName(in), "No space for raster buffer"); return (0); @@ -171,7 +195,13 @@ cvt_by_tile( TIFF *in, TIFF *out ) * Allocate a scanline buffer for swapping during the vertical * mirroring pass. */ - wrk_line = (uint32*)_TIFFmalloc(tile_width * sizeof (uint32)); + wrk_linesize = tile_width * sizeof (uint32); + if (tile_width != wrk_linesize / sizeof (uint32)) + { + TIFFError(TIFFFileName(in), "Integer overflow when calculating wrk_line buffer"); + exit(EXIT_FAILURE); + } + wrk_line = (uint32*)_TIFFmalloc(wrk_linesize); if (!wrk_line) { TIFFError(TIFFFileName(in), "No space for raster scanline buffer"); ok = 0; @@ -247,6 +277,7 @@ cvt_by_strip( TIFF *in, TIFF *out ) uint32 row; uint32 *wrk_line; int ok = 1; + uint32 rastersize, wrk_linesize; TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width); TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height); @@ -261,7 +292,13 @@ cvt_by_strip( TIFF *in, TIFF *out ) /* * Allocate strip buffer */ - raster = (uint32*)_TIFFmalloc(width * rowsperstrip * sizeof (uint32)); + rastersize = width * rowsperstrip * sizeof (uint32); + if (width != (rastersize / rowsperstrip) / sizeof( uint32)) + { + TIFFError(TIFFFileName(in), "Integer overflow when calculating raster buffer"); + exit(EXIT_FAILURE); + } + raster = (uint32*)_TIFFmalloc(rastersize); if (raster == 0) { TIFFError(TIFFFileName(in), "No space for raster buffer"); return (0); @@ -271,7 +308,13 @@ cvt_by_strip( TIFF *in, TIFF *out ) * Allocate a scanline buffer for swapping during the vertical * mirroring pass. */ - wrk_line = (uint32*)_TIFFmalloc(width * sizeof (uint32)); + wrk_linesize = width * sizeof (uint32); + if (width != wrk_linesize / sizeof (uint32)) + { + TIFFError(TIFFFileName(in), "Integer overflow when calculating wrk_line buffer"); + exit(EXIT_FAILURE); + } + wrk_line = (uint32*)_TIFFmalloc(wrk_linesize); if (!wrk_line) { TIFFError(TIFFFileName(in), "No space for raster scanline buffer"); ok = 0; @@ -369,6 +412,12 @@ cvt_whole_image( TIFF *in, TIFF *out ) (unsigned long)width, (unsigned long)height); return 0; } + if (maxMalloc != 0 && (tmsize_t)pixel_count * (tmsize_t)sizeof(uint32) > maxMalloc) { + TIFFError(TIFFFileName(in), + "Raster size " TIFF_UINT64_FORMAT " over memory limit (" TIFF_UINT64_FORMAT "), try -b option.", + (uint64)pixel_count * sizeof(uint32), (uint64)maxMalloc); + return 0; + } rowsperstrip = TIFFDefaultStripSize(out, rowsperstrip); TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip); @@ -494,6 +543,13 @@ tiffcvt(TIFF* in, TIFF* out) TIFFSetField(out, TIFFTAG_SOFTWARE, TIFFGetVersion()); CopyField(TIFFTAG_DOCUMENTNAME, stringv); + if (maxMalloc != 0 && TIFFStripSize(in) > maxMalloc) + { + TIFFError(TIFFFileName(in), + "Strip Size " TIFF_UINT64_FORMAT " over memory limit (" TIFF_UINT64_FORMAT ")", + (uint64)TIFFStripSize(in), (uint64)maxMalloc); + return 0; + } if( process_by_block && TIFFIsTiled( in ) ) return( cvt_by_tile( in, out ) ); else if( process_by_block ) @@ -502,11 +558,11 @@ tiffcvt(TIFF* in, TIFF* out) return( cvt_whole_image( in, out ) ); } -static char* stuff[] = { - "usage: tiff2rgba [-c comp] [-r rows] [-b] [-n] [-8] input... output", +static const char* stuff[] = { + "usage: tiff2rgba [-c comp] [-r rows] [-b] [-n] [-8] [-M size] input... output", "where comp is one of the following compression algorithms:", " jpeg\t\tJPEG encoding", - " zip\t\tLempel-Ziv & Welch encoding", + " zip\t\tZip/Deflate encoding", " lzw\t\tLempel-Ziv & Welch encoding", " packbits\tPackBits encoding", " none\t\tno compression", @@ -515,19 +571,19 @@ static char* stuff[] = { " -b (progress by block rather than as a whole image)", " -n don't emit alpha component.", " -8 write BigTIFF file instead of ClassicTIFF", + " -M set the memory allocation limit in MiB. 0 to disable limit", NULL }; static void usage(int code) { - char buf[BUFSIZ]; int i; + FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; - setbuf(stderr, buf); - fprintf(stderr, "%s\n\n", TIFFGetVersion()); + fprintf(out, "%s\n\n", TIFFGetVersion()); for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); + fprintf(out, "%s\n", stuff[i]); exit(code); } diff --git a/thirdparty/tiff-4.0.3/tools/tiffcmp.c b/thirdparty/tiff-4.2.0/tools/tiffcmp.c similarity index 92% rename from thirdparty/tiff-4.0.3/tools/tiffcmp.c rename to thirdparty/tiff-4.2.0/tools/tiffcmp.c index bc7dac94..041d6a2d 100644 --- a/thirdparty/tiff-4.0.3/tools/tiffcmp.c +++ b/thirdparty/tiff-4.2.0/tools/tiffcmp.c @@ -1,5 +1,3 @@ -/* $Id: tiffcmp.c,v 1.16 2010-03-10 18:56:50 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -41,8 +39,15 @@ #include "tiffio.h" +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + #ifndef HAVE_GETOPT -extern int getopt(int, char**, char*); +extern int getopt(int argc, char * const argv[], const char *optstring); #endif static int stopondiff = 1; @@ -53,7 +58,7 @@ static uint16 sampleformat = SAMPLEFORMAT_UINT; static uint32 imagewidth; static uint32 imagelength; -static void usage(void); +static void usage(int code); static int tiffcmp(TIFF*, TIFF*); static int cmptags(TIFF*, TIFF*); static int ContigCompare(int, uint32, unsigned char*, unsigned char*, tsize_t); @@ -63,15 +68,23 @@ static void PrintFloatDiff(uint32, int, uint32, double, double); static void leof(const char*, uint32, int); +/* + * exit with status : + * 0 No differences were found. + * 1 Differences were found. + * >1 An error occurred. + */ int main(int argc, char* argv[]) { TIFF *tif1, *tif2; int c, dirnum; +#if !HAVE_DECL_OPTARG extern int optind; extern char* optarg; +#endif - while ((c = getopt(argc, argv, "ltz:")) != -1) + while ((c = getopt(argc, argv, "ltz:h")) != -1) switch (c) { case 'l': stopondiff = 0; @@ -82,18 +95,20 @@ main(int argc, char* argv[]) case 't': stoponfirsttag = 0; break; + case 'h': + usage(EXIT_SUCCESS); case '?': - usage(); + usage(2); /*NOTREACHED*/ } if (argc - optind < 2) - usage(); + usage(2); tif1 = TIFFOpen(argv[optind], "r"); if (tif1 == NULL) - return (-1); + return (2); tif2 = TIFFOpen(argv[optind+1], "r"); if (tif2 == NULL) - return (-2); + return (2); dirnum = 0; while (tiffcmp(tif1, tif2)) { if (!TIFFReadDirectory(tif1)) { @@ -115,7 +130,7 @@ main(int argc, char* argv[]) return (0); } -char* stuff[] = { +static const char* stuff[] = { "usage: tiffcmp [options] file1 file2", "where options are:", " -l list each byte of image data that differs between the files", @@ -125,16 +140,15 @@ NULL }; static void -usage(void) +usage(int code) { - char buf[BUFSIZ]; int i; + FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; - setbuf(stderr, buf); - fprintf(stderr, "%s\n\n", TIFFGetVersion()); + fprintf(out, "%s\n\n", TIFFGetVersion()); for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); - exit(-1); + fprintf(out, "%s\n", stuff[i]); + exit(code); } #define checkEOF(tif, row, sample) { \ @@ -177,7 +191,7 @@ tiffcmp(TIFF* tif1, TIFF* tif2) buf2 = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(tif2)); if (buf1 == NULL || buf2 == NULL) { fprintf(stderr, "No space for scanline buffers\n"); - exit(-1); + exit(2); } if (config1 != config2 && bitspersample != 8 && samplesperpixel > 1) { fprintf(stderr, @@ -260,6 +274,7 @@ bad1: static int cmptags(TIFF* tif1, TIFF* tif2) { + uint16 compression1, compression2; CmpLongField(TIFFTAG_SUBFILETYPE, "SubFileType"); CmpLongField(TIFFTAG_IMAGEWIDTH, "ImageWidth"); CmpLongField(TIFFTAG_IMAGELENGTH, "ImageLength"); @@ -276,8 +291,20 @@ cmptags(TIFF* tif1, TIFF* tif2) CmpShortField(TIFFTAG_SAMPLEFORMAT, "SampleFormat"); CmpFloatField(TIFFTAG_XRESOLUTION, "XResolution"); CmpFloatField(TIFFTAG_YRESOLUTION, "YResolution"); - CmpLongField(TIFFTAG_GROUP3OPTIONS, "Group3Options"); - CmpLongField(TIFFTAG_GROUP4OPTIONS, "Group4Options"); + if( TIFFGetField(tif1, TIFFTAG_COMPRESSION, &compression1) && + compression1 == COMPRESSION_CCITTFAX3 && + TIFFGetField(tif2, TIFFTAG_COMPRESSION, &compression2) && + compression2 == COMPRESSION_CCITTFAX3 ) + { + CmpLongField(TIFFTAG_GROUP3OPTIONS, "Group3Options"); + } + if( TIFFGetField(tif1, TIFFTAG_COMPRESSION, &compression1) && + compression1 == COMPRESSION_CCITTFAX4 && + TIFFGetField(tif2, TIFFTAG_COMPRESSION, &compression2) && + compression2 == COMPRESSION_CCITTFAX4 ) + { + CmpLongField(TIFFTAG_GROUP4OPTIONS, "Group4Options"); + } CmpShortField(TIFFTAG_RESOLUTIONUNIT, "ResolutionUnit"); CmpShortField(TIFFTAG_PLANARCONFIG, "PlanarConfiguration"); CmpLongField(TIFFTAG_ROWSPERSTRIP, "RowsPerStrip"); @@ -423,7 +450,8 @@ PrintIntDiff(uint32 row, int sample, uint32 pix, uint32 w1, uint32 w2) { int32 mask1, mask2, s; - mask1 = ~((-1) << bitspersample); + /* mask1 should have the n lowest bits set, where n == bitspersample */ + mask1 = ((int32)1 << bitspersample) - 1; s = (8 - bitspersample); mask2 = mask1 << s; for (; mask2 && pix < imagewidth; diff --git a/thirdparty/tiff-4.0.3/tools/tiffcp.c b/thirdparty/tiff-4.2.0/tools/tiffcp.c similarity index 87% rename from thirdparty/tiff-4.0.3/tools/tiffcp.c rename to thirdparty/tiff-4.2.0/tools/tiffcp.c index 0f81b19d..e56b1c10 100644 --- a/thirdparty/tiff-4.0.3/tools/tiffcp.c +++ b/thirdparty/tiff-4.2.0/tools/tiffcp.c @@ -1,5 +1,3 @@ -/* $Id: tiffcp.c,v 1.49 2010-12-23 13:38:47 dron Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -43,9 +41,9 @@ #include #include #include +#include #include -#include #ifdef HAVE_UNISTD_H # include @@ -53,8 +51,15 @@ #include "tiffio.h" +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + #ifndef HAVE_GETOPT -extern int getopt(int, char**, char*); +extern int getopt(int argc, char * const argv[], const char *optstring); #endif #if defined(VMS) @@ -67,6 +72,12 @@ extern int getopt(int, char**, char*); #define TRUE 1 #define FALSE 0 +#define DEFAULT_MAX_MALLOC (256 * 1024 * 1024) + +/* malloc size limit (in bytes) + * disabled when set to 0 */ +static tmsize_t maxMalloc = DEFAULT_MAX_MALLOC; + static int outtiled = -1; static uint32 tilewidth; static uint32 tilelength; @@ -86,16 +97,31 @@ static int jpegcolormode = JPEGCOLORMODE_RGB; static uint16 defcompression = (uint16) -1; static uint16 defpredictor = (uint16) -1; static int defpreset = -1; +static int subcodec = -1; static int tiffcp(TIFF*, TIFF*); static int processCompressOptions(char*); -static void usage(void); +static void usage(int code); static char comma = ','; /* (default) comma separator character */ static TIFF* bias = NULL; static int pageNum = 0; static int pageInSeq = 0; +/** + * This custom malloc function enforce a maximum allocation size + */ +static void* limitMalloc(tmsize_t s) +{ + if (maxMalloc && (s > maxMalloc)) { + fprintf(stderr, "MemoryLimitError: allocation of " TIFF_UINT64_FORMAT " bytes is forbidden. Limit is " TIFF_UINT64_FORMAT ".\n", + (uint64)s, (uint64)maxMalloc); + fprintf(stderr, " use -m option to change limit.\n"); + return NULL; + } + return _TIFFmalloc(s); +} + static int nextSrcImage (TIFF *tif, char **imageSpec) /* seek to the next image specified in *imageSpec @@ -116,7 +142,7 @@ static int nextSrcImage (TIFF *tif, char **imageSpec) fprintf (stderr, "Expected a %c separated image # list after %s\n", comma, TIFFFileName (tif)); - exit (-4); /* syntax error */ + exit (EXIT_FAILURE); /* syntax error */ } } if (TIFFSetDirectory (tif, nextImage)) return 1; @@ -134,12 +160,14 @@ static TIFF* openSrcImage (char **imageSpec) no images specified, or a pointer to the next image number text */ { + /* disable strip shopping when using jbig compression */ + const char *mode = (defcompression == COMPRESSION_JBIG) ? "rc" : "r"; TIFF *tif; char *fn = *imageSpec; *imageSpec = strchr (fn, comma); if (*imageSpec) { /* there is at least one image number specifier */ **imageSpec = '\0'; - tif = TIFFOpen (fn, "r"); + tif = TIFFOpen (fn, mode); /* but, ignore any single trailing comma */ if (!(*imageSpec)[1]) {*imageSpec = NULL; return tif;} if (tif) { @@ -150,7 +178,7 @@ static TIFF* openSrcImage (char **imageSpec) } } }else - tif = TIFFOpen (fn, "r"); + tif = TIFFOpen (fn, mode); return tif; } @@ -168,35 +196,40 @@ main(int argc, char* argv[]) char mode[10]; char* mp = mode; int c; +#if !HAVE_DECL_OPTARG extern int optind; extern char* optarg; +#endif *mp++ = 'w'; *mp = '\0'; - while ((c = getopt(argc, argv, ",:b:c:f:l:o:z:p:r:w:aistBLMC8x")) != -1) + while ((c = getopt(argc, argv, "m:,:b:c:f:l:o:p:r:w:aistBLMC8xh")) != -1) switch (c) { + case 'm': + maxMalloc = (tmsize_t)strtoul(optarg, NULL, 0) << 20; + break; case ',': - if (optarg[0] != '=') usage(); + if (optarg[0] != '=') usage(EXIT_FAILURE); comma = optarg[1]; break; case 'b': /* this file is bias image subtracted from others */ if (bias) { fputs ("Only 1 bias image may be specified\n", stderr); - exit (-2); + exit (EXIT_FAILURE); } { uint16 samples = (uint16) -1; char **biasFn = &optarg; bias = openSrcImage (biasFn); - if (!bias) exit (-5); + if (!bias) exit (EXIT_FAILURE); if (TIFFIsTiled (bias)) { fputs ("Bias image must be organized in strips\n", stderr); - exit (-7); + exit (EXIT_FAILURE); } TIFFGetField(bias, TIFFTAG_SAMPLESPERPIXEL, &samples); if (samples != 1) { fputs ("Bias image must be monochrome\n", stderr); - exit (-7); + exit (EXIT_FAILURE); } } break; @@ -205,7 +238,7 @@ main(int argc, char* argv[]) break; case 'c': /* compression scheme */ if (!processCompressOptions(optarg)) - usage(); + usage(EXIT_FAILURE); break; case 'f': /* fill order */ if (streq(optarg, "lsb2msb")) @@ -213,7 +246,7 @@ main(int argc, char* argv[]) else if (streq(optarg, "msb2lsb")) deffillorder = FILLORDER_MSB2LSB; else - usage(); + usage(EXIT_FAILURE); break; case 'i': /* ignore errors */ ignore = TRUE; @@ -231,7 +264,7 @@ main(int argc, char* argv[]) else if (streq(optarg, "contig")) defconfig = PLANARCONFIG_CONTIG; else - usage(); + usage(EXIT_FAILURE); break; case 'r': /* rows/strip */ defrowsperstrip = atol(optarg); @@ -264,15 +297,18 @@ main(int argc, char* argv[]) case 'x': pageInSeq = 1; break; + case 'h': + usage(EXIT_SUCCESS); + /*NOTREACHED*/ case '?': - usage(); + usage(EXIT_FAILURE); /*NOTREACHED*/ } if (argc - optind < 2) - usage(); + usage(EXIT_FAILURE); out = TIFFOpen(argv[argc-1], mode); if (out == NULL) - return (-2); + return (EXIT_FAILURE); if ((argc - optind) == 2) pageNum = -1; for (; optind < argc-1 ; optind++) { @@ -280,14 +316,14 @@ main(int argc, char* argv[]) in = openSrcImage (&imageCursor); if (in == NULL) { (void) TIFFClose(out); - return (-3); + return (EXIT_FAILURE); } if (diroff != 0 && !TIFFSetSubDirectory(in, diroff)) { TIFFError(TIFFFileName(in), "Error, setting subdirectory at " TIFF_UINT64_FORMAT, diroff); (void) TIFFClose(in); (void) TIFFClose(out); - return (1); + return (EXIT_FAILURE); } for (;;) { config = defconfig; @@ -302,7 +338,7 @@ main(int argc, char* argv[]) if (!tiffcp(in, out) || !TIFFWriteDirectory(out)) { (void) TIFFClose(in); (void) TIFFClose(out); - return (1); + return (EXIT_FAILURE); } if (imageCursor) { /* seek next image directory */ if (!nextSrcImage(in, &imageCursor)) break; @@ -313,7 +349,7 @@ main(int argc, char* argv[]) } (void) TIFFClose(out); - return (0); + return (EXIT_SUCCESS); } static void @@ -326,8 +362,10 @@ processZIPOptions(char* cp) defpredictor = atoi(cp); else if (*cp == 'p') defpreset = atoi(++cp); + else if (*cp == 's') + subcodec = atoi(++cp); else - usage(); + usage(EXIT_FAILURE); } while( (cp = strchr(cp, ':')) ); } } @@ -347,7 +385,7 @@ processG3Options(char* cp) else if (strneq(cp, "fill", 4)) defg3opts |= GROUP3OPT_FILLBITS; else - usage(); + usage(EXIT_FAILURE); } while( (cp = strchr(cp, ':')) ); } } @@ -370,7 +408,7 @@ processCompressOptions(char* opt) else if (cp[1] == 'r' ) jpegcolormode = JPEGCOLORMODE_RAW; else - usage(); + usage(EXIT_FAILURE); cp = strchr(cp+1,':'); } @@ -390,6 +428,12 @@ processCompressOptions(char* opt) } else if (strneq(opt, "lzma", 4)) { processZIPOptions(opt); defcompression = COMPRESSION_LZMA; + } else if (strneq(opt, "zstd", 4)) { + processZIPOptions(opt); + defcompression = COMPRESSION_ZSTD; + } else if (strneq(opt, "webp", 4)) { + processZIPOptions(opt); + defcompression = COMPRESSION_WEBP; } else if (strneq(opt, "jbig", 4)) { defcompression = COMPRESSION_JBIG; } else if (strneq(opt, "sgilog", 6)) { @@ -399,7 +443,7 @@ processCompressOptions(char* opt) return (1); } -char* stuff[] = { +static const char* stuff[] = { "usage: tiffcp [options] input... output", "where options are:", " -a append to output instead of overwriting", @@ -408,10 +452,16 @@ char* stuff[] = { " -p separate store samples separately (e.g. RRR...GGG...BBB...)", " -s write output in strips", " -t write output in tiles", +" -x force the merged tiff pages in sequence", " -8 write BigTIFF instead of default ClassicTIFF", +" -B write big-endian instead of native byte order", +" -L write little-endian instead of native byte order", +" -M disable use of memory-mapped files", +" -C disable strip chopping", " -i ignore read errors", " -b file[,#] bias (dark) monochrome image to be subtracted from all others", " -,=% use % rather than , to separate image #'s (per Note below)", +" -m size set maximum memory allocation size (MiB). 0 to disable limit.", "", " -r # make each strip have no more than # rows", " -w # set output tile width (pixels)", @@ -423,6 +473,8 @@ char* stuff[] = { " -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding", " -c zip[:opts] compress output with deflate encoding", " -c lzma[:opts] compress output with LZMA2 encoding", +" -c zstd[:opts] compress output with ZSTD encoding", +" -c webp[:opts] compress output with WEBP encoding", " -c jpeg[:opts] compress output with JPEG encoding", " -c jbig compress output with ISO JBIG encoding", " -c packbits compress output with packbits encoding", @@ -430,7 +482,6 @@ char* stuff[] = { " -c g4 compress output with CCITT Group 4 encoding", " -c sgilog compress output with SGILOG encoding", " -c none use no compression algorithm on output", -" -x force the merged tiff pages in sequence", "", "Group 3 options:", " 1d use default CCITT Group 3 1D-encoding", @@ -443,9 +494,12 @@ char* stuff[] = { " r output color image as RGB rather than YCbCr", "For example, -c jpeg:r:50 to get JPEG-encoded RGB data with 50% comp. quality", "", -"LZW, Deflate (ZIP) and LZMA2 options:", +"LZW, Deflate (ZIP), LZMA2, ZSTD and WEBP options:", " # set predictor value", " p# set compression level (preset)", +#if LIBDEFLATE_SUPPORT +" s# set subcodec (0=zlib, 1=libdeflate) (only for Deflate/ZIP)", +#endif "For example, -c lzw:2 to get LZW-encoded data with horizontal differencing,", "-c zip:3:p9 for Deflate encoding with maximum compression level and floating", "point predictor.", @@ -458,16 +512,15 @@ NULL }; static void -usage(void) +usage(int code) { - char buf[BUFSIZ]; int i; + FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; - setbuf(stderr, buf); - fprintf(stderr, "%s\n\n", TIFFGetVersion()); + fprintf(out, "%s\n\n", TIFFGetVersion()); for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); - exit(-1); + fprintf(out, "%s\n", stuff[i]); + exit(code); } #define CopyField(tag, v) \ @@ -586,8 +639,8 @@ static copyFunc pickCopyFunc(TIFF*, TIFF*, uint16, uint16); static int tiffcp(TIFF* in, TIFF* out) { - uint16 bitspersample, samplesperpixel; - uint16 input_compression, input_photometric; + uint16 bitspersample = 1, samplesperpixel = 1; + uint16 input_compression, input_photometric = PHOTOMETRIC_MINISBLACK; copyFunc cf; uint32 width, length; struct cpTag* p; @@ -629,6 +682,12 @@ tiffcp(TIFF* in, TIFF* out) TIFFSetField(out, TIFFTAG_PHOTOMETRIC, samplesperpixel == 1 ? PHOTOMETRIC_LOGL : PHOTOMETRIC_LOGLUV); + else if (input_compression == COMPRESSION_JPEG && + samplesperpixel == 3 ) { + /* RGB conversion was forced above + hence the output will be of the same type */ + TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); + } else CopyTag(TIFFTAG_PHOTOMETRIC, 1, TIFF_SHORT); if (fillorder != 0) @@ -644,7 +703,7 @@ tiffcp(TIFF* in, TIFF* out) case ORIENTATION_RIGHTBOT: /* XXX */ TIFFWarning(TIFFFileName(in), "using bottom-left orientation"); orientation = ORIENTATION_BOTLEFT; - /* fall thru... */ + /* fall through... */ case ORIENTATION_LEFTBOT: /* XXX */ case ORIENTATION_BOTLEFT: break; @@ -653,7 +712,7 @@ tiffcp(TIFF* in, TIFF* out) default: TIFFWarning(TIFFFileName(in), "using top-left orientation"); orientation = ORIENTATION_TOPLEFT; - /* fall thru... */ + /* fall through... */ case ORIENTATION_LEFTTOP: /* XXX */ case ORIENTATION_TOPLEFT: break; @@ -722,16 +781,39 @@ tiffcp(TIFF* in, TIFF* out) case COMPRESSION_ADOBE_DEFLATE: case COMPRESSION_DEFLATE: case COMPRESSION_LZMA: + case COMPRESSION_ZSTD: if (predictor != (uint16)-1) TIFFSetField(out, TIFFTAG_PREDICTOR, predictor); else CopyField(TIFFTAG_PREDICTOR, predictor); + if( compression == COMPRESSION_ADOBE_DEFLATE || + compression == COMPRESSION_DEFLATE ) + { + if( subcodec != -1 ) + { + if( TIFFSetField(out, TIFFTAG_DEFLATE_SUBCODEC, subcodec) != 1 ) + { + return FALSE; + } + } + } + /*fallthrough*/ + case COMPRESSION_WEBP: if (preset != -1) { if (compression == COMPRESSION_ADOBE_DEFLATE || compression == COMPRESSION_DEFLATE) TIFFSetField(out, TIFFTAG_ZIPQUALITY, preset); else if (compression == COMPRESSION_LZMA) TIFFSetField(out, TIFFTAG_LZMAPRESET, preset); + else if (compression == COMPRESSION_ZSTD) + TIFFSetField(out, TIFFTAG_ZSTD_LEVEL, preset); + else if (compression == COMPRESSION_WEBP) { + if (preset == 100) { + TIFFSetField(out, TIFFTAG_WEBP_LOSSLESS, TRUE); + } else { + TIFFSetField(out, TIFFTAG_WEBP_LEVEL, preset); + } + } } break; case COMPRESSION_CCITTFAX3: @@ -829,7 +911,7 @@ DECLAREcpFunc(cpContig2ContigByRow) tdata_t buf; uint32 row; - buf = _TIFFmalloc(scanlinesize); + buf = limitMalloc(scanlinesize); if (!buf) return 0; _TIFFmemset(buf, 0, scanlinesize); @@ -903,8 +985,8 @@ DECLAREcpFunc(cpBiasedContig2Contig) subtractLine = lineSubtractFn (sampleBits); if (subtractLine) { uint32 row; - buf = _TIFFmalloc(bufSize); - biasBuf = _TIFFmalloc(bufSize); + buf = limitMalloc(bufSize); + biasBuf = limitMalloc(bufSize); for (row = 0; row < imagelength; row++) { if (TIFFReadScanline(in, buf, row, 0) < 0 && !ignore) { @@ -966,14 +1048,14 @@ bad: DECLAREcpFunc(cpDecodedStrips) { tsize_t stripsize = TIFFStripSize(in); - tdata_t buf = _TIFFmalloc(stripsize); + tdata_t buf = limitMalloc(stripsize); (void) imagewidth; (void) spp; if (buf) { tstrip_t s, ns = TIFFNumberOfStrips(in); uint32 row = 0; _TIFFmemset(buf, 0, stripsize); - for (s = 0; s < ns; s++) { + for (s = 0; s < ns && row < imagelength; s++) { tsize_t cc = (row + rowsperstrip > imagelength) ? TIFFVStripSize(in, imagelength - row) : stripsize; if (TIFFReadEncodedStrip(in, s, buf, cc) < 0 @@ -1016,7 +1098,7 @@ DECLAREcpFunc(cpSeparate2SeparateByRow) tsample_t s; (void) imagewidth; - buf = _TIFFmalloc(scanlinesize); + buf = limitMalloc(scanlinesize); if (!buf) return 0; _TIFFmemset(buf, 0, scanlinesize); @@ -1056,11 +1138,21 @@ DECLAREcpFunc(cpContig2SeparateByRow) register uint32 n; uint32 row; tsample_t s; + uint16 bps = 0; - inbuf = _TIFFmalloc(scanlinesizein); - outbuf = _TIFFmalloc(scanlinesizeout); + (void) TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bps); + if( bps != 8 ) + { + TIFFError(TIFFFileName(in), + "Error, can only handle BitsPerSample=8 in %s", + "cpContig2SeparateByRow"); + return 0; + } + + inbuf = limitMalloc(scanlinesizein); + outbuf = limitMalloc(scanlinesizeout); if (!inbuf || !outbuf) - return 0; + goto bad; _TIFFmemset(inbuf, 0, scanlinesizein); _TIFFmemset(outbuf, 0, scanlinesizeout); /* unpack channels */ @@ -1109,11 +1201,21 @@ DECLAREcpFunc(cpSeparate2ContigByRow) register uint32 n; uint32 row; tsample_t s; + uint16 bps = 0; - inbuf = _TIFFmalloc(scanlinesizein); - outbuf = _TIFFmalloc(scanlinesizeout); + (void) TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bps); + if( bps != 8 ) + { + TIFFError(TIFFFileName(in), + "Error, can only handle BitsPerSample=8 in %s", + "cpSeparate2ContigByRow"); + return 0; + } + + inbuf = limitMalloc(scanlinesizein); + outbuf = limitMalloc(scanlinesizeout); if (!inbuf || !outbuf) - return 0; + goto bad; _TIFFmemset(inbuf, 0, scanlinesizein); _TIFFmemset(outbuf, 0, scanlinesizeout); for (row = 0; row < imagelength; row++) { @@ -1151,7 +1253,7 @@ bad: static void cpStripToTile(uint8* out, uint8* in, - uint32 rows, uint32 cols, int outskew, int inskew) + uint32 rows, uint32 cols, int outskew, int64 inskew) { while (rows-- > 0) { uint32 j = cols; @@ -1217,7 +1319,7 @@ cpImage(TIFF* in, TIFF* out, readFunc fin, writeFunc fout, if (scanlinesize && imagelength && bytes / (tsize_t)imagelength == scanlinesize) { - buf = _TIFFmalloc(bytes); + buf = limitMalloc(bytes); if (buf) { if ((*fin)(in, (uint8*)buf, imagelength, imagewidth, spp)) { @@ -1265,7 +1367,7 @@ DECLAREreadFunc(readSeparateStripsIntoBuffer) if (!scanlinesize) return 0; - scanline = _TIFFmalloc(scanlinesize); + scanline = limitMalloc(scanlinesize); if (!scanline) return 0; _TIFFmemset(scanline, 0, scanlinesize); @@ -1308,13 +1410,13 @@ DECLAREreadFunc(readContigTilesIntoBuffer) tdata_t tilebuf; uint32 imagew = TIFFScanlineSize(in); uint32 tilew = TIFFTileRowSize(in); - int iskew = imagew - tilew; + int64 iskew = (int64)imagew - (int64)tilew; uint8* bufp = (uint8*) buf; uint32 tw, tl; uint32 row; (void) spp; - tilebuf = _TIFFmalloc(tilesize); + tilebuf = limitMalloc(tilesize); if (tilebuf == 0) return 0; _TIFFmemset(tilebuf, 0, tilesize); @@ -1326,7 +1428,7 @@ DECLAREreadFunc(readContigTilesIntoBuffer) uint32 colb = 0; uint32 col; - for (col = 0; col < imagewidth; col += tw) { + for (col = 0; col < imagewidth && colb < imagew; col += tw) { if (TIFFReadTile(in, tilebuf, col, row, 0, 0) < 0 && !ignore) { TIFFError(TIFFFileName(in), @@ -1336,7 +1438,7 @@ DECLAREreadFunc(readContigTilesIntoBuffer) status = 0; goto done; } - if (colb + tilew > imagew) { + if (colb > iskew) { uint32 width = imagew - colb; uint32 oskew = tilew - width; cpStripToTile(bufp + colb, @@ -1360,22 +1462,39 @@ DECLAREreadFunc(readSeparateTilesIntoBuffer) int status = 1; uint32 imagew = TIFFRasterScanlineSize(in); uint32 tilew = TIFFTileRowSize(in); - int iskew = imagew - tilew*spp; + int iskew; tsize_t tilesize = TIFFTileSize(in); tdata_t tilebuf; uint8* bufp = (uint8*) buf; uint32 tw, tl; uint32 row; - uint16 bps, bytes_per_sample; + uint16 bps = 0, bytes_per_sample; - tilebuf = _TIFFmalloc(tilesize); + if (tilew && spp > (INT_MAX / tilew)) + { + TIFFError(TIFFFileName(in), "Error, cannot handle that much samples per tile row (Tile Width * Samples/Pixel)"); + return 0; + } + iskew = imagew - tilew*spp; + tilebuf = limitMalloc(tilesize); if (tilebuf == 0) return 0; _TIFFmemset(tilebuf, 0, tilesize); (void) TIFFGetField(in, TIFFTAG_TILEWIDTH, &tw); (void) TIFFGetField(in, TIFFTAG_TILELENGTH, &tl); (void) TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bps); - assert( bps % 8 == 0 ); + if( bps == 0 ) + { + TIFFError(TIFFFileName(in), "Error, cannot read BitsPerSample"); + status = 0; + goto done; + } + if( (bps % 8) != 0 ) + { + TIFFError(TIFFFileName(in), "Error, cannot handle BitsPerSample that is not a multiple of 8"); + status = 0; + goto done; + } bytes_per_sample = bps/8; for (row = 0; row < imagelength; row += tl) { @@ -1458,7 +1577,7 @@ DECLAREwriteFunc(writeBufferToSeparateStrips) tstrip_t strip = 0; tsample_t s; - obuf = _TIFFmalloc(stripsize); + obuf = limitMalloc(stripsize); if (obuf == NULL) return (0); _TIFFmemset(obuf, 0, stripsize); @@ -1500,7 +1619,7 @@ DECLAREwriteFunc(writeBufferToContigTiles) (void) spp; - obuf = _TIFFmalloc(TIFFTileSize(out)); + obuf = limitMalloc(TIFFTileSize(out)); if (obuf == NULL) return 0; _TIFFmemset(obuf, 0, tilesize); @@ -1511,7 +1630,7 @@ DECLAREwriteFunc(writeBufferToContigTiles) uint32 colb = 0; uint32 col; - for (col = 0; col < imagewidth; col += tw) { + for (col = 0; col < imagewidth && colb < imagew; col += tw) { /* * Tile is clipped horizontally. Calculate * visible portion and skewing factors. @@ -1551,16 +1670,27 @@ DECLAREwriteFunc(writeBufferToSeparateTiles) uint8* bufp = (uint8*) buf; uint32 tl, tw; uint32 row; - uint16 bps, bytes_per_sample; + uint16 bps = 0, bytes_per_sample; - obuf = _TIFFmalloc(TIFFTileSize(out)); + obuf = limitMalloc(TIFFTileSize(out)); if (obuf == NULL) return 0; _TIFFmemset(obuf, 0, tilesize); (void) TIFFGetField(out, TIFFTAG_TILELENGTH, &tl); (void) TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw); (void) TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps); - assert( bps % 8 == 0 ); + if( bps == 0 ) + { + TIFFError(TIFFFileName(out), "Error, cannot read BitsPerSample"); + _TIFFfree(obuf); + return 0; + } + if( (bps % 8) != 0 ) + { + TIFFError(TIFFFileName(out), "Error, cannot handle BitsPerSample that is not a multiple of 8"); + _TIFFfree(obuf); + return 0; + } bytes_per_sample = bps/8; for (row = 0; row < imagelength; row += tl) { @@ -1751,7 +1881,7 @@ pickCopyFunc(TIFF* in, TIFF* out, uint16 bitspersample, uint16 samplesperpixel) uint32 w, l, tw, tl; int bychunk; - (void) TIFFGetField(in, TIFFTAG_PLANARCONFIG, &shortv); + (void) TIFFGetFieldDefaulted(in, TIFFTAG_PLANARCONFIG, &shortv); if (shortv != config && bitspersample != 8 && samplesperpixel > 1) { fprintf(stderr, "%s: Cannot handle different planar configuration w/ bits/sample != 8\n", diff --git a/thirdparty/tiff-4.0.3/tools/tiffcrop.c b/thirdparty/tiff-4.2.0/tools/tiffcrop.c similarity index 94% rename from thirdparty/tiff-4.0.3/tools/tiffcrop.c rename to thirdparty/tiff-4.2.0/tools/tiffcrop.c index 9cd5d86f..d20b585a 100644 --- a/thirdparty/tiff-4.0.3/tools/tiffcrop.c +++ b/thirdparty/tiff-4.2.0/tools/tiffcrop.c @@ -1,5 +1,3 @@ -/* $Id: tiffcrop.c,v 1.20 2010-12-14 02:03:24 faxguy Exp $ */ - /* tiffcrop.c -- a port of tiffcp.c extended to include manipulations of * the image data through additional options listed below * @@ -27,7 +25,7 @@ * ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE * OR PERFORMANCE OF THIS SOFTWARE. * - * Some portions of the current code are derived from tiffcp, primarly in + * Some portions of the current code are derived from tiffcp, primarily in * the areas of lowlevel reading and writing of TAGS, scanlines and tiles though * some of the original functions have been extended to support arbitrary bit * depths. These functions are presented at the top of this file. @@ -130,8 +128,15 @@ static char tiffcrop_rev_date[] = "12-13-2010"; # include #endif +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + #ifndef HAVE_GETOPT -extern int getopt(int, char**, char*); +extern int getopt(int argc, char * const argv[], const char *optstring); #endif #ifdef NEED_LIBPORT @@ -148,10 +153,7 @@ extern int getopt(int, char**, char*); #define PATH_MAX 1024 #endif -#ifndef streq -#define streq(a,b) (strcmp((a),(b)) == 0) -#endif -#define strneq(a,b,n) (strncmp((a),(b),(n)) == 0) +#define TIFF_UINT32_MAX 0xFFFFFFFFU #define TRUE 1 #define FALSE 0 @@ -178,7 +180,7 @@ extern int getopt(int, char**, char*); #define ROTATECW_90 8 #define ROTATECW_180 16 #define ROTATECW_270 32 -#define ROTATE_ANY ROTATECW_90 || ROTATECW_180 || ROTATECW_270 +#define ROTATE_ANY (ROTATECW_90 | ROTATECW_180 | ROTATECW_270) #define CROP_NONE 0 #define CROP_MARGINS 1 @@ -215,6 +217,8 @@ extern int getopt(int, char**, char*); #define DUMP_TEXT 1 #define DUMP_RAW 2 +#define TIFF_DIR_MAX 65534 + /* Offsets into buffer for margins and fixed width and length segments */ struct offset { uint32 tmargin; @@ -336,7 +340,7 @@ struct paperdef { /* European page sizes corrected from update sent by * thomas . jarosch @ intra2net . com on 5/7/2010 * Paper Size Width Length Aspect Ratio */ -struct paperdef PaperTable[MAX_PAPERNAMES] = { +const struct paperdef PaperTable[MAX_PAPERNAMES] = { {"default", 8.500, 14.000, 0.607}, {"pa4", 8.264, 11.000, 0.751}, {"letter", 8.500, 11.000, 0.773}, @@ -464,7 +468,7 @@ static int writeBufferToSeparateTiles (TIFF*, uint8*, uint32, uint32, tsample static int extractContigSamplesToBuffer (uint8 *, uint8 *, uint32, uint32, tsample_t, uint16, uint16, struct dump_opts *); static int processCompressOptions(char*); -static void usage(void); +static void usage(int code); /* All other functions by Richard Nolde, not found in tiffcp */ static void initImageData (struct image_data *); @@ -620,7 +624,28 @@ static int dump_buffer (FILE *, int, uint32, uint32, uint32, unsigned char *); /* Functions derived in whole or in part from tiffcp */ /* The following functions are taken largely intact from tiffcp */ -static char* usage_info[] = { +#define DEFAULT_MAX_MALLOC (256 * 1024 * 1024) + +/* malloc size limit (in bytes) + * disabled when set to 0 */ +static tmsize_t maxMalloc = DEFAULT_MAX_MALLOC; + +/** + * This custom malloc function enforce a maximum allocation size + */ +static void* limitMalloc(tmsize_t s) +{ + if (maxMalloc && (s > maxMalloc)) { + fprintf(stderr, "MemoryLimitError: allocation of " TIFF_UINT64_FORMAT " bytes is forbidden. Limit is " TIFF_UINT64_FORMAT ".\n", + (uint64)s, (uint64)maxMalloc); + fprintf(stderr, " use -k option to change limit.\n"); return NULL; + } + return _TIFFmalloc(s); +} + + + +static const char* usage_info[] = { "usage: tiffcrop [options] source1 ... sourceN destination", "where options are:", " -h Print this syntax listing", @@ -633,6 +658,7 @@ static char* usage_info[] = { " -s Write output in strips", " -t Write output in tiles", " -i Ignore read errors", +" -k size set the memory allocation limit in MiB. 0 to disable limit", " ", " -r # Make each strip have no more than # rows", " -w # Set output tile width (pixels)", @@ -798,6 +824,11 @@ static int readContigTilesIntoBuffer (TIFF* in, uint8* buf, } tile_buffsize = tilesize; + if (tilesize == 0 || tile_rowsize == 0) + { + TIFFError("readContigTilesIntoBuffer", "Tile size or tile rowsize is zero"); + exit(EXIT_FAILURE); + } if (tilesize < (tsize_t)(tl * tile_rowsize)) { @@ -807,11 +838,25 @@ static int readContigTilesIntoBuffer (TIFF* in, uint8* buf, tilesize, tl * tile_rowsize); #endif tile_buffsize = tl * tile_rowsize; - } + if (tl != (tile_buffsize / tile_rowsize)) + { + TIFFError("readContigTilesIntoBuffer", "Integer overflow when calculating buffer size."); + exit(EXIT_FAILURE); + } + } - tilebuf = _TIFFmalloc(tile_buffsize); + /* Add 3 padding bytes for extractContigSamplesShifted32bits */ + if( (size_t) tile_buffsize > 0xFFFFFFFFU - 3U ) + { + TIFFError("readContigTilesIntoBuffer", "Integer overflow when calculating buffer size."); + exit(EXIT_FAILURE); + } + tilebuf = limitMalloc(tile_buffsize + 3); if (tilebuf == 0) return 0; + tilebuf[tile_buffsize] = 0; + tilebuf[tile_buffsize+1] = 0; + tilebuf[tile_buffsize+2] = 0; dst_rowsize = ((imagewidth * bps * spp) + 7) / 8; for (row = 0; row < imagelength; row += tl) @@ -938,8 +983,8 @@ static int readContigTilesIntoBuffer (TIFF* in, uint8* buf, } } prev_trailing_bits += trailing_bits; - if (prev_trailing_bits > 7) - prev_trailing_bits-= 8; + /* if (prev_trailing_bits > 7) */ + /* prev_trailing_bits-= 8; */ } } } @@ -970,7 +1015,7 @@ static int readSeparateTilesIntoBuffer (TIFF* in, uint8 *obuf, for (sample = 0; (sample < spp) && (sample < MAX_SAMPLES); sample++) { srcbuffs[sample] = NULL; - tbuff = (unsigned char *)_TIFFmalloc(tilesize + 8); + tbuff = (unsigned char *)limitMalloc(tilesize + 8); if (!tbuff) { TIFFError ("readSeparateTilesIntoBuffer", @@ -989,7 +1034,7 @@ static int readSeparateTilesIntoBuffer (TIFF* in, uint8 *obuf, nrow = (row + tl > imagelength) ? imagelength - row : tl; for (col = 0; col < imagewidth; col += tw) { - for (s = 0; s < spp; s++) + for (s = 0; s < spp && s < MAX_SAMPLES; s++) { /* Read each plane of a tile set into srcbuffs[s] */ tbytes = TIFFReadTile(in, srcbuffs[s], col, row, 0, s); if (tbytes < 0 && !ignore) @@ -1143,12 +1188,29 @@ writeBufferToSeparateStrips (TIFF* out, uint8* buf, tdata_t obuf; (void) TIFFGetFieldDefaulted(out, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); - (void) TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps); + (void) TIFFGetFieldDefaulted(out, TIFFTAG_BITSPERSAMPLE, &bps); bytes_per_sample = (bps + 7) / 8; - rowsize = ((bps * spp * width) + 7) / 8; /* source has interleaved samples */ + if( width == 0 || + (uint32)bps * (uint32)spp > TIFF_UINT32_MAX / width || + bps * spp * width > TIFF_UINT32_MAX - 7U ) + { + TIFFError(TIFFFileName(out), + "Error, uint32 overflow when computing (bps * spp * width) + 7"); + return 1; + } + rowsize = ((bps * spp * width) + 7U) / 8; /* source has interleaved samples */ + if( bytes_per_sample == 0 || + rowsperstrip > TIFF_UINT32_MAX / bytes_per_sample || + rowsperstrip * bytes_per_sample > TIFF_UINT32_MAX / (width + 1) ) + { + TIFFError(TIFFFileName(out), + "Error, uint32 overflow when computing rowsperstrip * " + "bytes_per_sample * (width + 1)"); + return 1; + } rowstripsize = rowsperstrip * bytes_per_sample * (width + 1); - obuf = _TIFFmalloc (rowstripsize); + obuf = limitMalloc (rowstripsize); if (obuf == NULL) return 1; @@ -1205,10 +1267,17 @@ static int writeBufferToContigTiles (TIFF* out, uint8* buf, uint32 imagelength, tsize_t tilesize = TIFFTileSize(out); unsigned char *tilebuf = NULL; - TIFFGetField(out, TIFFTAG_TILELENGTH, &tl); - TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw); - TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps); + if( !TIFFGetField(out, TIFFTAG_TILELENGTH, &tl) || + !TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw) || + !TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps) ) + return 1; + if (tilesize == 0 || tile_rowsize == 0 || tl == 0 || tw == 0) + { + TIFFError("writeBufferToContigTiles", "Tile size, tile row size, tile width, or tile length is zero"); + exit(EXIT_FAILURE); + } + tile_buffsize = tilesize; if (tilesize < (tsize_t)(tl * tile_rowsize)) { @@ -1218,13 +1287,26 @@ static int writeBufferToContigTiles (TIFF* out, uint8* buf, uint32 imagelength, tilesize, tl * tile_rowsize); #endif tile_buffsize = tl * tile_rowsize; + if (tl != tile_buffsize / tile_rowsize) + { + TIFFError("writeBufferToContigTiles", "Integer overflow when calculating buffer size"); + exit(EXIT_FAILURE); + } } - tilebuf = _TIFFmalloc(tile_buffsize); + if( imagewidth == 0 || + (uint32)bps * (uint32)spp > TIFF_UINT32_MAX / imagewidth || + bps * spp * imagewidth > TIFF_UINT32_MAX - 7U ) + { + TIFFError(TIFFFileName(out), + "Error, uint32 overflow when computing (imagewidth * bps * spp) + 7"); + return 1; + } + src_rowsize = ((imagewidth * spp * bps) + 7U) / 8; + + tilebuf = limitMalloc(tile_buffsize); if (tilebuf == 0) return 1; - - src_rowsize = ((imagewidth * spp * bps) + 7) / 8; for (row = 0; row < imagelength; row += tl) { nrow = (row + tl > imagelength) ? imagelength - row : tl; @@ -1270,7 +1352,7 @@ static int writeBufferToSeparateTiles (TIFF* out, uint8* buf, uint32 imagelength uint32 imagewidth, tsample_t spp, struct dump_opts * dump) { - tdata_t obuf = _TIFFmalloc(TIFFTileSize(out)); + tdata_t obuf = limitMalloc(TIFFTileSize(out)); uint32 tl, tw; uint32 row, col, nrow, ncol; uint32 src_rowsize, col_offset; @@ -1281,10 +1363,21 @@ static int writeBufferToSeparateTiles (TIFF* out, uint8* buf, uint32 imagelength if (obuf == NULL) return 1; - TIFFGetField(out, TIFFTAG_TILELENGTH, &tl); - TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw); - TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps); - src_rowsize = ((imagewidth * spp * bps) + 7) / 8; + if( !TIFFGetField(out, TIFFTAG_TILELENGTH, &tl) || + !TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw) || + !TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps) ) + return 1; + + if( imagewidth == 0 || + (uint32)bps * (uint32)spp > TIFF_UINT32_MAX / imagewidth || + bps * spp * imagewidth > TIFF_UINT32_MAX - 7 ) + { + TIFFError(TIFFFileName(out), + "Error, uint32 overflow when computing (imagewidth * bps * spp) + 7"); + _TIFFfree(obuf); + return 1; + } + src_rowsize = ((imagewidth * spp * bps) + 7U) / 8; for (row = 0; row < imagelength; row += tl) { @@ -1344,7 +1437,7 @@ processG3Options(char* cp) else if (strneq(cp, "fill", 4)) defg3opts |= GROUP3OPT_FILLBITS; else - usage(); + usage(EXIT_FAILURE); } while( (cp = strchr(cp, ':')) ); } } @@ -1376,7 +1469,7 @@ processCompressOptions(char* opt) else if (strneq(cp + 1, "rgb", 3 )) jpegcolormode = JPEGCOLORMODE_RGB; else - usage(); + usage(EXIT_FAILURE); cp = strchr(cp + 1, ':'); } } @@ -1410,14 +1503,15 @@ processCompressOptions(char* opt) } static void -usage(void) +usage(int code) { int i; + FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; - fprintf(stderr, "\n%s\n", TIFFGetVersion()); + fprintf(out, "\n%s\n", TIFFGetVersion()); for (i = 0; usage_info[i] != NULL; i++) - fprintf(stderr, "%s\n", usage_info[i]); - exit(-1); + fprintf(out, "%s\n", usage_info[i]); + exit(code); } #define CopyField(tag, v) \ @@ -1540,13 +1634,15 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 char *opt_ptr = NULL; /* Pointer to next token in option set */ char *sep = NULL; /* Pointer to a token separator */ unsigned int i, j, start, end; +#if !HAVE_DECL_OPTARG extern int optind; extern char* optarg; +#endif *mp++ = 'w'; *mp = '\0'; while ((c = getopt(argc, argv, - "ac:d:e:f:hil:m:p:r:stvw:z:BCD:E:F:H:I:J:K:LMN:O:P:R:S:U:V:X:Y:Z:")) != -1) + "ac:d:e:f:hik:l:m:p:r:stvw:z:BCD:E:F:H:I:J:K:LMN:O:P:R:S:U:V:X:Y:Z:")) != -1) { good_args++; switch (c) { @@ -1556,7 +1652,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 { TIFFError ("Unknown compression option", "%s", optarg); TIFFError ("For valid options type", "tiffcrop -h"); - exit (-1); + exit (EXIT_FAILURE); } break; case 'd': start = strtoul(optarg, NULL, 0); /* initial IFD offset */ @@ -1564,11 +1660,11 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 { TIFFError ("","Directory offset must be greater than zero"); TIFFError ("For valid options type", "tiffcrop -h"); - exit (-1); + exit (EXIT_FAILURE); } *dirnum = start - 1; break; - case 'e': switch (tolower(optarg[0])) /* image export modes*/ + case 'e': switch (tolower((int) optarg[0])) /* image export modes*/ { case 'c': crop_data->exp_mode = ONE_FILE_COMPOSITE; crop_data->img_mode = COMPOSITE_IMAGES; @@ -1587,7 +1683,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 break; /* Sections */ default: TIFFError ("Unknown export mode","%s", optarg); TIFFError ("For valid options type", "tiffcrop -h"); - exit (-1); + exit (EXIT_FAILURE); } break; case 'f': if (streq(optarg, "lsb2msb")) /* fill order */ @@ -1598,13 +1694,15 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 { TIFFError ("Unknown fill order", "%s", optarg); TIFFError ("For valid options type", "tiffcrop -h"); - exit (-1); + exit (EXIT_FAILURE); } break; - case 'h': usage(); + case 'h': usage(EXIT_SUCCESS); break; case 'i': ignore = TRUE; /* ignore errors */ break; + case 'k': maxMalloc = (tmsize_t)strtoul(optarg, NULL, 0) << 20; + break; case 'l': outtiled = TRUE; /* tile length */ *deftilelength = atoi(optarg); break; @@ -1615,9 +1713,9 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 *defconfig = PLANARCONFIG_CONTIG; else { - TIFFError ("Unkown planar configuration", "%s", optarg); + TIFFError ("Unknown planar configuration", "%s", optarg); TIFFError ("For valid options type", "tiffcrop -h"); - exit (-1); + exit (EXIT_FAILURE); } break; case 'r': /* rows/strip */ @@ -1629,13 +1727,13 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 case 't': /* generate tiled output */ outtiled = TRUE; break; - case 'v': TIFFError("Library Release", "%s", TIFFGetVersion()); - TIFFError ("Tiffcrop version", "%s, last updated: %s", + case 'v': printf("Library Release: %s\n", TIFFGetVersion()); + printf("Tiffcrop version: %s, last updated: %s\n", tiffcrop_version_id, tiffcrop_rev_date); - TIFFError ("Tiffcp code", "Copyright (c) 1988-1997 Sam Leffler"); - TIFFError (" ", "Copyright (c) 1991-1997 Silicon Graphics, Inc"); - TIFFError ("Tiffcrop additions", "Copyright (c) 2007-2010 Richard Nolde"); - exit (0); + printf("Tiffcp code: Copyright (c) 1988-1997 Sam Leffler\n"); + printf(" : Copyright (c) 1991-1997 Silicon Graphics, Inc\n"); + printf("Tiffcrop additions: Copyright (c) 2007-2010 Richard Nolde\n"); + exit (EXIT_SUCCESS); break; case 'w': /* tile width */ outtiled = TRUE; @@ -1654,7 +1752,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 { TIFFError ("Unable to parse coordinates for region", "%d %s", i, optarg); TIFFError ("For valid options type", "tiffcrop -h"); - exit (-1); + exit (EXIT_FAILURE); } } /* check for remaining elements over MAX_REGIONS */ @@ -1662,7 +1760,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 { TIFFError ("Region list exceeds limit of", "%d regions %s", MAX_REGIONS, optarg); TIFFError ("For valid options type", "tiffcrop -h"); - exit (-1);; + exit (EXIT_FAILURE);; } break; /* options for file open modes */ @@ -1684,21 +1782,21 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 { TIFFError("Invalid dump option", "%s", optarg); TIFFError ("For valid options type", "tiffcrop -h"); - exit (-1); + exit (EXIT_FAILURE); } *opt_offset = '\0'; /* convert option to lowercase */ end = strlen (opt_ptr); for (i = 0; i < end; i++) - *(opt_ptr + i) = tolower(*(opt_ptr + i)); + *(opt_ptr + i) = tolower((int) *(opt_ptr + i)); /* Look for dump format specification */ if (strncmp(opt_ptr, "for", 3) == 0) { /* convert value to lowercase */ end = strlen (opt_offset + 1); for (i = 1; i <= end; i++) - *(opt_offset + i) = tolower(*(opt_offset + i)); + *(opt_offset + i) = tolower((int) *(opt_offset + i)); /* check dump format value */ if (strncmp (opt_offset + 1, "txt", 3) == 0) { @@ -1716,7 +1814,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 { TIFFError("parse_command_opts", "Unknown dump format %s", opt_offset + 1); TIFFError ("For valid options type", "tiffcrop -h"); - exit (-1); + exit (EXIT_FAILURE); } } } @@ -1748,7 +1846,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 { TIFFError("", "You must specify a dump format for dump files"); TIFFError ("For valid options type", "tiffcrop -h"); - exit (-1); + exit (EXIT_FAILURE); } } break; @@ -1765,7 +1863,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 } break; case 'E': /* edge reference */ - switch (tolower(optarg[0])) + switch (tolower((int) optarg[0])) { case 't': crop_data->edge_ref = EDGE_TOP; break; @@ -1777,12 +1875,12 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 break; default: TIFFError ("Edge reference must be top, bottom, left, or right", "%s", optarg); TIFFError ("For valid options type", "tiffcrop -h"); - exit (-1); + exit (EXIT_FAILURE); } break; case 'F': /* flip eg mirror image or cropped segment, M was already used */ crop_data->crop_mode |= CROP_MIRROR; - switch (tolower(optarg[0])) + switch (tolower((int) optarg[0])) { case 'h': crop_data->mirror = MIRROR_HORIZ; break; @@ -1792,7 +1890,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 break; default: TIFFError ("Flip mode must be horiz, vert, or both", "%s", optarg); TIFFError ("For valid options type", "tiffcrop -h"); - exit (-1); + exit (EXIT_FAILURE); } break; case 'H': /* set horizontal resolution to new value */ @@ -1825,7 +1923,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 TIFFError("Missing or unknown option for inverting PHOTOMETRIC_INTERPRETATION", "%s", optarg); TIFFError ("For valid options type", "tiffcrop -h"); - exit (-1); + exit (EXIT_FAILURE); break; case 'J': /* horizontal margin for sectioned ouput pages */ page->hmargin = atof(optarg); @@ -1888,7 +1986,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 *image_count = i; break; case 'O': /* page orientation */ - switch (tolower(optarg[0])) + switch (tolower((int) optarg[0])) { case 'a': page->orient = ORIENTATION_AUTO; break; @@ -1898,7 +1996,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 break; default: TIFFError ("Orientation must be portrait, landscape, or auto.", "%s", optarg); TIFFError ("For valid options type", "tiffcrop -h"); - exit (-1); + exit (EXIT_FAILURE); } break; case 'P': /* page size selection */ @@ -1917,7 +2015,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 TIFFError ("", "%-15.15s %5.2f %5.2f", PaperTable[i].name, PaperTable[i].width, PaperTable[i].length); - exit (-1); + exit (EXIT_FAILURE); } TIFFError ("Invalid paper size", "%s", optarg); @@ -1927,7 +2025,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 TIFFError ("", "%-15.15s %5.2f %5.2f", PaperTable[i].name, PaperTable[i].width, PaperTable[i].length); - exit (-1); + exit (EXIT_FAILURE); } else { @@ -1946,7 +2044,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 break; default: TIFFError ("Rotation must be 90, 180, or 270 degrees clockwise", "%s", optarg); TIFFError ("For valid options type", "tiffcrop -h"); - exit (-1); + exit (EXIT_FAILURE); } break; case 'S': /* subdivide into Cols:Rows sections, eg 3:2 would be 3 across and 2 down */ @@ -1965,7 +2063,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 if ((page->cols * page->rows) > MAX_SECTIONS) { TIFFError ("Limit for subdivisions, ie rows x columns, exceeded", "%d", MAX_SECTIONS); - exit (-1); + exit (EXIT_FAILURE); } page->mode |= PAGE_MODE_ROWSCOLS; break; @@ -1989,7 +2087,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 { TIFFError ("Illegal unit of measure","%s", optarg); TIFFError ("For valid options type", "tiffcrop -h"); - exit (-1); + exit (EXIT_FAILURE); } break; case 'V': /* set vertical resolution to new value */ @@ -2012,6 +2110,10 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 { crop_data->zones++; opt_offset = strchr(opt_ptr, ':'); + if (!opt_offset) { + TIFFError("Wrong parameter syntax for -Z", "tiffcrop -h"); + exit(EXIT_FAILURE); + } *opt_offset = '\0'; crop_data->zonelist[i].position = atoi(opt_ptr); crop_data->zonelist[i].total = atoi(opt_offset + 1); @@ -2020,11 +2122,11 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 if ((opt_ptr != NULL) && (i >= MAX_REGIONS)) { TIFFError("Zone list exceeds region limit", "%d", MAX_REGIONS); - exit (-1); + exit (EXIT_FAILURE); } break; case '?': TIFFError ("For valid options type", "tiffcrop -h"); - exit (-1); + exit (EXIT_FAILURE); /*NOTREACHED*/ } } @@ -2034,28 +2136,30 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 * autoindex is set to non-zero. Update page and file counters * so TIFFTAG PAGENUM will be correct in image. */ -static int +static int update_output_file (TIFF **tiffout, char *mode, int autoindex, char *outname, unsigned int *page) { static int findex = 0; /* file sequence indicator */ + size_t basename_len; char *sep; - char filenum[16]; char export_ext[16]; char exportname[PATH_MAX]; if (autoindex && (*tiffout != NULL)) - { + { /* Close any export file that was previously opened */ TIFFClose (*tiffout); *tiffout = NULL; } - strcpy (export_ext, ".tiff"); - memset (exportname, '\0', PATH_MAX); + memcpy (export_ext, ".tiff", 6); + memset (exportname, '\0', sizeof(exportname)); - /* Leave room for page number portion of the new filename */ - strncpy (exportname, outname, PATH_MAX - 16); + /* Leave room for page number portion of the new filename : + * hyphen + 6 digits + dot + 4 extension characters + null terminator */ + #define FILENUM_MAX_LENGTH (1+6+1+4+1) + strncpy (exportname, outname, sizeof(exportname) - FILENUM_MAX_LENGTH); if (*tiffout == NULL) /* This is a new export file */ { if (autoindex) @@ -2067,21 +2171,21 @@ update_output_file (TIFF **tiffout, char *mode, int autoindex, *sep = '\0'; } else - strncpy (export_ext, ".tiff", 5); + memcpy (export_ext, ".tiff", 5); export_ext[5] = '\0'; + basename_len = strlen(exportname); /* MAX_EXPORT_PAGES limited to 6 digits to prevent string overflow of pathname */ if (findex > MAX_EXPORT_PAGES) - { - TIFFError("update_output_file", "Maximum of %d pages per file exceeded", MAX_EXPORT_PAGES); + { + TIFFError("update_output_file", "Maximum of %d pages per file exceeded", MAX_EXPORT_PAGES); return 1; } - sprintf (filenum, "-%03d%s", findex, export_ext); - filenum[14] = '\0'; - strncat (exportname, filenum, 15); + /* We previously assured that there will be space left */ + snprintf(exportname + basename_len, sizeof(exportname) - basename_len, "-%03d%.5s", findex, export_ext); } - exportname[PATH_MAX - 1] = '\0'; + exportname[sizeof(exportname) - 1] = '\0'; *tiffout = TIFFOpen(exportname, mode); if (*tiffout == NULL) @@ -2089,11 +2193,11 @@ update_output_file (TIFF **tiffout, char *mode, int autoindex, TIFFError("update_output_file", "Unable to open output file %s", exportname); return 1; } - *page = 0; + *page = 0; return 0; } - else + else (*page)++; return 0; @@ -2103,7 +2207,10 @@ update_output_file (TIFF **tiffout, char *mode, int autoindex, int main(int argc, char* argv[]) { + +#if !HAVE_DECL_OPTARG extern int optind; +#endif uint16 defconfig = (uint16) -1; uint16 deffillorder = 0; uint32 deftilewidth = (uint32) 0; @@ -2135,8 +2242,9 @@ main(int argc, char* argv[]) unsigned int total_pages = 0; unsigned int total_images = 0; unsigned int end_of_input = FALSE; - int seg, length; - char temp_filename[PATH_MAX + 1]; + int seg; + size_t length; + char temp_filename[PATH_MAX + 16]; /* Extra space keeps the compiler from complaining */ little_endian = *((unsigned char *)&little_endian) & '1'; @@ -2150,13 +2258,13 @@ main(int argc, char* argv[]) &crop, &page, &dump, imagelist, &image_count); if (argc - optind < 2) - usage(); + usage(EXIT_FAILURE); if ((argc - optind) == 2) pageNum = -1; else total_images = 0; - /* read multiple input files and write to output file(s) */ + /* Read multiple input files and write to output file(s) */ while (optind < argc - 1) { in = TIFFOpen (argv[optind], "r"); @@ -2164,7 +2272,14 @@ main(int argc, char* argv[]) return (-3); /* If only one input file is specified, we can use directory count */ - total_images = TIFFNumberOfDirectories(in); + total_images = TIFFNumberOfDirectories(in); + if (total_images > TIFF_DIR_MAX) + { + TIFFError (TIFFFileName(in), "File contains too many directories"); + if (out != NULL) + (void) TIFFClose(out); + return (1); + } if (image_count == 0) { dirnum = 0; @@ -2228,15 +2343,15 @@ main(int argc, char* argv[]) if (dump.infile != NULL) fclose (dump.infile); - /* dump.infilename is guaranteed to be NUL termimated and have 20 bytes - fewer than PATH_MAX */ - memset (temp_filename, '\0', PATH_MAX + 1); - sprintf (temp_filename, "%s-read-%03d.%s", dump.infilename, dump_images, + /* dump.infilename is guaranteed to be NUL terminated and have 20 bytes + fewer than PATH_MAX */ + snprintf(temp_filename, sizeof(temp_filename), "%s-read-%03d.%s", + dump.infilename, dump_images, (dump.format == DUMP_TEXT) ? "txt" : "raw"); if ((dump.infile = fopen(temp_filename, dump.mode)) == NULL) { TIFFError ("Unable to open dump file for writing", "%s", temp_filename); - exit (-1); + exit (EXIT_FAILURE); } dump_info(dump.infile, dump.format, "Reading image","%d from %s", dump_images, TIFFFileName(in)); @@ -2247,15 +2362,15 @@ main(int argc, char* argv[]) if (dump.outfile != NULL) fclose (dump.outfile); - /* dump.outfilename is guaranteed to be NUL termimated and have 20 bytes + /* dump.outfilename is guaranteed to be NUL terminated and have 20 bytes fewer than PATH_MAX */ - memset (temp_filename, '\0', PATH_MAX + 1); - sprintf (temp_filename, "%s-write-%03d.%s", dump.outfilename, dump_images, + snprintf(temp_filename, sizeof(temp_filename), "%s-write-%03d.%s", + dump.outfilename, dump_images, (dump.format == DUMP_TEXT) ? "txt" : "raw"); if ((dump.outfile = fopen(temp_filename, dump.mode)) == NULL) { TIFFError ("Unable to open dump file for writing", "%s", temp_filename); - exit (-1); + exit (EXIT_FAILURE); } dump_info(dump.outfile, dump.format, "Writing image","%d from %s", dump_images, TIFFFileName(in)); @@ -2268,7 +2383,7 @@ main(int argc, char* argv[]) if (loadImage(in, &image, &dump, &read_buff)) { TIFFError("main", "Unable to load source image"); - exit (-1); + exit (EXIT_FAILURE); } /* Correct the image orientation if it was not ORIENTATION_TOPLEFT. @@ -2282,7 +2397,7 @@ main(int argc, char* argv[]) if (getCropOffsets(&image, &crop, &dump)) { TIFFError("main", "Unable to define crop regions"); - exit (-1); + exit (EXIT_FAILURE); } if (crop.selections > 0) @@ -2290,7 +2405,7 @@ main(int argc, char* argv[]) if (processCropSelections(&image, &crop, &read_buff, seg_buffs)) { TIFFError("main", "Unable to process image selections"); - exit (-1); + exit (EXIT_FAILURE); } } else /* Single image segment without zones or regions */ @@ -2298,7 +2413,7 @@ main(int argc, char* argv[]) if (createCroppedImage(&image, &crop, &read_buff, &crop_buff)) { TIFFError("main", "Unable to create output image"); - exit (-1); + exit (EXIT_FAILURE); } } if (page.mode == PAGE_MODE_NONE) @@ -2312,12 +2427,12 @@ main(int argc, char* argv[]) { if (update_output_file (&out, mp, crop.exp_mode, argv[argc - 1], &next_page)) - exit (1); + exit (EXIT_FAILURE); if (writeCroppedImage(in, out, &image, &dump,crop.combined_width, crop.combined_length, crop_buff, next_page, total_pages)) { TIFFError("main", "Unable to write new image"); - exit (-1); + exit (EXIT_FAILURE); } } } @@ -2334,18 +2449,18 @@ main(int argc, char* argv[]) if (computeOutputPixelOffsets(&crop, &image, &page, sections, &dump)) { TIFFError("main", "Unable to compute output section data"); - exit (-1); + exit (EXIT_FAILURE); } /* If there are multiple files on the command line, the final one is assumed * to be the output filename into which the images are written. */ if (update_output_file (&out, mp, crop.exp_mode, argv[argc - 1], &next_page)) - exit (1); + exit (EXIT_FAILURE); if (writeImageSections(in, out, &image, &page, sections, &dump, sect_src, §_buff)) { TIFFError("main", "Unable to write image sections"); - exit (-1); + exit (EXIT_FAILURE); } } @@ -2595,6 +2710,7 @@ static void dump_info(FILE *dumpfile, int format, char *prefix, char *msg, ...) fprintf(dumpfile, "%s ", prefix); vfprintf(dumpfile, msg, ap); fprintf(dumpfile, "\n"); + va_end(ap); } } @@ -2640,7 +2756,7 @@ extractContigSamplesBytes (uint8 *in, uint8 *out, uint32 cols, { int i, bytes_per_sample, sindex; uint32 col, dst_rowsize, bit_offset; - uint32 src_byte, src_bit; + uint32 src_byte /*, src_bit */; uint8 *src = in; uint8 *dst = out; @@ -2682,12 +2798,12 @@ extractContigSamplesBytes (uint8 *in, uint8 *out, uint32 cols, if (sindex == 0) { src_byte = bit_offset / 8; - src_bit = bit_offset % 8; + /* src_bit = bit_offset % 8; */ } else { src_byte = (bit_offset + (sindex * bps)) / 8; - src_bit = (bit_offset + (sindex * bps)) % 8; + /* src_bit = (bit_offset + (sindex * bps)) % 8; */ } src = in + src_byte; for (i = 0; i < bytes_per_sample; i++) @@ -2919,9 +3035,25 @@ extractContigSamples24bits (uint8 *in, uint8 *out, uint32 cols, src = in + src_byte; matchbits = maskbits << (32 - src_bit - bps); if (little_endian) - buff1 = (src[0] << 24) | (src[1] << 16) | (src[2] << 8) | src[3]; + { + buff1 = (src[0] << 24); + if (matchbits & 0x00ff0000) + buff1 |= (src[1] << 16); + if (matchbits & 0x0000ff00) + buff1 |= (src[2] << 8); + if (matchbits & 0x000000ff) + buff1 |= src[3]; + } else - buff1 = (src[3] << 24) | (src[2] << 16) | (src[1] << 8) | src[0]; + { + buff1 = src[0]; + if (matchbits & 0x0000ff00) + buff1 |= (src[1] << 8); + if (matchbits & 0x00ff0000) + buff1 |= (src[2] << 16); + if (matchbits & 0xff000000) + buff1 |= (src[3] << 24); + } buff1 = (buff1 & matchbits) << (src_bit); if (ready_bits < 16) /* add another bps bits to the buffer */ @@ -2963,7 +3095,7 @@ extractContigSamples32bits (uint8 *in, uint8 *out, uint32 cols, tsample_t sample, uint16 spp, uint16 bps, tsample_t count, uint32 start, uint32 end) { - int ready_bits = 0, sindex = 0, shift_width = 0; + int ready_bits = 0, sindex = 0 /*, shift_width = 0 */; uint32 col, src_byte, src_bit, bit_offset; uint32 longbuff1 = 0, longbuff2 = 0; uint64 maskbits = 0, matchbits = 0; @@ -2992,7 +3124,7 @@ extractContigSamples32bits (uint8 *in, uint8 *out, uint32 cols, end = cols; } - shift_width = ((bps + 7) / 8) + 1; + /* shift_width = ((bps + 7) / 8) + 1; */ ready_bits = 0; maskbits = (uint64)-1 >> ( 64 - bps); for (col = start; col < end; col++) @@ -3337,7 +3469,7 @@ extractContigSamplesShifted32bits (uint8 *in, uint8 *out, uint32 cols, tsample_t count, uint32 start, uint32 end, int shift) { - int ready_bits = 0, sindex = 0, shift_width = 0; + int ready_bits = 0, sindex = 0 /*, shift_width = 0 */; uint32 col, src_byte, src_bit, bit_offset; uint32 longbuff1 = 0, longbuff2 = 0; uint64 maskbits = 0, matchbits = 0; @@ -3366,7 +3498,7 @@ extractContigSamplesShifted32bits (uint8 *in, uint8 *out, uint32 cols, end = cols; } - shift_width = ((bps + 7) / 8) + 1; + /* shift_width = ((bps + 7) / 8) + 1; */ ready_bits = shift; maskbits = (uint64)-1 >> ( 64 - bps); for (col = start; col < end; col++) @@ -3593,34 +3725,38 @@ extractContigSamplesToTileBuffer(uint8 *out, uint8 *in, uint32 rows, uint32 cols } /* end extractContigSamplesToTileBuffer */ static int readContigStripsIntoBuffer (TIFF* in, uint8* buf) - { - uint8* bufp = buf; - int32 bytes_read = 0; - uint16 strip, nstrips = TIFFNumberOfStrips(in); - uint32 stripsize = TIFFStripSize(in); - uint32 rows = 0; - uint32 rps = TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &rps); - tsize_t scanline_size = TIFFScanlineSize(in); +{ + uint8* bufp = buf; + int32 bytes_read = 0; + uint32 strip, nstrips = TIFFNumberOfStrips(in); + uint32 stripsize = TIFFStripSize(in); + uint32 rows = 0; + uint32 rps = TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &rps); + tsize_t scanline_size = TIFFScanlineSize(in); - for (strip = 0; strip < nstrips; strip++) - { - bytes_read = TIFFReadEncodedStrip (in, strip, bufp, -1); - rows = bytes_read / scanline_size; - if ((strip < (nstrips - 1)) && (bytes_read != (int32)stripsize)) - TIFFError("", "Strip %d: read %lu bytes, strip size %lu", - (int)strip + 1, (unsigned long) bytes_read, (unsigned long)stripsize); + if (scanline_size == 0) { + TIFFError("", "TIFF scanline size is zero!"); + return 0; + } - if (bytes_read < 0 && !ignore) - { - TIFFError("", "Error reading strip %lu after %lu rows", - (unsigned long) strip, (unsigned long)rows); - return 0; - } - bufp += bytes_read; - } + for (strip = 0; strip < nstrips; strip++) { + bytes_read = TIFFReadEncodedStrip (in, strip, bufp, -1); + rows = bytes_read / scanline_size; + if ((strip < (nstrips - 1)) && (bytes_read != (int32)stripsize)) + TIFFError("", "Strip %d: read %lu bytes, strip size %lu", + (int)strip + 1, (unsigned long) bytes_read, + (unsigned long)stripsize); - return 1; - } /* end readContigStripsIntoBuffer */ + if (bytes_read < 0 && !ignore) { + TIFFError("", "Error reading strip %lu after %lu rows", + (unsigned long) strip, (unsigned long)rows); + return 0; + } + bufp += stripsize; + } + + return 1; +} /* end readContigStripsIntoBuffer */ static int combineSeparateSamplesBytes (unsigned char *srcbuffs[], unsigned char *out, @@ -3686,7 +3822,7 @@ combineSeparateSamples8bits (uint8 *in[], uint8 *out, uint32 cols, FILE *dumpfile, int format, int level) { int ready_bits = 0; - int bytes_per_sample = 0; + /* int bytes_per_sample = 0; */ uint32 src_rowsize, dst_rowsize, src_offset; uint32 bit_offset; uint32 row, col, src_byte = 0, src_bit = 0; @@ -3703,7 +3839,7 @@ combineSeparateSamples8bits (uint8 *in[], uint8 *out, uint32 cols, return (1); } - bytes_per_sample = (bps + 7) / 8; + /* bytes_per_sample = (bps + 7) / 8; */ src_rowsize = ((bps * cols) + 7) / 8; dst_rowsize = ((bps * cols * spp) + 7) / 8; maskbits = (uint8)-1 >> ( 8 - bps); @@ -3723,7 +3859,7 @@ combineSeparateSamples8bits (uint8 *in[], uint8 *out, uint32 cols, matchbits = maskbits << (8 - src_bit - bps); /* load up next sample from each plane */ - for (s = 0; s < spp; s++) + for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) { src = in[s] + src_offset + src_byte; buff1 = ((*src) & matchbits) << (src_bit); @@ -3785,7 +3921,7 @@ combineSeparateSamples16bits (uint8 *in[], uint8 *out, uint32 cols, uint32 rows, uint16 spp, uint16 bps, FILE *dumpfile, int format, int level) { - int ready_bits = 0, bytes_per_sample = 0; + int ready_bits = 0 /*, bytes_per_sample = 0 */; uint32 src_rowsize, dst_rowsize; uint32 bit_offset, src_offset; uint32 row, col, src_byte = 0, src_bit = 0; @@ -3803,7 +3939,7 @@ combineSeparateSamples16bits (uint8 *in[], uint8 *out, uint32 cols, return (1); } - bytes_per_sample = (bps + 7) / 8; + /* bytes_per_sample = (bps + 7) / 8; */ src_rowsize = ((bps * cols) + 7) / 8; dst_rowsize = ((bps * cols * spp) + 7) / 8; maskbits = (uint16)-1 >> (16 - bps); @@ -3822,7 +3958,7 @@ combineSeparateSamples16bits (uint8 *in[], uint8 *out, uint32 cols, src_bit = bit_offset % 8; matchbits = maskbits << (16 - src_bit - bps); - for (s = 0; s < spp; s++) + for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) { src = in[s] + src_offset + src_byte; if (little_endian) @@ -3895,7 +4031,7 @@ combineSeparateSamples24bits (uint8 *in[], uint8 *out, uint32 cols, uint32 rows, uint16 spp, uint16 bps, FILE *dumpfile, int format, int level) { - int ready_bits = 0, bytes_per_sample = 0; + int ready_bits = 0 /*, bytes_per_sample = 0 */; uint32 src_rowsize, dst_rowsize; uint32 bit_offset, src_offset; uint32 row, col, src_byte = 0, src_bit = 0; @@ -3913,7 +4049,7 @@ combineSeparateSamples24bits (uint8 *in[], uint8 *out, uint32 cols, return (1); } - bytes_per_sample = (bps + 7) / 8; + /* bytes_per_sample = (bps + 7) / 8; */ src_rowsize = ((bps * cols) + 7) / 8; dst_rowsize = ((bps * cols * spp) + 7) / 8; maskbits = (uint32)-1 >> ( 32 - bps); @@ -3932,13 +4068,13 @@ combineSeparateSamples24bits (uint8 *in[], uint8 *out, uint32 cols, src_bit = bit_offset % 8; matchbits = maskbits << (32 - src_bit - bps); - for (s = 0; s < spp; s++) + for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) { src = in[s] + src_offset + src_byte; if (little_endian) - buff1 = (src[0] << 24) | (src[1] << 16) | (src[2] << 8) | src[3]; + buff1 = ((uint32)src[0] << 24) | ((uint32)src[1] << 16) | ((uint32)src[2] << 8) | (uint32)src[3]; else - buff1 = (src[3] << 24) | (src[2] << 16) | (src[1] << 8) | src[0]; + buff1 = ((uint32)src[3] << 24) | ((uint32)src[2] << 16) | ((uint32)src[1] << 8) | (uint32)src[0]; buff1 = (buff1 & matchbits) << (src_bit); /* If we have a full buffer's worth, write it out */ @@ -4019,7 +4155,7 @@ combineSeparateSamples32bits (uint8 *in[], uint8 *out, uint32 cols, uint32 rows, uint16 spp, uint16 bps, FILE *dumpfile, int format, int level) { - int ready_bits = 0, bytes_per_sample = 0, shift_width = 0; + int ready_bits = 0 /*, bytes_per_sample = 0, shift_width = 0 */; uint32 src_rowsize, dst_rowsize, bit_offset, src_offset; uint32 src_byte = 0, src_bit = 0; uint32 row, col; @@ -4038,11 +4174,11 @@ combineSeparateSamples32bits (uint8 *in[], uint8 *out, uint32 cols, return (1); } - bytes_per_sample = (bps + 7) / 8; + /* bytes_per_sample = (bps + 7) / 8; */ src_rowsize = ((bps * cols) + 7) / 8; dst_rowsize = ((bps * cols * spp) + 7) / 8; maskbits = (uint64)-1 >> ( 64 - bps); - shift_width = ((bps + 7) / 8) + 1; + /* shift_width = ((bps + 7) / 8) + 1; */ for (row = 0; row < rows; row++) { @@ -4058,7 +4194,7 @@ combineSeparateSamples32bits (uint8 *in[], uint8 *out, uint32 cols, src_bit = bit_offset % 8; matchbits = maskbits << (64 - src_bit - bps); - for (s = 0; s < spp; s++) + for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) { src = in[s] + src_offset + src_byte; if (little_endian) @@ -4248,7 +4384,7 @@ combineSeparateTileSamples8bits (uint8 *in[], uint8 *out, uint32 cols, matchbits = maskbits << (8 - src_bit - bps); /* load up next sample from each plane */ - for (s = 0; s < spp; s++) + for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) { src = in[s] + src_offset + src_byte; buff1 = ((*src) & matchbits) << (src_bit); @@ -4347,7 +4483,7 @@ combineSeparateTileSamples16bits (uint8 *in[], uint8 *out, uint32 cols, src_bit = bit_offset % 8; matchbits = maskbits << (16 - src_bit - bps); - for (s = 0; s < spp; s++) + for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) { src = in[s] + src_offset + src_byte; if (little_endian) @@ -4456,7 +4592,7 @@ combineSeparateTileSamples24bits (uint8 *in[], uint8 *out, uint32 cols, src_bit = bit_offset % 8; matchbits = maskbits << (32 - src_bit - bps); - for (s = 0; s < spp; s++) + for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) { src = in[s] + src_offset + src_byte; if (little_endian) @@ -4544,7 +4680,7 @@ combineSeparateTileSamples32bits (uint8 *in[], uint8 *out, uint32 cols, uint32 tw, uint16 spp, uint16 bps, FILE *dumpfile, int format, int level) { - int ready_bits = 0, shift_width = 0; + int ready_bits = 0 /*, shift_width = 0 */; uint32 src_rowsize, dst_rowsize, bit_offset, src_offset; uint32 src_byte = 0, src_bit = 0; uint32 row, col; @@ -4566,7 +4702,7 @@ combineSeparateTileSamples32bits (uint8 *in[], uint8 *out, uint32 cols, src_rowsize = ((bps * tw) + 7) / 8; dst_rowsize = ((imagewidth * bps * spp) + 7) / 8; maskbits = (uint64)-1 >> ( 64 - bps); - shift_width = ((bps + 7) / 8) + 1; + /* shift_width = ((bps + 7) / 8) + 1; */ for (row = 0; row < rows; row++) { @@ -4582,7 +4718,7 @@ combineSeparateTileSamples32bits (uint8 *in[], uint8 *out, uint32 cols, src_bit = bit_offset % 8; matchbits = maskbits << (64 - src_bit - bps); - for (s = 0; s < spp; s++) + for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) { src = in[s] + src_offset + src_byte; if (little_endian) @@ -4675,9 +4811,12 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8 *obuf, uint32 length, uint32 width, uint16 spp, struct dump_opts *dump) { - int i, j, bytes_per_sample, bytes_per_pixel, shift_width, result = 1; + int i, bytes_per_sample, bytes_per_pixel, shift_width, result = 1; + uint32 j; int32 bytes_read = 0; - uint16 bps, nstrips, planar, strips_per_sample; + uint16 bps = 0, planar; + uint32 nstrips; + uint32 strips_per_sample; uint32 src_rowsize, dst_rowsize, rows_processed, rps; uint32 rows_this_strip = 0; tsample_t s; @@ -4695,7 +4834,7 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8 *obuf, uint32 length, } memset (srcbuffs, '\0', sizeof(srcbuffs)); - TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bps); + TIFFGetFieldDefaulted(in, TIFFTAG_BITSPERSAMPLE, &bps); TIFFGetFieldDefaulted(in, TIFFTAG_PLANARCONFIG, &planar); TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &rps); if (rps > length) @@ -4730,10 +4869,17 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8 *obuf, uint32 length, nstrips = TIFFNumberOfStrips(in); strips_per_sample = nstrips /spp; + /* Add 3 padding bytes for combineSeparateSamples32bits */ + if( (size_t) stripsize > 0xFFFFFFFFU - 3U ) + { + TIFFError("readSeparateStripsIntoBuffer", "Integer overflow when calculating buffer size."); + exit(EXIT_FAILURE); + } + for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) { srcbuffs[s] = NULL; - buff = _TIFFmalloc(stripsize); + buff = limitMalloc(stripsize + 3); if (!buff) { TIFFError ("readSeparateStripsIntoBuffer", @@ -4742,6 +4888,9 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8 *obuf, uint32 length, _TIFFfree (srcbuffs[i]); return 0; } + buff[stripsize] = 0; + buff[stripsize+1] = 0; + buff[stripsize+2] = 0; srcbuffs[s] = buff; } @@ -5499,7 +5648,7 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, uint32 orows, ocols; /* rows and cols for output */ uint32 hmargin, vmargin; /* Horizontal and vertical margins */ uint32 x1, x2, y1, y2, line_bytes; - unsigned int orientation; + /* unsigned int orientation; */ uint32 i, j, k; scale = 1.0; @@ -5636,7 +5785,7 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, case ORIENTATION_PORTRAIT: ocols = TIFFhowmany(iwidth, owidth); orows = TIFFhowmany(ilength, olength); - orientation = ORIENTATION_PORTRAIT; + /* orientation = ORIENTATION_PORTRAIT; */ break; case ORIENTATION_LANDSCAPE: @@ -5645,7 +5794,7 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, x1 = olength; olength = owidth; owidth = x1; - orientation = ORIENTATION_LANDSCAPE; + /* orientation = ORIENTATION_LANDSCAPE; */ break; case ORIENTATION_AUTO: @@ -5659,7 +5808,7 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, { /* Portrait */ ocols = x1; orows = x2; - orientation = ORIENTATION_PORTRAIT; + /* orientation = ORIENTATION_PORTRAIT; */ } else { /* Landscape */ @@ -5668,7 +5817,7 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, x1 = olength; olength = owidth; owidth = x1; - orientation = ORIENTATION_LANDSCAPE; + /* orientation = ORIENTATION_LANDSCAPE; */ } } @@ -5722,7 +5871,8 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c { uint32 i; float xres = 0.0, yres = 0.0; - uint16 nstrips = 0, ntiles = 0, planar = 0; + uint32 nstrips = 0, ntiles = 0; + uint16 planar = 0; uint16 bps = 0, spp = 0, res_unit = 0; uint16 orientation = 0; uint16 input_compression = 0, input_photometric = 0; @@ -5930,12 +6080,27 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c TIFFGetField(in, TIFFTAG_TILELENGTH, &tl); tile_rowsize = TIFFTileRowSize(in); + if (ntiles == 0 || tlsize == 0 || tile_rowsize == 0) + { + TIFFError("loadImage", "File appears to be tiled, but the number of tiles, tile size, or tile rowsize is zero."); + exit(EXIT_FAILURE); + } buffsize = tlsize * ntiles; + if (tlsize != (buffsize / ntiles)) + { + TIFFError("loadImage", "Integer overflow when calculating buffer size"); + exit(EXIT_FAILURE); + } - if (buffsize < (uint32)(ntiles * tl * tile_rowsize)) { buffsize = ntiles * tl * tile_rowsize; + if (ntiles != (buffsize / tl / tile_rowsize)) + { + TIFFError("loadImage", "Integer overflow when calculating buffer size"); + exit(EXIT_FAILURE); + } + #ifdef DEBUG2 TIFFError("loadImage", "Tilesize %u is too small, using ntiles * tilelength * tilerowsize %lu", @@ -5950,12 +6115,29 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c } else { + uint32 buffsize_check; readunit = STRIP; TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); stsize = TIFFStripSize(in); nstrips = TIFFNumberOfStrips(in); + if (nstrips == 0 || stsize == 0) + { + TIFFError("loadImage", "File appears to be striped, but the number of stipes or stripe size is zero."); + exit(EXIT_FAILURE); + } + buffsize = stsize * nstrips; - + if (stsize != (buffsize / nstrips)) + { + TIFFError("loadImage", "Integer overflow when calculating buffer size"); + exit(EXIT_FAILURE); + } + buffsize_check = ((length * width * spp * bps) + 7); + if (length != ((buffsize_check - 7) / width / spp / bps)) + { + TIFFError("loadImage", "Integer overflow detected."); + exit(EXIT_FAILURE); + } if (buffsize < (uint32) (((length * width * spp * bps) + 7) / 8)) { buffsize = ((length * width * spp * bps) + 7) / 8; @@ -5995,29 +6177,46 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c } read_buff = *read_ptr; + /* +3 : add a few guard bytes since reverseSamples16bits() can read a bit */ + /* outside buffer */ if (!read_buff) - read_buff = (unsigned char *)_TIFFmalloc(buffsize); + { + if( buffsize > 0xFFFFFFFFU - 3 ) + { + TIFFError("loadImage", "Unable to allocate/reallocate read buffer"); + return (-1); + } + read_buff = (unsigned char *)limitMalloc(buffsize+3); + } else { if (prev_readsize < buffsize) + { + if( buffsize > 0xFFFFFFFFU - 3 ) { - new_buff = _TIFFrealloc(read_buff, buffsize); + TIFFError("loadImage", "Unable to allocate/reallocate read buffer"); + return (-1); + } + new_buff = _TIFFrealloc(read_buff, buffsize+3); if (!new_buff) { free (read_buff); - read_buff = (unsigned char *)_TIFFmalloc(buffsize); + read_buff = (unsigned char *)limitMalloc(buffsize+3); } else read_buff = new_buff; } } - if (!read_buff) { TIFFError("loadImage", "Unable to allocate/reallocate read buffer"); return (-1); } + read_buff[buffsize] = 0; + read_buff[buffsize+1] = 0; + read_buff[buffsize+2] = 0; + prev_readsize = buffsize; *read_ptr = read_buff; @@ -6143,14 +6342,14 @@ extractCompositeRegions(struct image_data *image, struct crop_mask *crop, uint32 i, trailing_bits, prev_trailing_bits; uint32 row, first_row, last_row, first_col, last_col; uint32 src_rowsize, dst_rowsize, src_offset, dst_offset; - uint32 crop_width, crop_length, img_width, img_length; + uint32 crop_width, crop_length, img_width /*, img_length */; uint32 prev_length, prev_width, composite_width; uint16 bps, spp; uint8 *src, *dst; tsample_t count, sample = 0; /* Update to extract one or more samples */ img_width = image->width; - img_length = image->length; + /* img_length = image->length; */ bps = image->bps; spp = image->spp; count = spp; @@ -6393,13 +6592,13 @@ extractSeparateRegion(struct image_data *image, struct crop_mask *crop, uint32 src_rowsize, dst_rowsize; uint32 row, first_row, last_row, first_col, last_col; uint32 src_offset, dst_offset; - uint32 crop_width, crop_length, img_width, img_length; + uint32 crop_width, crop_length, img_width /*, img_length */; uint16 bps, spp; uint8 *src, *dst; tsample_t count, sample = 0; /* Update to extract more or more samples */ img_width = image->width; - img_length = image->length; + /* img_length = image->length; */ bps = image->bps; spp = image->spp; count = spp; @@ -6511,14 +6710,22 @@ extractImageSection(struct image_data *image, struct pageseg *section, unsigned char *src_buff, unsigned char *sect_buff) { unsigned char bytebuff1, bytebuff2; - unsigned char *src, *dst; +#ifdef DEVELMODE + /* unsigned char *src, *dst; */ +#endif - uint32 img_width, img_length, img_rowsize; + uint32 img_width, img_rowsize; +#ifdef DEVELMODE + uint32 img_length; +#endif uint32 j, shift1, shift2, trailing_bits; uint32 row, first_row, last_row, first_col, last_col; uint32 src_offset, dst_offset, row_offset, col_offset; uint32 offset1, offset2, full_bytes; - uint32 sect_width, sect_length; + uint32 sect_width; +#ifdef DEVELMODE + uint32 sect_length; +#endif uint16 bps, spp; #ifdef DEVELMODE @@ -6528,12 +6735,16 @@ extractImageSection(struct image_data *image, struct pageseg *section, #endif img_width = image->width; +#ifdef DEVELMODE img_length = image->length; +#endif bps = image->bps; spp = image->spp; - src = src_buff; - dst = sect_buff; +#ifdef DEVELMODE + /* src = src_buff; */ + /* dst = sect_buff; */ +#endif src_offset = 0; dst_offset = 0; @@ -6555,7 +6766,9 @@ extractImageSection(struct image_data *image, struct pageseg *section, last_col = section->x2; sect_width = last_col - first_col + 1; +#ifdef DEVELMODE sect_length = last_row - first_row + 1; +#endif img_rowsize = ((img_width * bps + 7) / 8) * spp; full_bytes = (sect_width * spp * bps) / 8; /* number of COMPLETE bytes per row in section */ trailing_bits = (sect_width * bps) % 8; @@ -6615,12 +6828,12 @@ extractImageSection(struct image_data *image, struct pageseg *section, #endif bytebuff1 = bytebuff2 = 0; - if (shift1 == 0) /* the region is byte and sample alligned */ + if (shift1 == 0) /* the region is byte and sample aligned */ { _TIFFmemcpy (sect_buff + dst_offset, src_buff + offset1, full_bytes); #ifdef DEVELMODE - TIFFError ("", " Alligned data src offset1: %8d, Dst offset: %8d\n", offset1, dst_offset); + TIFFError ("", " Aligned data src offset1: %8d, Dst offset: %8d\n", offset1, dst_offset); sprintf(&bitarray[18], "\n"); sprintf(&bitarray[19], "\t"); for (j = 20, k = 7; j < 28; j++, k--) @@ -6862,21 +7075,21 @@ writeImageSections(TIFF *in, TIFF *out, struct image_data *image, if (createImageSection(sectsize, sect_buff_ptr)) { TIFFError("writeImageSections", "Unable to allocate section buffer"); - exit (-1); + exit(EXIT_FAILURE); } sect_buff = *sect_buff_ptr; if (extractImageSection (image, §ions[i], src_buff, sect_buff)) { TIFFError("writeImageSections", "Unable to extract image sections"); - exit (-1); + exit(EXIT_FAILURE); } /* call the write routine here instead of outside the loop */ if (writeSingleSection(in, out, image, dump, width, length, hres, vres, sect_buff)) { TIFFError("writeImageSections", "Unable to write image section"); - exit (-1); + exit(EXIT_FAILURE); } } @@ -6934,7 +7147,7 @@ writeSingleSection(TIFF *in, TIFF *out, struct image_data *image, TIFFSetField(out, TIFFTAG_COMPRESSION, COMPRESSION_JPEG); } else /* Use the compression from the input file */ - TIFFSetField(out, TIFFTAG_COMPRESSION, compression); + CopyField(TIFFTAG_COMPRESSION, compression); } if (compression == COMPRESSION_JPEG) @@ -7081,14 +7294,15 @@ writeSingleSection(TIFF *in, TIFF *out, struct image_data *image, TIFFSetField(out, TIFFTAG_GROUP3OPTIONS, g3opts); else CopyField(TIFFTAG_GROUP3OPTIONS, g3opts); - } else + } else { CopyTag(TIFFTAG_GROUP4OPTIONS, 1, TIFF_LONG); - CopyTag(TIFFTAG_BADFAXLINES, 1, TIFF_LONG); - CopyTag(TIFFTAG_CLEANFAXDATA, 1, TIFF_LONG); - CopyTag(TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG); - CopyTag(TIFFTAG_FAXRECVPARAMS, 1, TIFF_LONG); - CopyTag(TIFFTAG_FAXRECVTIME, 1, TIFF_LONG); - CopyTag(TIFFTAG_FAXSUBADDRESS, 1, TIFF_ASCII); + } + CopyTag(TIFFTAG_BADFAXLINES, 1, TIFF_LONG); + CopyTag(TIFFTAG_CLEANFAXDATA, 1, TIFF_LONG); + CopyTag(TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG); + CopyTag(TIFFTAG_FAXRECVPARAMS, 1, TIFF_LONG); + CopyTag(TIFFTAG_FAXRECVTIME, 1, TIFF_LONG); + CopyTag(TIFFTAG_FAXSUBADDRESS, 1, TIFF_ASCII); break; } { uint32 len32; @@ -7170,7 +7384,7 @@ createImageSection(uint32 sectsize, unsigned char **sect_buff_ptr) if (!sect_buff) { - sect_buff = (unsigned char *)_TIFFmalloc(sectsize); + sect_buff = (unsigned char *)limitMalloc(sectsize); *sect_buff_ptr = sect_buff; _TIFFmemset(sect_buff, 0, sectsize); } @@ -7181,8 +7395,8 @@ createImageSection(uint32 sectsize, unsigned char **sect_buff_ptr) new_buff = _TIFFrealloc(sect_buff, sectsize); if (!new_buff) { - free (sect_buff); - sect_buff = (unsigned char *)_TIFFmalloc(sectsize); + _TIFFfree (sect_buff); + sect_buff = (unsigned char *)limitMalloc(sectsize); } else sect_buff = new_buff; @@ -7223,7 +7437,7 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, cropsize = crop->bufftotal; crop_buff = seg_buffs[0].buffer; if (!crop_buff) - crop_buff = (unsigned char *)_TIFFmalloc(cropsize); + crop_buff = (unsigned char *)limitMalloc(cropsize); else { prev_cropsize = seg_buffs[0].size; @@ -7233,7 +7447,7 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, if (! next_buff) { _TIFFfree (crop_buff); - crop_buff = (unsigned char *)_TIFFmalloc(cropsize); + crop_buff = (unsigned char *)limitMalloc(cropsize); } else crop_buff = next_buff; @@ -7325,7 +7539,7 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, cropsize = crop->bufftotal; crop_buff = seg_buffs[i].buffer; if (!crop_buff) - crop_buff = (unsigned char *)_TIFFmalloc(cropsize); + crop_buff = (unsigned char *)limitMalloc(cropsize); else { prev_cropsize = seg_buffs[0].size; @@ -7335,7 +7549,7 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, if (! next_buff) { _TIFFfree (crop_buff); - crop_buff = (unsigned char *)_TIFFmalloc(cropsize); + crop_buff = (unsigned char *)limitMalloc(cropsize); } else crop_buff = next_buff; @@ -7461,7 +7675,7 @@ createCroppedImage(struct image_data *image, struct crop_mask *crop, crop_buff = *crop_buff_ptr; if (!crop_buff) { - crop_buff = (unsigned char *)_TIFFmalloc(cropsize); + crop_buff = (unsigned char *)limitMalloc(cropsize); *crop_buff_ptr = crop_buff; _TIFFmemset(crop_buff, 0, cropsize); prev_cropsize = cropsize; @@ -7474,7 +7688,7 @@ createCroppedImage(struct image_data *image, struct crop_mask *crop, if (!new_buff) { free (crop_buff); - crop_buff = (unsigned char *)_TIFFmalloc(cropsize); + crop_buff = (unsigned char *)limitMalloc(cropsize); } else crop_buff = new_buff; @@ -7562,7 +7776,7 @@ createCroppedImage(struct image_data *image, struct crop_mask *crop, * original code assumes we are always copying all samples. * Use of global variables for config, compression and others * should be replaced by addition to the crop_mask struct (which - * will be renamed to proc_opts indicating that is controlls + * will be renamed to proc_opts indicating that is controls * user supplied processing options, not just cropping) and * then passed in as an argument. */ @@ -7757,15 +7971,16 @@ writeCroppedImage(TIFF *in, TIFF *out, struct image_data *image, TIFFSetField(out, TIFFTAG_GROUP3OPTIONS, g3opts); else CopyField(TIFFTAG_GROUP3OPTIONS, g3opts); - } else + } else { CopyTag(TIFFTAG_GROUP4OPTIONS, 1, TIFF_LONG); - CopyTag(TIFFTAG_BADFAXLINES, 1, TIFF_LONG); - CopyTag(TIFFTAG_CLEANFAXDATA, 1, TIFF_LONG); - CopyTag(TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG); - CopyTag(TIFFTAG_FAXRECVPARAMS, 1, TIFF_LONG); - CopyTag(TIFFTAG_FAXRECVTIME, 1, TIFF_LONG); - CopyTag(TIFFTAG_FAXSUBADDRESS, 1, TIFF_ASCII); - break; + } + CopyTag(TIFFTAG_BADFAXLINES, 1, TIFF_LONG); + CopyTag(TIFFTAG_CLEANFAXDATA, 1, TIFF_LONG); + CopyTag(TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG); + CopyTag(TIFFTAG_FAXRECVPARAMS, 1, TIFF_LONG); + CopyTag(TIFFTAG_FAXRECVTIME, 1, TIFF_LONG); + CopyTag(TIFFTAG_FAXSUBADDRESS, 1, TIFF_ASCII); + break; case COMPRESSION_NONE: break; default: break; @@ -7835,7 +8050,6 @@ writeCroppedImage(TIFF *in, TIFF *out, struct image_data *image, if (!TIFFWriteDirectory(out)) { TIFFError("","Failed to write IFD for page number %d", pagenum); - TIFFClose(out); return (-1); } @@ -8096,8 +8310,8 @@ static int rotateContigSamples32bits(uint16 rotation, uint16 spp, uint16 bps, uint32 width, uint32 length, uint32 col, uint8 *src, uint8 *dst) { - int ready_bits = 0, shift_width = 0; - int bytes_per_sample, bytes_per_pixel; + int ready_bits = 0 /*, shift_width = 0 */; + /* int bytes_per_sample, bytes_per_pixel; */ uint32 row, rowsize, bit_offset; uint32 src_byte, src_bit; uint32 longbuff1 = 0, longbuff2 = 0; @@ -8114,12 +8328,12 @@ rotateContigSamples32bits(uint16 rotation, uint16 spp, uint16 bps, uint32 width, return (1); } - bytes_per_sample = (bps + 7) / 8; - bytes_per_pixel = ((bps * spp) + 7) / 8; - if (bytes_per_pixel < (bytes_per_sample + 1)) - shift_width = bytes_per_pixel; - else - shift_width = bytes_per_sample + 1; + /* bytes_per_sample = (bps + 7) / 8; */ + /* bytes_per_pixel = ((bps * spp) + 7) / 8; */ + /* if (bytes_per_pixel < (bytes_per_sample + 1)) */ + /* shift_width = bytes_per_pixel; */ + /* else */ + /* shift_width = bytes_per_sample + 1; */ rowsize = ((bps * spp * width) + 7) / 8; ready_bits = 0; @@ -8247,7 +8461,7 @@ rotateImage(uint16 rotation, struct image_data *image, uint32 *img_width, return (-1); } - if (!(rbuff = (unsigned char *)_TIFFmalloc(buffsize))) + if (!(rbuff = (unsigned char *)limitMalloc(buffsize))) { TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize); return (-1); @@ -8257,7 +8471,7 @@ rotateImage(uint16 rotation, struct image_data *image, uint32 *img_width, ibuff = *ibuff_ptr; switch (rotation) { - case 180: if ((bps % 8) == 0) /* byte alligned data */ + case 180: if ((bps % 8) == 0) /* byte aligned data */ { src = ibuff; pix_offset = (spp * bps) / 8; @@ -8711,8 +8925,8 @@ static int reverseSamples32bits (uint16 spp, uint16 bps, uint32 width, uint8 *ibuff, uint8 *obuff) { - int ready_bits = 0, shift_width = 0; - int bytes_per_sample, bytes_per_pixel; + int ready_bits = 0 /*, shift_width = 0 */; + /* int bytes_per_sample, bytes_per_pixel; */ uint32 bit_offset; uint32 src_byte = 0, high_bit = 0; uint32 col; @@ -8734,12 +8948,12 @@ reverseSamples32bits (uint16 spp, uint16 bps, uint32 width, mask_bits = (uint64)-1 >> (64 - bps); dst = obuff; - bytes_per_sample = (bps + 7) / 8; - bytes_per_pixel = ((bps * spp) + 7) / 8; - if (bytes_per_pixel < (bytes_per_sample + 1)) - shift_width = bytes_per_pixel; - else - shift_width = bytes_per_sample + 1; + /* bytes_per_sample = (bps + 7) / 8; */ + /* bytes_per_pixel = ((bps * spp) + 7) / 8; */ + /* if (bytes_per_pixel < (bytes_per_sample + 1)) */ + /* shift_width = bytes_per_pixel; */ + /* else */ + /* shift_width = bytes_per_sample + 1; */ for (col = width; col > 0; col--) { @@ -8823,6 +9037,11 @@ reverseSamplesBytes (uint16 spp, uint16 bps, uint32 width, } bytes_per_pixel = ((bps * spp) + 7) / 8; + if( bytes_per_pixel > sizeof(swapbuff) ) + { + TIFFError("reverseSamplesBytes","bytes_per_pixel too large"); + return (1); + } switch (bps / 8) { case 8: /* Use memcpy for multiple bytes per sample data */ @@ -8872,7 +9091,7 @@ mirrorImage(uint16 spp, uint16 bps, uint16 mirror, uint32 width, uint32 length, { case MIRROR_BOTH: case MIRROR_VERT: - line_buff = (unsigned char *)_TIFFmalloc(rowsize); + line_buff = (unsigned char *)limitMalloc(rowsize); if (line_buff == NULL) { TIFFError ("mirrorImage", "Unable to allocate mirror line buffer of %1u bytes", rowsize); @@ -8892,8 +9111,9 @@ mirrorImage(uint16 spp, uint16 bps, uint16 mirror, uint32 width, uint32 length, _TIFFfree(line_buff); if (mirror == MIRROR_VERT) break; + /* Fall through */ case MIRROR_HORIZ : - if ((bps % 8) == 0) /* byte alligned data */ + if ((bps % 8) == 0) /* byte aligned data */ { for (row = 0; row < length; row++) { @@ -8908,7 +9128,7 @@ mirrorImage(uint16 spp, uint16 bps, uint16 mirror, uint32 width, uint32 length, } else { /* non 8 bit per sample data */ - if (!(line_buff = (unsigned char *)_TIFFmalloc(rowsize + 1))) + if (!(line_buff = (unsigned char *)limitMalloc(rowsize + 1))) { TIFFError("mirrorImage", "Unable to allocate mirror line buffer"); return (-1); @@ -8973,7 +9193,6 @@ static int invertImage(uint16 photometric, uint16 spp, uint16 bps, uint32 width, uint32 length, unsigned char *work_buff) { uint32 row, col; - unsigned char bytebuff1, bytebuff2, bytebuff3, bytebuff4; unsigned char *src; uint16 *src_uint16; uint32 *src_uint32; @@ -9003,7 +9222,7 @@ invertImage(uint16 photometric, uint16 spp, uint16 bps, uint32 width, uint32 len for (row = 0; row < length; row++) for (col = 0; col < width; col++) { - *src_uint32 = (uint32)0xFFFFFFFF - *src_uint32; + *src_uint32 = ~(*src_uint32); src_uint32++; } break; @@ -9011,39 +9230,15 @@ invertImage(uint16 photometric, uint16 spp, uint16 bps, uint32 width, uint32 len for (row = 0; row < length; row++) for (col = 0; col < width; col++) { - *src_uint16 = (uint16)0xFFFF - *src_uint16; + *src_uint16 = ~(*src_uint16); src_uint16++; } break; - case 8: for (row = 0; row < length; row++) - for (col = 0; col < width; col++) - { - *src = (uint8)255 - *src; - src++; - } - break; - case 4: for (row = 0; row < length; row++) - for (col = 0; col < width; col++) - { - bytebuff1 = 16 - (uint8)(*src & 240 >> 4); - bytebuff2 = 16 - (*src & 15); - *src = bytebuff1 << 4 & bytebuff2; - src++; - } - break; - case 2: for (row = 0; row < length; row++) - for (col = 0; col < width; col++) - { - bytebuff1 = 4 - (uint8)(*src & 192 >> 6); - bytebuff2 = 4 - (uint8)(*src & 48 >> 4); - bytebuff3 = 4 - (uint8)(*src & 12 >> 2); - bytebuff4 = 4 - (uint8)(*src & 3); - *src = (bytebuff1 << 6) || (bytebuff2 << 4) || (bytebuff3 << 2) || bytebuff4; - src++; - } - break; + case 8: + case 4: + case 2: case 1: for (row = 0; row < length; row++) - for (col = 0; col < width; col += 8 /(spp * bps)) + for (col = 0; col < width; col += 8 / bps) { *src = ~(*src); src++; diff --git a/thirdparty/tiff-4.0.3/tools/tiffdither.c b/thirdparty/tiff-4.2.0/tools/tiffdither.c similarity index 86% rename from thirdparty/tiff-4.0.3/tools/tiffdither.c rename to thirdparty/tiff-4.2.0/tools/tiffdither.c index 3a377ac0..a9d1b7c5 100644 --- a/thirdparty/tiff-4.0.3/tools/tiffdither.c +++ b/thirdparty/tiff-4.2.0/tools/tiffdither.c @@ -1,5 +1,3 @@ -/* $Id: tiffdither.c,v 1.12 2010-03-10 18:56:50 bfriesen Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -39,6 +37,14 @@ #endif #include "tiffio.h" +#include "tiffiop.h" + +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif #define streq(a,b) (strcmp(a,b) == 0) #define strneq(a,b,n) (strncmp(a,b,n) == 0) @@ -50,13 +56,13 @@ uint32 imagewidth; uint32 imagelength; int threshold = 128; -static void usage(void); +static void usage(int code); /* * Floyd-Steinberg error propragation with threshold. * This code is stolen from tiffmedian. */ -static void +static int fsdither(TIFF* in, TIFF* out) { unsigned char *outline, *inputline, *inptr; @@ -68,14 +74,19 @@ fsdither(TIFF* in, TIFF* out) int lastline, lastpixel; int bit; tsize_t outlinesize; + int errcode = 0; imax = imagelength - 1; jmax = imagewidth - 1; inputline = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(in)); - thisline = (short *)_TIFFmalloc(imagewidth * sizeof (short)); - nextline = (short *)_TIFFmalloc(imagewidth * sizeof (short)); + thisline = (short *)_TIFFmalloc(TIFFSafeMultiply(tmsize_t, imagewidth, sizeof (short))); + nextline = (short *)_TIFFmalloc(TIFFSafeMultiply(tmsize_t, imagewidth, sizeof (short))); outlinesize = TIFFScanlineSize(out); outline = (unsigned char *) _TIFFmalloc(outlinesize); + if (! (inputline && thisline && nextline && outline)) { + fprintf(stderr, "Out of memory.\n"); + goto skip_on_error; + } /* * Get first line @@ -93,7 +104,7 @@ fsdither(TIFF* in, TIFF* out) nextline = tmpptr; lastline = (i == imax); if (TIFFReadScanline(in, inputline, i, 0) <= 0) - break; + goto skip_on_error; inptr = inputline; nextptr = nextline; for (j = 0; j < imagewidth; ++j) @@ -131,13 +142,18 @@ fsdither(TIFF* in, TIFF* out) } } if (TIFFWriteScanline(out, outline, i-1, 0) < 0) - break; + goto skip_on_error; } + goto exit_label; + skip_on_error: + errcode = 1; + exit_label: _TIFFfree(inputline); _TIFFfree(thisline); _TIFFfree(nextline); _TIFFfree(outline); + return errcode; } static uint16 compression = COMPRESSION_PACKBITS; @@ -157,7 +173,7 @@ processG3Options(char* cp) else if (strneq(cp, "fill", 4)) group3options |= GROUP3OPT_FILLBITS; else - usage(); + usage(EXIT_FAILURE); } while ((cp = strchr(cp, ':'))); } } @@ -199,14 +215,16 @@ main(int argc, char* argv[]) uint32 rowsperstrip = (uint32) -1; uint16 fillorder = 0; int c; +#if !HAVE_DECL_OPTARG extern int optind; extern char *optarg; +#endif - while ((c = getopt(argc, argv, "c:f:r:t:")) != -1) + while ((c = getopt(argc, argv, "c:f:r:t:h")) != -1) switch (c) { case 'c': /* compression scheme */ if (!processCompressOptions(optarg)) - usage(); + usage(EXIT_FAILURE); break; case 'f': /* fill order */ if (streq(optarg, "lsb2msb")) @@ -214,7 +232,7 @@ main(int argc, char* argv[]) else if (streq(optarg, "msb2lsb")) fillorder = FILLORDER_MSB2LSB; else - usage(); + usage(EXIT_FAILURE); break; case 'r': /* rows/strip */ rowsperstrip = atoi(optarg); @@ -226,29 +244,31 @@ main(int argc, char* argv[]) else if (threshold > 255) threshold = 255; break; + case 'h': + usage(EXIT_SUCCESS); case '?': - usage(); + usage(EXIT_FAILURE); /*NOTREACHED*/ } if (argc - optind < 2) - usage(); + usage(EXIT_FAILURE); in = TIFFOpen(argv[optind], "r"); if (in == NULL) - return (-1); + return (EXIT_FAILURE); TIFFGetField(in, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); if (samplesperpixel != 1) { fprintf(stderr, "%s: Not a b&w image.\n", argv[0]); - return (-1); + return (EXIT_FAILURE); } TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bitspersample); if (bitspersample != 8) { fprintf(stderr, " %s: Sorry, only handle 8-bit samples.\n", argv[0]); - return (-1); + return (EXIT_FAILURE); } out = TIFFOpen(argv[optind+1], "w"); if (out == NULL) - return (-1); + return (EXIT_FAILURE); CopyField(TIFFTAG_IMAGEWIDTH, imagewidth); TIFFGetField(in, TIFFTAG_IMAGELENGTH, &imagelength); TIFFSetField(out, TIFFTAG_IMAGELENGTH, imagelength-1); @@ -260,7 +280,7 @@ main(int argc, char* argv[]) TIFFSetField(out, TIFFTAG_FILLORDER, fillorder); else CopyField(TIFFTAG_FILLORDER, shortv); - sprintf(thing, "Dithered B&W version of %s", argv[optind]); + snprintf(thing, sizeof(thing), "Dithered B&W version of %s", argv[optind]); TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing); CopyField(TIFFTAG_PHOTOMETRIC, shortv); CopyField(TIFFTAG_ORIENTATION, shortv); @@ -282,13 +302,14 @@ main(int argc, char* argv[]) fsdither(in, out); TIFFClose(in); TIFFClose(out); - return (0); + return (EXIT_SUCCESS); } -char* stuff[] = { +static const char* stuff[] = { "usage: tiffdither [options] input.tif output.tif", "where options are:", " -r # make each strip have no more than # rows", +" -t # set the threshold value for dithering (default 128)", " -f lsb2msb force lsb-to-msb FillOrder for output", " -f msb2lsb force msb-to-lsb FillOrder for output", " -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding", @@ -311,16 +332,15 @@ NULL }; static void -usage(void) +usage(int code) { - char buf[BUFSIZ]; int i; + FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; - setbuf(stderr, buf); - fprintf(stderr, "%s\n\n", TIFFGetVersion()); + fprintf(out, "%s\n\n", TIFFGetVersion()); for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); - exit(-1); + fprintf(out, "%s\n", stuff[i]); + exit(code); } /* vim: set ts=8 sts=8 sw=8 noet: */ diff --git a/thirdparty/tiff-4.0.3/tools/tiffdump.c b/thirdparty/tiff-4.2.0/tools/tiffdump.c similarity index 87% rename from thirdparty/tiff-4.0.3/tools/tiffdump.c rename to thirdparty/tiff-4.2.0/tools/tiffdump.c index c1caafbc..00be9dd4 100644 --- a/thirdparty/tiff-4.0.3/tools/tiffdump.c +++ b/thirdparty/tiff-4.2.0/tools/tiffdump.c @@ -1,5 +1,3 @@ -/* $Id: tiffdump.c,v 1.26 2012-06-15 21:51:54 fwarmerdam Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -34,6 +32,8 @@ # include #endif +#include "tiffiop.h" + #ifdef HAVE_FCNTL_H # include #endif @@ -51,11 +51,18 @@ #endif #ifndef HAVE_GETOPT -extern int getopt(int, char**, char*); +extern int getopt(int argc, char * const argv[], const char *optstring); #endif #include "tiffio.h" +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + #ifndef O_BINARY # define O_BINARY 0 #endif @@ -95,14 +102,17 @@ const char* floatfmt = "%s%g"; /* FLOAT */ const char* doublefmt = "%s%g"; /* DOUBLE */ static void dump(int, uint64); + +#if !HAVE_DECL_OPTARG extern int optind; extern char* optarg; +#endif void usage() { fprintf(stderr, "usage: %s [-h] [-o offset] [-m maxitems] file.tif ...\n", appname); - exit(-1); + exit(EXIT_FAILURE); } int @@ -139,7 +149,7 @@ main(int argc, char* argv[]) fd = open(argv[optind], O_RDONLY|O_BINARY, 0); if (fd < 0) { perror(argv[0]); - return (-1); + return (EXIT_FAILURE); } if (multiplefiles) printf("%s:\n", argv[optind]); @@ -149,7 +159,7 @@ main(int argc, char* argv[]) dump(fd, diroff); close(fd); } - return (0); + return (EXIT_SUCCESS); } #define ord(e) ((int)e) @@ -162,9 +172,11 @@ static void Fatal(const char*, ...); static void dump(int fd, uint64 diroff) { - unsigned i; + unsigned i, j; + uint64* visited_diroff = NULL; + unsigned int count_visited_dir = 0; - lseek(fd, (off_t) 0, 0); + _TIFF_lseek_f(fd, (_TIFF_off_t) 0, 0); if (read(fd, (char*) &hdr, sizeof (TIFFHeaderCommon)) != sizeof (TIFFHeaderCommon)) ReadError("TIFF header"); if (hdr.common.tiff_magic != TIFF_BIGENDIAN @@ -223,10 +235,40 @@ dump(int fd, uint64 diroff) Fatal("Not a TIFF file, bad version number %u (%#x)", hdr.common.tiff_version, hdr.common.tiff_version); for (i = 0; diroff != 0; i++) { + for(j=0; j 0) putchar('\n'); diroff = ReadDirectory(fd, i, diroff); } + if( visited_diroff ) + free(visited_diroff); } static const int datawidth[] = { @@ -272,11 +314,7 @@ ReadDirectory(int fd, unsigned int ix, uint64 off) if (off == 0) /* no more directories */ goto done; -#if defined(__WIN32__) && defined(_MSC_VER) - if (_lseeki64(fd, (__int64)off, SEEK_SET) != (__int64)off) { -#else - if (lseek(fd, (off_t)off, SEEK_SET) != (off_t)off) { -#endif + if (_TIFF_lseek_f(fd, (_TIFF_off_t)off, SEEK_SET) != (_TIFF_off_t)off) { Fatal("Seek error accessing TIFF directory"); goto done; } @@ -303,7 +341,7 @@ ReadDirectory(int fd, unsigned int ix, uint64 off) dircount = (uint16)dircount64; direntrysize = 20; } - dirmem = _TIFFmalloc(dircount * direntrysize); + dirmem = _TIFFmalloc(TIFFSafeMultiply(tmsize_t,dircount,direntrysize)); if (dirmem == NULL) { Fatal("No space for TIFF directory"); goto done; @@ -355,6 +393,8 @@ ReadDirectory(int fd, unsigned int ix, uint64 off) void* datamem; uint64 dataoffset; int datatruncated; + int datasizeoverflow; + tag = *(uint16*)dp; if (swabflag) TIFFSwabShort(&tag); @@ -378,7 +418,7 @@ ReadDirectory(int fd, unsigned int ix, uint64 off) } else { - count = *(uint64*)dp; + memcpy(&count, dp, sizeof(uint64)); if (swabflag) TIFFSwabLong8(&count); dp += sizeof(uint64); @@ -392,14 +432,15 @@ ReadDirectory(int fd, unsigned int ix, uint64 off) typewidth = 0; else typewidth = datawidth[type]; - datasize = count*typewidth; + datasize = TIFFSafeMultiply(tmsize_t,count,typewidth); + datasizeoverflow = (typewidth > 0 && datasize / typewidth != count); datafits = 1; datamem = dp; dataoffset = 0; datatruncated = 0; if (!bigtiff) { - if (datasize>4) + if (datasizeoverflow || datasize>4) { uint32 dataoffset32; datafits = 0; @@ -413,46 +454,41 @@ ReadDirectory(int fd, unsigned int ix, uint64 off) } else { - if (datasize>8) + if (datasizeoverflow || datasize>8) { datafits = 0; datamem = NULL; - dataoffset = *(uint64*)dp; + memcpy(&dataoffset, dp, sizeof(uint64)); if (swabflag) TIFFSwabLong8(&dataoffset); } dp += sizeof(uint64); } - if (datasize>0x10000) + if (datasizeoverflow || datasize>0x10000) { datatruncated = 1; count = 0x10000/typewidth; - datasize = count*typewidth; + datasize = TIFFSafeMultiply(tmsize_t,count,typewidth); } if (count>maxitems) { datatruncated = 1; count = maxitems; - datasize = count*typewidth; + datasize = TIFFSafeMultiply(tmsize_t,count,typewidth); } if (!datafits) { - datamem = _TIFFmalloc((uint32)datasize); + datamem = _TIFFmalloc(datasize); if (datamem) { -#if defined(__WIN32__) && defined(_MSC_VER) - if (_lseeki64(fd, (__int64)dataoffset, SEEK_SET) - != (__int64)dataoffset) -#else - if (lseek(fd, (off_t)dataoffset, 0) != - (off_t)dataoffset) -#endif + if (_TIFF_lseek_f(fd, (_TIFF_off_t)dataoffset, 0) != + (_TIFF_off_t)dataoffset) { Error( "Seek error accessing tag %u value", tag); _TIFFfree(datamem); datamem = NULL; } - if (read(fd, datamem, (size_t)datasize) != (TIFF_SSIZE_T)datasize) + else if (read(fd, datamem, (size_t)datasize) != (TIFF_SSIZE_T)datasize) { Error( "Read error accessing tag %u value", tag); @@ -499,7 +535,10 @@ ReadDirectory(int fd, unsigned int ix, uint64 off) if (datatruncated) printf(" ..."); if (!datafits) - _TIFFfree(datamem); + { + _TIFFfree(datamem); + datamem = NULL; + } } printf(">\n"); } @@ -727,23 +766,23 @@ PrintData(FILE* fd, uint16 type, uint32 count, unsigned char* data) case TIFF_LONG8: { uint64 *llp = (uint64*)data; while (count-- > 0) { -#if defined(__WIN32__) && defined(_MSC_VER) - fprintf(fd, long8fmt, sep, (unsigned __int64) *llp++); -#else - fprintf(fd, long8fmt, sep, (unsigned long long) *llp++); -#endif + uint64 val; + memcpy(&val, llp, sizeof(uint64)); + llp ++; + fprintf(fd, long8fmt, sep, val); sep = " "; } break; } case TIFF_SLONG8: { int64 *llp = (int64*)data; - while (count-- > 0) -#if defined(__WIN32__) && defined(_MSC_VER) - fprintf(fd, slong8fmt, sep, (__int64) *llp++), sep = " "; -#else - fprintf(fd, slong8fmt, sep, (long long) *llp++), sep = " "; -#endif + while (count-- > 0) { + int64 val; + memcpy(&val, llp, sizeof(int64)); + llp ++; + fprintf(fd, slong8fmt, sep, val); + sep = " "; + } break; } case TIFF_RATIONAL: { @@ -842,7 +881,7 @@ Fatal(const char* fmt, ...) va_start(ap, fmt); vError(stderr, fmt, ap); va_end(ap); - exit(-1); + exit(EXIT_FAILURE); } /* vim: set ts=8 sts=8 sw=8 noet: */ diff --git a/thirdparty/tiff-4.0.3/tools/tiffgt.c b/thirdparty/tiff-4.2.0/tools/tiffgt.c similarity index 89% rename from thirdparty/tiff-4.0.3/tools/tiffgt.c rename to thirdparty/tiff-4.2.0/tools/tiffgt.c index de420396..f3cca8c9 100644 --- a/thirdparty/tiff-4.0.3/tools/tiffgt.c +++ b/thirdparty/tiff-4.2.0/tools/tiffgt.c @@ -1,5 +1,3 @@ -/* $Id: tiffgt.c,v 1.10 2010-07-01 15:56:56 dron Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -29,21 +27,36 @@ #include #include #include +#if HAVE_UNISTD_H #include +#endif -#if HAVE_APPLE_OPENGL_FRAMEWORK +#ifdef HAVE_OPENGL_GL_H # include +#else +# ifdef _WIN32 +# include +# endif +# include +#endif +#ifdef HAVE_GLUT_GLUT_H # include #else -# include # include #endif #include "tiffio.h" #include "tiffiop.h" +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + #ifndef HAVE_GETOPT -extern int getopt(int, char**, char*); +extern int getopt(int argc, char * const argv[], const char *optstring); #endif static uint32 width = 0, height = 0; /* window width & height */ @@ -62,20 +75,29 @@ static int filenum; static TIFFErrorHandler oerror; static TIFFErrorHandler owarning; -static void cleanup_and_exit(void); +static void cleanup_and_exit(int); static int initImage(void); static int prevImage(void); static int nextImage(void); static void setWindowSize(void); -static void usage(void); +static void usage(int); static uint16 photoArg(const char*); static void raster_draw(void); static void raster_reshape(int, int); static void raster_keys(unsigned char, int, int); static void raster_special(int, int, int); +#if !HAVE_DECL_OPTARG extern char* optarg; extern int optind; +#endif + +/* GLUT framework on MacOS X produces deprecation warnings */ +# if defined(__GNUC__) && defined(__APPLE__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +# endif + static TIFF* tif = NULL; int @@ -87,7 +109,7 @@ main(int argc, char* argv[]) oerror = TIFFSetErrorHandler(NULL); owarning = TIFFSetWarningHandler(NULL); - while ((c = getopt(argc, argv, "d:o:p:eflmsvw?")) != -1) + while ((c = getopt(argc, argv, "d:o:p:eflmsvwh")) != -1) switch (c) { case 'd': dirnum = atoi(optarg); @@ -116,13 +138,16 @@ main(int argc, char* argv[]) case 'v': verbose = 1; break; + case 'h': + usage(EXIT_SUCCESS); + /*NOTREACHED*/ case '?': - usage(); + usage(EXIT_FAILURE); /*NOTREACHED*/ } filenum = argc - optind; if ( filenum < 1) - usage(); + usage(EXIT_FAILURE); glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); @@ -142,13 +167,13 @@ main(int argc, char* argv[]) filelist = (char **) _TIFFmalloc(filenum * sizeof(char*)); if (!filelist) { TIFFError(argv[0], "Can not allocate space for the file list."); - return 1; + return EXIT_FAILURE; } _TIFFmemcpy(filelist, argv + optind, filenum * sizeof(char*)); fileindex = -1; if (nextImage() < 0) { _TIFFfree(filelist); - return 2; + return EXIT_FAILURE; } /* * Set initial directory if user-specified @@ -162,7 +187,7 @@ main(int argc, char* argv[]) photo = photo0; if (initImage() < 0){ _TIFFfree(filelist); - return 3; + return EXIT_FAILURE; } /* * Create a new window or reconfigure an existing @@ -178,12 +203,12 @@ main(int argc, char* argv[]) glutSpecialFunc(raster_special); glutMainLoop(); - cleanup_and_exit(); - return 0; + cleanup_and_exit(EXIT_SUCCESS); + return EXIT_SUCCESS; } static void -cleanup_and_exit(void) +cleanup_and_exit(int code) { TIFFRGBAImageEnd(&img); if (filelist != NULL) @@ -192,7 +217,7 @@ cleanup_and_exit(void) _TIFFfree(raster); if (tif != NULL) TIFFClose(tif); - exit(0); + exit(code); } static int @@ -235,7 +260,7 @@ initImage(void) if (raster == NULL) { width = height = 0; TIFFError(filelist[fileindex], "No space for raster buffer"); - cleanup_and_exit(); + cleanup_and_exit(EXIT_FAILURE); } width = w; height = h; @@ -287,6 +312,7 @@ static void raster_draw(void) { glDrawPixels(img.width, img.height, GL_RGBA, GL_UNSIGNED_BYTE, (const GLvoid *) raster); + glFlush(); } static void @@ -306,6 +332,8 @@ raster_reshape(int win_w, int win_h) static void raster_keys(unsigned char key, int x, int y) { + (void) x; + (void) y; switch (key) { case 'b': /* photometric MinIsBlack */ photo = PHOTOMETRIC_MINISBLACK; @@ -343,7 +371,7 @@ raster_keys(unsigned char key, int x, int y) break; case 'q': /* exit */ case '\033': - cleanup_and_exit(); + cleanup_and_exit(EXIT_SUCCESS); } glutPostRedisplay(); } @@ -351,6 +379,8 @@ raster_keys(unsigned char key, int x, int y) static void raster_special(int key, int x, int y) { + (void) x; + (void) y; switch (key) { case GLUT_KEY_PAGE_UP: /* previous logical image */ if (TIFFCurrentDirectory(tif) > 0) { @@ -397,9 +427,12 @@ raster_special(int key, int x, int y) glutPostRedisplay(); } +/* GLUT framework on MacOS X produces deprecation warnings */ +# if defined(__GNUC__) && defined(__APPLE__) +# pragma GCC diagnostic pop +# endif - -char* stuff[] = { +static const char* stuff[] = { "usage: tiffgt [options] file.tif", "where options are:", " -c use colormap visual", @@ -417,16 +450,15 @@ NULL }; static void -usage(void) +usage(int code) { - char buf[BUFSIZ]; int i; + FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; - setbuf(stderr, buf); - fprintf(stderr, "%s\n\n", TIFFGetVersion()); + fprintf(out, "%s\n\n", TIFFGetVersion()); for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); - exit(-1); + fprintf(out, "%s\n", stuff[i]); + exit(code); } static uint16 diff --git a/thirdparty/tiff-4.0.3/tools/tiffinfo.c b/thirdparty/tiff-4.2.0/tools/tiffinfo.c similarity index 77% rename from thirdparty/tiff-4.0.3/tools/tiffinfo.c rename to thirdparty/tiff-4.2.0/tools/tiffinfo.c index ae1a5f62..2271c9d1 100644 --- a/thirdparty/tiff-4.0.3/tools/tiffinfo.c +++ b/thirdparty/tiff-4.2.0/tools/tiffinfo.c @@ -1,5 +1,3 @@ -/* $Id: tiffinfo.c,v 1.21 2012-06-06 06:05:29 fwarmerdam Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -44,15 +42,22 @@ #include "tiffiop.h" +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + static TIFFErrorHandler old_error_handler = 0; -static int status = 0; /* exit status */ +static int status = EXIT_SUCCESS; /* exit status */ static int showdata = 0; /* show data */ static int rawdata = 0; /* show raw/decoded data */ static int showwords = 0; /* show data as bytes/words */ static int readdata = 0; /* read data in file */ static int stoponerr = 1; /* stop on first read error */ -static void usage(void); +static void usage(int); static void tiffinfo(TIFF*, uint16, long, int); static void @@ -60,7 +65,7 @@ PrivateErrorHandler(const char* module, const char* fmt, va_list ap) { if (old_error_handler) (*old_error_handler)(module,fmt,ap); - status = 1; + status = EXIT_FAILURE; } int @@ -69,13 +74,15 @@ main(int argc, char* argv[]) int dirnum = -1, multiplefiles, c; uint16 order = 0; TIFF* tif; +#if !HAVE_DECL_OPTARG extern int optind; extern char* optarg; +#endif long flags = 0; uint64 diroff = 0; int chopstrips = 0; /* disable strip chopping */ - while ((c = getopt(argc, argv, "f:o:cdDSjilmrsvwz0123456789")) != -1) + while ((c = getopt(argc, argv, "f:o:cdDSjilmrsvwz0123456789h")) != -1) switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': @@ -84,7 +91,7 @@ main(int argc, char* argv[]) break; case 'd': showdata++; - /* fall thru... */ + /* fall through... */ case 'D': readdata++; break; @@ -97,7 +104,7 @@ main(int argc, char* argv[]) else if (streq(optarg, "msb2lsb")) order = FILLORDER_MSB2LSB; else - usage(); + usage(EXIT_FAILURE); break; case 'i': stoponerr = 0; @@ -122,12 +129,15 @@ main(int argc, char* argv[]) case 'z': chopstrips = 1; break; + case 'h': + usage(EXIT_SUCCESS); + /*NOTREACHED*/ case '?': - usage(); + usage(EXIT_FAILURE); /*NOTREACHED*/ } if (optind >= argc) - usage(); + usage(EXIT_FAILURE); old_error_handler = TIFFSetErrorHandler(PrivateErrorHandler); @@ -145,7 +155,7 @@ main(int argc, char* argv[]) tiffinfo(tif, order, flags, 1); } else { do { - toff_t offset; + toff_t offset=0; tiffinfo(tif, order, flags, 1); if (TIFFGetField(tif, TIFFTAG_EXIFIFD, @@ -162,7 +172,7 @@ main(int argc, char* argv[]) return (status); } -char* stuff[] = { +static const char* stuff[] = { "usage: tiffinfo [options] input...", "where options are:", " -D read data", @@ -182,16 +192,15 @@ NULL }; static void -usage(void) +usage(int code) { - char buf[BUFSIZ]; int i; + FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; - setbuf(stderr, buf); - fprintf(stderr, "%s\n\n", TIFFGetVersion()); + fprintf(out, "%s\n\n", TIFFGetVersion()); for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); - exit(-1); + fprintf(out, "%s\n", stuff[i]); + exit(code); } static void @@ -245,9 +254,9 @@ TIFFReadSeparateStripData(TIFF* tif) buf = (unsigned char *)_TIFFmalloc(TIFFStripSize(tif)); if (buf) { - uint32 row, h; + uint32 row, h=0; uint32 rowsperstrip = (uint32)-1; - tsample_t s, samplesperpixel; + tsample_t s, samplesperpixel=0; TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h); TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); @@ -292,17 +301,24 @@ void TIFFReadContigTileData(TIFF* tif) { unsigned char *buf; - tsize_t rowsize = TIFFTileRowSize(tif); + tmsize_t rowsize = TIFFTileRowSize(tif); + tmsize_t tilesize = TIFFTileSize(tif); - buf = (unsigned char *)_TIFFmalloc(TIFFTileSize(tif)); + buf = (unsigned char *)_TIFFmalloc(tilesize); if (buf) { - uint32 tw, th, w, h; + uint32 tw=0, th=0, w=0, h=0; uint32 row, col; TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w); TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h); TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw); TIFFGetField(tif, TIFFTAG_TILELENGTH, &th); + if ( rowsize == 0 || th > (size_t) (tilesize / rowsize) ) + { + fprintf(stderr, "Cannot display data: th * rowsize > tilesize\n"); + _TIFFfree(buf); + return; + } for (row = 0; row < h; row += th) { for (col = 0; col < w; col += tw) { if (TIFFReadTile(tif, buf, col, row, 0, 0) < 0) { @@ -320,19 +336,26 @@ void TIFFReadSeparateTileData(TIFF* tif) { unsigned char *buf; - tsize_t rowsize = TIFFTileRowSize(tif); + tmsize_t rowsize = TIFFTileRowSize(tif); + tmsize_t tilesize = TIFFTileSize(tif); - buf = (unsigned char *)_TIFFmalloc(TIFFTileSize(tif)); + buf = (unsigned char *)_TIFFmalloc(tilesize); if (buf) { - uint32 tw, th, w, h; + uint32 tw=0, th=0, w=0, h=0; uint32 row, col; - tsample_t s, samplesperpixel; + tsample_t s, samplesperpixel=0; TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w); TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h); TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw); TIFFGetField(tif, TIFFTAG_TILELENGTH, &th); TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); + if ( rowsize == 0 || th > (size_t) (tilesize / rowsize) ) + { + fprintf(stderr, "Cannot display data: th * rowsize > tilesize\n"); + _TIFFfree(buf); + return; + } for (row = 0; row < h; row += th) { for (col = 0; col < w; col += tw) { for (s = 0; s < samplesperpixel; s++) { @@ -393,15 +416,15 @@ ShowRawWords(uint16* pp, uint32 n) putchar('\n'); } -void -TIFFReadRawData(TIFF* tif, int bitrev) +static void +TIFFReadRawDataStriped(TIFF* tif, int bitrev) { tstrip_t nstrips = TIFFNumberOfStrips(tif); - const char* what = TIFFIsTiled(tif) ? "Tile" : "Strip"; - uint64* stripbc; + const char* what = "Strip"; + uint64* stripbc=NULL; TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &stripbc); - if (nstrips > 0) { + if (stripbc != NULL && nstrips > 0) { uint32 bufsize = (uint32) stripbc[0]; tdata_t buf = _TIFFmalloc(bufsize); tstrip_t s; @@ -441,6 +464,66 @@ TIFFReadRawData(TIFF* tif, int bitrev) } } +static void +TIFFReadRawDataTiled(TIFF* tif, int bitrev) +{ + const char* what = "Tile"; + uint32 ntiles = TIFFNumberOfTiles(tif); + uint64 *tilebc; + + TIFFGetField(tif, TIFFTAG_TILEBYTECOUNTS, &tilebc); + if (tilebc != NULL && ntiles > 0) { + uint64 bufsize = 0; + tdata_t buf = NULL; + uint32 t; + + for (t = 0; t < ntiles; t++) { + if (buf == NULL || tilebc[t] > bufsize) { + buf = _TIFFrealloc(buf, (tmsize_t)tilebc[t]); + bufsize = tilebc[t]; + } + if (buf == NULL) { + fprintf(stderr, + "Cannot allocate buffer to read tile %lu\n", + (unsigned long) t); + break; + } + if (TIFFReadRawTile(tif, t, buf, (tmsize_t)tilebc[t]) < 0) { + fprintf(stderr, "Error reading tile %lu\n", + (unsigned long) t); + if (stoponerr) + break; + } else if (showdata) { + if (bitrev) { + TIFFReverseBits(buf, (tmsize_t)tilebc[t]); + printf("%s %lu: (bit reversed)\n ", + what, (unsigned long) t); + } else { + printf("%s %lu:\n ", what, + (unsigned long) t); + } + if (showwords) { + ShowRawWords((uint16*) buf, (uint32)(tilebc[t]>>1)); + } else { + ShowRawBytes((unsigned char*) buf, (uint32) tilebc[t]); + } + } + } + if (buf != NULL) + _TIFFfree(buf); + } +} + +void +TIFFReadRawData(TIFF* tif, int bitrev) +{ + if (TIFFIsTiled(tif)) { + TIFFReadRawDataTiled(tif, bitrev); + } else { + TIFFReadRawDataStriped(tif, bitrev); + } +} + static void tiffinfo(TIFF* tif, uint16 order, long flags, int is_image) { diff --git a/thirdparty/tiff-4.0.3/tools/tiffmedian.c b/thirdparty/tiff-4.2.0/tools/tiffmedian.c similarity index 90% rename from thirdparty/tiff-4.0.3/tools/tiffmedian.c rename to thirdparty/tiff-4.2.0/tools/tiffmedian.c index 6501494b..6654cd6f 100644 --- a/thirdparty/tiff-4.0.3/tools/tiffmedian.c +++ b/thirdparty/tiff-4.2.0/tools/tiffmedian.c @@ -1,5 +1,3 @@ -/* $Id: tiffmedian.c,v 1.10 2010-03-10 18:56:50 bfriesen Exp $ */ - /* * Apply median cut on an image. * @@ -56,6 +54,13 @@ #include "tiffio.h" +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + #define MAX_CMAP_SIZE 256 #define streq(a,b) (strcmp(a,b) == 0) @@ -108,7 +113,7 @@ static void quant(TIFF*, TIFF*); static void quant_fsdither(TIFF*, TIFF*); static Colorbox* largest_box(void); -static void usage(void); +static void usage(int); static int processCompressOptions(char*); #define CopyField(tag, v) \ @@ -123,15 +128,17 @@ main(int argc, char* argv[]) float floatv; uint32 longv; int c; +#if !HAVE_DECL_OPTARG extern int optind; extern char* optarg; +#endif num_colors = MAX_CMAP_SIZE; - while ((c = getopt(argc, argv, "c:C:r:f")) != -1) + while ((c = getopt(argc, argv, "c:C:r:fh")) != -1) switch (c) { case 'c': /* compression scheme */ if (!processCompressOptions(optarg)) - usage(); + usage(EXIT_FAILURE); break; case 'C': /* set colormap size */ num_colors = atoi(optarg); @@ -139,7 +146,7 @@ main(int argc, char* argv[]) fprintf(stderr, "-c: colormap too big, max %d\n", MAX_CMAP_SIZE); - usage(); + usage(EXIT_FAILURE); } break; case 'f': /* dither */ @@ -148,15 +155,18 @@ main(int argc, char* argv[]) case 'r': /* rows/strip */ rowsperstrip = atoi(optarg); break; + case 'h': + usage(EXIT_SUCCESS); + /*NOTREACHED*/ case '?': - usage(); + usage(EXIT_FAILURE); /*NOTREACHED*/ } if (argc - optind != 2) - usage(); + usage(EXIT_FAILURE); in = TIFFOpen(argv[optind], "r"); if (in == NULL) - return (-1); + return (EXIT_FAILURE); TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &imagewidth); TIFFGetField(in, TIFFTAG_IMAGELENGTH, &imagelength); TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bitspersample); @@ -164,18 +174,18 @@ main(int argc, char* argv[]) if (bitspersample != 8 && bitspersample != 16) { fprintf(stderr, "%s: Image must have at least 8-bits/sample\n", argv[optind]); - return (-3); + return (EXIT_FAILURE); } if (!TIFFGetField(in, TIFFTAG_PHOTOMETRIC, &photometric) || photometric != PHOTOMETRIC_RGB || samplesperpixel < 3) { fprintf(stderr, "%s: Image must have RGB data\n", argv[optind]); - return (-4); + return (EXIT_FAILURE); } TIFFGetField(in, TIFFTAG_PLANARCONFIG, &config); if (config != PLANARCONFIG_CONTIG) { fprintf(stderr, "%s: Can only handle contiguous data packing\n", argv[optind]); - return (-5); + return (EXIT_FAILURE); } /* @@ -245,7 +255,7 @@ main(int argc, char* argv[]) */ out = TIFFOpen(argv[optind+1], "w"); if (out == NULL) - return (-2); + return (EXIT_FAILURE); CopyField(TIFFTAG_SUBFILETYPE, longv); CopyField(TIFFTAG_IMAGEWIDTH, longv); @@ -290,7 +300,7 @@ main(int argc, char* argv[]) } TIFFSetField(out, TIFFTAG_COLORMAP, rm, gm, bm); (void) TIFFClose(out); - return (0); + return (EXIT_SUCCESS); } static int @@ -333,16 +343,15 @@ NULL }; static void -usage(void) +usage(int code) { - char buf[BUFSIZ]; int i; + FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; - setbuf(stderr, buf); - fprintf(stderr, "%s\n\n", TIFFGetVersion()); + fprintf(out, "%s\n\n", TIFFGetVersion()); for (i = 0; stuff[i] != NULL; i++) - fprintf(stderr, "%s\n", stuff[i]); - exit(-1); + fprintf(out, "%s\n", stuff[i]); + exit(code); } static void @@ -356,7 +365,7 @@ get_histogram(TIFF* in, Colorbox* box) inputline = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(in)); if (inputline == NULL) { fprintf(stderr, "No space for scanline buffer\n"); - exit(-1); + exit(EXIT_FAILURE); } box->rmin = box->gmin = box->bmin = 999; box->rmax = box->gmax = box->bmax = -1; @@ -371,9 +380,15 @@ get_histogram(TIFF* in, Colorbox* box) break; inptr = inputline; for (j = imagewidth; j-- > 0;) { - red = *inptr++ >> COLOR_SHIFT; - green = *inptr++ >> COLOR_SHIFT; - blue = *inptr++ >> COLOR_SHIFT; + red = (*inptr++) & 0xff >> COLOR_SHIFT; + green = (*inptr++) & 0xff >> COLOR_SHIFT; + blue = (*inptr++) & 0xff >> COLOR_SHIFT; + if ((red | green | blue) >= B_LEN) { + fprintf(stderr, + "Logic error. " + "Histogram array overflow!\n"); + exit(EXIT_FAILURE); + } if (red < box->rmin) box->rmin = red; if (red > box->rmax) @@ -779,24 +794,28 @@ quant(TIFF* in, TIFF* out) #define SWAP(type,a,b) { type p; p = a; a = b; b = p; } -#define GetInputLine(tif, row, bad) \ - if (TIFFReadScanline(tif, inputline, row, 0) <= 0) \ - bad; \ - inptr = inputline; \ - nextptr = nextline; \ - for (j = 0; j < imagewidth; ++j) { \ - *nextptr++ = *inptr++; \ - *nextptr++ = *inptr++; \ - *nextptr++ = *inptr++; \ - } +#define GetInputLine(tif, row, bad) \ + do { \ + if (TIFFReadScanline(tif, inputline, row, 0) <= 0) \ + bad; \ + inptr = inputline; \ + nextptr = nextline; \ + for (j = 0; j < imagewidth; ++j) { \ + *nextptr++ = *inptr++; \ + *nextptr++ = *inptr++; \ + *nextptr++ = *inptr++; \ + } \ + } while (0); #define GetComponent(raw, cshift, c) \ - cshift = raw; \ - if (cshift < 0) \ - cshift = 0; \ - else if (cshift >= MAX_COLOR) \ - cshift = MAX_COLOR-1; \ - c = cshift; \ - cshift >>= COLOR_SHIFT; + do { \ + cshift = raw; \ + if (cshift < 0) \ + cshift = 0; \ + else if (cshift >= MAX_COLOR) \ + cshift = MAX_COLOR-1; \ + c = cshift; \ + cshift >>= COLOR_SHIFT; \ + } while (0); static void quant_fsdither(TIFF* in, TIFF* out) diff --git a/thirdparty/tiff-4.0.3/tools/tiffset.c b/thirdparty/tiff-4.2.0/tools/tiffset.c similarity index 79% rename from thirdparty/tiff-4.0.3/tools/tiffset.c rename to thirdparty/tiff-4.2.0/tools/tiffset.c index 3b4b9f0e..75cf45c0 100644 --- a/thirdparty/tiff-4.0.3/tools/tiffset.c +++ b/thirdparty/tiff-4.2.0/tools/tiffset.c @@ -1,6 +1,4 @@ /****************************************************************************** - * $Id: tiffset.c,v 1.17 2012-07-29 15:45:30 tgl Exp $ - * * Project: libtiff tools * Purpose: Mainline for setting metadata in existing TIFF files. * Author: Frank Warmerdam, warmerdam@pobox.com @@ -29,6 +27,7 @@ ****************************************************************************** */ +#include "tif_config.h" #include #include @@ -36,23 +35,39 @@ #include "tiffio.h" -static char* usageMsg[] = { +#ifdef NEED_LIBPORT +# include "libport.h" +#endif + +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + +static const char* usageMsg[] = { "usage: tiffset [options] filename", "where options are:", " -s [count] ... set the tag value", +" -u to unset the tag", " -d set the directory", " -sd set the subdirectory", " -sf read the tag value from file (for ASCII tags only)", +" -h this help screen", NULL }; static void -usage(void) +usage(int code) { int i; + FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; + + fprintf(out, "%s\n\n", TIFFGetVersion()); for (i = 0; usageMsg[i]; i++) - fprintf(stderr, "%s\n", usageMsg[i]); - exit(-1); + fprintf(out, "%s\n", usageMsg[i]); + exit(code); } static const TIFFField * @@ -80,11 +95,11 @@ main(int argc, char* argv[]) int arg_index; if (argc < 2) - usage(); + usage(EXIT_FAILURE); tiff = TIFFOpen(argv[argc-1], "r+"); if (tiff == NULL) - return 2; + return EXIT_FAILURE; for( arg_index = 1; arg_index < argc-1; arg_index++ ) { if (strcmp(argv[arg_index],"-d") == 0 && arg_index < argc-2) { @@ -92,7 +107,7 @@ main(int argc, char* argv[]) if( TIFFSetDirectory(tiff, atoi(argv[arg_index]) ) != 1 ) { fprintf( stderr, "Failed to set directory=%s\n", argv[arg_index] ); - return 6; + return EXIT_FAILURE; } arg_index++; } @@ -101,11 +116,26 @@ main(int argc, char* argv[]) if( TIFFSetSubDirectory(tiff, atoi(argv[arg_index]) ) != 1 ) { fprintf( stderr, "Failed to set sub directory=%s\n", argv[arg_index] ); - return 7; + return EXIT_FAILURE; } arg_index++; } - if (strcmp(argv[arg_index],"-s") == 0 && arg_index < argc-3) { + /* Add unset option to tiffset -- Zach Baker (niquil@niquil.net) 11/14/2012 */ + if (strcmp(argv[arg_index],"-u") == 0 && arg_index < argc-2) { + const TIFFField *fip; + const char *tagname; + arg_index++; + tagname = argv[arg_index]; + fip = GetField(tiff, tagname); + if (!fip) + return EXIT_FAILURE; + + if (TIFFUnsetField(tiff, TIFFFieldTag(fip)) != 1) + { + fprintf(stderr, "Failed to unset %s\n", TIFFFieldName(fip)); + } + arg_index++; + } else if (strcmp(argv[arg_index],"-s") == 0 && arg_index < argc-3) { const TIFFField *fip; const char *tagname; @@ -136,10 +166,10 @@ main(int argc, char* argv[]) "Number of tag values is not enough. " "Expected %d values for %s tag, got %d\n", wc, TIFFFieldName(fip), argc - arg_index); - return 4; + return EXIT_FAILURE; } - if (wc > 1) { + if (wc > 1 || TIFFFieldWriteCount(fip) == TIFF_VARIABLE) { int i, size; void *array; @@ -173,6 +203,9 @@ main(int argc, char* argv[]) size = 4; break; + case TIFF_LONG8: + case TIFF_SLONG8: + case TIFF_IFD8: case TIFF_DOUBLE: size = 8; break; @@ -182,7 +215,7 @@ main(int argc, char* argv[]) if (!array) { fprintf(stderr, "No space for %s tag\n", tagname); - return 4; + return EXIT_FAILURE; } switch (TIFFFieldDataType(fip)) { @@ -209,7 +242,16 @@ main(int argc, char* argv[]) case TIFF_SLONG: case TIFF_IFD: for (i = 0; i < wc; i++) - ((uint32 *)array)[i] = atol(argv[arg_index+i]); + ((int32 *)array)[i] = atol(argv[arg_index+i]); + break; + case TIFF_LONG8: + for (i = 0; i < wc; i++) + ((uint64 *)array)[i] = strtoll(argv[arg_index+i], (char **)NULL, 10); + break; + case TIFF_SLONG8: + case TIFF_IFD8: + for (i = 0; i < wc; i++) + ((int64 *)array)[i] = strtoll(argv[arg_index+i], (char **)NULL, 10); break; case TIFF_DOUBLE: for (i = 0; i < wc; i++) @@ -260,6 +302,12 @@ main(int argc, char* argv[]) ret = TIFFSetField(tiff, TIFFFieldTag(fip), atol(argv[arg_index++])); break; + case TIFF_LONG8: + case TIFF_SLONG8: + case TIFF_IFD8: + ret = TIFFSetField(tiff, TIFFFieldTag(fip), + strtoll(argv[arg_index++], (char **)NULL, 10)); + break; case TIFF_DOUBLE: ret = TIFFSetField(tiff, TIFFFieldTag(fip), atof(argv[arg_index++])); @@ -284,18 +332,19 @@ main(int argc, char* argv[]) const TIFFField *fip; char *text; size_t len; + int ret; arg_index++; fip = GetField(tiff, argv[arg_index]); if (!fip) - return 3; + return EXIT_FAILURE; if (TIFFFieldDataType(fip) != TIFF_ASCII) { fprintf( stderr, "Only ASCII tags can be set from file. " "%s is not ASCII tag.\n", TIFFFieldName(fip) ); - return 5; + return EXIT_FAILURE; } arg_index++; @@ -306,28 +355,41 @@ main(int argc, char* argv[]) } text = (char *) malloc(1000000); + if(text == NULL) { + fprintf( stderr, + "Memory allocation error\n"); + fclose( fp ); + continue; + } len = fread( text, 1, 999999, fp ); text[len] = '\0'; fclose( fp ); - if(TIFFSetField( tiff, TIFFFieldTag(fip), text ) != 1) { + if(TIFFFieldPassCount( fip )) { + ret = TIFFSetField( tiff, TIFFFieldTag(fip), (uint16)len, text ); + } else { + ret = TIFFSetField( tiff, TIFFFieldTag(fip), text ); + } + if(!ret) { fprintf(stderr, "Failed to set %s from file %s\n", TIFFFieldName(fip), argv[arg_index]); } _TIFFfree( text ); arg_index++; + } else if (strcmp(argv[arg_index],"-h") == 0 || strcmp(argv[arg_index],"--help") == 0) { + usage(EXIT_SUCCESS); } else { fprintf(stderr, "Unrecognised option: %s\n", argv[arg_index]); - usage(); + usage(EXIT_FAILURE); } } TIFFRewriteDirectory(tiff); TIFFClose(tiff); - return 0; + return EXIT_SUCCESS; } /* vim: set ts=8 sts=8 sw=8 noet: */ diff --git a/thirdparty/tiff-4.0.3/tools/tiffsplit.c b/thirdparty/tiff-4.2.0/tools/tiffsplit.c similarity index 95% rename from thirdparty/tiff-4.0.3/tools/tiffsplit.c rename to thirdparty/tiff-4.2.0/tools/tiffsplit.c index fa43d63f..43b6fdc1 100644 --- a/thirdparty/tiff-4.0.3/tools/tiffsplit.c +++ b/thirdparty/tiff-4.2.0/tools/tiffsplit.c @@ -1,5 +1,3 @@ -/* $Id: tiffsplit.c,v 1.22 2011-10-22 17:03:01 bfriesen Exp $ */ - /* * Copyright (c) 1992-1997 Sam Leffler * Copyright (c) 1992-1997 Silicon Graphics, Inc. @@ -32,8 +30,15 @@ #include "tiffio.h" +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif + #ifndef HAVE_GETOPT -extern int getopt(int, char**, char*); +extern int getopt(int argc, char * const argv[], const char *optstring); #endif #define CopyField(tag, v) \ @@ -62,7 +67,7 @@ main(int argc, char* argv[]) if (argc < 2) { fprintf(stderr, "%s\n\n", TIFFGetVersion()); fprintf(stderr, "usage: tiffsplit input.tif [prefix]\n"); - return (-3); + return (EXIT_FAILURE); } if (argc > 2) { strncpy(fname, argv[2], sizeof(fname)); @@ -85,14 +90,14 @@ main(int argc, char* argv[]) _TIFFfree(path); if (out == NULL) - return (-2); + return (EXIT_FAILURE); if (!tiffcp(in, out)) - return (-1); + return (EXIT_FAILURE); TIFFClose(out); } while (TIFFReadDirectory(in)); (void) TIFFClose(in); } - return (0); + return (EXIT_SUCCESS); } static void @@ -119,7 +124,7 @@ newfilename(void) if (fnum == MAXFILES) { if (!defname || fname[0] == 'z') { fprintf(stderr, "tiffsplit: too many files.\n"); - exit(1); + exit(EXIT_FAILURE); } fname[0]++; fnum = 0; @@ -239,6 +244,7 @@ cpStrips(TIFF* in, TIFF* out) if (!TIFFGetField(in, TIFFTAG_STRIPBYTECOUNTS, &bytecounts)) { fprintf(stderr, "tiffsplit: strip byte counts are missing\n"); + _TIFFfree(buf); return (0); } for (s = 0; s < ns; s++) { @@ -272,6 +278,7 @@ cpTiles(TIFF* in, TIFF* out) if (!TIFFGetField(in, TIFFTAG_TILEBYTECOUNTS, &bytecounts)) { fprintf(stderr, "tiffsplit: tile byte counts are missing\n"); + _TIFFfree(buf); return (0); } for (t = 0; t < nt; t++) { diff --git a/thirdparty/zlib-1.2.8/lib/zlib-1.2.8_2019.lib b/thirdparty/zlib-1.2.8/lib/zlib-1.2.8_2019.lib new file mode 100644 index 00000000..3ace85bd --- /dev/null +++ b/thirdparty/zlib-1.2.8/lib/zlib-1.2.8_2019.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ac2b88ecc862920a87f5077d163b5caef13f4bbd48f54e58c167cb3c2aed663 +size 788528 diff --git a/thirdparty/zlib-1.2.8/lib/zlib-1.2.8_2019_64.lib b/thirdparty/zlib-1.2.8/lib/zlib-1.2.8_2019_64.lib new file mode 100644 index 00000000..0f9c9e28 --- /dev/null +++ b/thirdparty/zlib-1.2.8/lib/zlib-1.2.8_2019_64.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c44400101fe54d7f5d8630edc8cba409b94a7fa47ea417e33fcc1dc3fd08970 +size 800280 diff --git a/thirdparty/zlib-1.2.8/lib/zlib-1.2.8_2019_64d.lib b/thirdparty/zlib-1.2.8/lib/zlib-1.2.8_2019_64d.lib new file mode 100644 index 00000000..9f60c5f8 --- /dev/null +++ b/thirdparty/zlib-1.2.8/lib/zlib-1.2.8_2019_64d.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ef9236ac81ae404499a99b38f41a3b0591c7bfe79d9cb49358cec3ee3cf88b8 +size 366734 diff --git a/thirdparty/zlib-1.2.8/lib/zlib-1.2.8_2019d.lib b/thirdparty/zlib-1.2.8/lib/zlib-1.2.8_2019d.lib new file mode 100644 index 00000000..df1a0922 --- /dev/null +++ b/thirdparty/zlib-1.2.8/lib/zlib-1.2.8_2019d.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95e800099b8b8446b43777f259777fef61633e6041d6cba8716e7ff1051e3144 +size 325556 diff --git a/thirdparty/zlib-1.2.8/prj/zlib/zlib.vcxproj b/thirdparty/zlib-1.2.8/prj/zlib/zlib.vcxproj index 9b356c7d..62f7de14 100644 --- a/thirdparty/zlib-1.2.8/prj/zlib/zlib.vcxproj +++ b/thirdparty/zlib-1.2.8/prj/zlib/zlib.vcxproj @@ -27,27 +27,27 @@ StaticLibrary true MultiByte - v140 + v142 StaticLibrary true MultiByte - v140 + v142 StaticLibrary false true MultiByte - v140 + v142 StaticLibrary false true MultiByte - v140 + v142 diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txt index c791fb37..be1b8aa4 100644 --- a/toonz/sources/CMakeLists.txt +++ b/toonz/sources/CMakeLists.txt @@ -336,7 +336,16 @@ if(BUILD_ENV_MSVC) set(PLATFORM2 _64) endif() - if(MSVC_VERSION GREATER 1800) +#--- MSVC_VERSIONs --- +#1800 = VS 12.0 (v120 toolset) - 2013 +#1900 = VS 14.0 (v140 toolset) - 2015 +#1910-1919 = VS 15.0 (v141 toolset) - 2017 +#1920-1929 = VS 16.0 (v142 toolset) - 2019 +#1930-1939 = VS 17.0 (v143 toolset) - 2022 +# + if(MSVC_VERSION GREATER 1919) + set(MSVC_LIB_VERSION 2019) + elseif(MSVC_VERSION GREATER 1800) set(MSVC_LIB_VERSION 2015) else() set(MSVC_LIB_VERSION 2013) @@ -351,10 +360,10 @@ if(BUILD_ENV_MSVC) #set(JPEG_LIB ${SDKROOT}/LibJPEG/jpeg-9/lib/LibJPEG-9_${MSVC_LIB_VERSION}${PLATFORM2}.lib) set(JPEG_LIB ${SDKROOT}/libjpeg-turbo/lib/jpeg-static_${MSVC_LIB_VERSION}${PLATFORM2}.lib) set(TURBOJPEG_LIB ${SDKROOT}/libjpeg-turbo/lib/turbojpeg-static_${MSVC_LIB_VERSION}${PLATFORM2}.lib) - set(TIFF_INCLUDE_DIR ${SDKROOT}/tiff-4.0.3/libtiff) + set(TIFF_INCLUDE_DIR ${SDKROOT}/tiff-4.2.0/libtiff) set(TIFF_LIB - optimized ${SDKROOT}/tiff-4.0.3/lib/LibTIFF-4.0.3_${MSVC_LIB_VERSION}${PLATFORM2}.lib - debug ${SDKROOT}/tiff-4.0.3/lib/LibTIFF-4.0.3_${MSVC_LIB_VERSION}${PLATFORM2}d.lib + optimized ${SDKROOT}/tiff-4.2.0/lib/Libtiff-4.2.0_${MSVC_LIB_VERSION}${PLATFORM2}.lib + debug ${SDKROOT}/tiff-4.2.0/lib/Libtiff-4.2.0_${MSVC_LIB_VERSION}${PLATFORM2}d.lib ) set(PNG_LIB optimized ${SDKROOT}/libpng-1.6.21/lib/libpng16_${MSVC_LIB_VERSION}${PLATFORM2}.lib