summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/combined/combined_wavpack.h5
-rw-r--r--src/input/libdvdnav/diff_against_cvs.patch33
-rw-r--r--src/input/libdvdnav/ifo_types.h22
-rw-r--r--src/libw32dll/wine/windef.h7
-rw-r--r--src/libxineadec/nosefart/diff_to_nosefart_cvs.patch42
-rw-r--r--src/libxineadec/nosefart/nsf.h4
-rw-r--r--src/libxineadec/nosefart/osd.h4
-rw-r--r--src/xine-engine/alphablend.c4
-rw-r--r--src/xine-engine/alphablend.h25
-rw-r--r--src/xine-engine/buffer.h11
-rw-r--r--src/xine-utils/attributes.h12
11 files changed, 92 insertions, 77 deletions
diff --git a/src/combined/combined_wavpack.h b/src/combined/combined_wavpack.h
index aa57820b5..7688f91df 100644
--- a/src/combined/combined_wavpack.h
+++ b/src/combined/combined_wavpack.h
@@ -23,6 +23,7 @@
*/
#include "os_types.h"
+#include "bswap.h"
typedef struct {
uint32_t idcode; /* This should always be the string "wvpk" */
@@ -37,9 +38,9 @@ typedef struct {
uint32_t samples_count; /* Count of samples in the current frame */
uint32_t flags; /* Misc flags */
uint32_t decoded_crc32; /* CRC32 of the decoded data */
-} __attribute__((packed)) wvheader_t;
+} XINE_PACKED wvheader_t;
-static const uint32_t wvpk_signature = ME_FOURCC('w', 'v', 'p', 'k')
+static const uint32_t wvpk_signature = ME_FOURCC('w', 'v', 'p', 'k');
void *demux_wv_init_plugin (xine_t *const xine, void *const data);
void *decoder_wavpack_init_plugin (xine_t *xine, void *data);
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 <inttypes.h>
+ #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 <inttypes.h>
#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/libw32dll/wine/windef.h b/src/libw32dll/wine/windef.h
index e7f691a02..b86f2f740 100644
--- a/src/libw32dll/wine/windef.h
+++ b/src/libw32dll/wine/windef.h
@@ -7,8 +7,9 @@
#ifndef __WINE_WINDEF_H
#define __WINE_WINDEF_H
+#include "config.h"
+
#ifdef __WINE__
-# include "config.h"
# undef UNICODE
#endif
@@ -493,14 +494,14 @@ typedef LRESULT CALLBACK (*WNDPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
/* Macro for structure packing. */
+#define WINE_PACKED XINE_PACKED
+
#if defined(__GNUC__) || defined(__ICC)
#ifndef _EGCS_
-#define WINE_PACKED __attribute__((packed))
#define WINE_UNUSED __attribute__((unused))
#define WINE_NORETURN __attribute__((noreturn))
#endif
#else
-#define WINE_PACKED /* nothing */
#define WINE_UNUSED /* nothing */
#define WINE_NORETURN /* nothing */
#endif
diff --git a/src/libxineadec/nosefart/diff_to_nosefart_cvs.patch b/src/libxineadec/nosefart/diff_to_nosefart_cvs.patch
index 280cd89cb..2b6202fb8 100644
--- a/src/libxineadec/nosefart/diff_to_nosefart_cvs.patch
+++ b/src/libxineadec/nosefart/diff_to_nosefart_cvs.patch
@@ -73,3 +73,45 @@ diff -u -p -r1.1.1.1 nes_apu.c
}
/* resync cycle counter */
+--- a/src/libxineadec/nosefart/nsf.h Tue Apr 10 13:42:00 2007 +0200
++++ b/src/libxineadec/nosefart/nsf.h Tue Apr 10 13:48:50 2007 +0200
+@@ -29,6 +29,8 @@
+ #include "osd.h"
+ #include "nes6502.h"
+ #include "nes_apu.h"
++
++#include "config.h"
+
+ #define NSF_MAGIC "NESM\x1A"
+
+@@ -96,7 +98,7 @@ typedef struct nsf_s
+
+ /* our main processing routine, calls all external mixing routines */
+ void (*process)(void *buffer, int num_samples);
+-} __PACKED__ nsf_t;
++} XINE_PACKED nsf_t;
+
+ /* Function prototypes */
+ extern void nsf_init(void);
+--- a/src/libxineadec/nosefart/osd.h Tue Apr 10 13:42:00 2007 +0200
++++ b/src/libxineadec/nosefart/osd.h Tue Apr 10 13:19:34 2007 +0200
+@@ -26,19 +26,15 @@
+ #ifndef _OSD_H_
+ #define _OSD_H_
+
+-
+ #if defined(__GNUC__) || defined(__ICC)
+-#define __PACKED__ __attribute__ ((packed))
+ #define PATH_SEP '/'
+ #ifdef __DJGPP__
+ #include <dpmi.h>
+ #include "dos_ints.h"
+ #endif
+ #elif defined(WIN32)
+-#define __PACKED__
+ #define PATH_SEP '\\'
+ #else /* crapintosh? */
+-#define __PACKED__
+ #define PATH_SEP ':'
+ #endif
+
diff --git a/src/libxineadec/nosefart/nsf.h b/src/libxineadec/nosefart/nsf.h
index 163e2f62f..79ec1dbb6 100644
--- a/src/libxineadec/nosefart/nsf.h
+++ b/src/libxineadec/nosefart/nsf.h
@@ -30,6 +30,8 @@
#include "nes6502.h"
#include "nes_apu.h"
+#include "config.h"
+
#define NSF_MAGIC "NESM\x1A"
#define NSF_DEDICATED_PAL 0x01
@@ -96,7 +98,7 @@ typedef struct nsf_s
/* our main processing routine, calls all external mixing routines */
void (*process)(void *buffer, int num_samples);
-} __PACKED__ nsf_t;
+} XINE_PACKED nsf_t;
/* Function prototypes */
extern void nsf_init(void);
diff --git a/src/libxineadec/nosefart/osd.h b/src/libxineadec/nosefart/osd.h
index ee90aa972..38b9480c7 100644
--- a/src/libxineadec/nosefart/osd.h
+++ b/src/libxineadec/nosefart/osd.h
@@ -26,19 +26,15 @@
#ifndef _OSD_H_
#define _OSD_H_
-
#if defined(__GNUC__) || defined(__ICC)
-#define __PACKED__ __attribute__ ((packed))
#define PATH_SEP '/'
#ifdef __DJGPP__
#include <dpmi.h>
#include "dos_ints.h"
#endif
#elif defined(WIN32)
-#define __PACKED__
#define PATH_SEP '\\'
#else /* crapintosh? */
-#define __PACKED__
#define PATH_SEP ':'
#endif
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;
diff --git a/src/xine-utils/attributes.h b/src/xine-utils/attributes.h
index b533286c8..27c6fc5bc 100644
--- a/src/xine-utils/attributes.h
+++ b/src/xine-utils/attributes.h
@@ -30,18 +30,6 @@
#define ATTR_ALIGN(align)
#endif
-/* disable GNU __attribute__ extension, when not compiling with GNU C */
-#if defined(__GNUC__) || defined (__ICC)
-#ifndef ATTRIBUTE_PACKED
-#define ATTRIBUTE_PACKED 1
-#endif
-#else
-#undef ATTRIBUTE_PACKED
-#ifndef __attribute__
-#define __attribute__(x) /**/
-#endif /* __attribute __*/
-#endif
-
#ifdef XINE_COMPILE
# include "config.h"
#endif