Guard PIConnection, thread primitives, PICodeParser and other feature
code behind PIP_HAS_THREADS/PIP_HAS_FILESYSTEM. In CMake generate the
feature flags summary from the single PIP_HAS_FLAGS list (used by the
add_definitions loop as well), default ICU to OFF and make introspection
also require PIP_HAS_SOCKET. Build system/thread test suites only when
the corresponding feature flags are enabled.
Found while verifying -DPIP_HAS_THREADS=OFF / -DPIP_HAS_FILESYSTEM=OFF
smoke builds (pre-existing gaps of the branch):
- piinit.cpp: full implementation now requires PIP_HAS_THREADS as well
(the PIInit class is declared in piinit.h only with threads; without
threads PIInit is absent altogether, stub/absent branches unchanged)
- PIWaitEvent: drop the PIP_HAS_THREADS guard - it is a plain
pipe/select/WaitForMultipleObjects wrapper with no thread usage
(master had no guard), restores unistd.h include for PICAN etc.
- PIEthernet: guard server_thread_ member, server_func(), threaded
listen/stop parts and writeThreaded() calls by PIP_HAS_THREADS
- PIPeer: guard class/impl by PIP_HAS_THREADS (uses PIThread/PITimer/
PIDiagnostics), openDevice() /etc/pip.conf read by PIP_HAS_FILESYSTEM
- PIBinaryLog::restart(): guard threaded-read restart by PIP_HAS_THREADS
- PIIODevice::configure(config_file,...), PIConnection::configureFromConfig,
PIConfig include resolution: guard path-based bodies by PIP_HAS_FILESYSTEM
- PISerial::availableDevicesInfo(): guard /dev and /proc/tty scan by
PIP_HAS_FILESYSTEM
- PIHIDevice impl: requires filesystem (sysfs scan) in addition to threads
- PIPluginLoader::pluginsDirectories/findLibrary: guard PIFile/PIDir use
by PIP_HAS_FILESYSTEM (fallback: empty list / path as-is)
- drop the ANDROID_PLATFORM block forcing PROCESS/DYNLIB/FFT off:
Android has /proc and dlopen and these features worked there in master
- __sighandler__: wrap PIProcess::currentPID() by PIP_HAS_PROCESS (0
fallback), the dumpApplicationToFile() call itself is already guarded
by PIP_INTROSPECTION && PIP_HAS_FILESYSTEM
- PISystemMonitor: guard /proc-related members (proc_dir/file/filem) and
code paths (startOnProcess, run() non-Windows part, gatherThread /proc
reader) by PIP_HAS_PROCESS/PIP_HAS_FILESYSTEM so the file compiles for
any flag combination, e.g. -DPIP_HAS_PROCESS=OFF -DPIP_HAS_FILESYSTEM=OFF
The stub member definitions lived in the header and were picked up by
every TU including piinit.h, causing multiple-definition link errors in
embedded (PIP_EMBEDDED) builds. Definitions now live only in piinit.cpp;
the stub implementation is compiled in the '#else' branch guarded by
PIP_HAS_THREADS (no-PIInit builds are unchanged).
PIThread::stopAndWait now returns bool
PIKbdListener on Linux now use piwaitevent_p and can immediately stop
new base method piZeroMemory, also migrate all "memset 0" to piZeroMemory
apply some code analyzer recommendations
ICU flag now check if libicu exists
prepare for more accurate growth of containers (limited PoT, then constantly increase size)