add an option to force the use of PollingDirectoryWatcherStrategy on Linux

This commit is contained in:
Ludovic LIEVRE 2020-01-10 09:54:19 +00:00
parent d36cc4aee8
commit 42629d1ed4
2 changed files with 6 additions and 3 deletions

View File

@ -106,6 +106,9 @@
// on platforms with no inotify.
//#define POCO_NO_INOTIFY
// Define to force the use of PollingDirectoryWatcher
#define POCO_DW_FORCE_POLLING
// Following are options to remove certain features
// to reduce library/executable size for smaller

View File

@ -252,7 +252,7 @@ private:
};
#elif POCO_OS == POCO_OS_LINUX || POCO_OS == POCO_OS_ANDROID
#elif (POCO_OS == POCO_OS_LINUX || POCO_OS == POCO_OS_ANDROID) && !defined(POCO_DW_FORCE_POLLING)
class LinuxDirectoryWatcherStrategy: public DirectoryWatcherStrategy
@ -572,7 +572,7 @@ void DirectoryWatcher::init()
#if POCO_OS == POCO_OS_WINDOWS_NT
_pStrategy = new WindowsDirectoryWatcherStrategy(*this);
#elif POCO_OS == POCO_OS_LINUX || POCO_OS == POCO_OS_ANDROID
#elif (POCO_OS == POCO_OS_LINUX || POCO_OS == POCO_OS_ANDROID) && !defined(POCO_DW_FORCE_POLLING)
_pStrategy = new LinuxDirectoryWatcherStrategy(*this);
#elif POCO_OS == POCO_OS_MAC_OS_X || POCO_OS == POCO_OS_FREE_BSD
_pStrategy = new BSDDirectoryWatcherStrategy(*this);