(MAXSIZE): New macro.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 2 Nov 2004 20:17:37 +0000 (20:17 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 2 Nov 2004 20:17:37 +0000 (20:17 +0000)
commit3bd23802ad65a4379e0c97d736dc6c2ab2d37f1d
treedc8e1c28f6b4170a0813b14a0163d1fede51cf2a
parentea6305f7467ea99eac90af5717e190bdffd664ce
(MAXSIZE): New macro.
(xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
size does not exceed MAXSIZE.  Avoid cast.
As suggested by Mark D. Baushke in
<http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
if readlink fails with buffer size just under MAXSIZE, try again
with MAXSIZE.
lib/xreadlink.c