]> xenbits.xensource.com Git - people/aperard/ovmf.git/commitdiff
MdePkg/Include: Rename _DEBUG() to address name collision
authorMichael D Kinney <michael.d.kinney@intel.com>
Sat, 3 Feb 2024 01:02:41 +0000 (17:02 -0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 14 Feb 2024 02:37:16 +0000 (02:37 +0000)
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 <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
MdePkg/Include/Library/DebugLib.h

index 40772f2e0f7b829a1e89bdaa054db9340e2552cc..0db3b78ec86d0a58000baf2775c5eeabe19fe0c8 100644 (file)
@@ -375,9 +375,9 @@ UnitTestDebugAssert (
         DebugPrint (PrintLevel, ##__VA_ARGS__);      \\r
       }                                              \\r
     } while (FALSE)\r
-#define _DEBUG(Expression)  _DEBUG_PRINT Expression\r
+#define _DEBUGLIB_DEBUG(Expression)  _DEBUG_PRINT Expression\r
 #else\r
-#define _DEBUG(Expression)  DebugPrint Expression\r
+#define _DEBUGLIB_DEBUG(Expression)  DebugPrint Expression\r
 #endif\r
 \r
 /**\r
@@ -422,7 +422,7 @@ UnitTestDebugAssert (
 #define DEBUG(Expression)        \\r
     do {                           \\r
       if (DebugPrintEnabled ()) {  \\r
-        _DEBUG (Expression);       \\r
+        _DEBUGLIB_DEBUG (Expression);       \\r
       }                            \\r
     } while (FALSE)\r
 #else\r