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

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

From: "ir(dot) F(dot)T(dot)M(dot) van Vugt bc(dot)" <ftm(dot)van(dot)vugt(at)foxi(dot)nl>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-bugs(at)postgreSQL(dot)org>
Subject: Re: multiple exception definition in pg_type.h -> error compiling postgres support in Qt with gcc v3.2 (SuSE 8.1)
Date: 2002-10-16 08:05:05
Message-ID: 200210161005.05172.ftm.van.vugt@foxi.nl (view raw or flat)
Thread:
Lists: 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 would 
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

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2002-10-16 13:48:38
Subject: Re: multiple exception definition in pg_type.h -> error compiling postgres support in Qt with gcc v3.2 (SuSE 8.1)
Previous:From: Talja AriDate: 2002-10-16 07:59:29
Subject: now() gives the time of the last commit, not the time it is called

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