pnggroup / libpng

LIBPNG: Portable Network Graphics support, official libpng repository
http://libpng.sf.net
Other
1.25k stars 611 forks source link

Restore STDERR in pngtest.c #557

Open bungeman opened 4 months ago

bungeman commented 4 months ago

In "test: Add consistency checks for the PNG_LIBPNG_VER* number" [0] the STDERR macro was moved from outside an ifdef to inside an ifdef. This broke the code in the else of this ifdef which also uses the STDERR macro. Move STDERR back to where it was to avoid compile errors in the else case.

[0] https://github.com/pnggroup/libpng/commit/cc8006c48d90cca8bf380fa69469b08f4edb00c5

Fixes: https://github.com/pnggroup/libpng/issues/560

jbowler commented 4 months ago

This should be an issue with a repro; i.e. report a bug, don't suggest a fix.

jbowler commented 10 hours ago

@ctruta: I've now verified this against the repro in #560 It's an issue for libpng16 because it breaks real world configurations. In particular it breaks configurations which don't have the read support pngtest.c requires - "make" step fails when it compiles pngtest.c

The change fixes this.