Skip site navigation (1) Skip section navigation (2)

Re: incompatible pointer types with newer zlib

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: incompatible pointer types with newer zlib
Date: 2012-02-24 10:01:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On tor, 2012-02-23 at 10:17 -0500, Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > Fixing most of this is not difficult, see attached patch.  The only
> > ugliness is in pg_backup_archiver.h
> > FILE       *FH;             /* General purpose file handle */
> > which is used throughout pg_dump as sometimes a real FILE* and sometimes
> > a gzFile handle.  There are also some fileno() calls on this, so just
> > replacing this with an #ifdef isn't going to work.  This might need some
> > more restructuring to make the code truly type-safe.  My quick patch
> > replaces the type with void*, thus sort of restoring the original
> > situation that allowed this to work.
> void * seems entirely reasonable given the two different usages, but
> I would be happier if the patch added explicit casts whereever FH is
> set to or used as one of these two types.

That would add about 70 casts all over the place.  I don't think that
will make things clearer or more robust.  I think we either leave it as
my first patch for now or find a more robust solution with a union or

In response to


pgsql-hackers by date

Next:From: Simon RiggsDate: 2012-02-24 10:35:44
Subject: Re: Initial 9.2 pgbench write results
Previous:From: Jeroen VermeulenDate: 2012-02-24 09:38:52
Subject: Re: foreign key locks, 2nd attempt

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group