From 2de490e2847edaaa11e1ac1baefc5bcd6ebac2fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 10 Apr 2007 13:57:26 +0200 Subject: Rationalise __attribute__((packed)) usage. First of all, as we check the presence of the attribute in configure.ac and we generate the XINE_PACKED definition there, there's no need to do the work again on attributes.h. Also remove #pragma pack support for now, as the trick is just not neat enough, and as it is it's just noise. Make Wine, libdvdnav and nosefart use XINE_PACKED rather than doing their own checks, as they are less reliable. --- src/input/libdvdnav/diff_against_cvs.patch | 33 ++++++++++++++++++++++++++++++ src/input/libdvdnav/ifo_types.h | 22 ++------------------ 2 files changed, 35 insertions(+), 20 deletions(-) (limited to 'src/input') diff --git a/src/input/libdvdnav/diff_against_cvs.patch b/src/input/libdvdnav/diff_against_cvs.patch index 202474fef..b9b1dbe8b 100644 --- a/src/input/libdvdnav/diff_against_cvs.patch +++ b/src/input/libdvdnav/diff_against_cvs.patch @@ -432,3 +432,36 @@ diff -u -p -u -r1.19 searching.c if(this->position_current.still != 0) { printerr("Cannot seek in a still frame."); +--- src/input/libdvdnav/ifo_types.h Tue Apr 10 13:13:59 2007 +0200 ++++ src/input/libdvdnav/ifo_types.h Tue Apr 10 13:38:19 2007 +0200 +@@ -23,2 +25,2 @@ + #include + #include "dvd_reader.h" + ++#include "config.h" ++ +- +-#undef ATTRIBUTE_PACKED +-#undef PRAGMA_PACK_BEGIN +-#undef PRAGMA_PACK_END +- +-#if defined(__GNUC__) +-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +-#define ATTRIBUTE_PACKED __attribute__ ((packed)) +-#define PRAGMA_PACK 0 +-#endif +-#endif +- +-#if !defined(ATTRIBUTE_PACKED) +-#define ATTRIBUTE_PACKED +-#define PRAGMA_PACK 1 +-#endif +- +-#if PRAGMA_PACK +-#pragma pack(1) +-#endif +- ++#define ATTRIBUTE_PACKED XINE_PACKED + + /** + * Common diff --git a/src/input/libdvdnav/ifo_types.h b/src/input/libdvdnav/ifo_types.h index 17be98f83..e9332ecec 100644 --- a/src/input/libdvdnav/ifo_types.h +++ b/src/input/libdvdnav/ifo_types.h @@ -23,27 +23,9 @@ #include #include "dvd_reader.h" +#include "config.h" -#undef ATTRIBUTE_PACKED -#undef PRAGMA_PACK_BEGIN -#undef PRAGMA_PACK_END - -#if defined(__GNUC__) -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) -#define ATTRIBUTE_PACKED __attribute__ ((packed)) -#define PRAGMA_PACK 0 -#endif -#endif - -#if !defined(ATTRIBUTE_PACKED) -#define ATTRIBUTE_PACKED -#define PRAGMA_PACK 1 -#endif - -#if PRAGMA_PACK -#pragma pack(1) -#endif - +#define ATTRIBUTE_PACKED XINE_PACKED /** * Common -- cgit v1.2.3