diff options
Diffstat (limited to 'src/xine-engine')
-rw-r--r-- | src/xine-engine/alphablend.c | 4 | ||||
-rw-r--r-- | src/xine-engine/alphablend.h | 25 | ||||
-rw-r--r-- | src/xine-engine/buffer.h | 11 |
3 files changed, 5 insertions, 35 deletions
diff --git a/src/xine-engine/alphablend.c b/src/xine-engine/alphablend.c index 9947da365..d4c708887 100644 --- a/src/xine-engine/alphablend.c +++ b/src/xine-engine/alphablend.c @@ -1113,7 +1113,7 @@ static void blend_yuv_exact(uint8_t *dst_cr, uint8_t *dst_cb, static uint8_t *(*blend_yuv_grow_extra_data(alphablend_t *extra_data, int osd_width))[ 3 ][ 2 ] { - struct __attribute__((packed)) header_s { + struct XINE_PACKED header_s { int id; int max_width; uint8_t *data[ 3 ][ 2 ]; @@ -1523,7 +1523,7 @@ static void blend_yuy2_exact(uint8_t *dst_cr, uint8_t *dst_cb, static uint8_t *(*blend_yuy2_grow_extra_data(alphablend_t *extra_data, int osd_width))[ 3 ] { - struct __attribute__((packed)) header_s { + struct XINE_PACKED header_s { int id; int max_width; uint8_t *data[ 3 ]; diff --git a/src/xine-engine/alphablend.h b/src/xine-engine/alphablend.h index 513ac116f..4fc879b2c 100644 --- a/src/xine-engine/alphablend.h +++ b/src/xine-engine/alphablend.h @@ -39,37 +39,14 @@ typedef struct { void _x_alphablend_init(alphablend_t *extra_data, xine_t *xine) XINE_PROTECTED; void _x_alphablend_free(alphablend_t *extra_data) XINE_PROTECTED; -/* _MSC_VER port changes */ -#undef ATTRIBUTE_PACKED -#undef PRAGMA_PACK_BEGIN -#undef PRAGMA_PACK_END - -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || defined(__ICC) -#define ATTRIBUTE_PACKED __attribute__ ((packed)) -#define PRAGMA_PACK 0 -#endif - -#if !defined(ATTRIBUTE_PACKED) -#define ATTRIBUTE_PACKED -#define PRAGMA_PACK 1 -#endif - -#if PRAGMA_PACK -#pragma pack(8) -#endif - typedef struct { /* CLUT == Color LookUp Table */ uint8_t cb; uint8_t cr; uint8_t y; uint8_t foo; -} ATTRIBUTE_PACKED clut_t; +} XINE_PACKED clut_t; -#if PRAGMA_PACK -#pragma pack() -#endif - #define XX44_PALETTE_SIZE 32 typedef struct { diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index 4c86a1136..224eb798d 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.h @@ -627,16 +627,12 @@ uint32_t _x_formattag_to_buf_audio( uint32_t formattag ) XINE_PROTECTED; char * _x_buf_audio_name( uint32_t buf_type ) XINE_PROTECTED; -#ifndef ATTRIBUTE_PACKED -/* no attribute packed? let's try with pragma pack as a last resort */ -#pragma pack(2) -#endif /* this is xine version of BITMAPINFOHEADER * - should be safe to compile on 64bits machines * - will always use machine endian format, so demuxers reading * stuff from win32 formats must use the function below. */ -typedef struct __attribute__((__packed__)) { +typedef struct XINE_PACKED { int32_t biSize; int32_t biWidth; int32_t biHeight; @@ -653,7 +649,7 @@ typedef struct __attribute__((__packed__)) { /* this is xine version of WAVEFORMATEX * (the same comments from xine_bmiheader) */ -typedef struct __attribute__((__packed__)) { +typedef struct XINE_PACKED { int16_t wFormatTag; int16_t nChannels; int32_t nSamplesPerSec; @@ -662,9 +658,6 @@ typedef struct __attribute__((__packed__)) { int16_t wBitsPerSample; int16_t cbSize; } xine_waveformatex; -#ifndef ATTRIBUTE_PACKED -#pragma pack() -#endif /* convert xine_bmiheader struct from little endian */ void _x_bmiheader_le2me( xine_bmiheader *bih ) XINE_PROTECTED; |