summaryrefslogtreecommitdiff
path: root/nt/inc/sys/stat.h
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2012-12-14 16:05:01 +0200
committerEli Zaretskii <eliz@gnu.org>2012-12-14 16:05:01 +0200
commit5c207910c4899af1c547b0e508692d846c145d48 (patch)
treeb3516d3332d126e8add66cfff68c11ac7ed187b8 /nt/inc/sys/stat.h
parentb421decc52e07a3c56b2b259321867bc352f5173 (diff)
downloademacs-5c207910c4899af1c547b0e508692d846c145d48.tar.gz
emacs-5c207910c4899af1c547b0e508692d846c145d48.tar.bz2
emacs-5c207910c4899af1c547b0e508692d846c145d48.zip
Speed up most calls to 'stat' and 'lstat' on MS-Windows.
src/w32.c (stat_worker): If w32_stat_get_owner_group is zero, do not try to get accurate owner and group information from NT file security APIs. This is to make most callers of 'stat' and 'lstat', which don't need that information, much faster. src/dired.c (Ffile_attributes) [WINDOWSNT]: Set w32_stat_get_owner_group to a non-zero value, to request accurate owner and group information from 'lstat'. nt/inc/sys/stat.h: Declare w32_stat_get_owner_group.
Diffstat (limited to 'nt/inc/sys/stat.h')
-rw-r--r--nt/inc/sys/stat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/nt/inc/sys/stat.h b/nt/inc/sys/stat.h
index b673b80a0e3..fb56b7cab40 100644
--- a/nt/inc/sys/stat.h
+++ b/nt/inc/sys/stat.h
@@ -98,6 +98,10 @@ struct stat {
char st_gname[260];
};
+/* Internal variable for asking 'stat'/'lstat' to produce accurate
+ info about owner and group of files. */
+extern int w32_stat_get_owner_group;
+
/* Prevent redefinition by other headers, e.g. wchar.h. */
#define _STAT_DEFINED