summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-07-31 12:31:02 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-07-31 12:56:51 -0700
commit3a8d0cc825635e07da2a90c4ac987b476fc9b05d (patch)
tree7a18ef1a777007f05feff6a35ebadc4338330906 /admin
parent192342a3a93a2e467ab589ae2d1ffd5e7acf1398 (diff)
downloademacs-3a8d0cc825635e07da2a90c4ac987b476fc9b05d.tar.gz
Avoid most stat calls when completing file names
* admin/merge-gnulib (GNULIB_MODULES): Add d-type. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * m4/d-type.m4: New file, copied from gnulib. * src/dired.c (DT_UNKNOWN, DT_DIR, DT_LINK) [!HAVE_STRUCT_DIRENT_D_TYPE]: New constants. (dirent_type): New function. (file_name_completion): Use it, to avoid unnecessary calls to stat-like functions on GNU/Linux and other platforms with d_type. (file_name_completion_stat): Just follow the link; there is no need to try first with AT_SYMLINK_NOFOLLOW since the directory entry was already checked to exist.
Diffstat (limited to 'admin')
-rwxr-xr-xadmin/merge-gnulib3
1 files changed, 2 insertions, 1 deletions
diff --git a/admin/merge-gnulib b/admin/merge-gnulib
index 18c9ee8def7..c23e8a40ea7 100755
--- a/admin/merge-gnulib
+++ b/admin/merge-gnulib
@@ -30,7 +30,8 @@ GNULIB_MODULES='
careadlinkat close-stream
count-leading-zeros count-one-bits count-trailing-zeros
crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512
- diffseq dtoastr dtotimespec dup2 environ execinfo explicit_bzero faccessat
+ d-type diffseq dtoastr dtotimespec dup2
+ environ execinfo explicit_bzero faccessat
fcntl fcntl-h fdatasync fdopendir
filemode filevercmp flexmember fstatat fsync
getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog