Larry Jones wrote: > > Jari Salminen writes: > > > > If the logfile is opened with just O_RDONLY, the multiline log message is > > stored correcly (I tested this with CVS 1.10.7): > > > > /* Handle logfile as normal text file without binary mode ... */ > > if ((logfd = CVS_OPEN (logfile, O_RDONLY)) < 0) > > It's not that simple -- if the file is opened in text mode, there's no > guarantee that the following fstat will return the correct size, which > the following code depends on. The whole thing needs to be rewritten > using standard C instead of Unix C. > Windows will return the correct length (ie. file size - number of linefeeds) for fstat from text files. On any system which doesn't this is irrelevant, since the return from statbuf is only used once and it will simply alloc/read too many bytes - the read returns the number of actual bytes read, and the function behaves correctly. Tony -- "Now you too can enjoy having babies... start collecting today" (Recent advert) [EMAIL PROTECTED]