summaryrefslogtreecommitdiff
path: root/src/port
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2022-08-06 08:34:56 -0700
committerAndres Freund <andres@anarazel.de>2022-08-06 08:34:56 -0700
commit922a8fa098404cbd5c6089e78eca4aebd828f847 (patch)
treeef8e0ef81b416a479366eb0fc9d7584dee2f962b /src/port
parent6c1c9f88ad5484fbef201b6adf59c319ceed764e (diff)
downloadpostgresql-922a8fa098404cbd5c6089e78eca4aebd828f847.tar.gz
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/port')
-rw-r--r--src/port/win32gettimeofday.c (renamed from src/port/gettimeofday.c)4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/port/gettimeofday.c b/src/port/win32gettimeofday.c
index ee8fe82337..0464548758 100644
--- a/src/port/gettimeofday.c
+++ b/src/port/win32gettimeofday.c
@@ -1,8 +1,8 @@
/*
- * gettimeofday.c
+ * win32gettimeofday.c
* Win32 gettimeofday() replacement
*
- * src/port/gettimeofday.c
+ * src/port/win32gettimeofday.c
*
* Copyright (c) 2003 SRA, Inc.
* Copyright (c) 2003 SKC, Inc.