Fixed failing hunks.
authorWayne Davison <wayned@samba.org>
Thu, 15 Dec 2005 23:18:59 +0000 (23:18 +0000)
committerWayne Davison <wayned@samba.org>
Thu, 15 Dec 2005 23:18:59 +0000 (23:18 +0000)
atimes.diff
early-checksum.diff

index 89af210..fd7ab01 100644 (file)
@@ -15,7 +15,7 @@ command before "make":
                rprintf(FINFO, "flist->length=%.0f\n",
                        (double) fptr[i]->length);
                rprintf(FINFO, "flist->mode=%#o\n", (int) fptr[i]->mode);
---- orig/flist.c       2005-11-07 04:29:01
+--- orig/flist.c       2005-11-10 16:58:36
 +++ flist.c    2005-07-28 00:16:34
 @@ -50,6 +50,7 @@ extern int preserve_perms;
  extern int preserve_devices;
@@ -25,7 +25,7 @@ command before "make":
  extern int relative_paths;
  extern int implied_dirs;
  extern int copy_links;
-@@ -138,16 +139,18 @@ static void list_file_entry(struct file_
+@@ -140,16 +141,18 @@ static void list_file_entry(struct file_
  
  #ifdef SUPPORT_LINKS
        if (preserve_links && S_ISLNK(f->mode)) {
@@ -46,7 +46,7 @@ command before "make":
                        safe_fname(f_name(f)));
        }
  }
