Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oKU6b-0006aJ-Pl for pgsql-hackers@arkaria.postgresql.org; Sun, 07 Aug 2022 00:25:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oKU6a-0001Sq-Gi for pgsql-hackers@arkaria.postgresql.org; Sun, 07 Aug 2022 00:25:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oKU6a-0001Sh-7H for pgsql-hackers@lists.postgresql.org; Sun, 07 Aug 2022 00:25:20 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oKU6Y-0001Zu-5e for pgsql-hackers@postgresql.org; Sun, 07 Aug 2022 00:25:19 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 2770PDxn154533; Sat, 6 Aug 2022 20:25:13 -0400 From: Tom Lane To: Thomas Munro cc: Andres Freund , Andrew Dunstan , Robert Haas , pgsql-hackers Subject: Re: Cleaning up historical portability baggage In-reply-to: References: <1249825.1658622186@sss.pgh.pa.us> <20220804013546.h65najrzig764jar@awork3.anarazel.de> <3295936.1659577924@sss.pgh.pa.us> <20220804023010.24snkyq3hser5pxq@awork3.anarazel.de> <20220805210823.u546w4p4wzfany7p@awork3.anarazel.de> <20220806000311.ywx65iuchvj4qn2k@awork3.anarazel.de> <148623.1659827307@sss.pgh.pa.us> <149696.1659828174@sss.pgh.pa.us> Comments: In-reply-to Thomas Munro message dated "Sun, 07 Aug 2022 12:14:18 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <154531.1659831913.1@sss.pgh.pa.us> Date: Sat, 06 Aug 2022 20:25:13 -0400 Message-ID: <154532.1659831913@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thomas Munro writes: > On Sun, Aug 7, 2022 at 11:22 AM Tom Lane wrote: >> Thomas Munro 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