Date: Fri, 26 Oct 2001 15:23:35 +0300 (WET) From: Andris Pavenis X-Sender: pavenis AT ieva06 To: Andrew Cottrell Cc: djgpp-workers AT delorie DOT com Subject: Re: GCC 3.02 query oin Win XP/2K In-Reply-To: <001801c15e18$1b2aa450$0a02a8c0@acceleron> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Fri, 26 Oct 2001, Andrew Cottrell wrote: > Andris, > > Thanks for the email. I have just downloaded the bianries and source. I just > started the djconfig.sh and will check out the results in the morning, first > 5 minutes of the build looks okay. > > > > Perhaps not. I think it should be Ok to be used. Only fix I'm thinking > > about is small fix for lang/cxx-v3/bits/fstream.tcc. But it is a new thing > > and has got too little testing yet > > I will build it this weekend and start using it and if it looks okay I will > upload the Win XP / 2K in 3 or 4 days if iot works okay. This fix is not yet in. Here are diffs for libstdc++-v3/include/std/fstream.tcc: --- bits/fstream.tcc~1 Wed Oct 24 16:56:10 2001 +++ bits/fstream.tcc Fri Oct 26 13:15:42 2001 @@ -409,9 +409,23 @@ #if 1 int __plen = _M_out_end - _M_out_beg; streamsize __len = 0; - +#ifdef __DJGPP__ + int __plen0 = _M_out_cur - _M_out_beg; + streamoff __pos=0; + if (__plen0) + { + __len = _M_file->xsputn(_M_out_beg, __plen); + _M_file->sync(); + } + if (__plen>__plen0) + { + __pos = _M_file->seekoff(0, ios_base::cur); + __len += _M_file->xsputn(_M_out_cur, __plen-__plen0); + } +#else /* !__DJGPP__ */ if (__plen) __len = _M_file->xsputn(_M_out_beg, __plen); +#endif if (__c !=traits_type::eof()) { @@ -423,6 +437,10 @@ // NB: Need this so that external byte sequence reflects // internal buffer. _M_file->sync(); +#ifdef __DJGPP__ + if (__plen!=__plen0) + _M_file->seekpos(__pos); +#endif if (__len == __plen) { _M_set_indeterminate(); This patch fixes filebuf test failure introduced by earlier patch for std_fstream.h to fix DOS style (CR LF) file handling on output. Test fails later anyway as it expects only LF to be written to file when LF if sent to filebuf. I'm sending this also to djgpp-workers as patch could be usefull to somebody else Andris