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:
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "piliterals_time.h"
|
||||
|
||||
#ifndef PIP_NO_SOCKET
|
||||
#ifdef PIP_HAS_SOCKET
|
||||
|
||||
/** \class PIBroadcast
|
||||
* \brief Broadcast for all interfaces, including loopback
|
||||
@@ -271,4 +271,4 @@ void PIBroadcast::run() {
|
||||
if (ac) addressesChanged();
|
||||
}
|
||||
|
||||
#endif // PIP_NO_SOCKET
|
||||
#endif // PIP_HAS_SOCKET
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "piethutilbase.h"
|
||||
|
||||
#ifndef PIP_NO_SOCKET
|
||||
#ifdef PIP_HAS_SOCKET
|
||||
|
||||
#include "pitranslator.h"
|
||||
#ifdef PIP_CRYPT
|
||||
@@ -132,4 +132,4 @@ size_t PIEthUtilBase::cryptSizeAddition() {
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // PIP_NO_SOCKET
|
||||
#endif // PIP_HAS_SOCKET
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "piethernet.h"
|
||||
#include "piliterals.h"
|
||||
|
||||
#ifndef PIP_NO_SOCKET
|
||||
#ifdef PIP_HAS_SOCKET
|
||||
|
||||
|
||||
/** \class PIPackedTCP pipackedtcp.h
|
||||
@@ -200,4 +200,4 @@ bool PIPackedTCP::closeDevice() {
|
||||
return eth->close();
|
||||
}
|
||||
|
||||
#endif // PIP_NO_SOCKET
|
||||
#endif // PIP_HAS_SOCKET
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "piiodevice.h"
|
||||
#include "pitranslator.h"
|
||||
|
||||
#ifndef PIP_NO_SOCKET
|
||||
#ifdef PIP_HAS_SOCKET
|
||||
#ifdef __GNUC__
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
@@ -178,4 +178,4 @@ uint PIStreamPacker::sizeCryptedSize() {
|
||||
return sizeof(int) + (crypt_size ? cryptSizeAddition() : 0);
|
||||
}
|
||||
|
||||
#endif // PIP_NO_SOCKET
|
||||
#endif // PIP_HAS_SOCKET
|
||||
|
||||
Reference in New Issue
Block a user