mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Remove 'defined' within macro
This eliminates the use of 'defined' within macros that get substituted on #if lines; see the previous patch for a more detailed discussion. Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
parent
0ea7a09ced
commit
512336676e
9
png.c
9
png.c
@ -996,8 +996,13 @@ png_colorspace_set_gamma(png_const_structrp png_ptr,
|
||||
* In 1.6.0 this test replaces the ones in pngrutil.c, in the gAMA chunk
|
||||
* handling code, which only required the value to be >0.
|
||||
*/
|
||||
# define ERRMSG (defined PNG_TRANSFORM_MECH_SUPPORTED) &&\
|
||||
(defined PNG_ERROR_TEXT_SUPPORTED)
|
||||
# if (defined PNG_TRANSFORM_MECH_SUPPORTED) &&\
|
||||
(defined PNG_ERROR_TEXT_SUPPORTED)
|
||||
# define ERRMSG 1
|
||||
# else
|
||||
# define ERRMSG 0
|
||||
# endif
|
||||
|
||||
# if ERRMSG
|
||||
png_const_charp errmsg;
|
||||
# endif
|
||||
|
10
pngpriv.h
10
pngpriv.h
@ -319,9 +319,13 @@
|
||||
* is just the affirm code; there's no reason to allow configuration of this
|
||||
* option.
|
||||
*/
|
||||
#define PNG_AFFIRM_TEXT (PNG_RELEASE_BUILD ?\
|
||||
(defined PNG_ERROR_TEXT_SUPPORTED) :\
|
||||
(defined PNG_WARNINGS_SUPPORTED) || (defined PNG_CONSOLE_IO_SUPPORTED))
|
||||
#if PNG_RELEASE_BUILD ?\
|
||||
(defined PNG_ERROR_TEXT_SUPPORTED) :\
|
||||
(defined PNG_WARNINGS_SUPPORTED) || (defined PNG_CONSOLE_IO_SUPPORTED)
|
||||
# define PNG_AFFIRM_TEXT 1
|
||||
#else
|
||||
# define PNG_AFFIRM_TEXT 0
|
||||
#endif /* PNG_AFFIRM_TEXT definition */
|
||||
|
||||
#define PNG_SRC_LINE (PNG_SRC_FILE + __LINE__)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user