diff options
author | Michael Brown <mcb30@ipxe.org> | 2011-03-31 00:39:40 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2011-03-31 03:31:11 +0100 |
commit | 748d5ed9dae08f761643ffe1bb0ba3b6b037651f (patch) | |
tree | ae946508bbdb01b2554605e0cec72933d070e081 /src/include/ipxe/efi/Base.h | |
parent | de2d983ab85b383d3d35cf0fb0a85f28835b09f6 (diff) | |
download | ipxe-748d5ed9dae08f761643ffe1bb0ba3b6b037651f.tar.gz |
[efi] Synchronise EFI header files
Synchronised to EDK2 SVN revision 11462.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/efi/Base.h')
-rw-r--r-- | src/include/ipxe/efi/Base.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/include/ipxe/efi/Base.h b/src/include/ipxe/efi/Base.h index d95f24bd4..999b41471 100644 --- a/src/include/ipxe/efi/Base.h +++ b/src/include/ipxe/efi/Base.h @@ -496,7 +496,7 @@ typedef CHAR8 *VA_LIST; @return A pointer to the beginning of a variable argument list. **/ -#define VA_START(Marker, Parameter) (Marker = (VA_LIST) & (Parameter) + _INT_SIZE_OF (Parameter)) +#define VA_START(Marker, Parameter) (Marker = (VA_LIST) ((UINTN) & (Parameter) + _INT_SIZE_OF (Parameter))) /** Returns an argument of a specified type from a variable argument list and updates @@ -575,7 +575,15 @@ typedef UINTN *BASE_LIST; @return Offset, in bytes, of field. **/ +#ifdef __GNUC__ +#if __GNUC__ >= 4 +#define OFFSET_OF(TYPE, Field) ((UINTN) __builtin_offsetof(TYPE, Field)) +#endif +#endif + +#ifndef OFFSET_OF #define OFFSET_OF(TYPE, Field) ((UINTN) &(((TYPE *)0)->Field)) +#endif /** Macro that returns a pointer to the data structure that contains a specified field of |