[rrd-developers] [PATCH,RFC] optional mmap based file I/O

Bernhard Fischer rep.dot.nop at gmail.com
Mon Jun 4 14:14:04 CEST 2007


On Fri, Jun 01, 2007 at 09:11:56PM +0200, Tobias Oetiker wrote:
>done

Thanks.
A quick glance at resize makes me believe that both shrinking and
growing of files either for the mmap or the FD accessors work now.

I think that was about all, or is there a function/file that is not
converted as of now?


I have an autoconf check that checks which version of rrdtools is found
on a system. Perhaps this would be convenient for folks who want to
check if rrdtool <= 1.2.x or >= 1.3 is available?

Will have to be AC_DEFUN'ed and put into an rrdtool_version.m4 or
the like.. Perhaps something for contrib/m4 ?

---- 8< ----
oldCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -I$RRDTOOL_DIR/include -L$RRDTOOL_DIR/lib -lrrd -Werror"
AC_LANG_PUSH(C)

AC_MSG_CHECKING([version of rrdtool])
AC_TRY_LINK([#include <rrd.h>],[int main() {
  int my_fd, ret;
  ret = LockRRD(my_fd);
  return 0;
}],[rrdtool_v12=no
AC_MSG_RESULT(>= 1.3)],[rrdtool_v12=maybe]
)
if test "x$rrdtool_v12" = "xmaybe"; then
AC_TRY_LINK([#include <rrd.h>],[int main() {
  int ret;
  FILE *my_filp;
  ret = LockRRD(my_filp);
  return 0;
}],[rrdtool_v12=yes
AC_MSG_RESULT(1.2)],[AC_MSG_RESULT(unknown)
AC_MSG_WARN(Could not determine version of rrdtool to link against!)]
)
fi
AC_LANG_POP(C)
CFLAGS="$oldCFLAGS"
AM_CONDITIONAL(RRDTOOL_V12,[test "x$rrdtool_v12" = "xyes"])

---- 8< ----



More information about the rrd-developers mailing list