Merge pull request #2881 from Ludorg/poco-1.10.0

Add an option to force the use of PollingDirectoryWatcherStrategy
This commit is contained in:
Günter Obiltschnig 2020-01-17 08:34:10 +01:00 committed by GitHub
commit 6058f5dd23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View File

@ -96,6 +96,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

@ -150,7 +150,7 @@ private:
};
#if POCO_OS == POCO_OS_WINDOWS_NT
#if (POCO_OS == POCO_OS_WINDOWS_NT) && !defined(POCO_DW_FORCE_POLLING)
class WindowsDirectoryWatcherStrategy: public DirectoryWatcherStrategy
@ -248,7 +248,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
@ -376,7 +376,7 @@ private:
};
#elif POCO_OS == POCO_OS_MAC_OS_X || POCO_OS == POCO_OS_FREE_BSD
#elif (POCO_OS == POCO_OS_MAC_OS_X || POCO_OS == POCO_OS_FREE_BSD) && !defined(POCO_DW_FORCE_POLLING)
class BSDDirectoryWatcherStrategy: public DirectoryWatcherStrategy
@ -566,11 +566,11 @@ void DirectoryWatcher::init()
if (!_directory.isDirectory())
throw Poco::InvalidArgumentException("not a directory", _directory.path());
#if POCO_OS == POCO_OS_WINDOWS_NT
#if (POCO_OS == POCO_OS_WINDOWS_NT) && !defined(POCO_DW_FORCE_POLLING)
_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
#elif (POCO_OS == POCO_OS_MAC_OS_X || POCO_OS == POCO_OS_FREE_BSD) && !defined(POCO_DW_FORCE_POLLING)
_pStrategy = new BSDDirectoryWatcherStrategy(*this);
#else
_pStrategy = new PollingDirectoryWatcherStrategy(*this);