lkml.org 
[lkml]   [2014]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/1] security: Used macros from compiler.h instead of __attribute__((...))
From
On Wed, Jun 18, 2014 at 8:50 PM, Paul Moore <paul@paul-moore.com> wrote:
> On Wednesday, June 11, 2014 09:25:30 PM Gideon Israel Dsouza wrote:
>> To increase compiler portability there is <linux/compiler.h> which
>> provides convenience macros for various gcc constructs. Eg: __packed
>> for __attribute__((packed)).
>>
>> This patch is part of a large task I've taken to clean the gcc
>> specific attributes and use the the macros instead.
>>
>> Signed-off-by: Gideon Israel Dsouza <gidisrael@gmail.com>
>> ---
>> security/selinux/include/security.h | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> From what I can tell this should still work with both the LLVM and Intel
> compilers, is that correct?

That's the idea of the compiler-agnostic attribute macros.

Interestingly, only include/linux/compiler-gcc.h defines __packed.

As it's already in heavy use, I can only assume both LLVM and the Intel
compilers handle both "__packed" (without a special definition) and the
gcc-specific "__attribute__((packed))".

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


\
 
 \ /
  Last update: 2014-06-19 07:41    [W:0.319 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site