py-zipfile-deflate64: Xcode ≥ 16.3 compatibility #29411
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adapts madler/zlib@4bd9a71 (2024-01-14), which appeared in zlib 1.3.1 (2024-01-22), to the snapshot of zlib in zipfile-deflate64 0.2.0 (2022-01-05). This zlib snapshot is based on zlib 1.2.11 (2017-01-15).
This patch is necessary for compatibility with the Clang compiler in Xcode ≥ 16.3: TARGET_OS_MAC as it was used in zutil.h intends to refer to the Classic Mac OS. This macro has long been defined by the macOS SDK to mean modern macOS, but was only defined by <TargetConditionals.h>, which was not ordinarily llvm/llvm-project@6e1f191 (2023-12-07, in upstream Clang 18.1, 2024-01-29, and in Xcode 16.3, 2025-03-31) now has the compiler itself defining this macro unconditionally for Apple targets (https://releases.llvm.org/18.1.0/tools/clang/docs/ReleaseNotes.html#clang-frontend-potentially-breaking-changes), with the effect of breaking code like this that used the macro in a different way. There was some discussion of this at madler/zlib#895.
The upstream project, https://github.com/brianhelba/zipfile-deflate64/, appears dead, with no updates since 2022-01-05, and no action on pull requests since then either. brianhelba/zipfile-deflate64#45 was reported against the upstream on 2025-04-24 for this exact problem. But @brianhelba anyway in case it helps.
Description
Type(s)
Tested on
macOS 26.0 25A354 arm64
Xcode 26.0 17A324
Verification
Have you
port lint?sudo port test?sudo port -vst install?