Re: [PATCH] Move 'long long' check to c.h - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Move 'long long' check to c.h
Date
Msg-id 10589.1274721141@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] Move 'long long' check to c.h  (Michael Meskes <meskes@postgresql.org>)
Responses Re: [PATCH] Move 'long long' check to c.h
List pgsql-hackers
Michael Meskes <meskes@postgresql.org> writes:
> On Sat, May 22, 2010 at 11:20:50PM -0400, Stephen Frost wrote:
>> git diff -p), I noted that c.h is already included by both extern.h
>> and ecpg.header through postgres_fe.h.  Given this and that we're
>> already doing alot of similar #define's there (unlike in those other
>> files), I felt c.h was a more appropriate place.  Putting it in c.h
>> also means we don't have to duplicate that code.

> But do other parts of PG also need it? Keep in mind that this works for ecpg
> because it needs LLONG_MIN or LONGLONG_MIN anyway. I'm not sure if there are
> compilers that have long long without those defines, but I'd guess there
> aren't.

I think the current coding is extremely fragile (if it indeed works at
all) because of its assumption that <limits.h> has been included
already.  In any case, we have configure tests that exist only for the
benefit of contrib modules, so it's hard to argue that we shouldn't have
one that exists only for ecpg.

I think we should fix this (properly) for 9.0.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Exposing the Xact commit order to the user
Next
From: Bruce Momjian
Date:
Subject: Re: pg_upgrade docs