5ff74ecae8
specific __attribute__((__unused__)), which breaks MSVC compilation... I'll use this as a reminder that gnu-efi is compiled with more than GNU toolchains, and that contributors might want to be careful about adding GNU-specific extensions... This patch does the following: Create a new eficompiler.h header that sets all compiler-specific options and extensions Create a new EFI_UNUSED macro to be used in lieu of __attribute__((__unused__)) and applies it to the relevant sources Move the ALIGN(x) macro, previously defined in efisetjmp.h to the new header Oh, and it also fixes a bunch of trailing whitespaces (because my code editor is set to do just that by default). Signed-off-by: Pete Batard <pbatard@users.sf.net> Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
31 lines
483 B
C
31 lines
483 B
C
/*++
|
|
|
|
Copyright (c) 2016 Pete Batard <pete@akeo.ie>
|
|
|
|
Module Name:
|
|
|
|
eficompiler.h
|
|
|
|
Abstract:
|
|
|
|
Compiler specific adjustments
|
|
|
|
--*/
|
|
|
|
#ifdef _MSC_EXTENSIONS
|
|
#define EFI_UNUSED
|
|
#else
|
|
#define EFI_UNUSED __attribute__((__unused__))
|
|
#endif
|
|
|
|
#ifdef _MSC_EXTENSIONS
|
|
#define ALIGN(x) __declspec(align(x))
|
|
#else
|
|
#define ALIGN(x) __attribute__((__aligned__(x)))
|
|
#endif
|
|
|
|
/* Also add a catch-all on __attribute__() for MS compilers */
|
|
#ifdef _MSC_EXTENSIONS
|
|
#define __attribute__(x)
|
|
#endif
|