From f6009a82389192e15700fd850d5a17276f7b5520 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Wed, 26 Oct 2016 14:14:47 +0200 Subject: [PATCH] MdeModulePkg/RegularExpressionDxe: guard the definition of ARRAY_SIZE In one of the next patches, we'll introduce ARRAY_SIZE in "MdePkg/Include/Base.h". In order to proceed in small steps, make the module-local definition of ARRAY_SIZE conditional. This way the introduction of the macro under MdePkg will silently switch this module over (after which we can remove the module-local definition completely). Cc: Cecil Sheng Cc: Feng Tian Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Feng Tian Reviewed-by: Star Zeng Reviewed-by: Jordan Justen --- .../Universal/RegularExpressionDxe/RegularExpressionDxe.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.h b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.h index b3f70136d8..73ea92b5a1 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.h +++ b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.h @@ -26,7 +26,9 @@ #include #include +#ifndef ARRAY_SIZE #define ARRAY_SIZE(Array) (sizeof(Array) / sizeof(*Array)) +#endif /** Checks if the input string matches to the regular expression pattern.