diff options
| author | Andrew Choi | 2001-08-24 07:09:01 +0000 |
|---|---|---|
| committer | Andrew Choi | 2001-08-24 07:09:01 +0000 |
| commit | fb4c6c961bb0e84d06831a0d9c85d9294d77fe19 (patch) | |
| tree | cb19695465638a47484ab79c8612d71ca24a33b8 /src | |
| parent | cf6ce50be68c02cc4cf4601bb09101418d74a3fe (diff) | |
| download | emacs-fb4c6c961bb0e84d06831a0d9c85d9294d77fe19.tar.gz emacs-fb4c6c961bb0e84d06831a0d9c85d9294d77fe19.zip | |
2001-08-24 Andrew Choi <akochoi@cse.cuhk.edu.hk>
* fileio.c (Ffile_readable_p) [macintosh]: Call access instead of
open to determine whether file is readable (as for DOS_NT).
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/fileio.c | 9 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3ea6c330291..18e0ce0b93b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2001-08-24 Andrew Choi <akochoi@cse.cuhk.edu.hk> | ||
| 2 | |||
| 3 | * fileio.c (Ffile_readable_p) [macintosh]: Call access instead of | ||
| 4 | open to determine whether file is readable (as for DOS_NT). | ||
| 5 | |||
| 1 | 2001-08-23 Gerd Moellmann <gerd@gnu.org> | 6 | 2001-08-23 Gerd Moellmann <gerd@gnu.org> |
| 2 | 7 | ||
| 3 | * fileio.c (Finsert_file_contents): If VISIT is non-nil, and | 8 | * fileio.c (Finsert_file_contents): If VISIT is non-nil, and |
| @@ -282,7 +287,7 @@ | |||
| 282 | * coding.c (setup_coding_system): Don't do any designation based | 287 | * coding.c (setup_coding_system): Don't do any designation based |
| 283 | on reg_bits if charset is not yet defined. | 288 | on reg_bits if charset is not yet defined. |
| 284 | 289 | ||
| 285 | * lisp.h (XVECTOR): Verify correct object type before returning a | 290 | * lisp.h (XVECTOR): Verify correct object type before returning a |
| 286 | pointer, using eassert. | 291 | pointer, using eassert. |
| 287 | 292 | ||
| 288 | 2001-07-17 Gerd Moellmann <gerd@gnu.org> | 293 | 2001-07-17 Gerd Moellmann <gerd@gnu.org> |
diff --git a/src/fileio.c b/src/fileio.c index 271cee1a4f0..0b33668ab5d 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -2967,12 +2967,13 @@ See also `file-exists-p' and `file-attributes'.") | |||
| 2967 | 2967 | ||
| 2968 | absname = ENCODE_FILE (absname); | 2968 | absname = ENCODE_FILE (absname); |
| 2969 | 2969 | ||
| 2970 | #ifdef DOS_NT | 2970 | #if defined(DOS_NT) || defined(macintosh) |
| 2971 | /* Under MS-DOS and Windows, open does not work for directories. */ | 2971 | /* Under MS-DOS, Windows, and Macintosh, open does not work for |
| 2972 | directories. */ | ||
| 2972 | if (access (XSTRING (absname)->data, 0) == 0) | 2973 | if (access (XSTRING (absname)->data, 0) == 0) |
| 2973 | return Qt; | 2974 | return Qt; |
| 2974 | return Qnil; | 2975 | return Qnil; |
| 2975 | #else /* not DOS_NT */ | 2976 | #else /* not DOS_NT and not macintosh */ |
| 2976 | flags = O_RDONLY; | 2977 | flags = O_RDONLY; |
| 2977 | #if defined (S_ISFIFO) && defined (O_NONBLOCK) | 2978 | #if defined (S_ISFIFO) && defined (O_NONBLOCK) |
| 2978 | /* Opening a fifo without O_NONBLOCK can wait. | 2979 | /* Opening a fifo without O_NONBLOCK can wait. |
| @@ -2989,7 +2990,7 @@ See also `file-exists-p' and `file-attributes'.") | |||
| 2989 | return Qnil; | 2990 | return Qnil; |
| 2990 | emacs_close (desc); | 2991 | emacs_close (desc); |
| 2991 | return Qt; | 2992 | return Qt; |
| 2992 | #endif /* not DOS_NT */ | 2993 | #endif /* not DOS_NT and not macintosh */ |
| 2993 | } | 2994 | } |
| 2994 | 2995 | ||
| 2995 | /* Having this before file-symlink-p mysteriously caused it to be forgotten | 2996 | /* Having this before file-symlink-p mysteriously caused it to be forgotten |