On 04/24/2011 12:25 PM, Tom Lane wrote:
Andrew Dunstan<and...@dunslane.net>  writes:
The attached patch is intended to clean up a bunch of compiler warnings
seen on Windows due to mismatches of signedness or constness, unused
variables, redefined macros and a missing prototype.
BTW, this hunk:



[snip]

is indicative of far worse problems than the one it claims to solve.
This file is in fundamental violation of the first commandment of
Postgres #includes, which is "thou shalt have no other gods before c.h".
We need to put postgres.h *before* the Python.h include.  I don't know
what issues led to the current arrangement but it is fraught with
portability gotchas.  In particular it's just about guaranteed to fail
on platforms where<stdio.h>  reacts to _FILE_OFFSET_BITS --- plpython.c
is going to get compiled expecting a different stdio library than the
rest of the backend.

                        


Well, I certainly noticed that postgres.h wasn't first, but assumed it had been sanctioned long ago. It's been that way for a long time.

I'll leave that bit out of this cleanup, but we should look at this whole mess separately ASAP.

cheers

andrew

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to