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/EfiStdArg.h | |
parent | fbf926add92ee7c528aed264b0b71442b2caef04 (diff) | |
download | edk2-e8de46808a7d2426116de79cdf2aeab43d5a5537.tar.gz edk2-e8de46808a7d2426116de79cdf2aeab43d5a5537.tar.bz2 edk2-e8de46808a7d2426116de79cdf2aeab43d5a5537.zip |
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/EfiStdArg.h')
-rw-r--r-- | EdkCompatibilityPkg/Foundation/Include/EfiStdArg.h | 22 |
1 files changed, 22 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
|