www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/05/30/04:24:17

From: Eric Backus <ericb AT lsid DOT hp DOT com>
Subject: Re: fstat() yet again
To: eliz AT is DOT elta DOT co DOT il
Date: Mon, 30 May 94 1:14:42 PDT
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (djgpp)
Mailer: Elm [revision: 70.85]

Eli Zaretskii wrote:
> More about f?stat() under DOS: it would be nice if they returned the S_IEXEC
> bit when called on an executable (i.e., *.exe, *.com, *bat at least).  LS and
> the like would really be happy then...

Setting S_IEXEC for *.exe, *.com, and *.bat is probably a good idea
(want to implement it?).

However, in DOS, the shell decides what is executable, so the setting
of S_IEXEC might not be correct for the shell you are running.  If you
use 4DOS, isn't there a ".btm" type of executable batch file?  And if
you use ms_sh, your executable scripts might not have an extension at
all.

> Also, if I'm correct, calling stat()
> on a volume label fails (this was for Borland C++, and GO32 is compiled with
> Borland compiler, right?).

Since the volume label is not a file in the UNIX sense of the word, I
think stat() is operating correctly.  I believe you can create a file
with the same name as the volume label, for example.
--
				Eric Backus
				ericb AT lsid DOT hp DOT com
				(206) 335-2495

- Raw text -


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