X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f Date: Tue, 8 Jan 2002 11:15:11 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Charles Sandmann cc: djgpp-workers AT delorie DOT com, Tim Van Holder Subject: Re: bash's 'test' is inconsistent on XP (causing autoconf testsuite failures) In-Reply-To: <10201080614.AA26269@clio.rice.edu> 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 Tue, 8 Jan 2002, Charles Sandmann wrote: > _truename fails for devices on Win2K (both calls, original and fixpathed). > findfirst succeeds. The return name is the 3 character item (nul, con, etc). > The return time field is zero, date field is 33). Size is zero. As noted > above, attribute byte is incorrect (doesn't set device). > > Suggestion: > 1) If truename failed (but findfirst is OK), and > 2) If size is zero, and > 3) If date+time field is the unique "device time", and > 4) If os_trueversion is 0x532 and LFN, and > 5) (maybe) if returned file name length == 3 > > Then we set the 0x40 bit in the attribute byte and let lstat handle it ? Sounds like a good idea; the telltale ``device time'' is especially promising. But please don't use 5): device names can be up to 8 characters (e.g. EMMXXXX0 used by expanded memory managers), so we cannot limit them to 3 characters. Perhaps the lack of slashes is a better sign, since _truename is supposed to return a fully-qualified file name. Alternatively, we could call the SFN version of _truename in addition to the LFN version, perhaps only if we suspect a device under W2K/XP.