Commit 4f796b144c85d69ea6a5037e95bc3aba0a073e1e

Jim Meyering 2000-06-21T20:16:03

(xgetcwd): If the required pathname length is smaller than 1024, return a memory chunk of least possible size, instead of size PATH_MAX + 2. In the loop, increment the size proportionally. Use free/xmalloc instead of xrealloc to avoid copying for very long paths.