Fixed issues compiling for Apple gcc on IA-32

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9310 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
AJFISH
2009-09-24 21:48:45 +00:00
parent fbf926add9
commit e8de46808a
99 changed files with 2216 additions and 2186 deletions

View File

@@ -60,6 +60,25 @@ Abstract:
#define _EFI_INT_SIZE_OF(n) ((sizeof (n) + sizeof (UINTN) - 1) &~(sizeof (UINTN) - 1))
#if defined(__GNUC__)
//
// Use GCC built-in macros for variable argument lists.
//
///
/// Variable used to traverse the list of arguments. This type can vary by
/// implementation and could be an array or structure.
///
typedef __builtin_va_list VA_LIST;
#define VA_START(Marker, Parameter) __builtin_va_start (Marker, Parameter)
#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)
#else
//
// Also support coding convention rules for var arg macros
//
@@ -70,6 +89,9 @@ typedef CHAR8 *VA_LIST;
#define VA_ARG(ap, t) (*(t *) ((ap += _EFI_INT_SIZE_OF (t)) - _EFI_INT_SIZE_OF (t)))
#define VA_END(ap) (ap = (VA_LIST) 0)
#endif
#endif
#endif