error using MacPorts zlib, not present with system zlib?

Mike Alexander mta at
Wed Feb 22 18:36:44 PST 2012

--On February 22, 2012 4:50:52 PM -0500 Eric Cronin 
<ecronin at> wrote:

> This code is wrong.  The zlib documentation says gzgetc takes a
> gzFile* not a void*.

Your analysis of this is correct except for one minor point.  gzopen 
returns and gzgetc (and others) take a gzFile not a gzFile*.  The 
definition of gzFile is

  typedef struct gzFile_s *gzFile;

so it's defined as a pointer.  Some compilers at some warning levels 
get annoyed if you use a gzFile* instead of gzFile for these parameters.


More information about the macports-users mailing list