From 6eaed467b0a74bf6a2694ce657e7167280f5aa94 Mon Sep 17 00:00:00 2001 From: dockes Date: Mon, 30 Nov 2009 06:34:49 +0000 Subject: [PATCH] compile either fam or inotify not both --- src/index/rclmonrcv.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/index/rclmonrcv.cpp b/src/index/rclmonrcv.cpp index a9d46363..f206013c 100644 --- a/src/index/rclmonrcv.cpp +++ b/src/index/rclmonrcv.cpp @@ -195,6 +195,9 @@ void *rclMonRcvRun(void *q) return 0; } +// We dont compile both the inotify and the fam interface and inotify +// has preference +#ifndef RCL_USE_INOTIFY #ifdef RCL_USE_FAM ////////////////////////////////////////////////////////////////////////// /** Fam/gamin -based monitor class */ @@ -376,7 +379,7 @@ bool RclFAM::getEvent(RclMonEvent& ev, int secs) return true; } #endif // RCL_USE_FAM - +#endif // ! INOTIFY #ifdef RCL_USE_INOTIFY ////////////////////////////////////////////////////////////////////////// @@ -568,12 +571,16 @@ bool RclIntf::getEvent(RclMonEvent& ev, int secs) // The monitor 'factory' static RclMonitor *makeMonitor() { -#ifdef RCL_USE_FAM - return new RclFAM; -#endif #ifdef RCL_USE_INOTIFY return new RclIntf; #endif +#ifndef RCL_USE_INOTIFY +#ifdef RCL_USE_FAM + return new RclFAM; +#endif +#endif + LOGINFO(("RclMonitor: neither Inotify nor Fam was compiled as " + "file system change notification interface\n")); return 0; } #endif // RCL_MONITOR