1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

Fix Linux getcwd for long paths

The getcwd syscall (so far?) can only handle path up to one page
in size.  There is no limit about directory hierarchy depth, though,
and the POSIX getcwd is supposed to handle this.  In that case fall
back to the generic getcwd.

Additionally, optimize the generic getcwd to use openat when possible
to change the asymptotic performance from O(N^2) to O(n).
This commit is contained in:
Ulrich Drepper
2011-05-08 08:37:19 -04:00
parent 28377d1bf5
commit 7fb90fb89b
11 changed files with 320 additions and 159 deletions

View File

@ -0,0 +1 @@
#include "getcwd.c"