stdio broken in SysV?

Mike Wescott wescott at micky.columbia.ncr.com
Sat Feb 24 06:47:05 AEST 1990


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.

Which is broken? The program that does:

		fpin = fdopen(fd,"r");
		fpot = fdopen(fd,"w");

Or the stdio that blows up in memcpy() called from doprnt() called by
fprintf() in the same program?

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.

--
	-Mike Wescott
	 mike.wescott at ncrcae.Columbia.NCR.COM



More information about the Comp.bugs.sys5 mailing list