Plexus P/40 System III Release 1.2 'C' compiler/library bug

Ihnat ignatz at aicchi.UUCP
Fri Mar 15 04:56:56 AEST 1985


Well, I'm bit by the portability thing.  For a long time, I used a
copy of stdio that I'd rewritten about 3 years ago, to be cleaner &
faster than the then-current version.  In addition to some other things,
it allowed variable-sized setbuf declarations.  When I left the client,
I had to leave that version, since there was some original source
code in it.  So, I'm now back to using vanilla System III
stdio--and guess what.  Yep, you're supposed to use the manifest
buffer variable BUFSIZ.  (Interestingly enough, however, the problem
is caused not by stdio initializing the buffer, or anything like
that; the stack is growing into the buffer on one of the returns
from within csav3, while doing the cleanup at the end of the job.
Moving the buffer to static data, or doing an fflush(), fixes the
glitch; although it would break again on messages > the declared
size)

Hokay, so this is an object lesson in portability.
-- 
	Dave Ihnat
	Analysts International Corporation
	(312) 882-4673
	ihnp4!aicchi!ignatz



More information about the Comp.unix.wizards mailing list