diff options
author | Andres Freund <andres@anarazel.de> | 2022-08-06 08:34:56 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2022-08-06 08:34:56 -0700 |
commit | 922a8fa098404cbd5c6089e78eca4aebd828f847 (patch) | |
tree | ef8e0ef81b416a479366eb0fc9d7584dee2f962b /configure | |
parent | 6c1c9f88ad5484fbef201b6adf59c319ceed764e (diff) | |
download | postgresql-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 'configure')
-rwxr-xr-x | configure | 47 |
1 files changed, 0 insertions, 47 deletions
@@ -15945,39 +15945,6 @@ if test x"$pgac_cv_var_int_timezone" = xyes ; then $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5 -$as_echo_n "checking whether gettimeofday takes only one argument... " >&6; } -if ${pgac_cv_func_gettimeofday_1arg+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/time.h> -int -main () -{ -struct timeval *tp; -struct timezone *tzp; -gettimeofday(tp,tzp); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - pgac_cv_func_gettimeofday_1arg=no -else - pgac_cv_func_gettimeofday_1arg=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5 -$as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; } -if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then - -$as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5 $as_echo_n "checking for wcstombs_l declaration... " >&6; } if ${pgac_cv_func_wcstombs_l+:} false; then : @@ -16909,20 +16876,6 @@ _ACEOF fi done - ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" -if test "x$ac_cv_func_gettimeofday" = xyes; then : - $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h - -else - case " $LIBOBJS " in - *" gettimeofday.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" - ;; -esac - -fi - - case " $LIBOBJS " in *" dirmod.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS dirmod.$ac_objext" |