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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-11-16T02:52:21Z
Lists: pgsql-hackers

Attachments

Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Nov 15, 2017 at 5:22 PM, Tom Lane <tgl@sss.pgh.pa.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

Commits

  1. Further refactoring of c.h and nearby files.

  2. Rearrange c.h to create a "compiler characteristics" section.