From c99cd9519a56b2d7c60fa30e9fecd02f08336671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 9 May 2008 15:16:17 +0200 Subject: Cleanup handling of packed attribute. - Add a configure test for the attribute, during xine build process. - Define the attribute as supported when using GCC 2.95 or later outside xine build process. - Use the new XINE_PACKED define instead of the attribute directly. - Check for SUPPORT_ATTRIBUTE_PACKED rather than doing strange subdefines. --- m4/attributes.m4 | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'm4') diff --git a/m4/attributes.m4 b/m4/attributes.m4 index 393ee0ba7..bb53cca41 100644 --- a/m4/attributes.m4 +++ b/m4/attributes.m4 @@ -166,6 +166,14 @@ AC_DEFUN([CC_ATTRIBUTE_MALLOC], [ [$2]) ]) +AC_DEFUN([CC_ATTRIBUTE_PACKED], [ + CC_CHECK_ATTRIBUTE( + [packed], , + [struct astructure { char a; int b; long c; void *d; } __attribute__((packed));], + [$1], + [$2]) +]) + AC_DEFUN([CC_FLAG_VISIBILITY], [ AC_REQUIRE([CC_CHECK_WERROR]) ac_save_CFLAGS="$CFLAGS" -- cgit v1.2.3