int count = specpdl_ptr - specpdl;
struct gcpro gcpro1, gcpro2, gcpro3;
-#ifdef MSDOS
-#if __DJGPP__ > 1
- /* Some fields of struct stat are *very* expensive to compute on MS-DOS,
- but aren't required here. Avoid computing the following fields:
- st_inode, st_size and st_nlink for directories, and the execute bits
- in st_mode for non-directory files with non-standard extensions. */
-
- unsigned short save_djstat_flags = _djstat_flags;
-
- _djstat_flags = _STAT_INODE | _STAT_EXEC_MAGIC | _STAT_DIRSIZE;
-#endif
-#endif
-
#ifdef VMS
extern DIRENTRY * readdirver ();
UNGCPRO;
bestmatch = unbind_to (count, bestmatch);
-#ifdef MSDOS
-#if __DJGPP__ > 1
- _djstat_flags = save_djstat_flags;
-#endif
-#endif
-
if (all_flag || NILP (bestmatch))
return bestmatch;
if (matchcount == 1 && bestmatchsize == XSTRING (file)->size)
int value;
char *fullname = (char *) alloca (len + pos + 2);
+#ifdef MSDOS
+#if __DJGPP__ > 1
+ /* Some fields of struct stat are *very* expensive to compute on MS-DOS,
+ but aren't required here. Avoid computing the following fields:
+ st_inode, st_size and st_nlink for directories, and the execute bits
+ in st_mode for non-directory files with non-standard extensions. */
+
+ unsigned short save_djstat_flags = _djstat_flags;
+
+ _djstat_flags = _STAT_INODE | _STAT_EXEC_MAGIC | _STAT_DIRSIZE;
+#endif /* __DJGPP__ > 1 */
+#endif /* MSDOS */
+
bcopy (XSTRING (dirname)->data, fullname, pos);
#ifndef VMS
if (!IS_DIRECTORY_SEP (fullname[pos - 1]))
stat (fullname, st_addr);
return value;
#else
- return stat (fullname, st_addr);
-#endif
+ value = stat (fullname, st_addr);
+#ifdef MSDOS
+#if __DJGPP__ > 1
+ _djstat_flags = save_djstat_flags;
+#endif /* __DJGPP__ > 1 */
+#endif /* MSDOS */
+ return value;
+#endif /* S_IFLNK */
}
\f
#ifdef VMS