From 0ea7a09ced4fb5d87d2a8e7b99891dacb641d88d Mon Sep 17 00:00:00 2001 From: John Bowler Date: Mon, 26 Dec 2016 16:24:40 -0800 Subject: [PATCH] Remove 'defined' within macro This removes the use of a macro containing the pre-processor 'defined' operator. It is unclear whether this is valid; a macro which "generates" 'defined' is not permitted, but the use of the work "generates" within the C90 standard seems to imply more than simple substitution of an expression itself containing a well-formed defined operation. Signed-off-by: John Bowler --- contrib/libtests/pngvalid.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/contrib/libtests/pngvalid.c b/contrib/libtests/pngvalid.c index 1c45b615a..330e26393 100644 --- a/contrib/libtests/pngvalid.c +++ b/contrib/libtests/pngvalid.c @@ -1,9 +1,8 @@ /* pngvalid.c - validate libpng by constructing then reading png files. * - * Last changed in libpng 1.6.26 [(PENDING RELEASE)] - * Copyright (c) 2014-2016 Glenn Randers-Pehrson - * Written by John Cunningham Bowler + * Last changed in libpng 1.6.26 [October 20, 2016] + * Copyright (c) 2014-2016 John Cunningham Bowler * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer @@ -4011,8 +4010,11 @@ check_interlace_type(int const interlace_type) # define do_own_interlace 1 #endif /* WRITE_INTERLACING tests */ -#define CAN_WRITE_INTERLACE\ - PNG_LIBPNG_VER >= 10700 || defined PNG_WRITE_INTERLACING_SUPPORTED +#if PNG_LIBPNG_VER >= 10700 || defined PNG_WRITE_INTERLACING_SUPPORTED +# define CAN_WRITE_INTERLACE 1 +#else +# define CAN_WRITE_INTERLACE 0 +#endif /* Do the same thing for read interlacing; this controls whether read tests do * their own de-interlace or use libpng.