Moved kluged (conditional) define of lchown from rsync.h to syscall.c.
authorWayne Davison <wayned@samba.org>
Mon, 3 Jan 2005 21:03:33 +0000 (21:03 +0000)
committerWayne Davison <wayned@samba.org>
Mon, 3 Jan 2005 21:03:33 +0000 (21:03 +0000)
rsync.h
syscall.c

diff --git a/rsync.h b/rsync.h
index 914eb2e..c753098 100644 (file)
--- a/rsync.h
+++ b/rsync.h
@@ -591,13 +591,6 @@ extern int errno;
 #define SUPPORT_LINKS HAVE_READLINK
 #define SUPPORT_HARD_LINKS HAVE_LINK
 
 #define SUPPORT_LINKS HAVE_READLINK
 #define SUPPORT_HARD_LINKS HAVE_LINK
 
-/* This could be bad on systems which have no lchown and where chown
- * follows symbollic links.  On such systems it might be better not to
- * try to chown symlinks at all. */
-#ifndef HAVE_LCHOWN
-#define lchown chown
-#endif
-
 #define SIGNAL_CAST (RETSIGTYPE (*)())
 
 #ifndef EWOULDBLOCK
 #define SIGNAL_CAST (RETSIGTYPE (*)())
 
 #ifndef EWOULDBLOCK
index f34774c..f498547 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -72,6 +72,9 @@ int do_lchown(const char *path, uid_t owner, gid_t group)
 {
        if (dry_run) return 0;
        RETURN_ERROR_IF_RO_OR_LO;
 {
        if (dry_run) return 0;
        RETURN_ERROR_IF_RO_OR_LO;
+#ifdef HAVE_LCHOWN
+#define lchown chown
+#endif
        return lchown(path, owner, group);
 }
 
        return lchown(path, owner, group);
 }