summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2016-10-26 14:14:47 +0200
committerLaszlo Ersek <lersek@redhat.com>2016-10-27 10:49:52 +0200
commitf6009a82389192e15700fd850d5a17276f7b5520 (patch)
tree87ff82b1fbfdbdbf3bd877fbb4dffab4b718421d /MdeModulePkg
parent2e182e30e5712cbd39ed6f851e5fd00f9bfef7dc (diff)
downloadedk2-platforms-f6009a82389192e15700fd850d5a17276f7b5520.tar.xz
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 <cecil.sheng@hpe.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Feng Tian <feng.tian@Intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.h2
1 files changed, 2 insertions, 0 deletions
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 <Library/DebugLib.h>
#include <Library/BaseLib.h>
+#ifndef ARRAY_SIZE
#define ARRAY_SIZE(Array) (sizeof(Array) / sizeof(*Array))
+#endif
/**
Checks if the input string matches to the regular expression pattern.