Re: multiple exception definition in pg_type.h -> error compiling postgres support in Qt with gcc v3.2 (SuSE 8.1) - Mailing list pgsql-bugs

From ir. F.T.M. van Vugt bc.
Subject Re: multiple exception definition in pg_type.h -> error compiling postgres support in Qt with gcc v3.2 (SuSE 8.1)
Date
Msg-id 200210161005.05172.ftm.van.vugt@foxi.nl
Whole thread Raw
In response to Re: multiple exception definition in pg_type.h -> error  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: multiple exception definition in pg_type.h -> error compiling postgres support in Qt with gcc v3.2 (SuSE 8.1)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Tom Lane writes:
> That's hard to believe; I think it's Qt that's doing something strange
> here.

As a newbie on the list, I'm sorry I have to disagree with you, Tom... ;)

The fact that PostgreSQL dissolves stuff into something like:

#include <errno.h>
extern int errno;
extern int errno;

was more of a suprise to me, but I could be missing something here.


>> Anyone object to doing
>>
>>       extern int no_such_variable;
>>
>> instead?
>
>I wouldn't be surprised if some imaginative AIX linker will croak on that,
>but let's try it.

Well, can't say anything on that particular linker, but obviously this woul=
d=20
be a workable solution.


May I ask why you don't want to go with something like:

#define DESCR(x) typedef int postgresql_foo_bar



As far as Qt goes, both their next minor version as well as the next
major release will contain a workaround for this problem, something
like:

#if defined(errno)
# undef errno
#endif
#define errno qt_psql_errno
#include <catalog/pg_type.h>
#undef errno

But I guess the supposed fix will go into the PostgreSQL sourcetree?


Mind you, I don't want to start a discussion on who 'has to' solve
what where and which way is the best ;-)



Anyway, thanks a lot for the rapid responses!




Frank van Vugt

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: spurious "UNIQUE constraint matching given keys for referenced table" error
Next
From: Tom Lane
Date:
Subject: Re: multiple exception definition in pg_type.h -> error compiling postgres support in Qt with gcc v3.2 (SuSE 8.1)