Avoid recursive gzgetc() macro call.

Recursive macro calls are normally caught by the preprocessor and
avoided. This commit avoids the possibility of a problem entirely.
pull/176/head
Mark Adler 9 years ago
parent 7d6956b6a1
commit ebbc57393d
  1. 4
      zlib.h

@ -1698,10 +1698,10 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
#ifdef Z_PREFIX_SET
# undef z_gzgetc
# define z_gzgetc(g) \
((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
#else
# define gzgetc(g) \
((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
#endif
/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or

Loading…
Cancel
Save