diff options
author | AJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-09-24 21:48:45 +0000 |
---|---|---|
committer | AJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-09-24 21:48:45 +0000 |
commit | e8de46808a7d2426116de79cdf2aeab43d5a5537 (patch) | |
tree | fa8a3c90384138fd31fd2079e1ef0bd0d0e53d7d /EdkCompatibilityPkg/Foundation/Include | |
parent | fbf926add92ee7c528aed264b0b71442b2caef04 (diff) | |
download | edk2-platforms-e8de46808a7d2426116de79cdf2aeab43d5a5537.tar.xz |
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
Diffstat (limited to 'EdkCompatibilityPkg/Foundation/Include')
-rw-r--r-- | EdkCompatibilityPkg/Foundation/Include/EfiStdArg.h | 22 | ||||
-rw-r--r-- | EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h | 2 | ||||
-rw-r--r-- | EdkCompatibilityPkg/Foundation/Include/X64/EfiBind.h | 2 |
3 files changed, 26 insertions, 0 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Include/EfiStdArg.h b/EdkCompatibilityPkg/Foundation/Include/EfiStdArg.h index d125cedac7..989b87326b 100644 --- a/EdkCompatibilityPkg/Foundation/Include/EfiStdArg.h +++ b/EdkCompatibilityPkg/Foundation/Include/EfiStdArg.h @@ -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
//
@@ -72,4 +91,7 @@ typedef CHAR8 *VA_LIST; #endif
+
+#endif
+
#endif
diff --git a/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h b/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h index 5cfbb74131..12d7154d0b 100644 --- a/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h +++ b/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h @@ -83,7 +83,9 @@ Abstract: //
// Make sure we are useing the correct packing rules per EFI specification
//
+#ifndef __GNUC__
#pragma pack()
+#endif
#if __INTEL_COMPILER
//
diff --git a/EdkCompatibilityPkg/Foundation/Include/X64/EfiBind.h b/EdkCompatibilityPkg/Foundation/Include/X64/EfiBind.h index a0ab02b838..14eca7a301 100644 --- a/EdkCompatibilityPkg/Foundation/Include/X64/EfiBind.h +++ b/EdkCompatibilityPkg/Foundation/Include/X64/EfiBind.h @@ -35,7 +35,9 @@ Abstract: //
// Make sure we are useing the correct packing rules per EFI specification
//
+#ifndef __GNUC__
#pragma pack()
+#endif
#if __INTEL_COMPILER
//
|