Date: Thu, 11 Apr 1996 12:02:43 +0200 (IST) From: Eli Zaretskii To: djgpp-workers AT delorie DOT com Subject: Bug fix for `stat' Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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. */