mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Move our p{read,write}v replacements into their own files.
macOS's ranlib issued a warning about an empty pread.o file with the previous arrangement, on systems new enough to require no replacement functions. Let's go back to using configure's AC_REPLACE_FUNCS system to build and include each .o in the library only if it's needed, which requires moving the *v() functions to their own files. Also move the _with_retry() wrapper to a more permanent home. Reported-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/1283127.1610554395%40sss.pgh.pa.us
This commit is contained in:
54
configure
vendored
54
configure
vendored
@ -15155,7 +15155,7 @@ fi
|
||||
LIBS_including_readline="$LIBS"
|
||||
LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
|
||||
|
||||
for ac_func in backtrace_symbols clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit kqueue mbstowcs_l memset_s poll posix_fallocate ppoll pread preadv pstat pthread_is_threaded_np pwrite pwritev readlink readv setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink sync_file_range uselocale wcstombs_l writev
|
||||
for ac_func in backtrace_symbols clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit kqueue mbstowcs_l memset_s poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink readv setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink sync_file_range uselocale wcstombs_l writev
|
||||
do :
|
||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
||||
@ -15832,6 +15832,58 @@ esac
|
||||
|
||||
fi
|
||||
|
||||
ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
|
||||
if test "x$ac_cv_func_pread" = xyes; then :
|
||||
$as_echo "#define HAVE_PREAD 1" >>confdefs.h
|
||||
|
||||
else
|
||||
case " $LIBOBJS " in
|
||||
*" pread.$ac_objext "* ) ;;
|
||||
*) LIBOBJS="$LIBOBJS pread.$ac_objext"
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
|
||||
ac_fn_c_check_func "$LINENO" "preadv" "ac_cv_func_preadv"
|
||||
if test "x$ac_cv_func_preadv" = xyes; then :
|
||||
$as_echo "#define HAVE_PREADV 1" >>confdefs.h
|
||||
|
||||
else
|
||||
case " $LIBOBJS " in
|
||||
*" preadv.$ac_objext "* ) ;;
|
||||
*) LIBOBJS="$LIBOBJS preadv.$ac_objext"
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
|
||||
ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
|
||||
if test "x$ac_cv_func_pwrite" = xyes; then :
|
||||
$as_echo "#define HAVE_PWRITE 1" >>confdefs.h
|
||||
|
||||
else
|
||||
case " $LIBOBJS " in
|
||||
*" pwrite.$ac_objext "* ) ;;
|
||||
*) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
|
||||
ac_fn_c_check_func "$LINENO" "pwritev" "ac_cv_func_pwritev"
|
||||
if test "x$ac_cv_func_pwritev" = xyes; then :
|
||||
$as_echo "#define HAVE_PWRITEV 1" >>confdefs.h
|
||||
|
||||
else
|
||||
case " $LIBOBJS " in
|
||||
*" pwritev.$ac_objext "* ) ;;
|
||||
*) LIBOBJS="$LIBOBJS pwritev.$ac_objext"
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
|
||||
ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
|
||||
if test "x$ac_cv_func_random" = xyes; then :
|
||||
$as_echo "#define HAVE_RANDOM 1" >>confdefs.h
|
||||
|
Reference in New Issue
Block a user