]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
* getcwd.c: Use system getcwd first, if appropriate.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 1 Dec 2004 07:13:35 +0000 (07:13 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 1 Dec 2004 07:13:35 +0000 (07:13 +0000)
lib/ChangeLog

index abefd19cf3c471bf7d78c56d633aa02636ff6596..c0f8caffb9069009a8f7b27c5233b78747c5cafe 100644 (file)
@@ -1,10 +1,15 @@
 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * getcwd.c (is_ENAMETOOLONG): New macro.
+       (__getcwd.c): Don't restore errno; glibc doesn't.
+       [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
+       first, falling back to our code only if its results look suspicious.
+       Ensure that the resulting buffer is only as large as necessary.
+
        * readutmp.c: Include readutmp.h first.
        Include <errno.h>, since readutmp.h no longer does that.
-       * readutmp.h: Don't include <sys/types.h>, <errno.h>,
+       * readutmp.h: Don't include <errno.h>,
        <sys/param.h>, <time.h>; not needed to establish interface.
-       Include <stddef.h> instead.
        (errno): Remove decl.
        (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
        (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,