Re: [RFC] building postgres with meson - v13

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, "wangw(dot)fnst(at)fujitsu(dot)com" <wangw(dot)fnst(at)fujitsu(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, samay sharma <smilingsamay(at)gmail(dot)com>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [RFC] building postgres with meson - v13
Date: 2022-09-27 04:29:27
Message-ID: CA+hUKG+50eOUbN++ocDc0Qnp9Pvmou23DSXu=ZA6fepOcftKqA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 27, 2022 at 2:19 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> Subject: [PATCH v17 15/23] windows: Set UMDF_USING_NTSTATUS globally, include ntstatus.h

No Windows expertise here, but this looks reasonable. I originally
tried to contain UMDF_USING_NTSTATUS to small translation units for
fear of unintended consequences, but PCH requires you not to mess with
macros that affect the compilation of a header as seen by different
translation units, which is an incompatible goal. If this is passing
on MSVC and MingGW then +1 from me.

You mentioned WIN32_NO_STATUS in the commit message -- a mistake?
Digging out my old emails/notes... that's another way to be allowed to
include both ntstatus.h and windows.h/etc in the same translation
unit, but not the one we're using. I assume it's worse because you
have to define it and then undefine it, which sounds more antithetical
to the PCH dream. Admittedly UMDF_USING_NTSTATUS -- from the
"User-Mode Driver Framework" -- is a weird thing to be getting tangled
up with because we aren't writing a driver here, but it seems to be a
well known and widely used alternative, and is nicer because you only
have to define it.

> Subject: [PATCH v17 16/23] windows: adjust FD_SETSIZE via commandline define

Right, we have to fix that across translation units for the same
reason. But why as -D and not in win32_port.h? I followed the
discussion from 9acda73118 to try to find the answer to that and saw
that Michael wanted to put it there, but wanted to minimise the blast
radius at the time:

https://www.postgresql.org/message-id/20190826054000.GE7005%40paquier.xyz

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-09-27 04:31:43 Re: Apple's ranlib warns about protocol_openssl.c
Previous Message Andres Freund 2022-09-27 04:02:08 ci: reduce macos test concurrency