Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 108317 Details for
Bug 130346
dev-vcs/cvs has broken gnulib getcwd.c - cvs [xxx aborted]: cannot get working directory: Permission denied
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix cvs' internal getcwd
cvs-1.12.12-getcwd.patch (text/plain), 1.32 KB, created by
Martin Väth
on 2007-01-27 22:01:51 UTC
(
hide
)
Description:
Patch to fix cvs' internal getcwd
Filename:
MIME Type:
Creator:
Martin Väth
Created:
2007-01-27 22:01:51 UTC
Size:
1.32 KB
patch
obsolete
>--- lib/getcwd.c >+++ lib/getcwd.c >@@ -101,10 +101,17 @@ > #endif > > #if D_INO_IN_DIRENT >-# define MATCHING_INO(dp, ino) ((dp)->d_ino == (ino)) >+/*# define MATCHING_INO(dp, ino) ((dp)->d_ino == (ino))*/ > #else >-# define MATCHING_INO(dp, ino) true >+/*# define MATCHING_INO(dp, ino) true*/ > #endif >+/* Patch: Always ignore dirent.d_ino entries, even if they exist, >+ although this slows down the getcwd algorithm. >+ The reason is that for some filesystem (e.g. combination squashfs/unionfs) >+ this gives a different value than stat() and thus confuses the algorithm. >+*/ >+# define MATCHING_INO(dp, ino) true >+ > > #if !_LIBC > # define __getcwd getcwd >@@ -153,7 +160,12 @@ > size_t allocated = size; > size_t used; > >-#if HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD >+/*#if HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD */ >+/* Patch: The above is commented out, because the system's getcwd should >+ be preferred even if AT_FDCWD is defined, i.e. even if the following >+ algorithm would be fast: The system's getcwd does not rely so much >+ about D_INO_IN_DIRENT (see the above patch why this is bad). */ >+#if HAVE_PARTLY_WORKING_GETCWD > /* The system getcwd works, except it sometimes fails when it > shouldn't, setting errno to ERANGE, ENAMETOOLONG, or ENOENT. If > AT_FDCWD is not defined, the algorithm below is O(N**2) and this
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 130346
:
85321
|
85324
|
85338
|
85339
|
85340
|
85341
|
102977
| 108317