delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/04/11/13:43:42

Message-ID: <316D4441.26FC@tempe.vlsi.com>
Date: Thu, 11 Apr 1996 10:41:21 -0700
From: Charles Marslett <charles DOT marslett AT tempe DOT vlsi DOT com>
Organization: VLSI Technology, Inc.
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: Bug fix for `stat'
References: <Pine DOT SUN DOT 3 DOT 91 DOT 960411115845 DOT 27524U-100000 AT is>

Eli Zaretskii wrote:
> The current code of `stat' incorrectly stops testing for extensions of
> executables when _STAT_EXEC_MAGIC is set, but _STAT_EXE_EXT is not.  The
> following patch fixes that....
> !           if ( (_djstat_flags & _STAT_EXECBIT) == 0 )...
> --- 572,578 ----...
> !           if ((_djstat_flags & _STAT_EXECBIT) != _STAT_EXECBIT)...

If this is correct, _STAT_EXECBIT should be renamed -- a name like that
implies a single bit is set in the equate, in which case the two lines
of code do exactly the same thing.  If it is a multibit equate, it should
be named something like _STAT_EXECSELECT so as to not imply a single bit
value (now I gotta go look at the definition, like I shouda done first... :-).

--Charles

- Raw text -


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