[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Gcc 3.3.6 v 4.0.1



On Mon, 2009-03-02 at 00:59 +0100, Vincent Rivière wrote:
> Alan Hourihane wrote:
> > I think this should fix it.....
> ...
> >  init_obstream (FILE *stream, struct obstack *obstack)
> >  {
> > +  (void) obstack;
> > +
> > +  stream->__magic = _IOMAGIC;
> >    stream->__mode.__write = 1;
> >    stream->__mode.__read = 1;
> 
> Frank, Alan: thank you for your help. I have dug a lot around stdio, and I 
> understood a lot of things.
> 
> I'm currently working on a patch for the MiNTLib, it fixes some gmp 
> testcases, but not yet all of them. I hope it will be finished in a few days.
> 
> Alan, your patch was very good starting point.
> The missing _IOMAGIC value was the first cause of failure. It can't work 
> without it. But adding it is not enough.
> 
> I noticed a "bad smell": you added the following line:
> (void) obstack;
> to avoid compiler warnings about the unused parameter.
> You're right, it isn't used. But it should !

Yes, so doing...

stream->__cookie = (void *)obstack 

isn't enough either ??

Alan.