Fixed failing hunks.
authorWayne Davison <wayned@samba.org>
Fri, 24 Feb 2006 18:03:01 +0000 (18:03 +0000)
committerWayne Davison <wayned@samba.org>
Fri, 24 Feb 2006 18:03:01 +0000 (18:03 +0000)
backup-dir-dels.diff
fsync.diff
threaded-receiver.diff

index aa1f829..842fe6b 100644 (file)
@@ -15,11 +15,9 @@ Marc St-Onge
 
 --- old/backup.c
 +++ new/backup.c
-@@ -22,11 +22,17 @@
+@@ -22,10 +22,15 @@
  
  extern int verbose;
- extern int backup_suffix_len;
-+extern int backup_suffix_dels_len;
  extern int backup_dir_len;
 +extern int backup_dir_dels_len;
  extern unsigned int backup_dir_remainder;
@@ -33,8 +31,8 @@ Marc St-Onge
  
  extern int am_root;
  extern int preserve_devices;
-@@ -36,6 +42,8 @@ extern int preserve_hard_links;
- extern int orig_umask;
+@@ -33,6 +38,8 @@ extern int preserve_specials;
+ extern int preserve_links;
  extern int safe_symlinks;
  
 +static int deleting;
@@ -42,7 +40,7 @@ Marc St-Onge
  /* make a complete pathname for backup file */
  char *get_backup_name(char *fname)
  {
-@@ -53,11 +61,28 @@ char *get_backup_name(char *fname)
+@@ -50,11 +57,28 @@ char *get_backup_name(char *fname)
        return NULL;
  }
  
@@ -72,7 +70,7 @@ Marc St-Onge
  
        if (!fnamebak)
                return 0;
-@@ -97,7 +122,8 @@ path
+@@ -94,7 +118,8 @@ path
  static int make_bak_dir(char *fullpath)
  {
        STRUCT_STAT st;
@@ -82,7 +80,7 @@ Marc St-Onge
        char *end = rel + strlen(rel);
        char *p = end;
  
-@@ -185,7 +211,8 @@ static int keep_backup(char *fname)
+@@ -182,7 +207,8 @@ static int keep_backup(char *fname)
        if (!(file = make_file(fname, NULL, NULL, 0, NO_FILTERS)))
                return 1; /* the file could have disappeared */
  
@@ -92,7 +90,7 @@ Marc St-Onge
                return 0;
  
        /* Check to see if this is a device file, or link */
-@@ -280,3 +307,13 @@ int make_backup(char *fname)
+@@ -277,3 +303,13 @@ int make_backup(char *fname)
                return keep_backup(fname);
        return make_simple_backup(fname);
  }
@@ -108,7 +106,7 @@ Marc St-Onge
 +}
 --- old/generator.c
 +++ new/generator.c
-@@ -91,6 +91,9 @@ extern dev_t filesystem_dev;
+@@ -90,6 +90,9 @@ extern dev_t filesystem_dev;
  extern char *backup_dir;
  extern char *backup_suffix;
  extern int backup_suffix_len;
@@ -118,7 +116,7 @@ Marc St-Onge
  extern struct file_list *the_file_list;
  extern struct filter_list_struct server_filter_list;
  
-@@ -103,10 +106,14 @@ static int can_link_devices = 1;
+@@ -102,10 +105,14 @@ static int can_link_devices = 1;
  #define DEL_TERSE             (1<<3)
  
  
@@ -134,7 +132,7 @@ Marc St-Onge
  }
  
  
-@@ -127,8 +134,8 @@ static int delete_item(char *fname, int 
+@@ -126,8 +133,8 @@ static int delete_item(char *fname, int 
        if (!S_ISDIR(mode)) {
                if (max_delete && ++deletion_count > max_delete)
                        return 0;
@@ -145,7 +143,7 @@ Marc St-Onge
                else
                        ok = robust_unlink(fname) == 0;
                if (ok) {
-@@ -150,9 +157,9 @@ static int delete_item(char *fname, int 
+@@ -149,9 +156,9 @@ static int delete_item(char *fname, int 
            || (dry_run && zap_dir)) {
                ok = 0;
                errno = ENOTEMPTY;
@@ -193,7 +191,7 @@ Marc St-Onge
    rprintf(F," -u, --update                skip files that are newer on the receiver\n");
    rprintf(F,"     --inplace               update destination files in-place (SEE MAN PAGE)\n");
    rprintf(F,"     --append                append data onto shorter files\n");
-@@ -496,7 +504,9 @@ static struct poptOption long_options[] 
+@@ -497,7 +505,9 @@ static struct poptOption long_options[] 
    {"bwlimit",          0,  POPT_ARG_INT,    &bwlimit, 0, 0, 0 },
    {"backup",          'b', POPT_ARG_NONE,   &make_backups, 0, 0, 0 },
    {"backup-dir",       0,  POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
@@ -203,7 +201,7 @@ Marc St-Onge
    {"list-only",        0,  POPT_ARG_VAL,    &list_only, 2, 0, 0 },
    {"read-batch",       0,  POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
    {"write-batch",      0,  POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 },
-@@ -1205,6 +1215,8 @@ int parse_arguments(int *argc, const cha
+@@ -1212,6 +1222,8 @@ int parse_arguments(int *argc, const cha
                        partial_dir = sanitize_path(NULL, partial_dir, NULL, 0);
                if (backup_dir)
                        backup_dir = sanitize_path(NULL, backup_dir, NULL, 0);
@@ -212,7 +210,7 @@ Marc St-Onge
        }
        if (server_filter_list.head && !am_sender) {
                struct filter_list_struct *elp = &server_filter_list;
-@@ -1239,6 +1251,14 @@ int parse_arguments(int *argc, const cha
+@@ -1246,6 +1258,14 @@ int parse_arguments(int *argc, const cha
                                return 0;
                        }
                }
@@ -227,7 +225,7 @@ Marc St-Onge
        }
  
        if (!backup_suffix)
-@@ -1250,6 +1270,16 @@ int parse_arguments(int *argc, const cha
+@@ -1257,6 +1277,16 @@ int parse_arguments(int *argc, const cha
                        backup_suffix);
                return 0;
        }
@@ -244,7 +242,7 @@ Marc St-Onge
        if (backup_dir) {
                backup_dir_len = strlcpy(backup_dir_buf, backup_dir, sizeof backup_dir_buf);
                backup_dir_remainder = sizeof backup_dir_buf - backup_dir_len;
-@@ -1273,6 +1303,31 @@ int parse_arguments(int *argc, const cha
+@@ -1280,6 +1310,31 @@ int parse_arguments(int *argc, const cha
                        "P *%s", backup_suffix);
                parse_rule(&filter_list, backup_dir_buf, 0, 0);
        }
@@ -276,7 +274,7 @@ Marc St-Onge
        if (make_backups && !backup_dir)
                omit_dir_times = 1;
  
-@@ -1614,6 +1669,10 @@ void server_options(char **args,int *arg
+@@ -1624,6 +1679,10 @@ void server_options(char **args,int *arg
                args[ac++] = "--backup-dir";
                args[ac++] = backup_dir;
        }
@@ -287,7 +285,7 @@ Marc St-Onge
  
        /* Only send --suffix if it specifies a non-default value. */
        if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) {
-@@ -1622,7 +1681,13 @@ void server_options(char **args,int *arg
+@@ -1632,7 +1691,13 @@ void server_options(char **args,int *arg
                        goto oom;
                args[ac++] = arg;
        }
index 103964f..e207e1e 100644 (file)
@@ -3,15 +3,15 @@ to be called on every file we write.
 
 --- old/options.c
 +++ new/options.c
-@@ -42,6 +42,7 @@ int whole_file = -1;
- int append_mode = 0;
+@@ -43,6 +43,7 @@ int append_mode = 0;
  int keep_dirlinks = 0;
+ int copy_dirlinks = 0;
  int copy_links = 0;
 +int do_fsync = 0;
  int preserve_links = 0;
  int preserve_hard_links = 0;
  int preserve_perms = 0;
-@@ -327,6 +328,7 @@ void usage(enum logcode F)
+@@ -329,6 +330,7 @@ void usage(enum logcode F)
    rprintf(F,"     --partial-dir=DIR       put a partially transferred file into DIR\n");
    rprintf(F,"     --delay-updates         put all updated files into place at transfer's end\n");
    rprintf(F," -m, --prune-empty-dirs      prune empty directory chains from the file-list\n");
@@ -19,7 +19,7 @@ to be called on every file we write.
    rprintf(F,"     --numeric-ids           don't map uid/gid values by user/group name\n");
    rprintf(F,"     --timeout=TIME          set I/O timeout in seconds\n");
    rprintf(F," -I, --ignore-times          don't skip files that match in size and mod-time\n");
-@@ -500,6 +502,7 @@ static struct poptOption long_options[] 
+@@ -504,6 +506,7 @@ static struct poptOption long_options[] 
    {"only-write-batch", 0,  POPT_ARG_STRING, &batch_name, OPT_ONLY_WRITE_BATCH, 0, 0 },
    {"files-from",       0,  POPT_ARG_STRING, &files_from, 0, 0, 0 },
    {"from0",           '0', POPT_ARG_NONE,   &eol_nulls, 0, 0, 0},
@@ -27,7 +27,7 @@ to be called on every file we write.
    {"numeric-ids",      0,  POPT_ARG_NONE,   &numeric_ids, 0, 0, 0 },
    {"timeout",          0,  POPT_ARG_INT,    &io_timeout, 0, 0, 0 },
    {"rsh",             'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
-@@ -1698,6 +1701,9 @@ void server_options(char **args,int *arg
+@@ -1705,6 +1708,9 @@ void server_options(char **args,int *arg
                args[ac++] = tmpdir;
        }
  
@@ -39,15 +39,15 @@ to be called on every file we write.
                 *   and it may be an older version that doesn't know this
 --- old/receiver.c
 +++ new/receiver.c
-@@ -38,6 +38,7 @@ extern int keep_dirlinks;
+@@ -36,6 +36,7 @@ extern int protocol_version;
+ extern int relative_paths;
  extern int preserve_hard_links;
  extern int preserve_perms;
- extern int io_error;
 +extern int do_fsync;
  extern int basis_dir_cnt;
  extern int make_backups;
  extern int cleanup_got_literal;
-@@ -256,6 +257,12 @@ static int receive_data(int f_in, char *
+@@ -252,6 +253,12 @@ static int receive_data(int f_in, char *
                exit_cleanup(RERR_FILEIO);
        }
  
@@ -80,7 +80,7 @@ to be called on every file we write.
  extern int modify_window;
  extern int relative_paths;
  extern int human_readable;
-@@ -318,6 +319,12 @@ int copy_file(const char *source, const 
+@@ -319,6 +320,12 @@ int copy_file(const char *source, const 
                return -1;
        }
  
index 34f01b0..ea26547 100644 (file)
@@ -87,7 +87,7 @@ After applying this patch, run these commands for a successful build:
  extern int protocol_version;
  extern int fuzzy_basis;
  extern int always_checksum;
-@@ -98,6 +97,11 @@ static int deletion_count = 0; /* used t
+@@ -97,6 +96,11 @@ static int deletion_count = 0; /* used t
  static int can_link_symlinks = 1; /* start out optimistic */
  static int can_link_devices = 1;
  
@@ -99,7 +99,7 @@ After applying this patch, run these commands for a successful build:
  /* For calling delete_file() */
  #define DEL_FORCE_RECURSE     (1<<1) /* recurse even w/o --force */
  #define DEL_TERSE             (1<<3)
-@@ -446,8 +450,8 @@ static void sum_sizes_sqroot(struct sum_
+@@ -445,8 +449,8 @@ static void sum_sizes_sqroot(struct sum_
        }
  
        if (protocol_version < 27) {
@@ -110,7 +110,7 @@ After applying this patch, run these commands for a successful build:
                s2length = SUM_LENGTH;
        } else {
                int32 c;
-@@ -457,7 +461,7 @@ static void sum_sizes_sqroot(struct sum_
+@@ -456,7 +460,7 @@ static void sum_sizes_sqroot(struct sum_
                for (c = blength; c >>= 1 && b; b--) {}
                /* add a bit, subtract rollsum, round up. */
                s2length = (b + 1 - 32 + 7) / 8; /* --optimize in compiler-- */
@@ -119,7 +119,7 @@ After applying this patch, run these commands for a successful build:
                s2length = MIN(s2length, SUM_LENGTH);
        }
  
-@@ -491,7 +495,7 @@ static void generate_and_send_sums(int f
+@@ -490,7 +494,7 @@ static void generate_and_send_sums(int f
        sum_sizes_sqroot(&sum, len);
        write_sum_head(f_out, &sum);
  
@@ -128,7 +128,7 @@ After applying this patch, run these commands for a successful build:
                return;
  
        if (len > 0)
-@@ -510,7 +514,7 @@ static void generate_and_send_sums(int f
+@@ -509,7 +513,7 @@ static void generate_and_send_sums(int f
  
                if (f_copy >= 0) {
                        full_write(f_copy, map, n1);
@@ -137,7 +137,7 @@ After applying this patch, run these commands for a successful build:
                                continue;
                }
  
-@@ -1140,7 +1144,7 @@ static void recv_generator(char *fname, 
+@@ -1152,7 +1156,7 @@ static void recv_generator(char *fname, 
                return;
        }
  
@@ -146,7 +146,7 @@ After applying this patch, run these commands for a successful build:
                return;
  
        if (fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
-@@ -1195,7 +1199,7 @@ static void recv_generator(char *fname, 
+@@ -1207,7 +1211,7 @@ static void recv_generator(char *fname, 
                goto notify_others;
        }
  
@@ -155,7 +155,7 @@ After applying this patch, run these commands for a successful build:
                if (!(backupptr = get_backup_name(fname))) {
                        close(fd);
                        return;
-@@ -1286,7 +1290,10 @@ void generate_files(int f_out, struct fi
+@@ -1298,7 +1302,10 @@ void generate_files(int f_out, struct fi
        int save_ignore_existing = ignore_existing;
        int save_ignore_non_existing = ignore_non_existing;
        int save_do_progress = do_progress;
@@ -167,7 +167,7 @@ After applying this patch, run these commands for a successful build:
  
        if (protocol_version >= 29) {
                itemizing = 1;
-@@ -1315,7 +1322,7 @@ void generate_files(int f_out, struct fi
+@@ -1327,7 +1334,7 @@ void generate_files(int f_out, struct fi
                do_delete_pass(flist);
        do_progress = 0;
  
@@ -176,7 +176,7 @@ After applying this patch, run these commands for a successful build:
                whole_file = 0;
        if (verbose >= 2) {
                rprintf(FINFO, "delta-transmission %s\n",
-@@ -1324,12 +1331,6 @@ void generate_files(int f_out, struct fi
+@@ -1336,12 +1343,6 @@ void generate_files(int f_out, struct fi
                        : "enabled");
        }
  
@@ -189,7 +189,7 @@ After applying this patch, run these commands for a successful build:
        for (i = 0; i < flist->count; i++) {
                struct file_struct *file = flist->files[i];
  
-@@ -1373,23 +1374,34 @@ void generate_files(int f_out, struct fi
+@@ -1385,23 +1386,34 @@ void generate_files(int f_out, struct fi
                delete_in_dir(NULL, NULL, NULL, NULL);
  
        phase++;
@@ -230,7 +230,7 @@ After applying this patch, run these commands for a successful build:
                if (local_name)
                        strlcpy(fbuf, local_name, sizeof fbuf);
                else
-@@ -1401,27 +1413,43 @@ void generate_files(int f_out, struct fi
+@@ -1413,27 +1425,43 @@ void generate_files(int f_out, struct fi
        phase++;
        ignore_non_existing = save_ignore_non_existing;
        ignore_existing = save_ignore_existing;
@@ -283,7 +283,7 @@ After applying this patch, run these commands for a successful build:
        do_progress = save_do_progress;
 --- old/io.c
 +++ new/io.c
-@@ -47,20 +47,17 @@ extern int allowed_lull;
+@@ -46,20 +46,17 @@ extern int allowed_lull;
  extern int am_server;
  extern int am_daemon;
  extern int am_sender;
@@ -304,7 +304,7 @@ After applying this patch, run these commands for a successful build:
  int batch_fd = -1;
  int batch_gen_fd = -1;
  
-@@ -84,7 +81,6 @@ const char *io_read_phase = phase_unknow
+@@ -83,7 +80,6 @@ const char *io_read_phase = phase_unknow
  int kluge_around_eof = 0;
  
  int msg_fd_in = -1;
@@ -312,7 +312,7 @@ After applying this patch, run these commands for a successful build:
  int sock_f_in = -1;
  int sock_f_out = -1;
  
-@@ -111,27 +107,32 @@ static OFF_T active_bytecnt = 0;
+@@ -110,27 +106,32 @@ static OFF_T active_bytecnt = 0;
  static void read_loop(int fd, char *buf, size_t len);
  
  struct flist_ndx_item {
@@ -351,7 +351,7 @@ After applying this patch, run these commands for a successful build:
  
  static void flist_ndx_push(struct flist_ndx_list *lp, int ndx)
  {
-@@ -141,27 +142,31 @@ static void flist_ndx_push(struct flist_
+@@ -140,27 +141,31 @@ static void flist_ndx_push(struct flist_
                out_of_memory("flist_ndx_push");
        item->next = NULL;
        item->ndx = ndx;
@@ -389,7 +389,7 @@ After applying this patch, run these commands for a successful build:
  
        return ndx;
  }
-@@ -170,7 +175,7 @@ static void check_timeout(void)
+@@ -169,7 +174,7 @@ static void check_timeout(void)
  {
        time_t t;
  
@@ -398,7 +398,7 @@ After applying this patch, run these commands for a successful build:
                return;
  
        if (!last_io_in) {
-@@ -211,45 +216,40 @@ void set_io_timeout(int secs)
+@@ -210,45 +215,40 @@ void set_io_timeout(int secs)
  
  /* Setup the fd used to receive MSG_* messages.  Only needed during the
   * early stages of being a local sender (up through the sending of the
@@ -456,7 +456,7 @@ After applying this patch, run these commands for a successful build:
  static void read_msg_fd(void)
  {
        char buf[2048];
-@@ -268,51 +268,6 @@ static void read_msg_fd(void)
+@@ -267,51 +267,6 @@ static void read_msg_fd(void)
        tag = (tag >> 24) - MPLEX_BASE;
  
        switch (tag) {
@@ -508,7 +508,7 @@ After applying this patch, run these commands for a successful build:
        case MSG_INFO:
        case MSG_ERROR:
        case MSG_LOG:
-@@ -355,71 +310,75 @@ void decrement_active_files(int ndx)
+@@ -354,71 +309,75 @@ void decrement_active_files(int ndx)
        active_bytecnt -= the_file_list->files[ndx]->length;
  }
  
@@ -628,7 +628,7 @@ After applying this patch, run these commands for a successful build:
        return flist_ndx_pop(&hlink_list);
  }
  
-@@ -499,11 +458,6 @@ static int read_timeout(int fd, char *bu
+@@ -498,11 +457,6 @@ static int read_timeout(int fd, char *bu
                FD_ZERO(&r_fds);
                FD_ZERO(&w_fds);
                FD_SET(fd, &r_fds);
@@ -640,7 +640,7 @@ After applying this patch, run these commands for a successful build:
                if (io_filesfrom_f_out >= 0) {
                        int new_fd;
                        if (io_filesfrom_buflen == 0) {
-@@ -536,9 +490,6 @@ static int read_timeout(int fd, char *bu
+@@ -535,9 +489,6 @@ static int read_timeout(int fd, char *bu
                        continue;
                }
  
@@ -650,7 +650,7 @@ After applying this patch, run these commands for a successful build:
                if (io_filesfrom_f_out >= 0) {
                        if (io_filesfrom_buflen) {
                                if (FD_ISSET(io_filesfrom_f_out, &w_fds)) {
-@@ -860,6 +811,8 @@ static void readfd(int fd, char *buffer,
+@@ -859,6 +810,8 @@ static void readfd(int fd, char *buffer,
        }
  
        if (fd == write_batch_monitor_in) {
@@ -659,7 +659,7 @@ After applying this patch, run these commands for a successful build:
                if ((size_t)write(batch_fd, buffer, total) != total)
                        exit_cleanup(RERR_FILEIO);
        }
-@@ -1115,7 +1068,6 @@ static void writefd_unbuffered(int fd,ch
+@@ -1114,7 +1067,6 @@ static void writefd_unbuffered(int fd,ch
                         * to grab any messages they sent before they died. */
                        while (fd == sock_f_out && io_multiplexing_in) {
                                set_io_timeout(30);
@@ -667,7 +667,7 @@ After applying this patch, run these commands for a successful build:
                                readfd_unbuffered(sock_f_in, io_filesfrom_buf,
                                                  sizeof io_filesfrom_buf);
                        }
-@@ -1125,7 +1077,7 @@ static void writefd_unbuffered(int fd,ch
+@@ -1124,7 +1076,7 @@ static void writefd_unbuffered(int fd,ch
                total += cnt;
  
                if (fd == sock_f_out) {
@@ -676,7 +676,7 @@ After applying this patch, run these commands for a successful build:
                                last_io_out = time(NULL);
                        sleep_for_bwlimit(cnt);
                }
-@@ -1149,7 +1101,7 @@ static void mplex_write(enum msgcode cod
+@@ -1148,7 +1100,7 @@ static void mplex_write(enum msgcode cod
         * cause output to occur down the socket.  Setting contiguous_write_len
         * prevents the reading of msg_fd_in once we actually start to write
         * this sequence of data (though we might read it before the start). */
@@ -685,7 +685,7 @@ After applying this patch, run these commands for a successful build:
                contiguous_write_len = len + 4;
  
        if (n > sizeof buffer - 4)
-@@ -1165,31 +1117,29 @@ static void mplex_write(enum msgcode cod
+@@ -1164,31 +1116,29 @@ static void mplex_write(enum msgcode cod
        if (len)
                writefd_unbuffered(sock_f_out, buf, len);
  
@@ -729,7 +729,7 @@ After applying this patch, run these commands for a successful build:
        if (fd == sock_f_out)
                stats.total_written += len;
  
-@@ -1402,9 +1352,3 @@ void start_write_batch(int fd)
+@@ -1401,9 +1351,3 @@ void start_write_batch(int fd)
        else
                write_batch_monitor_in = fd;
  }
@@ -749,7 +749,7 @@ After applying this patch, run these commands for a successful build:
  extern int allow_8bit_chars;
  extern int protocol_version;
  extern int preserve_times;
-@@ -75,7 +74,6 @@ struct {
+@@ -76,7 +75,6 @@ struct {
        { RERR_IPC        , "error in IPC code" },
        { RERR_CRASHED    , "sibling process crashed" },
        { RERR_TERMINATED , "sibling process terminated abnormally" },
@@ -778,7 +778,7 @@ After applying this patch, run these commands for a successful build:
  extern int am_daemon;
  extern int blocking_io;
  extern int remove_sent_files;
-@@ -84,9 +83,20 @@ struct pid_status {
+@@ -85,9 +84,20 @@ struct pid_status {
  
  static time_t starttime, endtime;
  static int64 total_read, total_written;
@@ -799,7 +799,7 @@ After applying this patch, run these commands for a successful build:
  /* Works like waitpid(), but if we already harvested the child pid in our
   * remember_children(), we succeed instead of returning an error. */
  pid_t wait_process(pid_t pid, int *status_ptr, int flags)
-@@ -163,7 +173,7 @@ static void handle_stats(int f)
+@@ -164,7 +174,7 @@ static void handle_stats(int f)
                show_flist_stats();
        }
  
@@ -808,7 +808,7 @@ After applying this patch, run these commands for a successful build:
                return;
  
        if (am_daemon) {
-@@ -618,12 +628,30 @@ static void do_server_sender(int f_in, i
+@@ -617,12 +627,30 @@ static void do_server_sender(int f_in, i
        exit_cleanup(0);
  }
  
@@ -842,7 +842,7 @@ After applying this patch, run these commands for a successful build:
  
        /* The receiving side mustn't obey this, or an existing symlink that
         * points to an identical file won't be replaced by the referent. */
-@@ -632,70 +660,16 @@ static int do_recv(int f_in,int f_out,st
+@@ -631,70 +659,16 @@ static int do_recv(int f_in,int f_out,st
        if (preserve_hard_links)
                init_hard_links();
  
@@ -918,7 +918,7 @@ After applying this patch, run these commands for a successful build:
        generate_files(f_out, flist, local_name);
  
        handle_stats(-1);
-@@ -706,10 +680,13 @@ static int do_recv(int f_in,int f_out,st
+@@ -705,10 +679,13 @@ static int do_recv(int f_in,int f_out,st
        }
        io_flush(FULL_FLUSH);
  
@@ -936,7 +936,7 @@ After applying this patch, run these commands for a successful build:
  }
  
  
-@@ -1077,22 +1054,6 @@ static int start_client(int argc, char *
+@@ -1078,22 +1055,6 @@ static int start_client(int argc, char *
        return ret;
  }
  
@@ -959,7 +959,7 @@ After applying this patch, run these commands for a successful build:
  RETSIGTYPE remember_children(UNUSED(int val))
  {
  #ifdef WNOHANG
-@@ -1184,8 +1145,6 @@ int main(int argc,char *argv[])
+@@ -1185,8 +1146,6 @@ int main(int argc,char *argv[])
  # endif
        sigact.sa_flags = SA_NOCLDSTOP;
  #endif
@@ -970,16 +970,16 @@ After applying this patch, run these commands for a successful build:
        SIGACTMASK(SIGSEGV, rsync_panic_handler);
 --- old/match.c
 +++ new/match.c
-@@ -21,7 +21,7 @@
+@@ -20,7 +20,7 @@
+ #include "rsync.h"
  
  extern int verbose;
- extern int am_server;
 -extern int do_progress;
 +extern int recv_progress;
  extern int checksum_seed;
  extern int append_mode;
  
-@@ -133,7 +133,7 @@ static void matched(int f, struct sum_st
+@@ -132,7 +132,7 @@ static void matched(int f, struct sum_st
        else
                last_match = offset;
  
@@ -988,7 +988,7 @@ After applying this patch, run these commands for a successful build:
                show_progress(last_match, buf->file_size);
  }
  
-@@ -333,7 +333,7 @@ void match_sums(int f, struct sum_struct
+@@ -332,7 +332,7 @@ void match_sums(int f, struct sum_struct
        if (append_mode) {
                OFF_T j = 0;
                for (j = CHUNK_SIZE; j < s->flength; j += CHUNK_SIZE) {
@@ -997,7 +997,7 @@ After applying this patch, run these commands for a successful build:
                                show_progress(last_match, buf->file_size);
                        sum_update(map_ptr(buf, last_match, CHUNK_SIZE),
                                   CHUNK_SIZE);
-@@ -341,7 +341,7 @@ void match_sums(int f, struct sum_struct
+@@ -340,7 +340,7 @@ void match_sums(int f, struct sum_struct
                }
                if (last_match < s->flength) {
                        int32 len = s->flength - last_match;
@@ -1008,14 +1008,14 @@ After applying this patch, run these commands for a successful build:
                        last_match = s->flength;
 --- old/options.c
 +++ new/options.c
-@@ -73,7 +73,6 @@ int def_compress_level = Z_DEFAULT_COMPR
+@@ -74,7 +74,6 @@ int def_compress_level = Z_DEFAULT_COMPR
  int am_root = 0;
  int am_server = 0;
  int am_sender = 0;
 -int am_generator = 0;
  int am_starting_up = 1;
- int orig_umask = 0;
  int relative_paths = -1;
+ int implied_dirs = 1;
 @@ -95,6 +94,7 @@ int am_daemon = 0;
  int daemon_over_rsh = 0;
  int do_stats = 0;
@@ -1024,7 +1024,7 @@ After applying this patch, run these commands for a successful build:
  int keep_partial = 0;
  int safe_symlinks = 0;
  int copy_unsafe_links = 0;
-@@ -1296,6 +1296,7 @@ int parse_arguments(int *argc, const cha
+@@ -1299,6 +1299,7 @@ int parse_arguments(int *argc, const cha
  
        if (do_progress && !verbose && !log_before_transfer && !am_server)
                verbose = 1;
@@ -1063,7 +1063,7 @@ After applying this patch, run these commands for a successful build:
  extern int log_before_transfer;
  extern int log_format_has_i;
  extern int daemon_log_format_has_i;
-@@ -158,7 +158,7 @@ static int receive_data(int f_in, char *
+@@ -153,7 +153,7 @@ static int receive_data(int f_in, char *
                if (sum.remainder)
                        sum.flength -= sum.blength - sum.remainder;
                for (j = CHUNK_SIZE; j < sum.flength; j += CHUNK_SIZE) {
@@ -1072,7 +1072,7 @@ After applying this patch, run these commands for a successful build:
                                show_progress(offset, total_size);
                        sum_update(map_ptr(mapbuf, offset, CHUNK_SIZE),
                                   CHUNK_SIZE);
-@@ -166,7 +166,7 @@ static int receive_data(int f_in, char *
+@@ -161,7 +161,7 @@ static int receive_data(int f_in, char *
                }
                if (offset < sum.flength) {
                        int32 len = sum.flength - offset;
@@ -1081,7 +1081,7 @@ After applying this patch, run these commands for a successful build:
                                show_progress(offset, total_size);
                        sum_update(map_ptr(mapbuf, offset, len), len);
                        offset = sum.flength;
-@@ -179,7 +179,7 @@ static int receive_data(int f_in, char *
+@@ -174,7 +174,7 @@ static int receive_data(int f_in, char *
        }
  
        while ((i = recv_token(f_in, &data)) != 0) {
@@ -1090,7 +1090,7 @@ After applying this patch, run these commands for a successful build:
                        show_progress(offset, total_size);
  
                if (i > 0) {
-@@ -247,7 +247,7 @@ static int receive_data(int f_in, char *
+@@ -242,7 +242,7 @@ static int receive_data(int f_in, char *
                ftruncate(fd, offset);
  #endif
  
@@ -1099,7 +1099,7 @@ After applying this patch, run these commands for a successful build:
                end_progress(total_size);
  
        if (fd != -1 && offset > 0 && sparse_end(fd) != 0) {
-@@ -298,12 +298,12 @@ static void handle_delayed_updates(struc
+@@ -293,12 +293,12 @@ static void handle_delayed_updates(struc
                                        "rename failed for %s (from %s)",
                                        full_fname(fname), partialptr);
                        } else {
@@ -1115,7 +1115,7 @@ After applying this patch, run these commands for a successful build:
                                handle_partial_dir(partialptr, PDIR_DELETE);
                        }
                }
-@@ -354,11 +354,6 @@ int recv_files(int f_in, struct file_lis
+@@ -349,11 +349,6 @@ int recv_files(int f_in, struct file_lis
        if (verbose > 2)
                rprintf(FINFO,"recv_files(%d) starting\n",flist->count);
  
@@ -1127,7 +1127,7 @@ After applying this patch, run these commands for a successful build:
        if (delay_updates)
                delayed_bits = bitbag_create(flist->count);
  
-@@ -379,7 +374,7 @@ int recv_files(int f_in, struct file_lis
+@@ -374,7 +369,7 @@ int recv_files(int f_in, struct file_lis
                                rprintf(FINFO, "recv_files phase=%d\n", phase);
                        if (phase == 2 && delay_updates)
                                handle_delayed_updates(flist, local_name);
@@ -1136,7 +1136,7 @@ After applying this patch, run these commands for a successful build:
                        if (keep_partial && !partial_dir)
                                make_backups = 0; /* prevents double backup */
                        if (append_mode) {
-@@ -601,7 +596,7 @@ int recv_files(int f_in, struct file_lis
+@@ -596,7 +591,7 @@ int recv_files(int f_in, struct file_lis
                /* log the transfer */
                if (log_before_transfer)
                        log_item(file, &initial_stats, iflags, NULL);
@@ -1145,7 +1145,7 @@ After applying this patch, run these commands for a successful build:
                        rprintf(FINFO, "%s\n", fname);
  
                /* recv file data */
-@@ -644,11 +639,13 @@ int recv_files(int f_in, struct file_lis
+@@ -639,11 +634,13 @@ int recv_files(int f_in, struct file_lis
                cleanup_disable();
  
                if (recv_ok > 0) {
@@ -1161,7 +1161,7 @@ After applying this patch, run these commands for a successful build:
                } else if (!recv_ok) {
                        int msgtype = phase || read_batch ? FERROR : FINFO;
                        if (msgtype == FERROR || verbose) {
-@@ -671,8 +668,8 @@ int recv_files(int f_in, struct file_lis
+@@ -666,8 +663,8 @@ int recv_files(int f_in, struct file_lis
                                        errstr, fname, keptstr, redostr);
                        }
                        if (!phase) {
@@ -1174,7 +1174,7 @@ After applying this patch, run these commands for a successful build:
        }
 --- old/rsync.c
 +++ new/rsync.c
-@@ -41,7 +41,6 @@ extern int orig_umask;
+@@ -40,7 +40,6 @@ extern int omit_dir_times;
  extern int am_root;
  extern int am_server;
  extern int am_sender;
@@ -1212,7 +1212,7 @@ After applying this patch, run these commands for a successful build:
  
 --- old/util.c
 +++ new/util.c
-@@ -404,49 +404,6 @@ int robust_rename(char *from, char *to, 
+@@ -420,49 +420,6 @@ int robust_rename(char *from, char *to, 
        return -1;
  }