Re: [PATCH] Centralize the macro definition of "__packed".

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 18 Jan 2007, Tim Schmielau wrote:

> On Thu, 18 Jan 2007, Robert P. J. Day wrote:
>
> >   Centralize the attribute macro definition of "__packed" so no
> > subsystem has to do that explicitly.
> >
> > Signed-off-by: Robert P. J. Day <[email protected]>
> >
> > ---
> >
> >   compile tested to make sure the HFS subsystem still builds.  now
> > there's just 50 gazillion usages of "__attribute__((packed))" that can
> > be tightened up.
> >
> >
> >  fs/hfs/hfs.h                 |    2 --
> >  fs/hfsplus/hfsplus_raw.h     |    2 --
> >  include/linux/compiler-gcc.h |    1 +
> >  3 files changed, 1 insertion(+), 4 deletions(-)
>
> Moving definitions into compiler-gcc.h only will screw non-gcc
> compilers like icc. They should probably go into the generic section
> of compiler.h instead.

actually, it *appears* that the standard works this way.  the macro
"__deprecated" is defined in compiler-gcc.h with:

    #define __deprecated __attribute__((deprecated))

while the more generic compiler.h handles whether or not it was
defined:

    #ifndef __deprecated
    # define __deprecated           /* unimplemented */
    #endif

so i'm guessing that's how any new attribute shortcut macros should be
handled, yes?

rday
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux