Commit Graph

2812 Commits

Author SHA1 Message Date
Bob Friesenhahn
a9afad2a9f * 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.
2015-09-01 19:23:16 +00:00
Bob Friesenhahn
e762ba3de9 * 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-09-01 15:38:01 +00:00
Bob Friesenhahn
ba57d5f0b7 * 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-09-01 02:51:50 +00:00
Even Rouault
704f717cf5 * 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 15:05:57 +00:00
Even Rouault
45e29cce8d * 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-31 14:36:10 +00:00
Bob Friesenhahn
e9b10efff9 Additional CMake-related files were missing from the distribution tarball. 2015-08-31 00:01:18 +00:00
Bob Friesenhahn
adc4f64c30 Make edit of html/Makefile.am its own step so it is not missed. 2015-08-30 21:40:39 +00:00
Bob Friesenhahn
1fea0da266 All the CMakeLists.txt files were missing from the distribution tarball. 2015-08-30 21:26:45 +00:00
Even Rouault
42bfc7006a * libtiff/tif_lzw.c: make nextdata a unsigned type to avoid
undefined behaviour with shifts (gcc -fsanitize=shift)
2015-08-30 21:07:44 +00:00
Even Rouault
6dc8110cee * 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 20:49:55 +00:00
Bob Friesenhahn
27e622bff5 * configure.ac: libtiff 4.0.5 released. 2015-08-30 17:37:46 +00:00
Bob Friesenhahn
7663ccc1ec Fix compiler warning about constant value promotion to unsigned long. 2015-08-29 20:39:17 +00:00
Bob Friesenhahn
bcf0cb43f4 Add ld-version-script option to cmake build. 2015-08-29 15:30:28 +00:00
Bob Friesenhahn
036132130d Add CMake build instructions. 2015-08-29 15:30:11 +00:00
Bob Friesenhahn
0d55e7db1b Remove strange termination characters from ChangeLog. 2015-08-28 22:34:15 +00:00
Bob Friesenhahn
0841549b8a Use consistent line terminations. 2015-08-28 22:19:26 +00:00
Bob Friesenhahn
c38c973b79 Added HTML file describing the changes which will appear in the 4.0.5 release. 2015-08-28 16:04:56 +00:00
Bob Friesenhahn
b1f904c7a2 Add some comments in tif_win32.c regarding known issue with WIN64 build. 2015-08-23 20:12:44 +00:00
Bob Friesenhahn
5a17dc99ce For MinGW builds, make sure required CRT is available in order to enable large file support. 2015-08-23 17:49:01 +00:00
Bob Friesenhahn
d9bc8472e7 fax2tiff eliminate warning about cast to thandle_t. 2015-08-23 15:40:45 +00:00
Bob Friesenhahn
7ea1078bea rewrite_tag test uses main() with no argument list. 2015-08-23 14:23:00 +00:00
Bob Friesenhahn
c65c70205c Fix Cmake build issues caused by Windows large file updates. 2015-08-21 01:59:33 +00:00
Bob Friesenhahn
8ba4a1c894 Support large files under Windows using tif_unix.c and libtiff tools. 2015-08-19 02:31:04 +00:00
Bob Friesenhahn
a0e1185771 Fix problem with 'boolean' definition from IJG JPEG 9. 2015-08-16 20:08:21 +00:00
Bob Friesenhahn
4199a92ce7 tif_jpeg.c consistency fixes. 2015-08-15 20:13:07 +00:00
Bob Friesenhahn
01aa45a312 CMakeLists.txt fix for libtiffxx symbol versioning. 2015-08-14 02:26:37 +00:00
Bob Friesenhahn
80dc16cf74 * 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-07-04 22:09:27 +00:00
Bob Friesenhahn
d7db70c929 Add missing file from CMake patch set. 2015-06-25 13:24:52 +00:00
Bob Friesenhahn
5b90af247e * 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-25 02:27:58 +00:00
Bob Friesenhahn
0319952da2 * test/Makefile.am: tiff2rgba-quad-tile.jpg.sh depends on the JPEG
library so only execute if JPEG is available.
2015-06-21 19:32:32 +00:00
Bob Friesenhahn
f5047249d2 * libtiff 4.0.4 released. 2015-06-21 19:13:03 +00:00
Bob Friesenhahn
bdd91bbdf8 * 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.
2015-06-21 18:46:29 +00:00
Bob Friesenhahn
37c8b068e1 * html/build.html: Try to improve the nmake-based VC++ build
description.
2015-06-21 18:21:28 +00:00
Bob Friesenhahn
47d8b0eafd * libtiff/tiffconf.vc.h: Build fixes based on testing.
* libtiff/tif_config.vc.h: Build fixes based on testing.
2015-06-21 17:02:12 +00:00
Bob Friesenhahn
848ff19ce2 * libtiff/libtiff.def: TIFFRasterScanline does not exist so remove
export for it.
2015-06-21 14:35:07 +00:00
Bob Friesenhahn
d21d2b3057 * libtiff/tif_config.vc.h: Make adjustments to match the new
definitions that configure produces, including for WIN64.  Still
needs to be tested.

