OvmfPkg/PlatformBootManagerLib: 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: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Laszlo Ersek 2016-10-26 14:14:47 +02:00
parent 2f2a78f9d6
commit 103b12cec5
1 changed files with 2 additions and 0 deletions

View File

@ -40,7 +40,9 @@ CONST UINT8 PciHostIrqs[] = {
//
// Array Size macro
//
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(array) (sizeof (array) / sizeof (array[0]))
#endif
//
// Type definitions