Added BITS_EQUAL() define.
[rsync/rsync.git] / rsync.h
diff --git a/rsync.h b/rsync.h
index e07ac9f..a509242 100644 (file)
--- a/rsync.h
+++ b/rsync.h
@@ -70,6 +70,8 @@
 
 #define BITS_SET(val,bits) (((val) & (bits)) == (bits))
 #define BITS_SETnUNSET(val,onbits,offbits) (((val) & ((onbits)|(offbits))) == (onbits))
+#define BITS_EQUAL(b1,b2,mask) (((unsigned)(b1) & (unsigned)(mask)) \
+                            == ((unsigned)(b2) & (unsigned)(mask)))
 
 /* update this if you make incompatible changes */
 #define PROTOCOL_VERSION 30
@@ -507,7 +509,6 @@ struct file_struct {
                uid_t uid;           /* The user ID number */
                uid_t gid;           /* The group ID number or GID_NONE */
                struct idev *idev;   /* The hard-link info during matching */
-               struct hlist *hlist; /* The hard-link info after matching */
                int32 num;           /* A signed number */
                uint32 unum;         /* An unsigned number */
        } extras[1];
@@ -539,8 +540,12 @@ extern int preserve_gid;
 
 /* Basename (AKA filename) and length applies to all items */
 #define F_BASENAME(f) ((const char*)(f) + FILE_STRUCT_LEN)
-#define F_LENGTH(f) ((OFF_T)(f)->len32 + ((f)->flags & FLAG_LENGTH64 \
-                  ? (OFF_T)OPT_EXTRA(f, 0)->unum << 32 : 0u))
+#if SIZEOF_INT64 < 8
+#define F_LENGTH(f) ((int64)(f)->len32)
+#else
+#define F_LENGTH(f) ((int64)(f)->len32 + ((f)->flags & FLAG_LENGTH64 \
+                  ? (int64)OPT_EXTRA(f, 0)->unum << 32 : 0))
+#endif
 
 /* If there is a symlink string, it is always right after the basename */
 #define F_SYMLINK(f) (F_BASENAME(f) + strlen(F_BASENAME(f)) + 1)