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

Diego Biurrun diego at biurrun.de
Wed Mar 14 00:35:30 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..

Yes, that was the question.  Anyway, applied.

Diego



More information about the MPlayer-dev-eng mailing list