Skip to content

Bump bundled zlib to 1.3.2 - #59

Merged
danoli3 merged 1 commit into
masterfrom
chore/bump-zlib-1.3.2
Aug 16, 2026
Merged

Bump bundled zlib to 1.3.2#59
danoli3 merged 1 commit into
masterfrom
chore/bump-zlib-1.3.2

Conversation

@danoli3

@danoli3 danoli3 commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Bumps bundled zlib from 1.2.13 to 1.3.2 (latest release), superseding the stalled 1.3.1 bump in #16 which had conflicts.

zlib >= 1.3 needs HAVE_UNISTD_H defined for gzread.c/gzwrite.c (normally set by zlib's own configure/CMake, which building its sources directly bypasses) - added for non-Windows builds.

No FreeImage-specific patches existed in the old bundled copy (diffed clean against pristine upstream 1.2.13), so this is a straight vendor bump.

Fixes: #16

Wholesale-replaces Source/ZLib/* with the official zlib 1.3.2 release
(latest as of this commit; supersedes the stalled 1.3.1 bump in #16).
No FreeImage-specific patches existed in the bundled 1.2.13 copy (diffed
clean against pristine upstream), so this is a straight vendor bump.

zlib >= 1.3 needs HAVE_UNISTD_H defined for gzread.c/gzwrite.c to see
read()/write()/close() - normally set by zlib's own configure/CMake
auto-detection (check_include_file(unistd.h ...)), which building its
sources directly via FreeImage's own CMakeLists.txt bypasses. Define it
directly for non-Windows builds.

Verified: builds clean, FreeImage_ZLibCompress/Uncompress round-trips
correctly, and a PNG save/load round-trip (uses zlib internally via
libpng) produces correct pixel data.
@danoli3 danoli3 mentioned this pull request Aug 16, 2026
@danoli3
danoli3 merged commit 95a1899 into master Aug 16, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant