summaryrefslogtreecommitdiff
path: root/include/ansidecl.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2006-12-06 14:36:41 +0000
committerNick Clifton <nickc@redhat.com>2006-12-06 14:36:41 +0000
commit85bec2cff408fdd5ee5e957946318b2320c5603a (patch)
tree2e157c6c9fc94ca053e462fdb515d30c15cd8055 /include/ansidecl.h
parent63f8994c21802de6e17e8709cc0a8bb271292b5c (diff)
downloadgdb-85bec2cff408fdd5ee5e957946318b2320c5603a.tar.gz
Define ATTRIBUTE_PACKED and use as necessary.
Diffstat (limited to 'include/ansidecl.h')
-rw-r--r--include/ansidecl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/ansidecl.h b/include/ansidecl.h
index a1a765d63f3..793b1e654df 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. */