Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix unused platform check and configuration for macOS
In a similar manner as zlib (madler/zlib#895), libpng contains a header configuration that's no longer valid and hasn't been exercised for the macOS target. - The target OS conditional macros are misused. Specifically `TARGET_OS_MAC` covers all Apple targets, including iOS, and it should not be checked with `#if defined` as they would always be defined (to either 1 or 0) on Apple platforms. - `#include <fp.h>` no longer works for the macOS target and results in a compilation failure. macOS ships all required functions in `math.h`, and clients should use `math.h` instead. This problem has not been noticed until a recent extension in clang (llvm/llvm-project#74676) exposed the issue and broke libpng builds on Apple platforms. The failure can be reproduced now by adding `#include <TargetConditionals.h>` before the block.
- Loading branch information