From: Gerd Moellmann Date: Thu, 13 Sep 2001 14:06:10 +0000 (+0000) Subject: Fix last change. X-Git-Tag: emacs-pretest-21.0.106~119 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=620c4704a93c3e9034f376e2e20852b3ee0a3b34;p=emacs.git Fix last change. --- diff --git a/src/ChangeLog b/src/ChangeLog index c053a1530d1..57eefa996e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2001-09-13 Gerd Moellmann + * filelock.c (current_lock_owner): If readlink returns ERANGE, + take that to mean that the buffer is too small. + * fileio.c (Ffile_symlink_p): If readlink returns ERANGE, take that to mean that the buffer is too small. diff --git a/src/filelock.c b/src/filelock.c index 6e78a05e309..f82c16b7996 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -435,6 +435,7 @@ current_lock_owner (owner, lfname) { bufsize *= 2; lfinfo = (char *) xrealloc (lfinfo, bufsize); + errno = 0; len = readlink (lfname, lfinfo, bufsize); #ifdef ERANGE /* HP-UX reports ERANGE if the buffer is too small. */