delorie.com/djgpp/bugs/show.cgi   search  
Bug 000074

When Created: 04/11/1996 09:28:43
Against DJGPP version: 2.00
By whom: eliz@is.elta.co.il
Abstract: `stat' doesn't report executable bit when _STAT_EXEC_MAGIC is set
If you set _STAT_EXEC_MAGIC, but not _STAT_EXEC_EXT in _djstat_flags,
`stat' won't report the executable bits, even for those files that
should be identifiable as such by their extension alone.

Solution added: 04/11/1996 09:31:14
By whom: eliz@is.elta.co.il
Apply this simple patch:

*** 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. */

Fixed in version 2.01 on 06/13/1996 00:44:38
By whom: dj@delorie.com



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