aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mach
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-05-08 08:37:19 -0400
committerUlrich Drepper <drepper@gmail.com>2011-05-08 08:37:19 -0400
commit7fb90fb89bbdf273ab7ab96517fe1b156cd7aee1 (patch)
treec9fb5b27f0c75b57cd3090e2f3c857feba542f41 /sysdeps/mach
parent28377d1bf58625172a1734b92e835591d4d23a18 (diff)
downloadglibc-7fb90fb89bbdf273ab7ab96517fe1b156cd7aee1.zip
glibc-7fb90fb89bbdf273ab7ab96517fe1b156cd7aee1.tar.gz
glibc-7fb90fb89bbdf273ab7ab96517fe1b156cd7aee1.tar.bz2
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).
Diffstat (limited to 'sysdeps/mach')
-rw-r--r--sysdeps/mach/hurd/rewinddir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/mach/hurd/rewinddir.c b/sysdeps/mach/hurd/rewinddir.c
index 6956453..322844e 100644
--- a/sysdeps/mach/hurd/rewinddir.c
+++ b/sysdeps/mach/hurd/rewinddir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,10 +22,10 @@
#include <unistd.h>
/* Rewind DIRP to the beginning of the directory. */
-/* XXX should be __rewinddir ? */
void
rewinddir (dirp)
DIR *dirp;
{
seekdir (dirp, (off_t) 0L);
}
+libc_hidden_def (rewinddir)