From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Simplify gettimeofday() fallback logic.
Date: Sat, 06 Aug 2022 15:44:40 +0000
Message-ID: <E1oKLyh-000atf-Sv@gemulon.postgresql.org> (raw)
Simplify gettimeofday() fallback logic.
There's no known supported system needing 1 argument gettimeofday()
support. The test for it was added a long time ago (92c6bf9775b). Remove.
Until now we tested whether a gettimeofday() fallback is needed when
targetting windows. Which lead to the odd result that HAVE_GETTIMEOFDAY only
being defined when targetting MinGW (which has gettimeofday() since at least
2007). As the fallback is specific to msvc, remove the configure code and
rename src/port/gettimeofday.c to src/port/win32gettimeofday.c.
While at it, also remove the definition of struct timezone, a forward
declaration of the struct is sufficient.
Reviewed-By: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-By: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/20220806000311.ywx65iuchvj4qn2k@awork3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/922a8fa098404cbd5c6089e78eca4aebd828f847
Modified Files
--------------
config/c-library.m4 | 24 ------------
configure | 47 ------------------------
configure.ac | 2 -
src/include/pg_config.h.in | 10 -----
src/include/port.h | 5 ---
src/include/port/win32_port.h | 15 +++-----
src/port/{gettimeofday.c => win32gettimeofday.c} | 4 +-
src/tools/msvc/Mkvcbuild.pm | 3 +-
src/tools/msvc/Solution.pm | 2 -
9 files changed, 9 insertions(+), 103 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: andres@anarazel.de
Subject: Re: pgsql: Simplify gettimeofday() fallback logic.
In-Reply-To: <E1oKLyh-000atf-Sv@gemulon.postgresql.org>
References: <E1oKLyh-000atf-Sv@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox