]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Move declaractions of lstat, stat, and rpl_lstat
authorJim Meyering <jim@meyering.net>
Mon, 4 Sep 2000 20:51:12 +0000 (20:51 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 4 Sep 2000 20:51:12 +0000 (20:51 +0000)
as well as the definition of lstat from cp.c to this file.

src/copy.h

index 69a2e2e311696b932665b8cbf8cfab71afce45e5..e5a35cd6d8b5e1173d98a61755465ae8257636fb 100644 (file)
@@ -130,6 +130,18 @@ struct cp_options
   int (*xstat) ();
 };
 
+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 PARAMS((const char *, struct stat *));
+#  undef lstat
+#  define lstat rpl_lstat
+# endif
+
 int
 copy PARAMS ((const char *src_path, const char *dst_path,
              int nonexistent_dst, const struct cp_options *options,