| 1 | // | 
|---|
| 2 | // Config.h | 
|---|
| 3 | // | 
|---|
| 4 | // Library: Foundation | 
|---|
| 5 | // Package: Core | 
|---|
| 6 | // Module:  Foundation | 
|---|
| 7 | // | 
|---|
| 8 | // Feature configuration for the POCO libraries. | 
|---|
| 9 | // | 
|---|
| 10 | // Copyright (c) 2006-2016, Applied Informatics Software Engineering GmbH. | 
|---|
| 11 | // and Contributors. | 
|---|
| 12 | // | 
|---|
| 13 | // SPDX-License-Identifier:	BSL-1.0 | 
|---|
| 14 | // | 
|---|
| 15 |  | 
|---|
| 16 |  | 
|---|
| 17 | #ifndef Foundation_Config_INCLUDED | 
|---|
| 18 | #define Foundation_Config_INCLUDED | 
|---|
| 19 |  | 
|---|
| 20 |  | 
|---|
| 21 | #include "Poco/Version.h" | 
|---|
| 22 |  | 
|---|
| 23 |  | 
|---|
| 24 | #if POCO_VERSION >= 0x02000000 | 
|---|
| 25 | #define POCO_ENABLE_CPP11 | 
|---|
| 26 | #endif | 
|---|
| 27 |  | 
|---|
| 28 | // Define to enable C++14 support | 
|---|
| 29 | // #define POCO_ENABLE_CPP14 | 
|---|
| 30 |  | 
|---|
| 31 |  | 
|---|
| 32 | // Define to force disable C++14 support | 
|---|
| 33 | // #define POCO_DISABLE_CPP14 | 
|---|
| 34 |  | 
|---|
| 35 |  | 
|---|
| 36 | // Define to disable implicit linking | 
|---|
| 37 | // #define POCO_NO_AUTOMATIC_LIBS | 
|---|
| 38 |  | 
|---|
| 39 |  | 
|---|
| 40 | // Define to disable automatic initialization | 
|---|
| 41 | // Defining this will disable ALL automatic | 
|---|
| 42 | // initialization framework-wide (e.g. Net | 
|---|
| 43 | // on Windows, all Data back-ends, etc). | 
|---|
| 44 | // | 
|---|
| 45 | // #define POCO_NO_AUTOMATIC_LIB_INIT | 
|---|
| 46 |  | 
|---|
| 47 |  | 
|---|
| 48 | // Define to disable FPEnvironment support | 
|---|
| 49 | // #define POCO_NO_FPENVIRONMENT | 
|---|
| 50 |  | 
|---|
| 51 |  | 
|---|
| 52 | // Define if std::wstring is not available | 
|---|
| 53 | // #define POCO_NO_WSTRING | 
|---|
| 54 |  | 
|---|
| 55 |  | 
|---|
| 56 | // Define to disable shared memory | 
|---|
| 57 | // #define POCO_NO_SHAREDMEMORY | 
|---|
| 58 |  | 
|---|
| 59 |  | 
|---|
| 60 | // Define if no <locale> header is available (such as on WinCE) | 
|---|
| 61 | // #define POCO_NO_LOCALE | 
|---|
| 62 |  | 
|---|
| 63 |  | 
|---|
| 64 | // Define to desired default thread stack size | 
|---|
| 65 | // Zero means OS default | 
|---|
| 66 | #ifndef POCO_THREAD_STACK_SIZE | 
|---|
| 67 | #define POCO_THREAD_STACK_SIZE 0 | 
|---|
| 68 | #endif | 
|---|
| 69 |  | 
|---|
| 70 |  | 
|---|
| 71 | // Define to override system-provided | 
|---|
| 72 | // minimum thread priority value on POSIX | 
|---|
| 73 | // platforms (returned by Poco::Thread::getMinOSPriority()). | 
|---|
| 74 | // #define POCO_THREAD_PRIORITY_MIN 0 | 
|---|
| 75 |  | 
|---|
| 76 |  | 
|---|
| 77 | // Define to override system-provided | 
|---|
| 78 | // maximum thread priority value on POSIX | 
|---|
| 79 | // platforms (returned by Poco::Thread::getMaxOSPriority()). | 
|---|
| 80 | // #define POCO_THREAD_PRIORITY_MAX 31 | 
|---|
| 81 |  | 
|---|
| 82 |  | 
|---|
| 83 | // Define to disable small object optimization. If not | 
|---|
| 84 | // defined, Any and Dynamic::Var (and similar optimization | 
|---|
| 85 | // candidates) will be auto-allocated on the stack in | 
|---|
| 86 | // cases when value holder fits into POCO_SMALL_OBJECT_SIZE | 
|---|
| 87 | // (see below). | 
|---|
| 88 | // | 
|---|
| 89 | // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 
|---|
| 90 | // !!! NOTE: Any/Dynamic::Var SOO will NOT work reliably   !!! | 
|---|
| 91 | // !!! without C++11 (std::aligned_storage in particular). !!! | 
|---|
| 92 | // !!! Only comment this out if your compiler has support  !!! | 
|---|
| 93 | // !!! for std::aligned_storage.                           !!! | 
|---|
| 94 | // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 
|---|
| 95 | // | 
|---|
| 96 | #ifndef POCO_NO_SOO | 
|---|
| 97 | #ifndef POCO_ENABLE_SOO | 
|---|
| 98 | #define POCO_NO_SOO | 
|---|
| 99 | #endif | 
|---|
| 100 | #endif | 
|---|
| 101 |  | 
|---|
| 102 |  | 
|---|
| 103 |  | 
|---|
| 104 | // Small object size in bytes. When assigned to Any or Var, | 
|---|
| 105 | // objects larger than this value will be alocated on the heap, | 
|---|
| 106 | // while those smaller will be placement new-ed into an | 
|---|
| 107 | // internal buffer. | 
|---|
| 108 | #if !defined(POCO_SMALL_OBJECT_SIZE) && !defined(POCO_NO_SOO) | 
|---|
| 109 | #define POCO_SMALL_OBJECT_SIZE 32 | 
|---|
| 110 | #endif | 
|---|
| 111 |  | 
|---|
| 112 |  | 
|---|
| 113 | // Define to disable compilation of DirectoryWatcher | 
|---|
| 114 | // on platforms with no inotify. | 
|---|
| 115 | // #define POCO_NO_INOTIFY | 
|---|
| 116 |  | 
|---|
| 117 |  | 
|---|
| 118 | // Following are options to remove certain features | 
|---|
| 119 | // to reduce library/executable size for smaller | 
|---|
| 120 | // embedded platforms. By enabling these options, | 
|---|
| 121 | // the size of a statically executable can be | 
|---|
| 122 | // reduced by a few 100 Kbytes. | 
|---|
| 123 |  | 
|---|
| 124 |  | 
|---|
| 125 | // No automatic registration of FileChannel in | 
|---|
| 126 | // LoggingFactory - avoids FileChannel and friends | 
|---|
| 127 | // being linked to executable. | 
|---|
| 128 | // #define POCO_NO_FILECHANNEL | 
|---|
| 129 |  | 
|---|
| 130 |  | 
|---|
| 131 | // No automatic registration of SplitterChannel in | 
|---|
| 132 | // LoggingFactory - avoids SplitterChannel being | 
|---|
| 133 | // linked to executable. | 
|---|
| 134 | // #define POCO_NO_SPLITTERCHANNEL | 
|---|
| 135 |  | 
|---|
| 136 |  | 
|---|
| 137 | // No automatic registration of SyslogChannel in | 
|---|
| 138 | // LoggingFactory - avoids SyslogChannel being | 
|---|
| 139 | // linked to executable on Unix/Linux systems. | 
|---|
| 140 | // #define POCO_NO_SYSLOGCHANNEL | 
|---|
| 141 |  | 
|---|
| 142 |  | 
|---|
| 143 | // Define to enable MSVC secure warnings | 
|---|
| 144 | // #define POCO_MSVC_SECURE_WARNINGS | 
|---|
| 145 |  | 
|---|
| 146 |  | 
|---|
| 147 | // No support for INI file configurations in | 
|---|
| 148 | // Poco::Util::Application. | 
|---|
| 149 | // #define POCO_UTIL_NO_INIFILECONFIGURATION | 
|---|
| 150 |  | 
|---|
| 151 |  | 
|---|
| 152 | // No support for JSON configuration in | 
|---|
| 153 | // Poco::Util::Application. Avoids linking of JSON | 
|---|
| 154 | // library and saves a few 100 Kbytes. | 
|---|
| 155 | // #define POCO_UTIL_NO_JSONCONFIGURATION | 
|---|
| 156 |  | 
|---|
| 157 |  | 
|---|
| 158 | // No support for XML configuration in | 
|---|
| 159 | // Poco::Util::Application. Avoids linking of XML | 
|---|
| 160 | // library and saves a few 100 Kbytes. | 
|---|
| 161 | // #define POCO_UTIL_NO_XMLCONFIGURATION | 
|---|
| 162 |  | 
|---|
| 163 |  | 
|---|
| 164 | // No IPv6 support | 
|---|
| 165 | // Define to disable IPv6 | 
|---|
| 166 | // #define POCO_NET_NO_IPv6 | 
|---|
| 167 |  | 
|---|
| 168 |  | 
|---|
| 169 | // Windows CE has no locale support | 
|---|
| 170 | #if defined(_WIN32_WCE) | 
|---|
| 171 | #define POCO_NO_LOCALE | 
|---|
| 172 | #endif | 
|---|
| 173 |  | 
|---|
| 174 |  | 
|---|
| 175 | // Enable the poco_debug_* and poco_trace_* macros | 
|---|
| 176 | // even if the _DEBUG variable is not set. | 
|---|
| 177 | // This allows the use of these macros in a release version. | 
|---|
| 178 | // #define POCO_LOG_DEBUG | 
|---|
| 179 |  | 
|---|
| 180 |  | 
|---|
| 181 | // OpenSSL on Windows | 
|---|
| 182 | // | 
|---|
| 183 | // Poco has its own OpenSSL build system. | 
|---|
| 184 | // See <https://github.com/pocoproject/openssl/blob/master/README.md> | 
|---|
| 185 | // for details. | 
|---|
| 186 | // | 
|---|
| 187 | // These options are Windows only. | 
|---|
| 188 | // | 
|---|
| 189 | // To disable the use of Poco-provided OpenSSL binaries, | 
|---|
| 190 | // define POCO_EXTERNAL_OPENSSL. | 
|---|
| 191 | // | 
|---|
| 192 | // Possible values: | 
|---|
| 193 | //   POCO_EXTERNAL_OPENSSL_SLPRO: | 
|---|
| 194 | //     Automatically link OpenSSL libraries from OpenSSL Windows installer provided | 
|---|
| 195 | //     by Shining Light Productions <http://slproweb.com/products/Win32OpenSSL.html> | 
|---|
| 196 | //     The (global) library search path must be set accordingly. | 
|---|
| 197 | //   POCO_EXTERNAL_OPENSSL_DEFAULT: | 
|---|
| 198 | //     Automatically link OpenSSL libraries from standard OpenSSL Windows build. | 
|---|
| 199 | //     The (global) library search path must be set accordingly. | 
|---|
| 200 | //   empty or other value: | 
|---|
| 201 | //     Do not link any OpenSSL libraries automatically. You will have to edit the | 
|---|
| 202 | //     Visual C++ project files for Crypto and NetSSL_OpenSSL. | 
|---|
| 203 | // #define POCO_EXTERNAL_OPENSSL POCO_EXTERNAL_OPENSSL_SLPRO | 
|---|
| 204 |  | 
|---|
| 205 |  | 
|---|
| 206 | // Define to prevent changing the suffix for shared libraries | 
|---|
| 207 | // to "d.so", "d.dll", etc. for _DEBUG builds in Poco::SharedLibrary. | 
|---|
| 208 | // #define POCO_NO_SHARED_LIBRARY_DEBUG_SUFFIX | 
|---|
| 209 |  | 
|---|
| 210 |  | 
|---|
| 211 | // Disarm POCO_DEPRECATED macro. | 
|---|
| 212 | // #define POCO_NO_DEPRECATED | 
|---|
| 213 |  | 
|---|
| 214 |  | 
|---|
| 215 | // Enable refcounting diagnostic context | 
|---|
| 216 | // (effective only in conjunction with _DEBUG). | 
|---|
| 217 | // Enabling this will record every reference | 
|---|
| 218 | // count change and automatically dump any leaks | 
|---|
| 219 | // at program termination. It is a heavy | 
|---|
| 220 | // functionality that records stack backtrace | 
|---|
| 221 | // (if available, otherwise it is not of much use) | 
|---|
| 222 | // on every refcount change, so it should be used | 
|---|
| 223 | // cautiously, with performance deterioration and | 
|---|
| 224 | // the amount of available memory taken into account. | 
|---|
| 225 | //#define POCO_REFCOUNT_DC | 
|---|
| 226 |  | 
|---|
| 227 |  | 
|---|
| 228 | // Macro defining the default initial size of | 
|---|
| 229 | // RefCountedObject FastMemoryPool. | 
|---|
| 230 | // Meaningful only if POCO_REFCOUNT_DC is defined | 
|---|
| 231 | #ifdef POCO_REFCOUNT_DC | 
|---|
| 232 | #define POCO_REFCOUNT_POOL_PREALLOC 1000000 | 
|---|
| 233 | #endif // POCO_REFCOUNT_DC | 
|---|
| 234 |  | 
|---|
| 235 |  | 
|---|
| 236 | // Macro enabling POCO Exceptions and assertions | 
|---|
| 237 | // to append stack backtrace (if available) | 
|---|
| 238 | #define POCO_EXCEPTION_BACKTRACE | 
|---|
| 239 |  | 
|---|
| 240 |  | 
|---|
| 241 | #endif // Foundation_Config_INCLUDED | 
|---|
| 242 |  | 
|---|