[MPlayer-dev-eng] [PATCH] fix compile when stream cache is disabled

Gianluigi Tiesi mplayer at netfarm.it
Tue Mar 13 09:33:18 CET 2007


On Mon, Mar 12, 2007 at 04:42:05PM +0100, Diego Biurrun wrote:
> On Tue, Mar 06, 2007 at 08:26:32AM +0100, Gianluigi Tiesi wrote:
> > On mingw stream cache is always disabled,
> > and g++ doesn't like undefined functions.
> > 
> > Patch attached.
> > 
> > diff -NuBr -x.svn -xhelp_mp.h -xlibdha -x'*.so' -x'*.log' -x'*.a' -x'*.exe' -x'*.o' -xconfigure.log -xconfig.mak -x.cvsignore -xconfig.h -xcodecs.conf.h -xversion.h -x.depend main/stream/stream.h sherpya/stream/stream.h
> 
> You should start using Subversion, it will make your life so much easier
> ...
I use subversion but I work with a patchset so it's more easy for me to
have a script that makes the patches from a "clean" mplayer to my
working copy. The output of the diff is made by a script, that I
used when mplayer was in cvs, then I've just modified it a bit to use on
svn sources.
Btw there is a switch to ask svn diff to include non
versioned files like diff -N ?
> 
> > --- main/stream/stream.h	2006-12-19 04:03:06.642481600 +0100
> > +++ sherpya/stream/stream.h	2007-03-06 06:43:22.803419200 +0100
> > @@ -119,6 +119,8 @@
> >  int cache_stream_seek_long(stream_t *s,off_t pos);
> >  #else
> >  // no cache, define wrappers:
> > +extern int stream_fill_buffer(stream_t *s);
> > +extern int stream_seek_long(stream_t *s,off_t pos);
> >  #define cache_stream_fill_buffer(x) stream_fill_buffer(x)
> >  #define cache_stream_seek_long(x,y) stream_seek_long(x,y)
> >  #define stream_enable_cache(x,y,z,w) 1
> 
> Why do you declare them extern?
Since they are in stream.c, stream.h is included/uses by other files
plain c files can link undefined external but not really a good
idea since this can cause problems on amd64 due to difference
in size of some types, c++ doesn't permit at all this.

Regards

-- 
Gianluigi Tiesi <sherpya at netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/



More information about the MPlayer-dev-eng mailing list