summaryrefslogtreecommitdiff
path: root/sys/external/bsd/gnu-efi/dist/inc/eficompiler.h
blob: 61cfc08a27b9842b8354e066b13578ac23c2c3bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*	$NetBSD: eficompiler.h,v 1.2 2018/08/16 18:24:35 jmcneill Exp $	*/

/*++

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 EFI_ALIGN(x) __declspec(align(x))
#else
#define EFI_ALIGN(x) __attribute__((__aligned__(x)))
#endif

/* Also add a catch-all on __attribute__() for MS compilers */
#ifdef _MSC_EXTENSIONS
#define __attribute__(x)
#endif