www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/04/11/05:09:44

Date: Thu, 11 Apr 1996 12:02:43 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: djgpp-workers AT delorie DOT com
Subject: Bug fix for `stat'
Message-Id: <Pine.SUN.3.91.960411115845.27524U-100000@is>
Mime-Version: 1.0

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. 

*** posix/sys/stat/stat.c~2	Wed Mar 20 00:53:14 1996
--- posix/sys/stat/stat.c	Sat Apr  6 13:20:20 1996
*************** stat_assist(const char *path, struct sta
*** 572,578 ****
            /* Set regular file bit.  */
            statbuf->st_mode |= S_IFREG;
  
!           if ( (_djstat_flags & _STAT_EXECBIT) == 0 )
              {
                /* Set execute bits based on file's extension and
                   first 2 bytes. */
--- 572,578 ----
            /* Set regular file bit.  */
            statbuf->st_mode |= S_IFREG;
  
!           if ((_djstat_flags & _STAT_EXECBIT) != _STAT_EXECBIT)
              {
                /* Set execute bits based on file's extension and
                   first 2 bytes. */

- Raw text -


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