From 64393a7ff9ec36164af337ae5ec33e3624d1450c Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Thu, 17 Aug 2023 16:11:41 +1200 Subject: [PATCH] Don't probe extra libraries for fdatasync. Commit d2e15083 got rid of the main configure probe and HAVE_FDATASYNC macro, but we still searched -lrt and -lposix4 for old Solaris systems. It's in the C library on modern Solaris, as on other supported systems. Reviewed-by: Peter Eisentraut Reviewed-by: Tristan Partin Discussion: https://postgr.es/m/CA%2BhUKGLLVx4drdvXats9PxH3eeB%2BE2NkJReJ%2BRGmaOpU%3D9rgEA%40mail.gmail.com --- configure | 57 ---------------------------------------------------- configure.ac | 2 -- meson.build | 1 - 3 files changed, 60 deletions(-) diff --git a/configure b/configure index 86ffccb1ee..e5f0df5bcc 100755 --- a/configure +++ b/configure @@ -12195,63 +12195,6 @@ if test "$ac_res" != no; then : fi -# Solaris: -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5 -$as_echo_n "checking for library containing fdatasync... " >&6; } -if ${ac_cv_search_fdatasync+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char fdatasync (); -int -main () -{ -return fdatasync (); - ; - return 0; -} -_ACEOF -for ac_lib in '' rt posix4; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_fdatasync=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_fdatasync+:} false; then : - break -fi -done -if ${ac_cv_search_fdatasync+:} false; then : - -else - ac_cv_search_fdatasync=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5 -$as_echo "$ac_cv_search_fdatasync" >&6; } -ac_res=$ac_cv_search_fdatasync -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - # Cygwin: { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5 $as_echo_n "checking for library containing shmget... " >&6; } diff --git a/configure.ac b/configure.ac index 116c5a1f68..e020d4fbf8 100644 --- a/configure.ac +++ b/configure.ac @@ -1286,8 +1286,6 @@ AC_SEARCH_LIBS(getopt_long, [getopt gnugetopt]) AC_SEARCH_LIBS(shm_open, rt) AC_SEARCH_LIBS(shm_unlink, rt) AC_SEARCH_LIBS(clock_gettime, [rt posix4]) -# Solaris: -AC_SEARCH_LIBS(fdatasync, [rt posix4]) # Cygwin: AC_SEARCH_LIBS(shmget, cygipc) # *BSD: diff --git a/meson.build b/meson.build index 2acb204003..0b76a47ece 100644 --- a/meson.build +++ b/meson.build @@ -2421,7 +2421,6 @@ func_checks = [ # required. Just checking for dlsym() ought to suffice. ['dlsym', {'dependencies': [dl_dep], 'define': false}], ['explicit_bzero'], - ['fdatasync', {'dependencies': [rt_dep, posix4_dep], 'define': false}], # Solaris ['getifaddrs'], ['getopt', {'dependencies': [getopt_dep, gnugetopt_dep], 'skip': always_replace_getopt}], ['getopt_long', {'dependencies': [getopt_dep, gnugetopt_dep], 'skip': always_replace_getopt_long}],