diff options
| author | Paul Eggert | 2011-02-21 17:55:20 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-02-21 17:55:20 -0800 |
| commit | f68c809d7e91fcde5ee2e4f7f15def3d7e48b720 (patch) | |
| tree | 9df8577ff5f281f066f778dee44bdb839eb13daf /src/lread.c | |
| parent | 5ecec6a7f4a1ce83abd53a14fba7f51b668c6336 (diff) | |
| download | emacs-f68c809d7e91fcde5ee2e4f7f15def3d7e48b720.tar.gz emacs-f68c809d7e91fcde5ee2e4f7f15def3d7e48b720.zip | |
[ChangeLog]
Assume S_ISLNK etc. work, since gnulib supports this.
* Makefile.in (GNULIB_MODULES): Add sys_stat.
* configure.in: Check for lstat and set HAVE_LSTAT=0 if not.
Pretend to be using the gnulib lstat module for benefit of sys/stat.h.
* configure, lib/Makefile.in, lib/gnulib.mk: Regenerate.
[lib-src/ChangeLog]
Assume S_ISLNK etc. work, since gnulib supports this.
* etags.c (S_ISREG): Remove.
[src/ChangeLog]
Assume S_ISLNK etc. work, since gnulib supports this.
* config.in: Regenerate.
* dired.c (lstat): Remove.
(file_name_completion): Assume S_ISDIR works.
(file_name_completion_stat): Assume S_ISLNK works.
Do not bother calling stat unless lstat says it's a symlink.
* fileio.c (S_ISLNK, S_ISFIFO, S_ISREG, lstat): Remove.
(Fcopy_file): Assume S_ISREG and S_ISLNK work.
(check_writable, Ffile_writable_p, Fset_file_times):
Assume S_ISDIR works.
(Ffile_readable_p): Use S_IFIFO, not S_ISFIFO, to guess whether
fifos exist.
(Ffile_regular_p, Finsert_file_contents): Assumes S_ISREG works.
* filelock.c (S_ISLNK): Remove.
* lread.c (openp): Assume S_ISDIR works.
* xrdb.c (S_ISDIR): Remove.
Diffstat (limited to 'src/lread.c')
| -rw-r--r-- | src/lread.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lread.c b/src/lread.c index 855869cd90d..e594a363873 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -1402,8 +1402,7 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, Lisp_Object *sto | |||
| 1402 | 1402 | ||
| 1403 | encoded_fn = ENCODE_FILE (string); | 1403 | encoded_fn = ENCODE_FILE (string); |
| 1404 | pfn = SSDATA (encoded_fn); | 1404 | pfn = SSDATA (encoded_fn); |
| 1405 | exists = (stat (pfn, &st) >= 0 | 1405 | exists = (stat (pfn, &st) == 0 && ! S_ISDIR (st.st_mode)); |
| 1406 | && (st.st_mode & S_IFMT) != S_IFDIR); | ||
| 1407 | if (exists) | 1406 | if (exists) |
| 1408 | { | 1407 | { |
| 1409 | /* Check that we can access or open it. */ | 1408 | /* Check that we can access or open it. */ |
| @@ -4385,7 +4384,7 @@ to load. See also `load-dangerous-libraries'. */); | |||
| 4385 | 4384 | ||
| 4386 | Qdir_ok = intern_c_string ("dir-ok"); | 4385 | Qdir_ok = intern_c_string ("dir-ok"); |
| 4387 | staticpro (&Qdir_ok); | 4386 | staticpro (&Qdir_ok); |
| 4388 | 4387 | ||
| 4389 | Qdo_after_load_evaluation = intern_c_string ("do-after-load-evaluation"); | 4388 | Qdo_after_load_evaluation = intern_c_string ("do-after-load-evaluation"); |
| 4390 | staticpro (&Qdo_after_load_evaluation) ; | 4389 | staticpro (&Qdo_after_load_evaluation) ; |
| 4391 | 4390 | ||