Factor out common logic of unchanged_attrs and itemize into report_ATTR
[rsync/rsync.git] / rsync.h
diff --git a/rsync.h b/rsync.h
index 79402cd..57e3d79 100644 (file)
--- a/rsync.h
+++ b/rsync.h
@@ -383,6 +383,14 @@ enum delret {
 #define CAN_CHMOD_SYMLINK 1
 #endif
 
+#ifdef HAVE_UTIMENSAT
+#ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
+#define ST_MTIME_NSEC st_mtim.tv_nsec
+#elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC)
+#define ST_MTIME_NSEC st_mtimensec
+#endif
+#endif
+
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #endif
@@ -665,6 +673,23 @@ struct ht_int64_node {
 #define ACLS_NEED_MASK 1
 #endif
 
+#if defined HAVE_FALLOCATE || HAVE_SYS_FALLOCATE
+#ifdef HAVE_LINUX_FALLOC_H
+#include <linux/falloc.h>
+#endif
+#ifdef FALLOC_FL_KEEP_SIZE
+#define SUPPORT_PREALLOCATION 1
+#elif defined HAVE_FTRUNCATE
+#define SUPPORT_PREALLOCATION 1
+#define PREALLOCATE_NEEDS_TRUNCATE 1
+#endif
+#else /* !fallocate */
+#if defined HAVE_EFFICIENT_POSIX_FALLOCATE && defined HAVE_FTRUNCATE
+#define SUPPORT_PREALLOCATION 1
+#define PREALLOCATE_NEEDS_TRUNCATE 1
+#endif
+#endif
+
 union file_extras {
        int32 num;
        uint32 unum;
@@ -1019,7 +1044,7 @@ extern int errno;
 
 #ifdef HAVE_READLINK
 #define SUPPORT_LINKS 1
-#ifndef NO_SYMLINK_XATTRS
+#if !defined NO_SYMLINK_XATTRS && !defined NO_SYMLINK_USER_XATTRS
 #define do_readlink(path, buf, bufsiz) readlink(path, buf, bufsiz)
 #endif
 #endif