X-Authentication-Warning: new-smtp2.ihug.com.au: Host p270-tnt3.syd.ihug.com.au [203.173.133.16] claimed to be acceleron Message-ID: <018d01c12e00$ce1317c0$0a02a8c0@acceleron> From: "Andrew Cottrell" To: "Eli Zaretskii" Cc: "Charles Sandmann" , References: Subject: Re: Read 3F00 STDIN problem on Win 2K ( was Re: Fseek on STDIN problem on Win 2K) Date: Sun, 26 Aug 2001 17:29:11 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Reply-To: djgpp-workers AT delorie DOT com ----- Original Message ----- From: "Eli Zaretskii" To: "Andrew Cottrell" Cc: "Charles Sandmann" ; Sent: Sunday, August 26, 2001 5:10 PM Subject: Re: Read 3F00 STDIN problem on Win 2K ( was Re: Fseek on STDIN problem on Win 2K) > > On Sun, 26 Aug 2001, Andrew Cottrell wrote: > > > 3) To turn off / on the poposed changes change the folloing line in main() > > from 0 to 1 or vice versa. > > USE_EXTRA_4201_CALL = 0; > > The variable USE_EXTRA_4201_CALL is used inside the modified _read. I'd > prefer to do that inside lseek, because _read is a heavily used > function. Since it appears that _read only has problems when > interspersed with seeks, perhaps we should have a workaround in lseek, > not in _read. > Could you please modify the test sources along these lines and see if the > problem is solved? I have updated the sample test program available from my home page. There are now 4 variables that define different test / fix sequences. They are: int USE_EXTRA_4201_CALL; int USE_EXTRA_4201_LSEEK_CALL; int USE_FSTAT_WIN2K_DEVICE_FIX; int USE_FILELENGTH_HANDLE_0_FIX; The latest proposal is to set the variables: USE_EXTRA_4201_CALL = 0; USE_EXTRA_4201_LSEEK_CALL = 0; USE_FSTAT_WIN2K_DEVICE_FIX =1 ; USE_FILELENGTH_HANDLE_0_FIX =1 ; The extra call inside lseek() did not work. The variable to turn on the extra lseek seek is: int USE_EXTRA_4201_LSEEK_CALL; Charles's other two proposals to mod fstat.c and filelen.c are now included in the source update and can be turned on via the two following variables: int USE_FSTAT_WIN2K_DEVICE_FIX; int USE_FILELENGTH_HANDLE_0_FIX; Note: You will also need to set the first #if in main.c to zero for the real test app to be executed (the one that uses fstat()).