Re: Cleaning up historical portability baggage

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cleaning up historical portability baggage
Date: 2022-08-07 00:25:13
Message-ID: 154532.1659831913@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> On Sun, Aug 7, 2022 at 11:22 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
>>> I also wonder if half the stuff in win32gettimeofday.c can be deleted.

> This looks good on CI (well I haven't waited for it to finish yet, but
> MSVC compiles it without warning and we're most of the way through the
> tests...).

Looks plausible from here. A couple other thoughts:

* While you're at it you could fix the "MinW" typo just above
the extern for gettimeofday.

* I'm half tempted to add something like this to gettimeofday:

/*
* POSIX declines to define what tzp points to, saying
* "If tzp is not a null pointer, the behavior is unspecified".
* Let's take this opportunity to verify that noplace in
* Postgres tries to use any unportable behavior.
*/
Assert(tzp == NULL);

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2022-08-07 00:25:52 Re: failing to build preproc.c on solaris with sun studio
Previous Message Thomas Munro 2022-08-07 00:22:02 Re: failing to build preproc.c on solaris with sun studio