Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh-3.0.2 repacked



Wolfgang Hukriede wrote:
> I'm sorry, but definitely there's no such alleged bug in the NeXTStep libc.
[...]
> Then, after:
> 
>         setvbuf(shout, NULL, _IOFBF, 0);
> 
> shout->_bufsiz gives ZERO, as well as shout->_base still is ZERO, in other
> words, shout is unbuffered. I cannot imagine this should be different with
> other libc's. Have you actually checked this?

Yes of course.  On all other systems I know (and I tesed zsh on 8 different
Unix systems) setvbuf ignores the last argument of setvbuf if the second
argument is NULL.  And conditional compilation is probably has been put
there because there were some systems without setvbuf or _IOFBF.  And only
NeXTStep people complained about slow refresh so I'm pretty sure that
NeXTStep is the only system with this behaviour.

And I used static buffer instead of passing NULL to make sure that it will
really work.  I can imagine that some other system's buggy libc would
interpret non-zero last argument as if you had given it a buffer at address
NULL.

Zoltan



Messages sorted by: Reverse Date, Date, Thread, Author