Re: Further simplification of c.h's #include section

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Further simplification of c.h's #include section
Date: 2017-11-16 02:52:21
Message-ID: 31734.1510800741@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Wed, Nov 15, 2017 at 5:22 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Thoughts?

> Sure, having a win32_port.h as a sub-include of port.h seems fine.

Here's a draft patch for this. I'm not too certain about the interactions
with Cygwin; some of the stuff I moved out of port.h might have to go back
there so that a Cygwin build will see it. There might also be some
declaration ordering dependencies that I failed to spot.

(Speaking of which, I'm wondering why the existing code monkeys around
with _WIN32_WINNT after it's already included a bunch of system headers.
Shouldn't that be set earlier --- in other words, shouldn't that code
move back to win32.h from win32_port.h? But I've not touched that here.
I did remove an at-best-redundant definition from pg_ctl.c though.)

Anybody want to test this manually, or shall we just throw it into the
buildfarm and see what blows up?

regards, tom lane

Attachment Content-Type Size
saner-win32-header-setup-1.patch text/x-diff 34.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2017-11-16 02:54:23 Re: [HACKERS] path toward faster partition pruning
Previous Message Tom Lane 2017-11-16 02:41:18 Re: pgsql: Disable installcheck tests for test_session_hooks