Re: windows consolidated cleanup

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: windows consolidated cleanup
Date: 2011-04-24 17:35:06
Message-ID: 4DB45F4A.8060806@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04/24/2011 12:25 PM, Tom Lane wrote:
> Andrew Dunstan<andrew(at)dunslane(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2011-04-24 17:47:34 Re: windows consolidated cleanup
Previous Message Simon Riggs 2011-04-24 17:22:43 Unlogged tables, persistent kind