stdio broken in SysV?

Clarence Dold dold at mitisft.Convergent.COM
Sun Feb 25 04:37:15 AEST 1990


in article <2010 at sauron.Columbia.NCR.COM>, wescott at micky.columbia.ncr.com (Mike Wescott) says:

> I am trying to port a program.  It blows up in fprintf because SysV
> stdio has the implicit assumption that a given file descriptor will
> be used by no more than one stdio stream.

> BTW the "implicit assumption" mentioned above is due to the fact that
> the array _bufendtab[] is indexed by fp->_file rather than by fp-_iob
> or built into the FILE structure itself.

>From fopen(3) man page:
"...input may not be directly followed by output" [later stated vice-versa]
"without an intervening fseek or rewind..."

which I believe will straighten out the _bufentab[fd] pointer.

-- 
---
Clarence A Dold - dold at tsmiti.Convergent.COM            (408) 435-5293
               ...pyramid!ctnews!tsmiti!dold        FAX (408) 435-3105
               P.O.Box 6685, San Jose, CA 95150-6685         MS#10-007



More information about the Comp.unix.wizards mailing list