X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Fnt.c;h=1e26fbbe1bf5971121d1ce48be0413da65d881bb;hp=af74f8410ed21f7b1551dd1948fd6365ddc8d297;hb=7b241b273a632ab80d7c620b5add28d5f11b0fd3;hpb=dbf2768f7b146e97e37a27316f70bb313f1acf15 diff --git a/src/nt.c b/src/nt.c index af74f84..1e26fbb 100644 --- a/src/nt.c +++ b/src/nt.c @@ -629,16 +629,16 @@ init_environment (void) renaming or deleting directories. (We also don't call chdir when running subprocesses for the same reason.) */ if (!GetCurrentDirectory (MAXPATHLEN, startup_dir)) - abort (); + ABORT (); { char *p; char modname[MAX_PATH]; if (!GetModuleFileName (NULL, modname, MAX_PATH)) - abort (); + ABORT (); if ((p = strrchr (modname, '\\')) == NULL) - abort (); + ABORT (); *p = 0; SetCurrentDirectory (modname); @@ -1356,7 +1356,7 @@ generate_inode_val (const char * name) doesn't resolve aliasing due to subst commands, or recognize hard links. */ if (!win32_get_long_filename ((char *)name, fullname, MAX_PATH)) - abort (); + ABORT (); parse_root (fullname, &p); /* Normal Win32 filesystems are still case insensitive. */ @@ -1449,9 +1449,9 @@ mswindows_fstat (int desc, struct stat * buf) /* determine rwx permissions */ if (info.dwFileAttributes & FILE_ATTRIBUTE_READONLY) - permission = _S_IREAD; + permission = _S_IREAD | _S_IEXEC; else - permission = _S_IREAD | _S_IWRITE; + permission = _S_IREAD | _S_IEXEC |_S_IWRITE; if (info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) permission |= _S_IEXEC; @@ -1638,22 +1638,12 @@ mswindows_stat (const char * path, struct stat * buf) /* determine rwx permissions */ if (wfd.dwFileAttributes & FILE_ATTRIBUTE_READONLY) - permission = _S_IREAD; + permission = _S_IREAD | _S_IEXEC; else - permission = _S_IREAD | _S_IWRITE; + permission = _S_IREAD | _S_IEXEC |_S_IWRITE; if (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) permission |= _S_IEXEC; - else - { - char * p = strrchr (name, '.'); - if (p != NULL && - (stricmp (p, ".exe") == 0 || - stricmp (p, ".com") == 0 || - stricmp (p, ".bat") == 0 || - stricmp (p, ".cmd") == 0)) - permission |= _S_IEXEC; - } buf->st_mode |= permission | (permission >> 3) | (permission >> 6);