Fix bug #12587 with slow startup on MS-Windows with Netlogon service.
authorEli Zaretskii <eliz@gnu.org>
Fri, 12 Oct 2012 15:19:54 +0000 (17:19 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 12 Oct 2012 15:19:54 +0000 (17:19 +0200)
commitbb385a92ec4f8f5bbc93641aaa274bd735826574
tree8fff4a185dfc74f91d94edc7b45dcd9dacbfbd67
parent605a3df6811c2b3ce9379149cc8fd64fc9846136
Fix bug #12587 with slow startup on MS-Windows with Netlogon service.

 src/fileio.c (check_existing): New function.
 (make_temp_name, Ffile_exists_p, Ffile_writable_p): Call it
 instead of calling 'stat', when what's needed is to check whether
 a file exists.  This avoids expensive system calls on MS-Windows.
 src/w32.c (init_environment): Call 'check_existing' instead of 'stat'.
 src/lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
 determine whether a file exists and is not a directory.
 src/lisp.h (check_existing): Add prototype.
src/ChangeLog
src/fileio.c
src/lisp.h
src/lread.c
src/w32.c