The latest version of gcc-4.0 is still more restrictive than the
previous one. Because of this, the patch had to be amended.
With the attached patch, 'xine-lib' can be compiled with the latest
version of gcc-4.0.
Regards
Andreas Jochens
diff -urN ../tmp-orig/xine-lib-1.0/src/libffmpeg/libavcodec/avcodec.h
./src/libffmpeg/libavcodec/avcodec.h
--- ../tmp-orig/xine-lib-1.0/src/libffmpeg/libavcodec/avcodec.h 2004-05-30
21:24:19.000000000 +0200
+++ ./src/libffmpeg/libavcodec/avcodec.h 2005-03-19 12:02:44.000000000
+0100
@@ -1639,6 +1639,14 @@
#define FF_OPT_MAX_DEPTH 10
} AVOption;
+#ifdef HAVE_MMX
+extern const struct AVOption avoptions_common[3 + 5];
+#else
+extern const struct AVOption avoptions_common[3];
+#endif
+extern const struct AVOption avoptions_workaround_bug[11];
+
+
/**
* Parse option(s) and sets fields in passed structure
* @param strct structure where the parsed results will be written
diff -urN ../tmp-orig/xine-lib-1.0/src/libffmpeg/libavcodec/common.h
./src/libffmpeg/libavcodec/common.h
--- ../tmp-orig/xine-lib-1.0/src/libffmpeg/libavcodec/common.h 2004-05-30
21:24:19.000000000 +0200
+++ ./src/libffmpeg/libavcodec/common.h 2005-03-19 12:02:32.000000000 +0100
@@ -65,15 +65,6 @@
{ name, help, offsetof(AVCodecContext, field), FF_OPT_TYPE_RCOVERRIDE,
.defval = 0, .defstr = NULL }
#define AVOPTION_SUB(ptr) { .name = NULL, .help = (const char*)ptr }
#define AVOPTION_END() AVOPTION_SUB(NULL)
-
-struct AVOption;
-#ifdef HAVE_MMX
-extern const struct AVOption avoptions_common[3 + 5];
-#else
-extern const struct AVOption avoptions_common[3];
-#endif
-extern const struct AVOption avoptions_workaround_bug[11];
-
#endif /* HAVE_AV_CONFIG_H */
/* Suppress restrict if it was not defined in config.h. */
diff -urN ../tmp-orig/xine-lib-1.0/src/libxineadec/nosefart/nes_apu.c
./src/libxineadec/nosefart/nes_apu.c
--- ../tmp-orig/xine-lib-1.0/src/libxineadec/nosefart/nes_apu.c 2004-12-12
07:55:59.000000000 +0100
+++ ./src/libxineadec/nosefart/nes_apu.c 2005-03-19 12:39:50.000000000
+0100
@@ -1011,10 +1011,13 @@
accum = -0x8000;
/* signed 16-bit output, unsigned 8-bit */
- if (16 == apu->sample_bits)
- *((int16 *) buffer)++ = (int16) accum;
- else
- *((uint8 *) buffer)++ = (accum >> 8) ^ 0x80;
+ if (16 == apu->sample_bits) {
+ *((int16 *) buffer) = (int16) accum;
+ buffer = (int16 *) buffer + 1;
+ } else {
+ *((uint8 *) buffer) = (accum >> 8) ^ 0x80;
+ buffer = (int8 *) buffer + 1;
+ }
}
/* resync cycle counter */
diff -urN ../tmp-orig/xine-lib-1.0/src/post/audio/stretch.c
./src/post/audio/stretch.c
--- ../tmp-orig/xine-lib-1.0/src/post/audio/stretch.c 2004-10-30
01:11:38.000000000 +0200
+++ ./src/post/audio/stretch.c 2005-03-19 13:26:56.068300815 +0100
@@ -476,7 +476,7 @@
memcpy( outbuf->mem, data_out,
outbuf->num_frames * this->bytes_per_frame );
num_frames_out -= outbuf->num_frames;
- (uint8_t *)data_out += outbuf->num_frames * this->bytes_per_frame;
+ data_out = (uint8_t *)data_out + outbuf->num_frames *
this->bytes_per_frame;
outbuf->vpts = this->pts;
this->pts = 0;
@@ -587,7 +587,7 @@
memcpy( (uint8_t *)this->audiofrag + this->num_frames *
this->bytes_per_frame,
data_in, frames_to_copy * this->bytes_per_frame );
- (uint8_t *)data_in += frames_to_copy * this->bytes_per_frame;
+ data_in = (uint8_t *)data_in + frames_to_copy * this->bytes_per_frame;
this->num_frames += frames_to_copy;
buf->num_frames -= frames_to_copy;
diff -urN ../tmp-orig/xine-lib-1.0/src/xine-engine/post.c
./src/xine-engine/post.c
--- ../tmp-orig/xine-lib-1.0/src/xine-engine/post.c 2004-10-17
21:14:30.000000000 +0200
+++ ./src/xine-engine/post.c 2005-03-19 12:33:22.000000000 +0100
@@ -241,7 +241,7 @@
if (!*input) return port;
(*input)->xine_in.name = "video in";
(*input)->xine_in.type = XINE_POST_DATA_VIDEO;
- (xine_video_port_t *)(*input)->xine_in.data = &port->new_port;
+ (*input)->xine_in.data = &port->new_port;
(*input)->post = post;
xine_list_append_content(post->input, *input);
}
@@ -251,7 +251,7 @@
if (!*output) return port;
(*output)->xine_out.name = "video out";
(*output)->xine_out.type = XINE_POST_DATA_VIDEO;
- (xine_video_port_t **)(*output)->xine_out.data = &port->original_port;
+ (*output)->xine_out.data = &port->original_port;
(*output)->xine_out.rewire = post_video_rewire;
(*output)->post = post;
(*output)->user_data = port;
@@ -718,7 +718,7 @@
if (!*input) return port;
(*input)->xine_in.name = "audio in";
(*input)->xine_in.type = XINE_POST_DATA_AUDIO;
- (xine_audio_port_t *)(*input)->xine_in.data = &port->new_port;
+ (*input)->xine_in.data = &port->new_port;
(*input)->post = post;
xine_list_append_content(post->input, *input);
}
@@ -728,7 +728,7 @@
if (!*output) return port;
(*output)->xine_out.name = "audio out";
(*output)->xine_out.type = XINE_POST_DATA_AUDIO;
- (xine_audio_port_t **)(*output)->xine_out.data = &port->original_port;
+ (*output)->xine_out.data = &port->original_port;
(*output)->xine_out.rewire = post_audio_rewire;
(*output)->post = post;
(*output)->user_data = port;
diff -urN ../tmp-orig/xine-lib-1.0/src/xine-utils/color.c
./src/xine-utils/color.c
--- ../tmp-orig/xine-lib-1.0/src/xine-utils/color.c 2003-12-09
01:02:38.000000000 +0100
+++ ./src/xine-utils/color.c 2005-03-19 12:29:52.000000000 +0100
@@ -495,8 +495,8 @@
/* process blocks of 4 pixels */
for (x=0; x < (width / 4); x++) {
- n1 = *(((unsigned int *) src1)++);
- n2 = *(((unsigned int *) src2)++);
+ n1 = *(((unsigned int *) src1)); src1 = ((unsigned int *) src1) + 1;
+ n2 = *(((unsigned int *) src2)); src2 = ((unsigned int *) src2) + 1;
n3 = (n1 & 0xFF00FF00) >> 8;
n4 = (n2 & 0xFF00FF00) >> 8;
n1 &= 0x00FF00FF;
diff -urN ../tmp-orig/xine-lib-1.0/src/xine-utils/memcpy.c
./src/xine-utils/memcpy.c
--- ../tmp-orig/xine-lib-1.0/src/xine-utils/memcpy.c 2004-12-20
22:22:22.000000000 +0100
+++ ./src/xine-utils/memcpy.c 2005-03-19 12:31:11.000000000 +0100
@@ -218,8 +218,8 @@
"movntps %%xmm2, 32(%1)\n"
"movntps %%xmm3, 48(%1)\n"
:: "r" (from), "r" (to) : "memory");
- ((const unsigned char *)from)+=64;
- ((unsigned char *)to)+=64;
+ from = ((const unsigned char *)from) + 64;
+ to = ((unsigned char *)to) + 64;
}
else
/*
@@ -241,8 +241,8 @@
"movntps %%xmm2, 32(%1)\n"
"movntps %%xmm3, 48(%1)\n"
:: "r" (from), "r" (to) : "memory");
- ((const unsigned char *)from)+=64;
- ((unsigned char *)to)+=64;
+ from = ((const unsigned char *)from) + 64;
+ to = ((unsigned char *)to) + 64;
}
/* since movntq is weakly-ordered, a "sfence"
* is needed to become ordered again. */
@@ -296,8 +296,8 @@
"movq %%mm6, 48(%1)\n"
"movq %%mm7, 56(%1)\n"
:: "r" (from), "r" (to) : "memory");
- ((const unsigned char *)from)+=64;
- ((unsigned char *)to)+=64;
+ from = ((const unsigned char *)from) + 64;
+ to = ((unsigned char *)to) + 64;
}
__asm__ __volatile__ ("emms":::"memory");
}
@@ -363,8 +363,8 @@
"movntq %%mm6, 48(%1)\n"
"movntq %%mm7, 56(%1)\n"
:: "r" (from), "r" (to) : "memory");
- ((const unsigned char *)from)+=64;
- ((unsigned char *)to)+=64;
+ from = ((const unsigned char *)from) + 64;
+ to = ((unsigned char *)to) + 64;
}
/* since movntq is weakly-ordered, a "sfence"
* is needed to become ordered again. */
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]