delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/08/13/06:17:35

Date: Mon, 13 Aug 2001 13:15:41 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <1190-Mon13Aug2001131540+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
CC: djgpp-workers AT delorie DOT com
In-reply-to: <10108130150.AA16986@clio.rice.edu> (sandmann@clio.rice.edu)
Subject: Re: Windows 2000 io testing
References: <10108130150 DOT AA16986 AT clio DOT rice DOT edu>
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

> From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
> Date: Sun, 12 Aug 2001 20:50:15 -0500 (CDT)
> 
> 1) 0x7160 cl=1 to get short truename fails on devices like con and ./nul
> 2) lfn open succeeds on both nul and ./nul
> 3) sfn _truename fails on ./nul but works on nul (returns C:/NUL)
> 4) sfn open fails on ./nul but works on nul (consistent with _truename)

Darn!  We will probably need to document this and continue, since
./nul is almost never used .

> 5) _chmod (__file_exists) is true with lfn active on devices, returns 0x20
>    (this is different than w95 for example).

Windows 9X should return 0x40; is that what you see?

Also, is findfirst consistent with _chmod for devices, i.e. does it
also return 0x20 in the attribute byte?

> 8) _get_dev_info looks ok for pre-opened handles

Does this mean the 5 preopen handles each program gets from the shell?
If so, did you try that under Bash as well?  What happens with handles
beyond the 5 standard ones, which are open in a parent program--can
the child successfully call _get_dev_info for those?

And does isatty work on preopen handles as well?

It would also be interesting to see what happens if a DJGPP program
uses an LFN open call to open a device, such as CON or NUL, then sets
one of the standard handles to the same device with dup2 and spawns a
child.  Do _get_dev_info and isatty work then on those inherited
handles?

> So far I've been unable to get an _open working reliably on all cases.
> Using lfn opens is actually more compatible (you can test directory
> existence).

Sorry, I don't follow: how does the LFN open helps testing for
directory existence?

- Raw text -


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