BaseTools: Copy PACKED definition from MdePkg Base.h

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2938

MdePkg Acpi10.h definition depends on PACKED.
When structure PCD refers to Acpi10.h, build will fail,
because PACKED definition is missing in BaseTools BaseTypes.h.

C source tools include BaseTools BaseTypes.h. They don't include MdePkg Base.h.
When C source tools include MdePkg Acpi10.h, they also need PACKED definition.
So, add PACKED definition into BaseTools BaseTypes.h.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Tested-by: Garrett Kirkendall <garrett.kirkendall@amd.com>
This commit is contained in:
gaoliming 2020-09-25 15:49:18 +08:00 committed by mergify[bot]
parent f1567720b1
commit cf0d09ca7b
1 changed files with 10 additions and 0 deletions

View File

@ -57,6 +57,16 @@
#define NULL ((VOID *) 0)
#endif
#ifdef __CC_ARM
//
// Older RVCT ARM compilers don't fully support #pragma pack and require __packed
// as a prefix for the structure.
//
#define PACKED __packed
#else
#define PACKED
#endif
//
// Support for variable length argument lists using the ANSI standard.
//