pread64() on that platform.
/* Define to 1 if you have the `pread' function. */
#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. */
#undef HAVE_PRIV_SET
/* Define to 1 if you have the `pwrite' function. */
#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. */
#undef HAVE_PW_DUP
/* Number of bits in a file offset, on hosts where this is settable. */
#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. */
#undef _LARGE_FILES
+case "$host_os" in
+ hpux*)
+ if test X"$ac_cv_func_pread" = X"yes"; then
+ O_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
+ for ac_func in pread64 pwrite64
+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"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+
+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
+
+
+fi
+done
+
+ CPPFLAGS="$O_CPPFLAGS"
+ fi
+ ;;
+esac
for ac_func in getgrouplist
do :
ac_fn_c_check_func "$LINENO" "getgrouplist" "ac_cv_func_getgrouplist"
dnl
AC_FUNC_GETGROUPS
AC_CHECK_FUNCS_ONCE([fexecve killpg nl_langinfo strftime pread pwrite openat])
+case "$host_os" in
+ hpux*)
+ if test X"$ac_cv_func_pread" = X"yes"; then
+ 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"
+ fi
+ ;;
+esac
AC_CHECK_FUNCS([getgrouplist], [], [
case "$host_os" in
aix*)
int getdomainname(char *, size_t);
#endif
+/*
+ * HP-UX 11.00 has broken pread/pwrite that can't handle a 64-bit off_t
+ * on 32-bit machines.
+ */
+#if defined(__hpux) && !defined(__LP64__)
+# ifdef HAVE_PREAD64
+# undef pread
+# define pread(_a, _b, _c, _d) pread64((_a), (_b), (_c), (_d))
+# endif
+# ifdef HAVE_PWRITE64
+# undef pwrite
+# define pwrite(_a, _b, _c, _d) pwrite64((_a), (_b), (_c), (_d))
+# endif
+#endif /* __hpux && !__LP64__ */
+
/* We wrap OpenBSD's strtonum() to get translatable error strings. */
__dso_public long long sudo_strtonum(const char *, long long, long long, const char **);
#undef strtonum