git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@1066
a5681a0c-68f1-0310-ab6d-
d61299d08faa
dnl for each function found we get a definition in config.h
dnl of the form HAVE_FUNCTION
-AC_CHECK_FUNCS(tzset mbstowcs opendir readdir chdir chroot getuid setlocale strerror strerror_r snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday posix_fadvise)
+AC_CHECK_FUNCS(tzset mbstowcs opendir readdir chdir chroot getuid setlocale strerror strerror_r snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday posix_fadvise madvise)
if test "x$enable_mmap" = xyes; then
fclose(rrd_file);
return(-1);
}
+#ifdef HAVE_MADVISE
+ /* when we use mmaping we tell the kernel the mmap equivalent
+ of POSIX_FADV_RANDOM */
+ madvise(rrd_mmaped_file,rrd_filesize,MADV_RANDOM);
#endif
+#endif
/* loop through the arguments. */
for(arg_i=0; arg_i<argc;arg_i++) {
char *stepper = strdup(argv[arg_i]);