Skip to content

Commit

Permalink
fix: Restore STDERR in pngtest.c
Browse files Browse the repository at this point in the history
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] cc8006c

Fixes: #560
Reviewed-by: Cosmin Truta <[email protected]>
Signed-off-by: Cosmin Truta <[email protected]>
  • Loading branch information
bungeman authored and ctruta committed Sep 8, 2024
1 parent 20f819c commit 40878fd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pngtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@

#include "png.h"

/* This hack was introduced for historical reasons, and we are
* still keeping it in libpng-1.6.x for compatibility reasons.
*/
#define STDERR stdout

/* Generate a compiler error if there is an old png.h in the search path. */
typedef png_libpng_version_1_6_44_git Your_png_h_is_not_version_1_6_44_git;

Expand Down Expand Up @@ -103,11 +108,6 @@ typedef png_libpng_version_1_6_44_git Your_png_h_is_not_version_1_6_44_git;
typedef FILE * png_FILE_p;
#endif

/* This hack was introduced for historical reasons, and we are
* still keeping it in libpng-1.6.x for compatibility reasons.
*/
#define STDERR stdout

#ifndef PNG_DEBUG
# define PNG_DEBUG 0
#endif
Expand Down

0 comments on commit 40878fd

Please sign in to comment.