From ded41a64bd5c6bc40283bf5bd07b18bae5cbcd09 Mon Sep 17 00:00:00 2001 From: Michael D Kinney Date: Fri, 2 Feb 2024 17:02:41 -0800 Subject: [PATCH] MdePkg/Include: Rename _DEBUG() to address name collision REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4683 When VS20xx host-based unit tests are built with debug libraries a name collision occurs with the DebugLib.h internal macro _DEBUG(). Rename this internal macro to _DEBUGLIB_DEBUG() to address the name collision. Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Michael D Kinney Reviewed-by: Leif Lindholm --- MdePkg/Include/Library/DebugLib.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MdePkg/Include/Library/DebugLib.h b/MdePkg/Include/Library/DebugLib.h index 40772f2e0f..0db3b78ec8 100644 --- a/MdePkg/Include/Library/DebugLib.h +++ b/MdePkg/Include/Library/DebugLib.h @@ -375,9 +375,9 @@ UnitTestDebugAssert ( DebugPrint (PrintLevel, ##__VA_ARGS__); \ } \ } while (FALSE) -#define _DEBUG(Expression) _DEBUG_PRINT Expression +#define _DEBUGLIB_DEBUG(Expression) _DEBUG_PRINT Expression #else -#define _DEBUG(Expression) DebugPrint Expression +#define _DEBUGLIB_DEBUG(Expression) DebugPrint Expression #endif /** @@ -422,7 +422,7 @@ UnitTestDebugAssert ( #define DEBUG(Expression) \ do { \ if (DebugPrintEnabled ()) { \ - _DEBUG (Expression); \ + _DEBUGLIB_DEBUG (Expression); \ } \ } while (FALSE) #else