another Micorport bug with C news

Dave Mason mason at tmsoft.uucp
Sat Jul 15 00:03:18 AEST 1989


In article <1989Jul13.022941.3573 at intacc.uucp> mann at intacc.UUCP (Jeff Mann) writes:
>I'm not sure how far this problem goes, but on this System V/AT rel 2.3,
>fseek(3)  causes  some  weird action from relaynews.  It seems that when
>working with a file which  has  been  opened  for  update  (read/write),
>performing  an  fseek after any writes causes subsequent writes to fail.

Actually they don't fail, they just all start at the same place in the
file, as I remember the problem, so only the last remains in the file.

>I believe that this is a bug in the Microport software, but  whether  it
>is in fseek, or somewhere else, I don't know.

I have been running an earlier version of Cnews for just under a year.
I had the same problem on a System Vr2 NS32000 box.  I didn't figure
out the exact source of the bug (it is some interaction between fseek
and fprintf), but I changed that code to do an sprintf followed by a
fwrite, and the problem was solved (only took 10 frustrating hours to
figure out what was going wrong & fix it!) I mentioned this to Geoff
in January, but he was reluctant to work around buggy stdio
implementations, and didn't want to have a limited string size that
the sprint solution implies (though that too could be worked around).

I had hoped that the partial stdio package that comes with the current
release would solve this problem, but I haven't had the time to start
installing the new release yet.  Did you try using the supplied stdio
package rather than the one from your supplier?
	../Dave



More information about the Comp.unix.microport mailing list