delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/01/08/04:19:14

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 <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
cc: djgpp-workers AT delorie DOT com, Tim Van Holder <tim DOT van DOT holder AT pandora DOT be>
Subject: Re: bash's 'test' is inconsistent on XP (causing autoconf testsuite failures)
In-Reply-To: <10201080614.AA26269@clio.rice.edu>
Message-ID: <Pine.SUN.3.91.1020108110849.21206U-100000@is>
MIME-Version: 1.0
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

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019