From: Jim Meyering Date: Sun, 8 Dec 2002 20:51:55 +0000 (+0000) Subject: (lstat) [! LSTAT_FOLLOWS_SLASHED_SYMLINK]: X-Git-Tag: v4.5.4~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b352458d0f249f4e6b7f92450fce1e5e9b53e79;p=thirdparty%2Fcoreutils.git (lstat) [! LSTAT_FOLLOWS_SLASHED_SYMLINK]: Define to rpl_lstat, so that even on systems like Solaris 5.8, du honors (per POSIX) the trailing slash on an argument referring to a symlink-to-directory. --- diff --git a/src/du.c b/src/du.c index b5c5258105..a4648be67d 100644 --- a/src/du.c +++ b/src/du.c @@ -96,6 +96,15 @@ typedef struct String String; int stat (); int lstat (); +/* Arrange to make lstat calls go through the wrapper function + on systems with an lstat function that does not dereference symlinks + that are specified with a trailing slash. */ +#if ! LSTAT_FOLLOWS_SLASHED_SYMLINK +int rpl_lstat (char const *, struct stat *); +# undef lstat +# define lstat rpl_lstat +#endif + /* Name under which this program was invoked. */ char *program_name;