From: Jason Rumney Date: Wed, 7 May 2003 22:14:01 +0000 (+0000) Subject: (Ffile_symlink_p): Let handlers handle symlinks even X-Git-Tag: ttn-vms-21-2-B4~10257 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5adcec2317814d032a24566cb8680d0622370630;p=emacs.git (Ffile_symlink_p): Let handlers handle symlinks even when system does not support them. --- diff --git a/src/ChangeLog b/src/ChangeLog index f1869a7334a..a7add6733e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-05-07 Jason Rumney + + * fileio.c (Ffile_symlink_p): Let handlers handle symlinks even + when system does not support them. + 2003-05-05 Stefan Monnier * fileio.c (Qwrite_region_annotate_functions): New var. diff --git a/src/fileio.c b/src/fileio.c index 71036912bbc..cfaf5738a5e 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3192,11 +3192,6 @@ Otherwise returns nil. */) (filename) Lisp_Object filename; { -#ifdef S_IFLNK - char *buf; - int bufsize; - int valsize; - Lisp_Object val; Lisp_Object handler; CHECK_STRING (filename); @@ -3208,6 +3203,13 @@ Otherwise returns nil. */) if (!NILP (handler)) return call2 (handler, Qfile_symlink_p, filename); +#ifdef S_IFLNK + { + char *buf; + int bufsize; + int valsize; + Lisp_Object val; + filename = ENCODE_FILE (filename); bufsize = 50; @@ -3242,6 +3244,7 @@ Otherwise returns nil. */) xfree (buf); val = DECODE_FILE (val); return val; + } #else /* not S_IFLNK */ return Qnil; #endif /* not S_IFLNK */