'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.
2015-06-21 01:09:09 +00:00
Bob Friesenhahn
108fe0c660 * 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.
2015-06-20 20:33:17 +00:00
Bob Friesenhahn
b72cc590ae * test/raw_decode.c (XMD_H): Avoid conflicting typedefs for INT32
and boolean in MinGW build due to including jpeglib.h.
2015-06-20 16:52:25 +00:00
Bob Friesenhahn
64a6901448 * test/rewrite_tag.c (main): Fix problem with location of variable
declaration.
2015-06-20 16:33:40 +00:00
Bob Friesenhahn
d4470e0648 * 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-20 16:07:00 +00:00
Bob Friesenhahn
d233f2b83c Add v4.0.4 changes summary in preparation for release. 2015-06-18 03:08:06 +00:00
Bob Friesenhahn
0b7487c60d * libtiff/tif_getimage.c: Fix four Coverity issues related to
unintended sign extension.
2015-06-17 03:12:20 +00:00
Bob Friesenhahn
ac3107ef45 Hopefully fix four Coverity issues related to unintended sign extension. 2015-06-17 01:34:07 +00:00
Even Rouault
39113ade50 * libtiff/tif_unix.c: fix compilation with MSVC (fix by Jeff McKenna) 2015-06-16 15:33:17 +00:00
Lee Howard
a2b4dfc83a Attempt to fix Coverity warning:
CID 1306634:  Integer handling issues  (SIGN_EXTENSION)
    Suspicious implicit sign extension: "img->samplesperpixel" with type
    "unsigned short" (16 bits, unsigned) is promoted in
    "img->col_offset * img->samplesperpixel" to type "int" (32 bits, signed),
    then sign-extended to type "long" (64 bits, signed).  If
    "img->col_offset * img->samplesperpixel" is greater than 0x7FFFFFFF, the
    upper bits of the result will all be 1.
2015-06-15 16:13:46 +00:00
Lee Howard
74d1dfd161 From Vadim Zeitlin on Bugzilla Bug #2510.
The attached patch fixes several harmless but still annoying warnings when
building libtiff...
2015-06-14 23:13:40 +00:00
Lee Howard
b5587ac2e4 From Ludolf Holzheid on Bugzilla Bug #2498:
Attached is a patch that adds a configure option to select the file I/O style
on Windows hosts.

It defaults to --enable-win32-io on all windows targets other than Cygwin and
to --disable-win32-io on Cygwin, and thus should be backwards-compatible.

This allows programs using the Unix file I/O style (such as Netpbm's tifftopnm)
to link against libtiff if configured for e.g. MinGW.
2015-06-14 22:55:16 +00:00
Lee Howard
837fbcd07a Update. 2015-06-14 22:16:37 +00:00
Lee Howard
0899543308 Bugzilla Bug #2409: Contribution by Gary Cramblitt and fix confirmed by Charles Stewart
TIFFRGBAImageGet does not properly handle a non-zero col_offset in the
TIFFRGBAImage structure passed as the first argument.  The current (incorrect)
behaviour depends upon the organization of the input tiff file as follows:

1.  If the TIFF is stripped, col_offset is completely ignored.
2.  If the TIFF is tiled, the image result is shifted to the left to the
nearest tile boundary.  For example, if the tilewidth is 100, col_offset is
125, and requested width is 200, you get an image with pixels from 100 up to
300, not 125 up to 325 as expected.

This problem was reported in the mailing list previously as follows, but no
action was taken:

1.  http://www.asmail.be/msg0054834339.html although Andrew is wrong about
tiled images working fine.
2.  http://www.asmail.be/msg0054682793.html
2015-06-14 22:14:10 +00:00
Lee Howard
a411152d3f From Marcos H. Woehrmann on Bugzilla Bug #2405. This corrects the shell equality operator. 2015-06-14 21:51:17 +00:00