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

Re: incompatible pointer types with newer zlib

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: incompatible pointer types with newer zlib
Date: 2012-02-23 15:17:28
Message-ID: 13579.1330010248@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
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.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2012-02-23 15:28:20
Subject: Re: foreign key locks, 2nd attempt
Previous:From: Christopher BrowneDate: 2012-02-23 15:14:07
Subject: Re: Option for pg_dump to dump tables in clustered index order

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