]> granicus.if.org Git - graphviz/commitdiff
Remove 2 -Wundef warnings in lefty.c
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Wed, 9 Sep 2020 08:45:14 +0000 (10:45 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Fri, 11 Sep 2020 06:04:39 +0000 (08:04 +0200)
It happened to be 2 warnings using autotools on Ubuntu 18.04, but it
could be up to 4.

cmd/lefty/lefty.c

index 3ca82f298ef0e35d70fdcef674c7b8ae550b9244..dadfc1cc7d914c7b371ed8ca8e74ddbf21ad595d 100644 (file)
 #  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)