summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorAndres Freund2022-08-06 15:34:56 +0000
committerAndres Freund2022-08-06 15:34:56 +0000
commit922a8fa098404cbd5c6089e78eca4aebd828f847 (patch)
treeef8e0ef81b416a479366eb0fc9d7584dee2f962b /config
parent6c1c9f88ad5484fbef201b6adf59c319ceed764e (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 'config')
-rw-r--r--config/c-library.m424
1 files changed, 0 insertions, 24 deletions
diff --git a/config/c-library.m4 b/config/c-library.m4
index 163ad5742d8..35fdc63afee 100644
--- a/config/c-library.m4
+++ b/config/c-library.m4
@@ -37,30 +37,6 @@ AC_DEFUN([PGAC_STRUCT_TIMEZONE],
])# PGAC_STRUCT_TIMEZONE
-# PGAC_FUNC_GETTIMEOFDAY_1ARG
-# ---------------------------
-# Check if gettimeofday() has only one arguments. (Normal is two.)
-# If so, define GETTIMEOFDAY_1ARG.
-AC_DEFUN([PGAC_FUNC_GETTIMEOFDAY_1ARG],
-[AC_CACHE_CHECK(whether gettimeofday takes only one argument,
-pgac_cv_func_gettimeofday_1arg,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/time.h>],
-[struct timeval *tp;
-struct timezone *tzp;
-gettimeofday(tp,tzp);])],
-[pgac_cv_func_gettimeofday_1arg=no],
-[pgac_cv_func_gettimeofday_1arg=yes])])
-if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
- AC_DEFINE(GETTIMEOFDAY_1ARG, 1,
- [Define to 1 if gettimeofday() takes only 1 argument.])
-fi
-AH_VERBATIM(GETTIMEOFDAY_1ARG_,
-[@%:@ifdef GETTIMEOFDAY_1ARG
-@%:@ define gettimeofday(a,b) gettimeofday(a)
-@%:@endif])dnl
-])# PGAC_FUNC_GETTIMEOFDAY_1ARG
-
-
# PGAC_FUNC_STRERROR_R_INT
# ---------------------------
# Check if strerror_r() returns int (POSIX) rather than char * (GNU libc).