boostorg / gil

Boost.GIL - Generic Image Library | Requires C++14 since Boost 1.80
https://boostorg.github.io/gil
Boost Software License 1.0
178 stars 163 forks source link

refactor: Replace deprecated libtiff v4.3 typedefs with C99 fixed-size integers #685

Closed marco-langer closed 2 years ago

marco-langer commented 2 years ago

Description

This PR replaces libtiff's fixed-size typedef uint32 with C99's fixed-size typedef std::uint32_t.

Rational: libtiff's typedefs are deprecated since v4.3.0 and we already see this deprecation warning in our CI for builds with clang on macos-10.15.

C99's fixed-size typedefs and libtiffs typedefs are almost interchangeable, with the notable exception for 64 bit macOS and a breaking change between long and long long according to this and this discussion. Currently I don't think this will affect Gil as we only used uint32 from libtiffs typedefs, but nevertheless it might be a good idea to check the impact of this PR on macOS builds before merging it into develop.

codecov[bot] commented 2 years ago

Codecov Report

Merging #685 (c1026cb) into develop (526c898) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           develop     #685   +/-   ##
========================================
  Coverage    80.32%   80.32%           
========================================
  Files          117      117           
  Lines         5032     5032           
========================================
  Hits          4042     4042           
  Misses         990      990           
striezel commented 2 years ago

C99's fixed-size typedefs and libtiffs typedefs are almost interchangeable, with the notable exception for 64 bit macOS and a breaking change between long and long long according to this and this discussion. Currently I don't think this will affect Gil as we only used uint32 from libtiffs typedefs, but nevertheless it might be a good idea to check the impact of this PR on macOS builds before merging it into develop.

I don't have much of a clue about macOS in general, but FWIW GitHub Actions is now also offering macOS 12 runners: https://github.blog/changelog/2022-06-13-github-actions-macos-12-for-github-hosted-runners-is-now-generally-available/ Maybe that can be helpful here to extend tests to newer macOS versions.