From 30c2f3ca120ed23a2df1eddba5a8f47811753c2b Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Fri, 10 Apr 2009 20:58:10 +0000 Subject: [PATCH] Allow EFIAPI to be defined on the compiler command line. --- MdePkg/Include/Ebc/ProcessorBind.h | 8 +++++++- MdePkg/Include/Ia32/ProcessorBind.h | 8 ++++++-- MdePkg/Include/Ipf/ProcessorBind.h | 8 ++++++-- MdePkg/Include/X64/ProcessorBind.h | 8 ++++++-- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/MdePkg/Include/Ebc/ProcessorBind.h b/MdePkg/Include/Ebc/ProcessorBind.h index c4c168d77..4cd89a94d 100644 --- a/MdePkg/Include/Ebc/ProcessorBind.h +++ b/MdePkg/Include/Ebc/ProcessorBind.h @@ -4,7 +4,7 @@ We currently only have one EBC complier so there may be some Intel compiler specific functions in this file. - Copyright (c) 2006 - 2008, Intel Corporation
+ Copyright (c) 2006 - 2009, Intel Corporation
All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -113,7 +113,13 @@ typedef unsigned long UINTN; /// use the correct C calling convention. All protocol member functions and /// EFI intrinsics are required to modify their member functions with EFIAPI. /// +#ifdef EFIAPI + /// + /// If EFIAPI is already defined, then we use that definition. + /// +#else #define EFIAPI +#endif /// /// The Microsoft* C compiler can removed references to unreferenced data items diff --git a/MdePkg/Include/Ia32/ProcessorBind.h b/MdePkg/Include/Ia32/ProcessorBind.h index e6d1a7da9..9cb4eac8c 100644 --- a/MdePkg/Include/Ia32/ProcessorBind.h +++ b/MdePkg/Include/Ia32/ProcessorBind.h @@ -1,7 +1,7 @@ /** @file Processor or Compiler specific defines and types for Ia32 architecture. - Copyright (c) 2006 - 2008, Intel Corporation
+ Copyright (c) 2006 - 2009, Intel Corporation
All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -295,7 +295,11 @@ typedef INT32 INTN; // use the correct C calling convention. All protocol member functions and // EFI intrinsics are required to modify their member functions with EFIAPI. // -#if defined(_MSC_EXTENSIONS) +#ifdef EFIAPI + /// + /// If EFIAPI is already defined, then we use that definition. + /// +#elif defined(_MSC_EXTENSIONS) /// /// Microsoft* compiler specific method for EFIAPI calling convension /// diff --git a/MdePkg/Include/Ipf/ProcessorBind.h b/MdePkg/Include/Ipf/ProcessorBind.h index deaf5a292..3532b7d4a 100644 --- a/MdePkg/Include/Ipf/ProcessorBind.h +++ b/MdePkg/Include/Ipf/ProcessorBind.h @@ -1,7 +1,7 @@ /** @file Processor or Compiler specific defines and types for Intel Itanium(TM). - Copyright (c) 2006 - 2008, Intel Corporation
+ Copyright (c) 2006 - 2009, Intel Corporation
All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -358,7 +358,11 @@ typedef INT64 INTN; // use the correct C calling convention. All protocol member functions and // EFI intrinsics are required to modify their member functions with EFIAPI. // -#if defined(_MSC_EXTENSIONS) +#ifdef EFIAPI + /// + /// If EFIAPI is already defined, then we use that definition. + /// +#elif defined(_MSC_EXTENSIONS) /// /// Microsoft* compiler specific method for EFIAPI calling convension /// diff --git a/MdePkg/Include/X64/ProcessorBind.h b/MdePkg/Include/X64/ProcessorBind.h index 71f527753..9310f9f33 100644 --- a/MdePkg/Include/X64/ProcessorBind.h +++ b/MdePkg/Include/X64/ProcessorBind.h @@ -1,7 +1,7 @@ /** @file Processor or Compiler specific defines and types x64 (Intel(r) EM64T, AMD64). - Copyright (c) 2006 - 2008, Intel Corporation
+ Copyright (c) 2006 - 2009, Intel Corporation
All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -348,7 +348,11 @@ typedef INT64 INTN; // use the correct C calling convention. All protocol member functions and // EFI intrinsics are required to modify their member functions with EFIAPI. // -#if defined(_MSC_EXTENSIONS) +#ifdef EFIAPI + /// + /// If EFIAPI is already defined, then we use that definition. + /// +#elif defined(_MSC_EXTENSIONS) /// /// Microsoft* compiler specific method for EFIAPI calling convension /// -- 2.11.4.GIT