]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(lstat) [LSTAT_FOLLOWS_SLASHED_SYMLINK]: Define to rpl_lstat.
authorJim Meyering <jim@meyering.net>
Sun, 2 Feb 2003 17:14:59 +0000 (17:14 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 2 Feb 2003 17:14:59 +0000 (17:14 +0000)
lib/ftw.c

index ccbb71a05b267decca57ec4435041836b6dc5d3b..8f2c2a81a4afa05e46e4788af5a9f944d6d6fdaf 100644 (file)
--- a/lib/ftw.c
+++ b/lib/ftw.c
@@ -120,6 +120,15 @@ char *stpcpy ();
 extern char *xgetcwd (void);
 #endif
 
+/* 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 ! _LIBC && ! LSTAT_FOLLOWS_SLASHED_SYMLINK
+int rpl_lstat (const char *, struct stat *);
+# undef lstat
+# define lstat(Name, Stat_buf) rpl_lstat(Name, Stat_buf)
+#endif
+
 #ifndef __set_errno
 # define __set_errno(Val) errno = (Val)
 #endif