]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(lstat) [! LSTAT_FOLLOWS_SLASHED_SYMLINK]:
authorJim Meyering <jim@meyering.net>
Sun, 8 Dec 2002 20:51:55 +0000 (20:51 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 8 Dec 2002 20:51:55 +0000 (20:51 +0000)
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.

src/du.c

index b5c52581054f995552273cef00e15df23248a897..a4648be67d23566f9eba3362b7f759277742e4b0 100644 (file)
--- 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;