diff -up which-2.19/bash.c.afs which-2.19/bash.c
--- which-2.19/bash.c.afs 2008-01-18 19:03:40.000000000 +0100
+++ which-2.19/bash.c 2008-01-25 11:41:14.000000000 +0100
@@ -34,7 +34,6 @@
*/
#define HAVE_GETGROUPS
#undef SHELL
-#undef AFS
#undef NOGROUP
/*
@@ -251,7 +250,7 @@ file_status (char const* name)
r = FS_EXISTS;
-#if defined (AFS)
+ if (getenv("AFS")) {
/* We have to use access(2) to determine access because AFS does not
support Unix file system semantics. This may produce wrong
answers for non-AFS files when ruid != euid. I hate AFS. */
@@ -261,8 +260,9 @@ file_status (char const* name)
r |= FS_READABLE;
return r;
-#else /* !AFS */
-
+ }
+ else /* !AFS */
+ {
/* Find out if the file is actually executable. By definition, the
only other criteria is that the file has an execute bit set that
we can use. The same with whether or not a file is readable. */
@@ -305,7 +305,7 @@ file_status (char const* name)
}
return r;
-#endif /* !AFS */
+ } /* !AFS */
}
/* From bash-3.2 / general.c / line 534 ; Changes: Using 'strchr' instead of 'xstrchr'. */