On Tue, May 18, 2004 at 04:41:59PM -0700, Matt Massie wrote:
> On Tue, 2004-05-18 at 16:29, Brooks Davis wrote:
> 
> > gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include -D_REENTRANT -Wall -c 
> > gzio.c -MT gzio.lo -MD -MP -MF .deps/gzio.TPlo  -fPIC -DPIC -o .libs/gzio.lo
> > gzio.c:24: error: redefinition of `struct internal_state'
> > gzio.c: In function `gz_open':
> > gzio.c:163: error: `Z_RLE' undeclared (first use in this function)
> > gzio.c:163: error: (Each undeclared identifier is reported only once
> > gzio.c:163: error: for each function it appears in.)
> > ...
> > 
> > The lines above that only compile due to a hidden dependency on
> > installed zlib headers.
> 
> are you saying that you get this error if zlib is not installed?  or you
> get this error even if zlib is installed and the headers are available?

I get this with zlib installed.  Z_RLE isn't defined in the zlib headers
on FreeBSD systems or the linux box I checked.

> i assume the latter since we have a redefinition.  
> 
> i had to modify gzio.c from the zlib library in order to correctly
> handle on-the-fly compression over sockets for multi-threaded apps. 
> previously, it was using fdopened sockets.  ugly.  i changed it to drop
> down to do read/writes on raw file descriptors and catch EINTR.  clearly
> i didn't get the headers right.  this isn't the first time i'm messed
> that up.
> 
> any ideas of how to fix it?  

If we're just using a hacked up copy of zlib with new symbols, we should
probably import a renamed copy of zlib.h that includes a definition of
Z_RLE do we stop picking up the system one.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

Attachment: pgp84u5u5Ft6o.pgp
Description: PGP signature

Reply via email to