delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | new-smtp2.ihug.com.au: Host p376-tnt4.syd.ihug.com.au [203.173.135.122] claimed to be acceleron |
Message-ID: | <003601c12d3c$95e6c0a0$0a02a8c0@acceleron> |
From: | "Andrew Cottrell" <acottrel AT ihug DOT com DOT au> |
To: | "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il> |
Cc: | <sandmann AT clio DOT rice DOT edu>, <djgpp-workers AT delorie DOT com> |
References: | <00de01c12d06$82e2cd40$0a02a8c0 AT acceleron> <7458-Sat25Aug2001102237+0300-eliz AT is DOT elta DOT co DOT il> |
Subject: | Re: Read 3F00 STDIN problem on Win 2K ( was Re: Fseek on STDIN problem on Win 2K) |
Date: | Sat, 25 Aug 2001 18:04:30 +1000 |
MIME-Version: | 1.0 |
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 |
> > From: "Andrew Cottrell" <acottrel AT ihug DOT com DOT au> > > Date: Sat, 25 Aug 2001 11:37:13 +1000 > > > > A quick fix is outlined below thanks to Charles finding that a fix for > > is_executable() is to add a call to 4201 with an offset of 0 after the 3F00 > > call, this also fixes _read(). If this is okay I can also include a similar > > change to d_read.c and int86.c > > > > What do people think about this? > [...] > > + if(use_lfn && _osmajor == 5 && _get_dos_version(1) == 0x532) > > + { > > + /* Windows 2000 or XP; or NT with LFN TSR. Windows 2000 behaves > > + badly when using 3F00 call. We need to seek to the current > > + position in order for subseqent calls to work. */ > > + memset(&r,0,sizeof(r)); > > + r.x.ax = 0x4201; /* 4201h current file position */ > > + r.x.bx = handle; /* BX = file handle */ > > + r.x.cx = r.x.dx =0; /* CX:DX = (signed) offset from origin of new file position */ > > + __dpmi_int(0x21, &r); > > Is 3F00 broken only under LFN? What happens if you set LFN=n on W2K: > does it work then? No it does not work. > If it's broken without LFN as well, you need to drop the test for > _USE_LFN in these patcehs. I will remove this check and see what other people say. > And that memset to zero out the registers' struct is not needed when > you call __dpmi_int (it zeroes out the important parts for you). I will remove the memset. > Otherwise, the changes look fine. Thanks! I will see if there are any other changes and send an email tomorrow with all of the diffs.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |