SOURCES: xine-lib-gcc4.patch (NEW) - initial, nfy

prism prism at pld-linux.org
Fri Jun 17 16:41:25 CEST 2005


Author: prism                        Date: Fri Jun 17 14:41:25 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- initial, nfy

---- Files affected:
SOURCES:
   xine-lib-gcc4.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/xine-lib-gcc4.patch
diff -u /dev/null SOURCES/xine-lib-gcc4.patch:1.1
--- /dev/null	Fri Jun 17 16:41:25 2005
+++ SOURCES/xine-lib-gcc4.patch	Fri Jun 17 16:41:20 2005
@@ -0,0 +1,231 @@
+diff -uNr xine-lib-1.0.1.orig/src/libffmpeg/libavcodec/common.h xine-lib-1.0.1/src/libffmpeg/libavcodec/common.h
+--- xine-lib-1.0.1.orig/src/libffmpeg/libavcodec/common.h	2005-04-26 10:09:09.000000000 +0200
++++ xine-lib-1.0.1/src/libffmpeg/libavcodec/common.h	2005-06-17 15:47:51.000000000 +0200
+@@ -66,14 +66,6 @@
+ #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 -uNr xine-lib-1.0.1.orig/src/libffmpeg/libavcodec/dsputil.h xine-lib-1.0.1/src/libffmpeg/libavcodec/dsputil.h
+--- xine-lib-1.0.1.orig/src/libffmpeg/libavcodec/dsputil.h	2005-04-26 10:09:09.000000000 +0200
++++ xine-lib-1.0.1/src/libffmpeg/libavcodec/dsputil.h	2005-06-17 15:48:39.000000000 +0200
+@@ -554,24 +554,4 @@
+     return score;\
+ }
+ 
+-#ifndef HAVE_LRINTF
+-/* XXX: add ISOC specific test to avoid specific BSD testing. */
+-/* better than nothing implementation. */
+-/* btw, rintf() is existing on fbsd too -- alex */
+-static inline long int lrintf(float x)
+-{
+-#ifdef CONFIG_WIN32
+-    /* XXX: incorrect, but make it compile */
+-    return (int)(x);
+-#else
+-    return (int)(rint(x));
+-#endif
+-}
+-#else
+-#ifndef _ISOC9X_SOURCE
+-#define _ISOC9X_SOURCE
+-#endif
+-#include <math.h>
+-#endif
+-
+ #endif
+diff -uNr xine-lib-1.0.1.orig/src/libw32dll/w32codec.c xine-lib-1.0.1/src/libw32dll/w32codec.c
+--- xine-lib-1.0.1.orig/src/libw32dll/w32codec.c	2005-04-26 10:09:15.000000000 +0200
++++ xine-lib-1.0.1/src/libw32dll/w32codec.c	2005-06-17 15:45:22.000000000 +0200
+@@ -131,7 +131,6 @@
+  */
+ static pthread_mutex_t win32_codec_mutex;
+ static pthread_once_t once_control = PTHREAD_ONCE_INIT;
+-static char*   win32_codec_name; 
+ 
+ #define VIDEOBUFSIZE 128*1024
+ 
+diff -uNr xine-lib-1.0.1.orig/src/libw32dll/wine/ext.c xine-lib-1.0.1/src/libw32dll/wine/ext.c
+--- xine-lib-1.0.1.orig/src/libw32dll/wine/ext.c	2005-04-26 10:09:14.000000000 +0200
++++ xine-lib-1.0.1/src/libw32dll/wine/ext.c	2005-06-17 15:45:22.000000000 +0200
+@@ -469,7 +469,7 @@
+ 
+     if (type&MEM_RESERVE && (unsigned)address&0xffff) {
+        size += (unsigned)address&0xffff;
+-       (unsigned)address &= ~0xffff;
++       address = (unsigned)address & ~0xffff;
+     }
+     pgsz = sysconf(_SC_PAGESIZE);
+     if (type&MEM_COMMIT && (unsigned)address%pgsz) {
+diff -uNr xine-lib-1.0.1.orig/src/libw32dll/wine/win32.c xine-lib-1.0.1/src/libw32dll/wine/win32.c
+--- xine-lib-1.0.1.orig/src/libw32dll/wine/win32.c	2005-04-26 10:09:14.000000000 +0200
++++ xine-lib-1.0.1/src/libw32dll/wine/win32.c	2005-06-17 15:45:22.000000000 +0200
+@@ -2623,7 +2623,7 @@
+     dbgprintf("GetWindowThreadProcessId(0x%x, 0x%x) => %d\n",
+ 	win, pid_data, tid);
+     if (pid_data)
+-	(int)*pid_data = tid;
++	*pid_data = tid;
+     return tid;
+ }
+ 
+diff -uNr xine-lib-1.0.1.orig/src/libxineadec/nosefart/nes_apu.c xine-lib-1.0.1/src/libxineadec/nosefart/nes_apu.c
+--- xine-lib-1.0.1.orig/src/libxineadec/nosefart/nes_apu.c	2005-04-26 10:09:16.000000000 +0200
++++ xine-lib-1.0.1/src/libxineadec/nosefart/nes_apu.c	2005-06-17 15:45:22.000000000 +0200
+@@ -1012,9 +1012,10 @@
+ 
+       /* signed 16-bit output, unsigned 8-bit */
+       if (16 == apu->sample_bits)
+-         *((int16 *) buffer)++ = (int16) accum;
++         *(int16 *) buffer = (int16) accum;
+       else
+-         *((uint8 *) buffer)++ = (accum >> 8) ^ 0x80;
++         *(uint8 *) buffer = (accum >> 8) ^ 0x80;
++      buffer++;
+    }
+ 
+    /* resync cycle counter */
+diff -uNr xine-lib-1.0.1.orig/src/post/audio/stretch.c xine-lib-1.0.1/src/post/audio/stretch.c
+--- xine-lib-1.0.1.orig/src/post/audio/stretch.c	2005-04-26 10:09:10.000000000 +0200
++++ xine-lib-1.0.1/src/post/audio/stretch.c	2005-06-17 15:45:22.000000000 +0200
+@@ -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 -uNr xine-lib-1.0.1.orig/src/video_out/vidix/drivers/pm3_vid.c xine-lib-1.0.1/src/video_out/vidix/drivers/pm3_vid.c
+--- xine-lib-1.0.1.orig/src/video_out/vidix/drivers/pm3_vid.c	2005-04-26 10:09:11.000000000 +0200
++++ xine-lib-1.0.1/src/video_out/vidix/drivers/pm3_vid.c	2005-06-17 15:45:22.000000000 +0200
+@@ -49,7 +49,6 @@
+ 
+ static pciinfo_t pci_info;
+ 
+-static void *pm3_reg_base;
+ static void *pm3_mem;
+ 
+ static int pm3_vidmem = PM3_VIDMEM;
+diff -uNr xine-lib-1.0.1.orig/src/xine-engine/post.c xine-lib-1.0.1/src/xine-engine/post.c
+--- xine-lib-1.0.1.orig/src/xine-engine/post.c	2005-04-26 10:09:12.000000000 +0200
++++ xine-lib-1.0.1/src/xine-engine/post.c	2005-06-17 15:45:22.000000000 +0200
+@@ -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 -uNr xine-lib-1.0.1.orig/src/xine-utils/color.c xine-lib-1.0.1/src/xine-utils/color.c
+--- xine-lib-1.0.1.orig/src/xine-utils/color.c	2005-04-26 10:09:15.000000000 +0200
++++ xine-lib-1.0.1/src/xine-utils/color.c	2005-06-17 15:45:22.000000000 +0200
+@@ -495,8 +495,10 @@
+ 
+   /* 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++;
++    n2  = *((unsigned int *) src2);
++    src2++;
+     n3  = (n1 & 0xFF00FF00) >> 8;
+     n4  = (n2 & 0xFF00FF00) >> 8;
+     n1 &= 0x00FF00FF;
+diff -uNr xine-lib-1.0.1.orig/src/xine-utils/memcpy.c xine-lib-1.0.1/src/xine-utils/memcpy.c
+--- xine-lib-1.0.1.orig/src/xine-utils/memcpy.c	2005-04-26 10:09:15.000000000 +0200
++++ xine-lib-1.0.1/src/xine-utils/memcpy.c	2005-06-17 15:45:22.000000000 +0200
+@@ -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. */
================================================================



More information about the pld-cvs-commit mailing list