From 017b276a7623b6bdd1d3d0310c83d208114fb0d1 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 6 Dec 2006 14:36:41 +0000 Subject: Define ATTRIBUTE_PACKED and use as necessary. --- include/ansidecl.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/ansidecl.h') diff --git a/include/ansidecl.h b/include/ansidecl.h index a1a765d63..793b1e654 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 whoes 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. */ -- cgit v1.2.3