Fixes build on OpenSolaris
@@ -195,7 +195,7 @@ AC_FUNC_STRFTIME
#checkpoint
AC_CACHE_SAVE
-AC_CHECK_FUNCS([clock fsync getrusage isascii getpassphrase])
+AC_CHECK_FUNCS([clock fsync getrusage isascii getpassphrase madvise])
AC_CHECK_FUNCS([memcpy memset random rename snprintf srandom gettime])
@@ -8417,7 +8417,7 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
rm -f confcache
-for ac_func in clock fsync getrusage isascii getpassphrase
+for ac_func in clock fsync getrusage isascii getpassphrase madvise
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -178,7 +178,9 @@ bin_checksum(const char *fname, int todo)
close(fd);
werr(ERR_BINSTAT);
}
+#ifdef HAVE_MADVISE
madvise(map, size, MADV_SEQUENTIAL);
+#endif
MD5_Update(&ctx, map, offset);
/* Hash everything after the packdata too */
@@ -103,6 +103,9 @@
zero-length file name argument. */
#undef HAVE_LSTAT_EMPTY_STRING_BUG
+/* Define to 1 if you have the `madvise' function. */
+#undef HAVE_MADVISE
+
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC