From: Magnus Jacobsson Date: Wed, 9 Sep 2020 08:45:14 +0000 (+0200) Subject: Remove 2 -Wundef warnings in lefty.c X-Git-Tag: 2.46.0~20^2^2~87^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=638cc2e04d3b9976adc46aed326dd5cdea626085;p=graphviz Remove 2 -Wundef warnings in lefty.c It happened to be 2 warnings using autotools on Ubuntu 18.04, but it could be up to 4. --- diff --git a/cmd/lefty/lefty.c b/cmd/lefty/lefty.c index 3ca82f298..dadfc1cc7 100644 --- a/cmd/lefty/lefty.c +++ b/cmd/lefty/lefty.c @@ -44,16 +44,16 @@ # endif #endif -#if HAVE_FILE_CNT +#if defined(HAVE_FILE_CNT) && HAVE_FILE_CNT #define canread(f) ((f)->_cnt>0) #else -# if HAVE_FILE_NEXT +# if defined(HAVE_FILE_NEXT) && HAVE_FILE_NEXT # define canread(f) ((f)->_next<(f)->_endb) # else -# if HAVE_FILE_IO_READ_END +# if defined(HAVE_FILE_IO_READ_END) && HAVE_FILE_IO_READ_END # define canread(f) ((f)->_IO_read_end>(f)->_IO_read_ptr) # else -# if HAVE_FILE_R +# if defined(HAVE_FILE_R) && HAVE_FILE_R # define canread(f) ((f)->_r>0) # else # define canread(f) (1)