refactor: rename PIP_NO_\* to PIP_HAS_\* with inverted logic
All feature flags now use positive naming (enabled by default): - PIP_HAS_FILESYSTEM, PIP_HAS_THREADS, PIP_HAS_SOCKET - PIP_HAS_PROCESS, PIP_HAS_DYNLIB, PIP_HAS_FFT, PIP_HAS_SERIAL Preprocessor guards inverted: - #ifndef PIP_NO_X → #ifdef PIP_HAS_X - #ifdef PIP_NO_X → #ifndef PIP_HAS_X CMake options default ON instead of OFF. Platform blocks set flags OFF to disable features. 85 files transformed via Python script + 2 manual fixes.
This commit is contained in:
@@ -19,9 +19,9 @@
|
||||
|
||||
#include "pisystemtests.h"
|
||||
|
||||
#ifndef PIP_NO_FILESYSTEM
|
||||
#ifdef PIP_HAS_FILESYSTEM
|
||||
# include "piconfig.h"
|
||||
#endif // !PIP_NO_FILESYSTEM
|
||||
#endif // PIP_HAS_FILESYSTEM
|
||||
|
||||
|
||||
namespace PISystemTests {
|
||||
@@ -35,10 +35,10 @@ PISystemTestReader pisystestreader;
|
||||
|
||||
|
||||
PISystemTests::PISystemTestReader::PISystemTestReader() {
|
||||
#if !defined(WINDOWS) && !defined(PIP_NO_FILESYSTEM)
|
||||
#if !defined(WINDOWS) && defined(PIP_HAS_FILESYSTEM)
|
||||
PIConfig conf(PIStringAscii("/etc/pip.conf"), PIIODevice::ReadOnly);
|
||||
time_resolution_ns = conf.getValue(PIStringAscii("time_resolution_ns"), 1).toLong();
|
||||
time_elapsed_ns = conf.getValue(PIStringAscii("time_elapsed_ns"), 0).toLong();
|
||||
usleep_offset_us = conf.getValue(PIStringAscii("usleep_offset_us"), 60).toLong();
|
||||
#endif // !WINDOWS && !PIP_NO_FILESYSTEM
|
||||
#endif // !WINDOWS && PIP_HAS_FILESYSTEM
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user