diff options
author | mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-05-10 19:44:21 +0000 |
---|---|---|
committer | mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-05-10 19:44:21 +0000 |
commit | 6ed623e4035d87e7db43677729b23844ef0e9a0d (patch) | |
tree | 7e98ee8ea49b1e765e11d10b47f41dd676a9338a /MdePkg/Include/Base.h | |
parent | 78b993a8f9dd5985a797037b8b6ecad5355ea0b2 (diff) | |
download | edk2-platforms-6ed623e4035d87e7db43677729b23844ef0e9a0d.tar.xz |
Update GCC version of VAR_ARG () to be compatible with non GCC version of VAR_ARG () so it handles TYPE parameters that are smaller than UINTN properly when GCC builtins are used for vararg parsing.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8282 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Include/Base.h')
-rw-r--r-- | MdePkg/Include/Base.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 4afdb7d84c..0e5ea1978d 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -339,11 +339,11 @@ struct _LIST_ENTRY { //
typedef __builtin_va_list VA_LIST;
-#define VA_START(Marker, Parameter) __builtin_va_start(Marker, Parameter)
+#define VA_START(Marker, Parameter) __builtin_va_start (Marker, Parameter)
-#define VA_ARG(Marker, TYPE) __builtin_va_arg(Marker, TYPE)
+#define VA_ARG(Marker, TYPE) ((sizeof (TYPE) < sizeof (UINTN)) ? (TYPE)(__builtin_va_arg (Marker, UINTN)) : (TYPE)(__builtin_va_arg (Marker, TYPE)))
-#define VA_END(Marker) __builtin_va_end(Marker)
+#define VA_END(Marker) __builtin_va_end (Marker)
#else
/**
|