From: Nick Clifton Date: Wed, 6 Dec 2006 18:08:51 +0000 (+0000) Subject: * ansidecl.h (ATTRIBUTE_PACKED): Define. X-Git-Tag: releases/gcc-4.3.0~8098 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0307c64eea66674bd3dd9a42fed80cf748e2acf8;p=thirdparty%2Fgcc.git * ansidecl.h (ATTRIBUTE_PACKED): Define. From-SVN: r119587 --- diff --git a/include/ChangeLog b/include/ChangeLog index 017d3fd30b5c..572f45ad7717 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2006-12-06 Nick Clifton + + * ansidecl.h (ATTRIBUTE_PACKED): Define. + 2006-11-30 Andrew Stubbs J"orn Rennecke diff --git a/include/ansidecl.h b/include/ansidecl.h index a1a765d63f32..16adc47a1bfa 100644 --- a/include/ansidecl.h +++ b/include/ansidecl.h @@ -361,6 +361,12 @@ So instead we use the macro below and test it against specific values. */ # endif /* GNUC >= 3.0 */ #endif /* ATTRIBUTE_ALIGNED_ALIGNOF */ +/* Useful for structures whose layout must much some binary specification + regardless of the alignment and padding qualities of the compiler. */ +#ifndef ATTRIBUTE_PACKED +# define ATTRIBUTE_PACKED __attribute__ ((packed)) +#endif + /* We use __extension__ in some places to suppress -pedantic warnings about GCC extensions. This feature didn't work properly before gcc 2.8. */