delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | new-smtp2.ihug.com.au: Host p178-apx1.syd.ihug.com.au [203.173.140.178] claimed to be acceleron |
Message-ID: | <00a001c12fb1$862c4690$0a02a8c0@acceleron> |
From: | "Andrew Cottrell" <acottrel AT ihug DOT com DOT au> |
To: | "Charles Sandmann" <sandmann AT clio DOT rice DOT edu>, <eliz AT is DOT elta DOT co DOT il> |
Cc: | <djgpp-workers AT delorie DOT com> |
References: | <10108262123 DOT AA03260 AT clio DOT rice DOT edu> |
Subject: | Re: fstat patch for redirected char handles (NT/W2K/XP) |
Date: | Tue, 28 Aug 2001 21:06:42 +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 |
> *** fstat.c_ Fri Aug 17 19:40:32 2001 > --- fstat.c Sun Aug 26 16:17:58 2001 > *************** fstat_assist(int fhandle, struct stat *s > *** 423,428 **** > --- 423,431 ---- > is_remote = 1; > else > is_remote = 0; > + > + if(!have_trusted_values && dev_info == 0 && _get_dos_version(1) == 0x532) > + is_dev = 1; /* Device under NT or Win2K with pre-open/lfn handle. */ > } > > /* First, fill the fields which are constant under DOS. */ > Wouldn't it be better move the setting of is_dev=0 to be the else condition of the if added in. I don't see any sense in setting is_dev=0 and then a few lines aleter checking for Win 2K or XP etc and then setting is_dev=1. Better to combine the setting of is_dev in the one if statement. *** fstat_orig.c Sun Aug 19 14:08:58 2001 --- fstat.c Tue Aug 28 21:07:18 2001 *************** *** 418,428 **** } else { - is_dev = 0; if (dev_info & 0x8000) is_remote = 1; else is_remote = 0; } /* First, fill the fields which are constant under DOS. */ --- 418,431 ---- } else { if (dev_info & 0x8000) is_remote = 1; else is_remote = 0; + if(!have_trusted_values && dev_info == 0 && _get_dos_version(1) == 0x532) + is_dev = 1; /* Device under NT or Win2K with pre-open/lfn handle. */ + else + is_dev = 0; } /* First, fill the fields which are constant under DOS. */
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |