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

Rich Felker dalias at aerifal.cx
Tue Mar 13 17:02:48 CET 2007


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..

Rich



More information about the MPlayer-dev-eng mailing list