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 !
After a lot of debugging, I went to the conclusion that the whole file
obstream.c is totally broken, and cannot work in any case. I started to
rewrite it completely, it is very similar to vasprintf.c, which is good.
I hope it will be ready soon (very boring work).
--
Vincent Rivière