X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=EdkCompatibilityPkg%2FFoundation%2FInclude%2FIa32%2FEfiBind.h;h=12d7154d0baef7754124cbf5290523d41869fb3d;hp=ae60a28e2738d1c3d0df65173f4634f39c9c2d43;hb=e8de46808a7d2426116de79cdf2aeab43d5a5537;hpb=3eb9473ea9a949badfe06ae61d2d3fcfa53651c7 diff --git a/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h b/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h index ae60a28e27..12d7154d0b 100644 --- a/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h +++ b/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2004 - 2006, Intel Corporation +Copyright (c) 2004 - 2008, 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 @@ -49,12 +49,12 @@ Abstract: return 1; \ } \ \ - EFI_STATUS \ + EFI_STATUS \ __declspec( dllexport ) \ __cdecl \ InitializeDriver ( \ - VOID *ImageHandle, \ - VOID *SystemTable \ + EFI_HANDLE ImageHandle, \ + EFI_SYSTEM_TABLE *SystemTable \ ) \ { \ return InitFunction(ImageHandle, SystemTable); \ @@ -83,7 +83,47 @@ Abstract: // // Make sure we are useing the correct packing rules per EFI specification // +#ifndef __GNUC__ #pragma pack() +#endif + +#if __INTEL_COMPILER +// +// Disable ICC's warning: trailing comma is nonstandard +// +//#pragma warning ( disable : 271 ) + +// +// Disable ICC's warning: extra ";" ignored +// +#pragma warning ( disable : 424 ) + +// +// Disable ICC's warning: : variable "foo" was set but never used +// +#pragma warning ( disable : 593 ) + +// +// Disable ICC's remark #1418: external function definition with no prior declaration. +// This is legal ANSI C code so we disable the remark that is turned on with /W4 +// +#pragma warning ( disable : 1418 ) + + +// +// Disable ICC's remark #1419: external declaration in primary source file +// This is legal ANSI C code so we disable the remark that is turned on with /W4 +// +#pragma warning ( disable : 1419 ) + +// +// Disable ICC's remark #869: "Parameter" was never referenced warning. +// This is legal ANSI C code so we disable the remark that is turned on with -Wall +// +#pragma warning ( disable : 869 ) + +#endif + #if _MSC_EXTENSIONS @@ -133,7 +173,7 @@ Abstract: #endif -#if (__STDC_VERSION__ < 199901L) +#if !defined(__GNUC__) && (__STDC_VERSION__ < 199901L) // // No ANSI C 2000 stdint.h integer width declarations, so define equivalents // @@ -203,7 +243,12 @@ typedef int32_t intn_t; // compiler will optimize away the rest of the function following, so that you run out in // the weeds if you skip over it with a debugger. // +#ifdef _MSC_EXTENSIONS #define EFI_BREAKPOINT() __asm { int 3 } +#elif __GNUC__ +#define EFI_BREAKPOINT() asm(" int $3"); +#endif + #define EFI_DEADLOOP() { volatile UINTN __iii; __iii = 1; while (__iii); } // @@ -263,7 +308,23 @@ typedef int32_t intn_t; #endif +// +// For symbol name in GNU assembly code, an extra "_" is necessary +// +#if defined(__GNUC__) + /// + /// Private worker functions for ASM_PFX() + /// + #define _CONCATENATE(a, b) __CONCATENATE(a, b) + #define __CONCATENATE(a, b) a ## b + + /// + /// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix + /// on symbols in assembly language. + /// + #define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name) +#endif #endif