summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-09-04 20:51:12 +0000
committerJim Meyering <jim@meyering.net>2000-09-04 20:51:12 +0000
commitcec4418796b4bf464a51896a8f8abf903d84d9e8 (patch)
tree71336760c33b31e2af0920d5f985c46f9fce86e5 /src
parent25e0824d28f499173211f901710abe822143d38c (diff)
downloadcoreutils-cec4418796b4bf464a51896a8f8abf903d84d9e8.tar.xz
Move declaractions of lstat, stat, and rpl_lstat
as well as the definition of lstat from cp.c to this file.
Diffstat (limited to 'src')
-rw-r--r--src/copy.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/copy.h b/src/copy.h
index 69a2e2e31..e5a35cd6d 100644
--- a/src/copy.h
+++ b/src/copy.h
@@ -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,