diff options
| author | Andres Freund | 2022-08-06 15:34:56 +0000 |
|---|---|---|
| committer | Andres Freund | 2022-08-06 15:34:56 +0000 |
| commit | 922a8fa098404cbd5c6089e78eca4aebd828f847 (patch) | |
| tree | ef8e0ef81b416a479366eb0fc9d7584dee2f962b /src/tools/msvc | |
| parent | 6c1c9f88ad5484fbef201b6adf59c319ceed764e (diff) | |
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
Diffstat (limited to 'src/tools/msvc')
| -rw-r--r-- | src/tools/msvc/Mkvcbuild.pm | 3 | ||||
| -rw-r--r-- | src/tools/msvc/Solution.pm | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index 8d88e78f051..bacc9207581 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -101,7 +101,7 @@ sub mkvcbuild our @pgportfiles = qw( chklocale.c explicit_bzero.c getpeereid.c getrusage.c inet_aton.c - getaddrinfo.c gettimeofday.c inet_net_ntop.c kill.c open.c + getaddrinfo.c inet_net_ntop.c kill.c open.c snprintf.c strlcat.c strlcpy.c dirmod.c noblock.c path.c dirent.c getopt.c getopt_long.c preadv.c pwritev.c pg_bitutils.c @@ -111,6 +111,7 @@ sub mkvcbuild win32dlopen.c win32env.c win32error.c win32fdatasync.c + win32gettimeofday.c win32link.c win32pread.c win32pwrite.c diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 9fe53bb036e..4916a86f5cf 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -220,7 +220,6 @@ sub GenerateFiles ENABLE_GSS => $self->{options}->{gss} ? 1 : undef, ENABLE_NLS => $self->{options}->{nls} ? 1 : undef, ENABLE_THREAD_SAFETY => 1, - GETTIMEOFDAY_1ARG => undef, HAVE_APPEND_HISTORY => undef, HAVE_ASN1_STRING_GET0_DATA => undef, HAVE_ATOMICS => 1, @@ -267,7 +266,6 @@ sub GenerateFiles HAVE_GETOPT_LONG => undef, HAVE_GETPEEREID => undef, HAVE_GETPEERUCRED => undef, - HAVE_GETTIMEOFDAY => undef, HAVE_GSSAPI_GSSAPI_H => undef, HAVE_GSSAPI_H => undef, HAVE_HMAC_CTX_FREE => undef, |
