2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 18:08:23 +00:00

Remove the HP-UX 11.0 pread64() hack, it causes problems on modern HP-UX.

This commit is contained in:
Todd C. Miller 2021-04-20 14:59:19 -06:00
parent 6717415e73
commit b0a32fe738
3 changed files with 1 additions and 50 deletions

View File

@ -647,9 +647,6 @@
/* Define to 1 if you have the `pread' function. */ /* Define to 1 if you have the `pread' function. */
#undef HAVE_PREAD #undef HAVE_PREAD
/* Define to 1 if you have the `pread64' function. */
#undef HAVE_PREAD64
/* Define to 1 if you have the `priv_set' function. */ /* Define to 1 if you have the `priv_set' function. */
#undef HAVE_PRIV_SET #undef HAVE_PRIV_SET
@ -677,9 +674,6 @@
/* Define to 1 if you have the `pwrite' function. */ /* Define to 1 if you have the `pwrite' function. */
#undef HAVE_PWRITE #undef HAVE_PWRITE
/* Define to 1 if you have the `pwrite64' function. */
#undef HAVE_PWRITE64
/* Define to 1 if you have the `pw_dup' function. */ /* Define to 1 if you have the `pw_dup' function. */
#undef HAVE_PW_DUP #undef HAVE_PW_DUP
@ -1332,10 +1326,6 @@
/* Number of bits in a file offset, on hosts where this is settable. */ /* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS #undef _FILE_OFFSET_BITS
/* Define to 1 to enable 64-bit versions of standard C functions on 32-bit
systems. */
#undef _LARGEFILE64_SOURCE
/* Define for large files, on AIX-style hosts. */ /* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES #undef _LARGE_FILES

27
configure vendored
View File

@ -20061,33 +20061,6 @@ if test "x$ac_cv_func_pread" = xyes
then : then :
printf "%s\n" "#define HAVE_PREAD 1" >>confdefs.h printf "%s\n" "#define HAVE_PREAD 1" >>confdefs.h
# pread(2) on 32-bit HP-UX 11.00 is buggy, use pread64(2) instead.
case "$host_os" in
hpux*|hiuxmpp*)
O_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
for ac_func in pread64 pwrite64
do :
as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"
then :
cat >>confdefs.h <<_ACEOF
#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
printf "%s\n" "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
fi
done
CPPFLAGS="$O_CPPFLAGS"
;;
esac
else $as_nop else $as_nop
case " $LIBOBJS " in case " $LIBOBJS " in

View File

@ -2689,19 +2689,7 @@ dnl Function checks
dnl dnl
AC_FUNC_GETGROUPS AC_FUNC_GETGROUPS
AC_CHECK_FUNCS_ONCE([fexecve fmemopen killpg nl_langinfo faccessat wordexp getauxval fseeko]) AC_CHECK_FUNCS_ONCE([fexecve fmemopen killpg nl_langinfo faccessat wordexp getauxval fseeko])
AC_CHECK_FUNCS([pread], [ AC_CHECK_FUNCS([pread], [], [
# pread(2) on 32-bit HP-UX 11.00 is buggy, use pread64(2) instead.
case "$host_os" in
hpux*|hiuxmpp*)
O_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
AC_CHECK_FUNCS([pread64 pwrite64], [
AC_DEFINE([_LARGEFILE64_SOURCE], [1], [Define to 1 to enable 64-bit versions of standard C functions on 32-bit systems.])
])
CPPFLAGS="$O_CPPFLAGS"
;;
esac
], [
AC_LIBOBJ(pread) AC_LIBOBJ(pread)
SUDO_APPEND_COMPAT_EXP(sudo_pread) SUDO_APPEND_COMPAT_EXP(sudo_pread)
]) ])