-@@ -309,6 +312,7 @@ void send_file_entry(struct file_struct 
+@@ -311,6 +314,7 @@ void send_file_entry(struct file_struct 
  {
        unsigned short flags;
        static time_t modtime;
@@ -54,7 +54,7 @@ command before "make":
        static mode_t mode;
        static int64 dev;
        static dev_t rdev;
-@@ -324,7 +328,7 @@ void send_file_entry(struct file_struct 
+@@ -326,7 +330,7 @@ void send_file_entry(struct file_struct 
  
        if (!file) {
                write_byte(f, 0);
@@ -63,7 +63,7 @@ command before "make":
                dev = 0, rdev = makedev(0, 0);
                rdev_major = 0;
                uid = 0, gid = 0;
-@@ -373,6 +377,12 @@ void send_file_entry(struct file_struct 
+@@ -375,6 +379,12 @@ void send_file_entry(struct file_struct 
                flags |= XMIT_SAME_TIME;
        else
                modtime = file->modtime;
@@ -76,7 +76,7 @@ command before "make":
  
  #ifdef SUPPORT_HARD_LINKS
        if (file->link_u.idev) {
-@@ -426,6 +436,8 @@ void send_file_entry(struct file_struct 
+@@ -428,6 +438,8 @@ void send_file_entry(struct file_struct 
                write_int(f, modtime);
        if (!(flags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
@@ -85,7 +85,7 @@ command before "make":
        if (preserve_uid && !(flags & XMIT_SAME_UID)) {
                if (!numeric_ids)
                        add_uid(uid);
-@@ -494,6 +506,7 @@ static struct file_struct *receive_file_
+@@ -495,6 +507,7 @@ static struct file_struct *receive_file_
                                              unsigned short flags, int f)
  {
        static time_t modtime;
@@ -93,7 +93,7 @@ command before "make":
        static mode_t mode;
        static int64 dev;
        static dev_t rdev;
-@@ -512,7 +525,7 @@ static struct file_struct *receive_file_
+@@ -513,7 +526,7 @@ static struct file_struct *receive_file_
        struct file_struct *file;
  
        if (!flist) {
@@ -102,7 +102,7 @@ command before "make":
                dev = 0, rdev = makedev(0, 0);
                rdev_major = 0;
                uid = 0, gid = 0;
-@@ -568,6 +581,8 @@ static struct file_struct *receive_file_
+@@ -569,6 +582,8 @@ static struct file_struct *receive_file_
                modtime = (time_t)read_int(f);
        if (!(flags & XMIT_SAME_MODE))
                mode = from_wire_mode(read_int(f));
@@ -111,7 +111,7 @@ command before "make":
  
        if (preserve_uid && !(flags & XMIT_SAME_UID))
                uid = (uid_t)read_int(f);
-@@ -618,6 +633,7 @@ static struct file_struct *receive_file_
+@@ -619,6 +634,7 @@ static struct file_struct *receive_file_
  
        file->flags = 0;
        file->modtime = modtime;
@@ -119,7 +119,7 @@ command before "make":
        file->length = file_length;
        file->mode = mode;
        file->uid = uid;
-@@ -866,6 +882,7 @@ skip_filters:
+@@ -867,6 +883,7 @@ struct file_struct *make_file(char *fnam
  
        file->flags = flags;
        file->modtime = st.st_mtime;
@@ -127,8 +127,8 @@ command before "make":
        file->length = st.st_size;
        if (chmod_modes && am_sender && (S_ISREG(st.st_mode) || S_ISDIR(st.st_mode)))
                file->mode = tweak_mode(st.st_mode, chmod_modes);
---- orig/generator.c   2005-10-30 22:30:28
-+++ generator.c        2005-07-28 00:14:43
+--- orig/generator.c   2005-12-15 23:00:49
++++ generator.c        2005-12-15 23:05:32
 @@ -44,6 +44,7 @@ extern int preserve_uid;
  extern int preserve_gid;
  extern int preserve_times;
@@ -137,30 +137,29 @@ command before "make":
  extern int delete_before;
  extern int delete_during;
  extern int delete_after;
-@@ -325,9 +326,21 @@ void itemize(struct file_struct *file, i
-                           : S_ISDIR(file->mode) ? !omit_dir_times
-                           : !S_ISLNK(file->mode);
-+                      if (iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !keep_time
-+                           && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname)) {
+@@ -343,10 +344,18 @@ void itemize(struct file_struct *file, i
+               if (S_ISREG(file->mode) && file->length != st->st_size)
+                       iflags |= ITEM_REPORT_SIZE;
+-              if ((iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !keep_time
+-                   && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
+-                  || (keep_time && cmp_modtime(file->modtime, st->st_mtime) != 0))
++              if (iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !keep_time
++                   && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname)) {
+                       iflags |= ITEM_REPORT_TIME;
++                      if (!preserve_atimes && !S_ISDIR(file->mode))
++                              iflags |= ITEM_REPORT_ATIME;
++              } else {
++                      if (keep_time && cmp_time(file->modtime, st->st_mtime) != 0)
 +                              iflags |= ITEM_REPORT_TIME;
-+                              if (!preserve_atimes && !S_ISDIR(file->mode))
-+                                      iflags |= ITEM_REPORT_ATIME;
-+                      } else {
-+                              if (keep_time && cmp_time(file->modtime, st->st_mtime) != 0)
-+                                      iflags |= ITEM_REPORT_TIME;
-+                              if (preserve_atimes && !S_ISDIR(file->mode)
-+                               && cmp_time(file->atime, st->st_atime) != 0)
-+                                      iflags |= ITEM_REPORT_ATIME;
-+                      }
-                       if ((iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !keep_time
-                            && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
--                          || (keep_time && cmp_modtime(file->modtime, st->st_mtime) != 0))
-+                          || (keep_time && cmp_time(file->modtime, st->st_mtime) != 0))
-                               iflags |= ITEM_REPORT_TIME;
-                       if (preserve_perms
-                        && (file->mode & CHMOD_BITS) != (st->st_mode & CHMOD_BITS))
-@@ -379,7 +392,7 @@ static int unchanged_file(char *fn, stru
++                      if (preserve_atimes && !S_ISDIR(file->mode)
++                       && cmp_time(file->atime, st->st_atime) != 0)
++                              iflags |= ITEM_REPORT_ATIME;
++              }
+               if (preserve_perms
+                && (file->mode & CHMOD_BITS) != (st->st_mode & CHMOD_BITS))
+                       iflags |= ITEM_REPORT_PERMS;
+@@ -395,7 +404,7 @@ int unchanged_file(char *fn, struct file
        if (ignore_times)
                return 0;
  
@@ -169,7 +168,7 @@ command before "make":
  }
  
  
-@@ -539,7 +552,7 @@ static int find_fuzzy(struct file_struct
+@@ -555,7 +564,7 @@ static int find_fuzzy(struct file_struct
                name = fp->basename;
  
                if (fp->length == file->length
@@ -178,7 +177,7 @@ command before "make":
                        if (verbose > 4) {
                                rprintf(FINFO,
                                        "fuzzy size/modtime match for %s\n",
-@@ -891,7 +904,7 @@ static void recv_generator(char *fname, 
+@@ -1086,7 +1095,7 @@ static void recv_generator(char *fname, 
        }
  
        if (update_only && statret == 0
@@ -187,17 +186,17 @@ command before "make":
                if (verbose > 1)
                        rprintf(FINFO, "%s is newer\n", safe_fname(fname));
                return;
---- orig/log.c 2005-10-26 16:49:08
-+++ log.c      2005-07-28 00:22:30
+--- orig/log.c 2005-12-15 23:00:49
++++ log.c      2005-12-15 23:05:44
 @@ -38,6 +38,7 @@ extern int module_id;
  extern int msg_fd_out;
  extern int protocol_version;
  extern int preserve_times;
 +extern int preserve_atimes;
+ extern int log_format_has_i;
  extern int log_format_has_o_or_i;
  extern int daemon_log_format_has_o_or_i;
- extern char *auth_user;
-@@ -503,11 +504,14 @@ static void log_formatted(enum logcode c
+@@ -504,11 +505,14 @@ static void log_formatted(enum logcode c
                        n[4] = !(iflags & ITEM_REPORT_TIME) ? '.'
                             : !preserve_times || IS_DEVICE(file->mode)
                                               || S_ISLNK(file->mode) ? 'T' : 't';
@@ -217,7 +216,7 @@ command before "make":
  
                        if (iflags & (ITEM_IS_NEW|ITEM_MISSING_DATA)) {
                                char ch = iflags & ITEM_IS_NEW ? '+' : '?';
---- orig/options.c     2005-11-07 04:29:01
+--- orig/options.c     2005-11-15 18:21:22
 +++ options.c  2005-11-07 04:32:19
 @@ -50,6 +50,7 @@ int preserve_uid = 0;
  int preserve_gid = 0;
@@ -227,7 +226,7 @@ command before "make":
  int update_only = 0;
  int cvs_exclude = 0;
  int dry_run = 0;
-@@ -292,8 +293,9 @@ void usage(enum logcode F)
+@@ -293,8 +294,9 @@ void usage(enum logcode F)
    rprintf(F," -o, --owner                 preserve owner (root only)\n");
    rprintf(F," -g, --group                 preserve group\n");
    rprintf(F," -D, --devices               preserve devices (root only)\n");
@@ -239,7 +238,7 @@ command before "make":
    rprintf(F,"     --chmod=CHMOD           change destination permissions\n");
    rprintf(F," -S, --sparse                handle sparse files efficiently\n");
    rprintf(F," -n, --dry-run               show what would have been transferred\n");
-@@ -397,6 +399,9 @@ static struct poptOption long_options[] 
+@@ -402,6 +404,9 @@ static struct poptOption long_options[] 
    {"times",           't', POPT_ARG_VAL,    &preserve_times, 1, 0, 0 },
    {"no-times",         0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
    {"no-t",             0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
@@ -249,7 +248,7 @@ command before "make":
    {"omit-dir-times",  'O', POPT_ARG_VAL,    &omit_dir_times, 2, 0, 0 },
    {"modify-window",    0,  POPT_ARG_INT,    &modify_window, OPT_MODIFY_WINDOW, 0, 0 },
    {"owner",           'o', POPT_ARG_VAL,    &preserve_uid, 1, 0, 0 },
-@@ -1429,6 +1434,8 @@ void server_options(char **args,int *arg
+@@ -1440,6 +1445,8 @@ void server_options(char **args,int *arg
                argstr[x++] = 'D';
        if (preserve_times)
                argstr[x++] = 't';
@@ -310,7 +309,7 @@ command before "make":
        }
  
        change_uid = am_root && preserve_uid && st->st_uid != file->uid;
---- orig/rsync.h       2005-10-14 18:45:50
+--- orig/rsync.h       2005-12-15 23:00:49
 +++ rsync.h    2005-07-28 00:04:51
 @@ -54,6 +54,7 @@
  #define XMIT_HAS_IDEV_DATA (1<<9)
@@ -328,15 +327,15 @@ command before "make":
  
  #define FULL_FLUSH    1
  #define NORMAL_FLUSH  0
-@@ -140,6 +142,7 @@
- #define DEL_TERSE             (1<<3)
+@@ -135,6 +137,7 @@
+ #define FNAMECMP_FUZZY                0x83
  
  /* For use by the itemize_changes code */
 +#define ITEM_REPORT_ATIME (1<<0)
  #define ITEM_REPORT_CHECKSUM (1<<1)
  #define ITEM_REPORT_SIZE (1<<2)
  #define ITEM_REPORT_TIME (1<<3)
-@@ -522,6 +525,7 @@ struct file_struct {
+@@ -516,6 +519,7 @@ struct file_struct {
                struct hlink *links;
        } link_u;
        time_t modtime;
@@ -344,7 +343,7 @@ command before "make":
        uid_t uid;
        gid_t gid;
        mode_t mode;
---- orig/rsync.yo      2005-11-07 04:29:02
+--- orig/rsync.yo      2005-12-15 07:55:39
 +++ rsync.yo   2005-11-07 04:34:55
 @@ -319,8 +319,9 @@ to the detailed description below for a 
   -o, --owner                 preserve owner (root only)
@@ -358,7 +357,7 @@ command before "make":
       --chmod=CHMOD           change destination permissions
   -S, --sparse                handle sparse files efficiently
   -n, --dry-run               show what would have been transferred
-@@ -698,6 +699,12 @@ it is preserving modification times (see
+@@ -702,6 +703,12 @@ it is preserving modification times (see
  the directories on the receiving side, it is a good idea to use bf(-O).
  This option is inferred if you use bf(--backup) without bf(--backup-dir).
  
@@ -371,7 +370,7 @@ command before "make":
  dit(bf(--chmod)) This options tells rsync to apply the listed "chmod" pattern
  to the permission of the files on the destination.  In addition to the normal
  parsing rules specified in the chmod manpage, you can specify an item that
-@@ -1139,7 +1146,7 @@ changes that are being made to each file
+@@ -1153,7 +1160,7 @@ changes that are being made to each file
  This is exactly the same as specifying bf(--log-format='%i %n%L').
  
  The "%i" escape has a cryptic output that is 9 letters long.  The general
@@ -380,7 +379,7 @@ command before "make":
  kind of update being done, bf(X) is replaced by the file-type, and the
  other letters represent attributes that may be output if they are being
  modified.
-@@ -1178,17 +1185,22 @@ quote(itemize(
+@@ -1192,17 +1199,22 @@ quote(itemize(
    by the file transfer.
    it() A bf(t) means the modification time is different and is being updated
    to the sender's value (requires bf(--times)).  An alternate value of bf(T)
@@ -428,8 +427,8 @@ command before "make":
 +
 +# The script would have aborted on error, so getting here means we've won.
 +exit 0
---- orig/testsuite/itemize.test        2005-07-07 20:35:48
-+++ testsuite/itemize.test     2005-07-28 00:29:54
+--- orig/testsuite/itemize.test        2005-12-15 23:00:49
++++ testsuite/itemize.test     2005-12-15 23:11:34
 @@ -44,14 +44,14 @@ ln "$fromdir/foo/config1" "$fromdir/foo/
  $RSYNC -iplr "$fromdir/" "$todir/" \
      | tee "$outfile"
@@ -528,43 +527,119 @@ command before "make":
 -.d..t.... ./
 -cd+++++++ bar/
 -cd+++++++ bar/baz/
--cf....... bar/baz/rsync
+-cf        bar/baz/rsync
 -cd+++++++ foo/
--cf....... foo/config1
--cf....... foo/config2
--hf+++++++ foo/extra => foo/config1
--cL+++++++ foo/sym -> ../bar/baz/rsync
+-cf        foo/config1
+-cf        foo/config2
+-hf        foo/extra => foo/config1
+-cL..T.... foo/sym -> ../bar/baz/rsync
 +.d..t..... ./
 +cd++++++++ bar/
 +cd++++++++ bar/baz/
-+cf........ bar/baz/rsync
++cf         bar/baz/rsync
 +cd++++++++ foo/
-+cf........ foo/config1
-+cf........ foo/config2
-+hf++++++++ foo/extra => foo/config1
-+cL++++++++ foo/sym -> ../bar/baz/rsync
++cf         foo/config1
++cf         foo/config2
++hf         foo/extra => foo/config1
++cL..T..... foo/sym -> ../bar/baz/rsync
  EOT
  diff $diffopt "$chkfile" "$outfile" || test_fail "test 8 failed"
  
-@@ -165,12 +165,12 @@ rm -rf "$todir"
- $RSYNC -iplrtH --link-dest="$lddir" "$fromdir/" "$todir/" \
+@@ -165,11 +165,11 @@ rm -rf "$todir"
+ $RSYNC -iplrtH --copy-dest="$lddir" "$fromdir/" "$todir/" \
      | tee "$outfile"
  cat <<EOT >"$chkfile"
 -.d..t.... ./
 -cd+++++++ bar/
 -cd+++++++ bar/baz/
 -cd+++++++ foo/
--hf+++++++ foo/extra => foo/config1
--cL+++++++ foo/sym -> ../bar/baz/rsync
+-hf        foo/extra => foo/config1
 +.d..t..... ./
 +cd++++++++ bar/
 +cd++++++++ bar/baz/
 +cd++++++++ foo/
-+hf++++++++ foo/extra => foo/config1
-+cL++++++++ foo/sym -> ../bar/baz/rsync
++hf         foo/extra => foo/config1
  EOT
  diff $diffopt "$chkfile" "$outfile" || test_fail "test 9 failed"
  
+@@ -196,15 +196,15 @@ $RSYNC -ivvplrtH --link-dest="$lddir" "$
+     | tee "$outfile"
+ filter_outfile
+ cat <<EOT >"$chkfile"
+-.d..t.... ./
+-cd+++++++ bar/
+-cd+++++++ bar/baz/
+-hf        bar/baz/rsync
+-cd+++++++ foo/
+-hf        foo/config1
+-hf        foo/config2
+-hf        foo/extra => foo/config1
+-hL        foo/sym -> ../bar/baz/rsync
++.d..t..... ./
++cd++++++++ bar/
++cd++++++++ bar/baz/
++hf         bar/baz/rsync
++cd++++++++ foo/
++hf         foo/config1
++hf         foo/config2
++hf         foo/extra => foo/config1
++hL         foo/sym -> ../bar/baz/rsync
+ EOT
+ diff $diffopt "$chkfile" "$outfile" || test_fail "test 11 failed"
+@@ -212,10 +212,10 @@ rm -rf "$todir"
+ $RSYNC -iplrtH --link-dest="$lddir" "$fromdir/" "$todir/" \
+     | tee "$outfile"
+ cat <<EOT >"$chkfile"
+-.d..t.... ./
+-cd+++++++ bar/
+-cd+++++++ bar/baz/
+-cd+++++++ foo/
++.d..t..... ./
++cd++++++++ bar/
++cd++++++++ bar/baz/
++cd++++++++ foo/
+ EOT
+ diff $diffopt "$chkfile" "$outfile" || test_fail "test 12 failed"
+@@ -243,14 +243,14 @@ filter_outfile
+ # TODO fix really-old problem when combining -H with --compare-dest:
+ # missing output for foo/extra hard-link (and it might not be updated)!
+ cat <<EOT >"$chkfile"
+-.d..t.... ./
+-cd+++++++ bar/
+-cd+++++++ bar/baz/
+-.f        bar/baz/rsync
+-cd+++++++ foo/
+-.f        foo/config1
+-.f        foo/config2
+-.L        foo/sym -> ../bar/baz/rsync
++.d..t..... ./
++cd++++++++ bar/
++cd++++++++ bar/baz/
++.f         bar/baz/rsync
++cd++++++++ foo/
++.f         foo/config1
++.f         foo/config2
++.L         foo/sym -> ../bar/baz/rsync
+ EOT
+ diff $diffopt "$chkfile" "$outfile" || test_fail "test 14 failed"
+@@ -258,10 +258,10 @@ rm -rf "$todir"
+ $RSYNC -iplrtH --compare-dest="$lddir" "$fromdir/" "$todir/" \
+     | tee "$outfile"
+ cat <<EOT >"$chkfile"
+-.d..t.... ./
+-cd+++++++ bar/
+-cd+++++++ bar/baz/
+-cd+++++++ foo/
++.d..t..... ./
++cd++++++++ bar/
++cd++++++++ bar/baz/
++cd++++++++ foo/
+ EOT
+ diff $diffopt "$chkfile" "$outfile" || test_fail "test 15 failed"
 --- orig/testsuite/rsync.fns   2005-06-10 21:33:28
 +++ testsuite/rsync.fns        2005-07-28 00:41:20
 @@ -50,7 +50,7 @@ printmsg() {
@@ -739,9 +814,9 @@ command before "make":
  
        return 0;
  }
---- orig/util.c        2005-10-16 22:38:40
+--- orig/util.c        2005-11-12 20:13:05
 +++ util.c     2005-07-27 23:37:27
-@@ -129,7 +129,7 @@ void overflow_exit(char *str)
+@@ -130,7 +130,7 @@ void overflow_exit(char *str)
  
  
  
@@ -750,7 +825,7 @@ command before "make":
  {
  #if !defined HAVE_LUTIMES || !defined HAVE_UTIMES
        if (S_ISLNK(mode))
-@@ -137,9 +137,13 @@ int set_modtime(char *fname, time_t modt
+@@ -138,9 +138,13 @@ int set_modtime(char *fname, time_t modt
  #endif
  
        if (verbose > 2) {
@@ -766,7 +841,7 @@ command before "make":
        }
  
        if (dry_run)
-@@ -148,7 +152,7 @@ int set_modtime(char *fname, time_t modt
+@@ -149,7 +153,7 @@ int set_modtime(char *fname, time_t modt
        {
  #ifdef HAVE_UTIMES
                struct timeval t[2];
@@ -775,7 +850,7 @@ command before "make":
                t[0].tv_usec = 0;
                t[1].tv_sec = modtime;
                t[1].tv_usec = 0;
-@@ -159,12 +163,12 @@ int set_modtime(char *fname, time_t modt
+@@ -160,12 +164,12 @@ int set_modtime(char *fname, time_t modt
                return utimes(fname, t);
  #elif defined HAVE_UTIMBUF
                struct utimbuf tbuf;
@@ -790,7 +865,7 @@ command before "make":
                t[1] = modtime;
                return utime(fname,t);
  #else
-@@ -1171,8 +1175,8 @@ int msleep(int t)
+@@ -1229,8 +1233,8 @@ int msleep(int t)
  
  
  /**
@@ -801,7 +876,7 @@ command before "make":
   * --modify-window).
   *
   * @retval 0 if the times should be treated as the same
-@@ -1181,7 +1185,7 @@ int msleep(int t)
+@@ -1239,7 +1243,7 @@ int msleep(int t)
   *
   * @retval -1 if the 2nd is later
   **/
index 0736dfa..3c8108e 100644 (file)
@@ -35,8 +35,8 @@ for a local copy, so the old algorithm is used for local copies.
        }
  
        if (!preserve_perms) {
---- orig/generator.c   2005-11-10 16:58:36
-+++ generator.c        2005-11-10 03:16:39
+--- orig/generator.c   2005-12-15 23:00:49
++++ generator.c        2005-12-15 23:16:48
 @@ -69,6 +69,7 @@ extern int ignore_timeout;
  extern int protocol_version;
  extern int fuzzy_basis;
@@ -45,17 +45,17 @@ for a local copy, so the old algorithm is used for local copies.
  extern int checksum_len;
  extern char *partial_dir;
  extern char *basis_dir[];
-@@ -375,7 +376,8 @@ void itemize(struct file_struct *file, i
+@@ -376,7 +377,8 @@ void itemize(struct file_struct *file, i
  
  
  /* Perform our quick-check heuristic for determining if a file is unchanged. */
--static int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
-+static int unchanged_file(char *fn, int fnamecmp_type, struct file_struct *file,
-+                        STRUCT_STAT *st)
+-int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
++int unchanged_file(char *fn, int fnamecmp_type, struct file_struct *file,
++                 STRUCT_STAT *st)
  {
        if (st->st_size != file->length)
                return 0;
-@@ -384,6 +386,8 @@ static int unchanged_file(char *fn, stru
+@@ -385,6 +387,8 @@ int unchanged_file(char *fn, struct file
           of the file time to determine whether to sync */
        if (always_checksum && S_ISREG(st->st_mode)) {
                char sum[MD4_SUM_LENGTH];
@@ -64,16 +64,16 @@ for a local copy, so the old algorithm is used for local copies.
                file_checksum(fn, sum, st->st_size);
                return memcmp(sum, file->u.sum, checksum_len) == 0;
        }
-@@ -940,7 +944,7 @@ static void recv_generator(char *fname, 
-                               match_level = 1;
-                               /* FALL THROUGH */
-                       case 1:
--                              if (!unchanged_file(fnamecmpbuf, file, &st))
-+                              if (!unchanged_file(fnamecmpbuf, 0, file, &st))
-                                       continue;
-                               best_match = i;
-                               match_level = 2;
-@@ -1068,7 +1072,7 @@ static void recv_generator(char *fname, 
+@@ -622,7 +626,7 @@ static int try_dests_reg(struct file_str
+                       match_level = 1;
+                       /* FALL THROUGH */
+               case 1:
+-                      if (!unchanged_file(cmpbuf, file, stp))
++                      if (!unchanged_file(cmpbuf, 0, file, stp))
+                               continue;
+                       best_match = j;
+                       match_level = 2;
+@@ -1160,7 +1164,7 @@ static void recv_generator(char *fname, 
                ;
        else if (fnamecmp_type == FNAMECMP_FUZZY)
                ;
@@ -82,7 +82,18 @@ for a local copy, so the old algorithm is used for local copies.
                if (partialptr) {
                        do_unlink(partialptr);
                        handle_partial_dir(partialptr, PDIR_DELETE);
---- orig/main.c        2005-11-10 16:58:36
+--- orig/hlink.c       2005-12-15 23:00:49
++++ hlink.c    2005-12-15 23:17:31
+@@ -210,7 +210,7 @@ int hard_link_check(struct file_struct *
+                                                       itemizing = code = 0;
+                                               break;
+                                       }
+-                                      if (!unchanged_file(cmpbuf, file, &st3))
++                                      if (!unchanged_file(cmpbuf, 0, file, &st3))
+                                               continue;
+                                       statret = 1;
+                                       st = &st3;
+--- orig/main.c        2005-12-15 07:55:39
 +++ main.c     2005-11-07 05:00:49
 @@ -45,6 +45,7 @@ extern int copy_links;
  extern int keep_dirlinks;
@@ -103,7 +114,7 @@ for a local copy, so the old algorithm is used for local copies.
  struct file_list *the_file_list;
  
  /* There's probably never more than at most 2 outstanding child processes,
-@@ -633,6 +636,7 @@ static void do_server_recv(int f_in, int
+@@ -659,6 +662,7 @@ static void do_server_recv(int f_in, int
        struct file_list *flist;
        char *local_name = NULL;
        char *dir = NULL;
@@ -111,7 +122,7 @@ for a local copy, so the old algorithm is used for local copies.
        int save_verbose = verbose;
  
        if (filesfrom_fd >= 0) {
-@@ -676,6 +680,10 @@ static void do_server_recv(int f_in, int
+@@ -702,6 +706,10 @@ static void do_server_recv(int f_in, int
                filesfrom_fd = -1;
        }
  
@@ -122,7 +133,7 @@ for a local copy, so the old algorithm is used for local copies.
        flist = recv_file_list(f_in);
        verbose = save_verbose;
        if (!flist) {
-@@ -684,6 +692,9 @@ static void do_server_recv(int f_in, int
+@@ -710,6 +718,9 @@ static void do_server_recv(int f_in, int
        }
        the_file_list = flist;
  
@@ -132,7 +143,7 @@ for a local copy, so the old algorithm is used for local copies.
        if (argc > 0)
                local_name = get_local_name(flist,argv[0]);
  
-@@ -732,6 +743,7 @@ int client_run(int f_in, int f_out, pid_
+@@ -758,6 +769,7 @@ int client_run(int f_in, int f_out, pid_
  {
        struct file_list *flist = NULL;
        int exit_code = 0, exit_code2 = 0;
@@ -140,7 +151,7 @@ for a local copy, so the old algorithm is used for local copies.
        char *local_name = NULL;
  
        cleanup_child_pid = pid;
-@@ -803,11 +815,18 @@ int client_run(int f_in, int f_out, pid_
+@@ -829,11 +841,18 @@ int client_run(int f_in, int f_out, pid_
                filesfrom_fd = -1;
        }
  
@@ -159,7 +170,7 @@ for a local copy, so the old algorithm is used for local copies.
        if (flist && flist->count > 0) {
                local_name = get_local_name(flist, argv[0]);
  
---- orig/rsync.h       2005-10-14 18:45:50
+--- orig/rsync.h       2005-12-15 23:00:49
 +++ rsync.h    2005-09-16 16:41:26
 @@ -64,6 +64,7 @@
  #define FLAG_DEL_HERE (1<<3)  /* receiver/generator */