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

Gianluigi Tiesi mplayer at netfarm.it
Sat Mar 17 03:01:01 CET 2007


On Tue, Mar 13, 2007 at 11:02:48AM -0500, Rich Felker wrote:
> On Tue, Mar 13, 2007 at 09:33:18AM +0100, Gianluigi Tiesi wrote:
> > > > --- 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
> 
> I think the question was about why you used the "extern" keyword,
> since it's the default. It's sorta like using the "auto" keyword to
> declare local variables..
> 
It's used in stream_rtp.cpp or something, it needs anyway
to have a reference to known that the two functions are in another file.
I think here it's the better place even if it's used in a different
file, since here are wrapped non-cached versions of functions.
Btw why cache was removed for mingw?

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