Mail Archives: djgpp-workers/1996/04/11/05:09:44
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 -