Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site aicchi.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!aicchi!ignatz From: ignatz@aicchi.UUCP (Ihnat) Newsgroups: net.unix-wizards Subject: Re: Plexus P/40 System III Release 1.2 'C' compiler/library bug Message-ID: <400@aicchi.UUCP> Date: Thu, 14-Mar-85 13:56:56 EST Article-I.D.: aicchi.400 Posted: Thu Mar 14 13:56:56 1985 Date-Received: Fri, 15-Mar-85 04:24:31 EST References: <395@aicchi.UUCP> Reply-To: ignatz@aicchi.UUCP (Ihnat) Distribution: net Organization: Analysts International Corp; Chicago Branch Lines: 21 Summary: Solution found 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