diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-05-09 15:16:17 +0200 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-05-09 15:16:17 +0200 |
commit | c99cd9519a56b2d7c60fa30e9fecd02f08336671 (patch) | |
tree | d897b2e3e31a2386a16dc6b5f4c3500ac66f601f /src/xine-engine/buffer.h | |
parent | ed72565137c93ab0385a10036d234f5f4dd1b960 (diff) | |
download | xine-lib-c99cd9519a56b2d7c60fa30e9fecd02f08336671.tar.gz xine-lib-c99cd9519a56b2d7c60fa30e9fecd02f08336671.tar.bz2 |
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.
Diffstat (limited to 'src/xine-engine/buffer.h')
-rw-r--r-- | src/xine-engine/buffer.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index ebb308a04..e0dc88bc7 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.h @@ -627,7 +627,7 @@ 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 +#ifndef SUPPORT_ATTRIBUTE_PACKED /* no attribute packed? let's try with pragma pack as a last resort */ #pragma pack(2) #endif @@ -636,7 +636,7 @@ char * _x_buf_audio_name( uint32_t buf_type ) XINE_PROTECTED; * - 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 +653,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,7 +662,7 @@ typedef struct __attribute__((__packed__)) { int16_t wBitsPerSample; int16_t cbSize; } xine_waveformatex; -#ifndef ATTRIBUTE_PACKED +#ifndef SUPPORT_ATTRIBUTE_PACKED #pragma pack() #endif |