Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d583380
)
Moved the file_extra union out of the file_struct.
author
Wayne Davison
<wayned@samba.org>
Sat, 16 Dec 2006 19:24:08 +0000
(19:24 +0000)
committer
Wayne Davison
<wayned@samba.org>
Sat, 16 Dec 2006 19:24:08 +0000
(19:24 +0000)
rsync.h
patch
|
blob
|
blame
|
history
diff --git
a/rsync.h
b/rsync.h
index
0e0ad82
..
79c8ccf
100644
(file)
--- a/
rsync.h
+++ b/
rsync.h
@@
-510,14
+510,15
@@
struct idev_node {
#define GID_NONE ((gid_t)-1)
#define GID_NONE ((gid_t)-1)
+union file_extras {
+ 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 */
+ int32 num; /* A signed number */
+ uint32 unum; /* An unsigned number */
+};
+
struct file_struct {
struct file_struct {
- union flist_extras {
- 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 */
- int32 num; /* A signed number */
- uint32 unum; /* An unsigned number */
- } extras[1];
time_t modtime; /* When the item was last modified */
const char *dirname; /* The dir info inside the transfer */
union {
time_t modtime; /* When the item was last modified */
const char *dirname; /* The dir info inside the transfer */
union {
@@
-535,11
+536,11
@@
extern int preserve_uid;
extern int preserve_gid;
#define FILE_STRUCT_LEN (offsetof(struct file_struct, basename))
extern int preserve_gid;
#define FILE_STRUCT_LEN (offsetof(struct file_struct, basename))
-#define EXTRA_LEN (sizeof (union f
list
_extras))
+#define EXTRA_LEN (sizeof (union f
ile
_extras))
#define SUM_EXTRA_CNT ((MD4_SUM_LENGTH + EXTRA_LEN - 1) / EXTRA_LEN)
#define SUM_EXTRA_CNT ((MD4_SUM_LENGTH + EXTRA_LEN - 1) / EXTRA_LEN)
-#define REQ_EXTRA(f,ndx) ((
f)->extras - (ndx - 1
))
-#define OPT_EXTRA(f,bump) ((
f)->extras - flist_extra_cnt
- (bump))
+#define REQ_EXTRA(f,ndx) ((
union file_extras*)(f) - (ndx
))
+#define OPT_EXTRA(f,bump) ((
union file_extras*)(f) - flist_extra_cnt - 1
- (bump))
#define LEN64_BUMP(f) ((f)->flags & FLAG_LENGTH64 ? 1 : 0)
#define HLINK_BUMP(f) (F_IS_HLINKED(f) ? 1 : 0)
#define LEN64_BUMP(f) ((f)->flags & FLAG_LENGTH64 ? 1 : 0)
#define HLINK_BUMP(f) (F_IS_HLINKED(f) ? 1 : 0)