# Changes in TIFF v4.0.6

References
Current Version | v4.0.6 (tag Release-v4-0-6)
Previous Version | v4.0.5
Master Download Site | https://download.osgeo.org/libtiff/
Master HTTP Site | https://download.osgeo.org/libtiff/

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)

## Software configuration changes

- `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.

## Library changes

- Fixes to avoid undefined behaviour of signed types (C standard compliance).

- Fixes to avoid possible issues 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 (MapTools bugzilla #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.

## Tools changes

- tiffgt

  - Silence glut API deprecation warnings on MacOS X.

- fax2ps

  - Detect failure to write to temporary file.

## Contributed software changes

None