diff --git a/src/lib/support/DLLUtil.h b/src/lib/support/DLLUtil.h index b62b2261be836f..70ae6df8a38ec2 100644 --- a/src/lib/support/DLLUtil.h +++ b/src/lib/support/DLLUtil.h @@ -29,17 +29,11 @@ #pragma once #if defined _WIN32 || defined __CYGWIN__ -#define DLL_IMPORT __declspec(dllimport) #define DLL_EXPORT __declspec(dllexport) -#define DLL_LOCAL #else #if __GNUC__ >= 4 -#define DLL_IMPORT __attribute__((visibility("default"))) #define DLL_EXPORT __attribute__((visibility("default"))) -#define DLL_LOCAL __attribute__((visibility("hidden"))) #else -#define DLL_IMPORT #define DLL_EXPORT -#define DLL_LOCAL #endif #endif diff --git a/src/lib/support/logging/CHIPLogging.h b/src/lib/support/logging/CHIPLogging.h index 1591e6824c3e7d..5bb01ff1ed5c6b 100644 --- a/src/lib/support/logging/CHIPLogging.h +++ b/src/lib/support/logging/CHIPLogging.h @@ -338,9 +338,9 @@ DLL_EXPORT void SetLogFilter(uint8_t category); static constexpr uint16_t kMaxModuleNameLen = 3; #if CHIP_LOG_FILTERING -DLL_LOCAL bool IsCategoryEnabled(uint8_t category); +bool IsCategoryEnabled(uint8_t category); #else // CHIP_LOG_FILTERING -DLL_LOCAL inline bool IsCategoryEnabled(uint8_t category) +inline bool IsCategoryEnabled(uint8_t category) { return true; } @@ -395,9 +395,9 @@ DLL_LOCAL inline bool IsCategoryEnabled(uint8_t category) #define _IsModuleCategoryEnabled3(DUMMY_ARG, GLOB_CAT) _IsModuleCategoryEnabled4(DUMMY_ARG 0, GLOB_CAT) #define _IsModuleCategoryEnabled4(ARG1, ARG2, ...) (ARG2) -DLL_LOCAL void Log(uint8_t module, uint8_t category, const char * msg, ...) ENFORCE_FORMAT(3, 4); -DLL_LOCAL void LogByteSpan(uint8_t module, uint8_t category, const ByteSpan & span); -DLL_LOCAL void LogV(uint8_t module, uint8_t category, const char * msg, va_list args) ENFORCE_FORMAT(3, 0); +void Log(uint8_t module, uint8_t category, const char * msg, ...) ENFORCE_FORMAT(3, 4); +void LogByteSpan(uint8_t module, uint8_t category, const ByteSpan & span); +void LogV(uint8_t module, uint8_t category, const char * msg, va_list args) ENFORCE_FORMAT(3, 0); #if CHIP_SYSTEM_CONFIG_PLATFORM_LOG #ifndef ChipPlatformLog diff --git a/src/platform/Darwin/Logging.h b/src/platform/Darwin/Logging.h index 30f6c966af8a53..ae7d5b22921293 100644 --- a/src/platform/Darwin/Logging.h +++ b/src/platform/Darwin/Logging.h @@ -17,7 +17,6 @@ #pragma once -#include #include #include @@ -65,18 +64,17 @@ enum OSLogCategory kOSLogCategory_AUTOMATION = OS_LOG_TYPE_DEFAULT, }; -DLL_LOCAL os_log_t LoggerForModule(chip::Logging::LogModule moduleId, char const * moduleName); -DLL_LOCAL void LogByteSpan(chip::Logging::LogModule moduleId, char const * moduleName, os_log_type_t type, - const chip::ByteSpan & span); +os_log_t LoggerForModule(chip::Logging::LogModule moduleId, char const * moduleName); +void LogByteSpan(chip::Logging::LogModule moduleId, char const * moduleName, os_log_type_t type, const chip::ByteSpan & span); // Helper constructs for compile-time validation of format strings for C++ / ObjC++ contexts. // Note that ObjC++ contexts are restricted to NSString style specifiers. Supporting os_log() // specifiers would require these to be emulated or stripped when log redirection is used. #ifdef __OBJC__ -DLL_LOCAL bool ValidateLogFormat(NSString * format, ...) __attribute__((format(__NSString__, 1, 0))); // not implemented +bool ValidateLogFormat(NSString * format, ...) __attribute__((format(__NSString__, 1, 0))); // not implemented #define ChipPlatformValidateLogFormat(F, ...) ((void) sizeof(chip::Logging::Platform::ValidateLogFormat(@F, ##__VA_ARGS__))) #else // __OBJC__ -DLL_LOCAL bool ValidateLogFormat(char const * format, ...) __attribute__((format(printf, 1, 0))); // not implemented +bool ValidateLogFormat(char const * format, ...) __attribute__((format(printf, 1, 0))); // not implemented #define ChipPlatformValidateLogFormat(F, ...) ((void) sizeof(chip::Logging::Platform::ValidateLogFormat(F, ##__VA_ARGS__))) #endif // __OBJC__