Mercurial > emacs
comparison src/fileio.c @ 39291:f9c8c910fe9a
(Ffile_symlink_p): Fix last change.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Fri, 14 Sep 2001 11:20:57 +0000 |
parents | 269a01a4ee76 |
children | dbb9a3969094 |
comparison
equal
deleted
inserted
replaced
39290:c5853621fe9b | 39291:f9c8c910fe9a |
---|---|
3104 buf = (char *) xrealloc (buf, bufsize); | 3104 buf = (char *) xrealloc (buf, bufsize); |
3105 bzero (buf, bufsize); | 3105 bzero (buf, bufsize); |
3106 | 3106 |
3107 errno = 0; | 3107 errno = 0; |
3108 valsize = readlink (XSTRING (filename)->data, buf, bufsize); | 3108 valsize = readlink (XSTRING (filename)->data, buf, bufsize); |
3109 if (valsize == -1 | 3109 if (valsize == -1) |
3110 { | |
3110 #ifdef ERANGE | 3111 #ifdef ERANGE |
3111 /* HP-UX reports ERANGE if buffer is too small. */ | 3112 /* HP-UX reports ERANGE if buffer is too small. */ |
3112 && errno != ERANGE | 3113 if (errno == ERANGE) |
3113 #endif | 3114 valsize = bufsize; |
3114 ) | 3115 else |
3115 { | 3116 #endif |
3116 xfree (buf); | 3117 { |
3117 return Qnil; | 3118 xfree (buf); |
3119 return Qnil; | |
3120 } | |
3118 } | 3121 } |
3119 } | 3122 } |
3120 while (valsize >= bufsize); | 3123 while (valsize >= bufsize); |
3121 | 3124 |
3122 val = make_string (buf, valsize); | 3125 val = make_string (buf, valsize); |