Fixed failing hunks.
authorWayne Davison <wayned@samba.org>
Fri, 24 Feb 2006 02:03:21 +0000 (02:03 +0000)
committerWayne Davison <wayned@samba.org>
Fri, 24 Feb 2006 02:03:21 +0000 (02:03 +0000)
atimes.diff
early-checksum.diff
fsync.diff
id-pair.diff
link-by-hash.diff
openssl-support.diff

index e06e720..bd4d44f 100644 (file)
@@ -197,7 +197,7 @@ After applying this patch, run these commands for a successful build:
  
 --- old/generator.c
 +++ new/generator.c
-@@ -44,6 +44,7 @@ extern int preserve_perms;
+@@ -45,6 +45,7 @@ extern int preserve_perms;
  extern int preserve_uid;
  extern int preserve_gid;
  extern int preserve_times;
@@ -282,7 +282,7 @@ After applying this patch, run these commands for a successful build:
                        if (preserve_hard_links && file->link_u.links)
                                hard_link_cluster(file, ndx, itemizing, code);
                } else if (itemizing)
-@@ -894,7 +901,7 @@ static void recv_generator(char *fname, 
+@@ -906,7 +913,7 @@ static void recv_generator(char *fname, 
                    && verbose && code && f_out != -1)
                        rprintf(code, "%s/\n", fname);
                if (delete_during && f_out != -1 && !phase && dry_run < 2
@@ -291,8 +291,8 @@ After applying this patch, run these commands for a successful build:
                        delete_in_dir(the_file_list, fname, file, &st);
                return;
        }
-@@ -1176,7 +1183,7 @@ static void recv_generator(char *fname, 
-       if (fuzzy_basis) {
+@@ -1188,7 +1195,7 @@ static void recv_generator(char *fname, 
+       if (fuzzy_dirlist) {
                int j = flist_find(fuzzy_dirlist, file);
                if (j >= 0) /* don't use changing file as future fuzzy basis */
 -                      fuzzy_dirlist->files[j]->flags |= FLAG_NO_FUZZY;
@@ -381,7 +381,7 @@ After applying this patch, run these commands for a successful build:
  int update_only = 0;
  int cvs_exclude = 0;
  int dry_run = 0;
-@@ -300,8 +301,9 @@ void usage(enum logcode F)
+@@ -299,8 +300,9 @@ void usage(enum logcode F)
    rprintf(F,"     --devices               preserve device files (super-user only)\n");
    rprintf(F,"     --specials              preserve special files\n");
    rprintf(F," -D                          same as --devices --specials\n");
@@ -393,7 +393,7 @@ After applying this patch, run these commands for a successful build:
    rprintf(F,"     --super                 receiver attempts super-user activities\n");
    rprintf(F," -S, --sparse                handle sparse files efficiently\n");
    rprintf(F," -n, --dry-run               show what would have been transferred\n");
-@@ -412,6 +414,9 @@ static struct poptOption long_options[] 
+@@ -411,6 +413,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 },
@@ -414,15 +414,15 @@ After applying this patch, run these commands for a successful build:
        else if (preserve_executability && am_sender)
 --- old/rsync.c
 +++ new/rsync.c
-@@ -37,6 +37,7 @@ extern int preserve_perms;
+@@ -35,6 +35,7 @@ extern int dry_run;
+ extern int daemon_log_format_has_i;
+ extern int preserve_perms;
  extern int preserve_executability;
++extern int preserve_atimes;
  extern int preserve_times;
  extern int omit_dir_times;
-+extern int preserve_atimes;
- extern int orig_umask;
  extern int am_root;
- extern int am_server;
-@@ -125,6 +126,7 @@ int set_file_attrs(char *fname, struct f
+@@ -128,6 +129,7 @@ int set_file_attrs(char *fname, struct f
        int updated = 0;
        STRUCT_STAT st2;
        int change_uid, change_gid;
@@ -430,7 +430,7 @@ After applying this patch, run these commands for a successful build:
  
        if (!st) {
                if (dry_run)
-@@ -143,18 +145,33 @@ int set_file_attrs(char *fname, struct f
+@@ -146,18 +148,33 @@ int set_file_attrs(char *fname, struct f
                }
        }
  
@@ -509,7 +509,7 @@ After applying this patch, run these commands for a successful build:
   * by doubling until FLIST_LINEAR then grow by FLIST_LINEAR
 --- old/rsync.yo
 +++ new/rsync.yo
-@@ -323,8 +323,9 @@ to the detailed description below for a 
+@@ -325,8 +325,9 @@ to the detailed description below for a 
       --devices               preserve device files (super-user only)
       --specials              preserve special files
   -D                          same as --devices --specials
@@ -521,7 +521,7 @@ After applying this patch, run these commands for a successful build:
       --super                 receiver attempts super-user activities
   -S, --sparse                handle sparse files efficiently
   -n, --dry-run               show what would have been transferred
-@@ -800,6 +801,12 @@ it is preserving modification times (see
+@@ -814,6 +815,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).
  
@@ -534,7 +534,7 @@ After applying this patch, run these commands for a successful build:
  dit(bf(--super)) This tells the receiving side to attempt super-user
  activities even if the receiving rsync wasn't run by the super-user.  These
  activities include: preserving users via the bf(--owner) option, preserving
-@@ -1308,7 +1315,7 @@ with older versions of rsync, but that a
+@@ -1322,7 +1329,7 @@ with older versions of rsync, but that a
  verbose messages).
  
  The "%i" escape has a cryptic output that is 9 letters long.  The general
@@ -543,7 +543,7 @@ After applying this patch, run these commands for a successful build:
  type 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.
-@@ -1348,7 +1355,7 @@ quote(itemize(
+@@ -1362,7 +1369,7 @@ 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)
@@ -552,7 +552,7 @@ After applying this patch, run these commands for a successful build:
    anytime a symlink is transferred, or when a file or device is transferred
    without bf(--times).
    it() A bf(p) means the permissions are different and are being updated to
-@@ -1357,7 +1364,10 @@ quote(itemize(
+@@ -1371,7 +1378,10 @@ quote(itemize(
    sender's value (requires bf(--owner) and super-user privileges).
    it() A bf(g) means the group is different and is being updated to the
    sender's value (requires bf(--group) and the authority to set the group).
@@ -790,7 +790,7 @@ After applying this patch, run these commands for a successful build:
  }
 --- old/util.c
 +++ new/util.c
-@@ -125,7 +125,7 @@ void overflow_exit(char *str)
+@@ -126,7 +126,7 @@ void overflow_exit(char *str)
        exit_cleanup(RERR_MALLOC);
  }
  
@@ -799,7 +799,7 @@ After applying this patch, run these commands for a successful build:
  {
  #if !defined HAVE_LUTIMES || !defined HAVE_UTIMES
        if (S_ISLNK(mode))
-@@ -133,9 +133,13 @@ int set_modtime(char *fname, time_t modt
+@@ -134,9 +134,13 @@ int set_modtime(char *fname, time_t modt
  #endif
  
        if (verbose > 2) {
@@ -815,7 +815,7 @@ After applying this patch, run these commands for a successful build:
        }
  
        if (dry_run)
-@@ -144,7 +148,7 @@ int set_modtime(char *fname, time_t modt
+@@ -145,7 +149,7 @@ int set_modtime(char *fname, time_t modt
        {
  #ifdef HAVE_UTIMES
                struct timeval t[2];
@@ -824,7 +824,7 @@ After applying this patch, run these commands for a successful build:
                t[0].tv_usec = 0;
                t[1].tv_sec = modtime;
                t[1].tv_usec = 0;
-@@ -155,12 +159,12 @@ int set_modtime(char *fname, time_t modt
+@@ -156,12 +160,12 @@ int set_modtime(char *fname, time_t modt
                return utimes(fname, t);
  #elif defined HAVE_UTIMBUF
                struct utimbuf tbuf;
index 0f66edc..f64037d 100644 (file)
@@ -37,7 +37,7 @@ for a local copy, so the old algorithm is used for local copies.
        return file;
 --- old/generator.c
 +++ new/generator.c
-@@ -71,6 +71,7 @@ extern int ignore_timeout;
+@@ -72,6 +72,7 @@ extern int ignore_timeout;
  extern int protocol_version;
  extern int fuzzy_basis;
  extern int always_checksum;
@@ -73,7 +73,7 @@ for a local copy, so the old algorithm is used for local copies.
                                continue;
                        best_match = j;
                        match_level = 2;
-@@ -1147,7 +1151,7 @@ static void recv_generator(char *fname, 
+@@ -1159,7 +1163,7 @@ static void recv_generator(char *fname, 
                ;
        else if (fnamecmp_type == FNAMECMP_FUZZY)
                ;
@@ -95,7 +95,7 @@ for a local copy, so the old algorithm is used for local copies.
                                        st = &st3;
 --- old/main.c
 +++ new/main.c
-@@ -45,6 +45,7 @@ extern int copy_links;
+@@ -44,6 +44,7 @@ extern int copy_links;
  extern int keep_dirlinks;
  extern int preserve_hard_links;
  extern int protocol_version;
@@ -103,18 +103,17 @@ for a local copy, so the old algorithm is used for local copies.
  extern int recurse;
  extern int relative_paths;
  extern int rsync_port;
-@@ -60,8 +61,10 @@ extern char *filesfrom_host;
+@@ -59,7 +60,9 @@ extern char *filesfrom_host;
  extern char *rsync_path;
  extern char *shell_cmd;
  extern char *batch_name;
 +extern char curr_dir[MAXPATHLEN];
  
- int local_server = 0;
 +int pre_checksum = 0;
+ int local_server = 0;
+ mode_t orig_umask = 0;
  struct file_list *the_file_list;
- /* There's probably never more than at most 2 outstanding child processes,
-@@ -719,6 +722,7 @@ static void do_server_recv(int f_in, int
+@@ -717,6 +720,7 @@ static void do_server_recv(int f_in, int
        struct file_list *flist;
        char *local_name = NULL;
        char *dir = NULL;
@@ -122,7 +121,7 @@ for a local copy, so the old algorithm is used for local copies.
        int save_verbose = verbose;
  
        if (filesfrom_fd >= 0) {
-@@ -762,6 +766,10 @@ static void do_server_recv(int f_in, int
+@@ -760,6 +764,10 @@ static void do_server_recv(int f_in, int
                filesfrom_fd = -1;
        }
  
@@ -133,7 +132,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) {
-@@ -770,6 +778,9 @@ static void do_server_recv(int f_in, int
+@@ -768,6 +776,9 @@ static void do_server_recv(int f_in, int
        }
        the_file_list = flist;
  
@@ -143,7 +142,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]);
  
-@@ -821,6 +832,7 @@ int client_run(int f_in, int f_out, pid_
+@@ -819,6 +830,7 @@ int client_run(int f_in, int f_out, pid_
  {
        struct file_list *flist = NULL;
        int exit_code = 0, exit_code2 = 0;
@@ -151,7 +150,7 @@ for a local copy, so the old algorithm is used for local copies.
        char *local_name = NULL;
  
        cleanup_child_pid = pid;
-@@ -895,11 +907,18 @@ int client_run(int f_in, int f_out, pid_
+@@ -893,11 +905,18 @@ int client_run(int f_in, int f_out, pid_
                filesfrom_fd = -1;
        }
  
index 8e0ae97..103964f 100644 (file)
@@ -11,7 +11,7 @@ to be called on every file we write.
  int preserve_links = 0;
  int preserve_hard_links = 0;
  int preserve_perms = 0;
-@@ -328,6 +329,7 @@ void usage(enum logcode F)
+@@ -327,6 +328,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");
-@@ -503,6 +505,7 @@ static struct poptOption long_options[] 
+@@ -500,6 +502,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 },
-@@ -1696,6 +1699,9 @@ void server_options(char **args,int *arg
+@@ -1698,6 +1701,9 @@ void server_options(char **args,int *arg
                args[ac++] = tmpdir;
        }
  
@@ -47,7 +47,7 @@ to be called on every file we write.
  extern int basis_dir_cnt;
  extern int make_backups;
  extern int cleanup_got_literal;
-@@ -257,6 +258,12 @@ static int receive_data(int f_in, char *
+@@ -256,6 +257,12 @@ static int receive_data(int f_in, char *
                exit_cleanup(RERR_FILEIO);
        }
  
@@ -62,14 +62,14 @@ to be called on every file we write.
        if (mapbuf)
 --- old/t_stub.c
 +++ new/t_stub.c
-@@ -30,6 +30,7 @@ int modify_window = 0;
+@@ -26,6 +26,7 @@
+  * functions, so that module test harnesses can run standalone.
+  **/
++int do_fsync = 0;
+ int modify_window = 0;
  int module_id = -1;
  int relative_paths = 0;
- int human_readable = 0;
-+int do_fsync;
- char *partial_dir;
- struct filter_list_struct server_filter_list;
 --- old/util.c
 +++ new/util.c
 @@ -30,6 +30,7 @@
@@ -80,7 +80,7 @@ to be called on every file we write.
  extern int modify_window;
  extern int relative_paths;
  extern int human_readable;
-@@ -303,6 +304,12 @@ int copy_file(const char *source, const 
+@@ -318,6 +319,12 @@ int copy_file(const char *source, const 
                return -1;
        }
  
index 1e3d67b..4caf5fd 100644 (file)
@@ -148,14 +148,14 @@ gets to be really large.
                iflags |= ITEM_IS_NEW;
 --- old/log.c
 +++ new/log.c
-@@ -45,6 +45,7 @@ extern int preserve_times;
- extern int log_format_has_i;
- extern int log_format_has_o_or_i;
- extern int daemon_log_format_has_o_or_i;
-+extern struct id_pair *id_pairs;
+@@ -48,6 +48,7 @@ extern int daemon_log_format_has_o_or_i;
+ extern mode_t orig_umask;
  extern char *auth_user;
  extern char *log_format;
++extern struct id_pair *id_pairs;
  #if defined HAVE_ICONV_OPEN && defined HAVE_ICONV_H
+ extern iconv_t ic_chck;
+ #endif
 @@ -480,16 +481,16 @@ static void log_formatted(enum logcode c
                case 'U':
                        strlcat(fmt, "ld", sizeof fmt);
@@ -178,9 +178,9 @@ gets to be really large.
                        break;
 --- old/rsync.c
 +++ new/rsync.c
-@@ -50,6 +50,7 @@ extern int inplace;
- extern int keep_dirlinks;
+@@ -50,6 +50,7 @@ extern int keep_dirlinks;
  extern int make_backups;
+ extern mode_t orig_umask;
  extern struct stats stats;
 +extern struct id_pair *id_pairs;
  extern struct chmod_mode_struct *daemon_chmod_modes;
index fc2f8f9..9690fab 100644 (file)
@@ -367,7 +367,7 @@ the file's name.
 +#endif
 --- old/options.c
 +++ new/options.c
-@@ -145,6 +145,7 @@ char *backup_suffix = NULL;
+@@ -144,6 +144,7 @@ char *backup_suffix = NULL;
  char *tmpdir = NULL;
  char *partial_dir = NULL;
  char *basis_dir[MAX_BASIS_DIRS+1];
@@ -375,7 +375,7 @@ the file's name.
  char *config_file = NULL;
  char *shell_cmd = NULL;
  char *log_format = NULL;
-@@ -338,6 +339,7 @@ void usage(enum logcode F)
+@@ -337,6 +338,7 @@ void usage(enum logcode F)
    rprintf(F,"     --compare-dest=DIR      also compare destination files relative to DIR\n");
    rprintf(F,"     --copy-dest=DIR         ... and include copies of unchanged files\n");
    rprintf(F,"     --link-dest=DIR         hardlink to files in DIR when unchanged\n");
@@ -383,7 +383,7 @@ the file's name.
    rprintf(F," -z, --compress              compress file data during the transfer\n");
    rprintf(F,"     --compress-level=NUM    explicitly set compression level\n");
    rprintf(F," -C, --cvs-exclude           auto-ignore files the same way CVS does\n");
-@@ -384,7 +386,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
+@@ -383,7 +385,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
        OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP,
        OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
        OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
@@ -392,7 +392,7 @@ the file's name.
        OPT_SERVER, OPT_REFUSED_BASE = 9000};
  
  static struct poptOption long_options[] = {
-@@ -478,6 +480,7 @@ static struct poptOption long_options[] 
+@@ -477,6 +479,7 @@ static struct poptOption long_options[] 
    {"compare-dest",     0,  POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
    {"copy-dest",        0,  POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
    {"link-dest",        0,  POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
@@ -400,7 +400,7 @@ the file's name.
    {"fuzzy",           'y', POPT_ARG_NONE,   &fuzzy_basis, 0, 0, 0 },
    {"compress",        'z', POPT_ARG_NONE,   0, 'z', 0, 0 },
    {"compress-level",   0,  POPT_ARG_INT,    &def_compress_level, 'z', 0, 0 },
-@@ -1063,6 +1066,21 @@ int parse_arguments(int *argc, const cha
+@@ -1062,6 +1065,21 @@ int parse_arguments(int *argc, const cha
                        usage(FINFO);
                        exit_cleanup(0);
  
@@ -422,7 +422,7 @@ the file's name.
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1711,6 +1729,11 @@ void server_options(char **args,int *arg
+@@ -1710,6 +1728,11 @@ void server_options(char **args,int *arg
                }
        }
  
@@ -436,7 +436,7 @@ the file's name.
                        args[ac++] = "--files-from";
 --- old/receiver.c
 +++ new/receiver.c
-@@ -54,6 +54,7 @@ extern int delay_updates;
+@@ -53,6 +53,7 @@ extern int delay_updates;
  extern struct stats stats;
  extern char *log_format;
  extern char *tmpdir;
@@ -444,7 +444,7 @@ the file's name.
  extern char *partial_dir;
  extern char *basis_dir[];
  extern struct file_list *the_file_list;
-@@ -125,12 +126,13 @@ static int get_tmpname(char *fnametmp, c
+@@ -124,12 +125,13 @@ static int get_tmpname(char *fnametmp, c
  
  
  static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
@@ -459,7 +459,7 @@ the file's name.
        int32 len;
        OFF_T offset = 0;
        OFF_T offset2;
-@@ -150,6 +152,9 @@ static int receive_data(int f_in, char *
+@@ -149,6 +151,9 @@ static int receive_data(int f_in, char *
        } else
                mapbuf = NULL;
  
@@ -469,7 +469,7 @@ the file's name.
        sum_init(checksum_seed);
  
        if (append_mode) {
-@@ -192,6 +197,8 @@ static int receive_data(int f_in, char *
+@@ -191,6 +196,8 @@ static int receive_data(int f_in, char *
                        cleanup_got_literal = 1;
  
                        sum_update(data, i);
@@ -478,7 +478,7 @@ the file's name.
  
                        if (fd != -1 && write_file(fd,data,i) != i)
                                goto report_write_error;
-@@ -218,6 +225,8 @@ static int receive_data(int f_in, char *
+@@ -217,6 +224,8 @@ static int receive_data(int f_in, char *
  
                        see_token(map, len);
                        sum_update(map, len);
@@ -487,7 +487,7 @@ the file's name.
                }
  
                if (inplace) {
-@@ -258,6 +267,8 @@ static int receive_data(int f_in, char *
+@@ -257,6 +266,8 @@ static int receive_data(int f_in, char *
        }
  
        sum_end(file_sum1);
@@ -496,7 +496,7 @@ the file's name.
  
        if (mapbuf)
                unmap_file(mapbuf);
-@@ -273,7 +284,7 @@ static int receive_data(int f_in, char *
+@@ -272,7 +283,7 @@ static int receive_data(int f_in, char *
  
  static void discard_receive_data(int f_in, OFF_T length)
  {
@@ -505,7 +505,7 @@ the file's name.
  }
  
  static void handle_delayed_updates(struct file_list *flist, char *local_name)
-@@ -605,8 +616,12 @@ int recv_files(int f_in, struct file_lis
+@@ -604,8 +615,12 @@ int recv_files(int f_in, struct file_lis
                        rprintf(FINFO, "%s\n", fname);
  
                /* recv file data */
@@ -521,10 +521,10 @@ the file's name.
                        log_item(file, &initial_stats, iflags, NULL);
 --- old/rsync.c
 +++ new/rsync.c
-@@ -49,6 +49,7 @@ extern int preserve_gid;
- extern int inplace;
+@@ -49,6 +49,7 @@ extern int inplace;
  extern int keep_dirlinks;
  extern int make_backups;
+ extern mode_t orig_umask;
 +extern char *link_by_hash_dir;
  extern struct stats stats;
  extern struct chmod_mode_struct *daemon_chmod_modes;
@@ -566,7 +566,7 @@ the file's name.
  #include "byteorder.h"
 --- old/rsync.yo
 +++ new/rsync.yo
-@@ -361,6 +361,7 @@ to the detailed description below for a 
+@@ -363,6 +363,7 @@ to the detailed description below for a 
       --compare-dest=DIR      also compare received files relative to DIR
       --copy-dest=DIR         ... and include copies of unchanged files
       --link-dest=DIR         hardlink to files in DIR when unchanged
index 1e78fcd..00ea8b5 100644 (file)
@@ -72,17 +72,17 @@ can't say if I've left any cleanup/compatibility errors in the code.
                        code, file, line);
 --- old/clientserver.c
 +++ new/clientserver.c
-@@ -45,6 +45,9 @@ extern int io_timeout;
- extern int orig_umask;
- extern int no_detach;
- extern int default_af_hint;
+@@ -34,6 +34,9 @@ extern int am_sender;
+ extern int am_server;
+ extern int am_daemon;
+ extern int am_root;
 +#if HAVE_OPENSSL
 +extern int use_ssl;
 +#endif
- extern char *bind_address;
- extern char *sockopts;
- extern char *config_file;
-@@ -104,8 +107,18 @@ int start_socket_client(char *host, char
+ extern int rsync_port;
+ extern int kluge_around_eof;
+ extern int daemon_over_rsh;
+@@ -109,8 +112,18 @@ int start_socket_client(char *host, char
        set_socket_options(fd, sockopts);
  
        ret = start_inband_exchange(user, path, fd, fd, argc);
@@ -102,7 +102,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
  }
  
  int start_inband_exchange(char *user, char *path, int f_in, int f_out, 
-@@ -166,6 +179,33 @@ int start_inband_exchange(char *user, ch
+@@ -171,6 +184,33 @@ int start_inband_exchange(char *user, ch
        if (verbose > 1)
                print_child_argv(sargs);
  
@@ -136,7 +136,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        p = strchr(path,'/');
        if (p) *p = 0;
        io_printf(f_out, "%s\n", path);
-@@ -194,6 +234,10 @@ int start_inband_exchange(char *user, ch
+@@ -199,6 +239,10 @@ int start_inband_exchange(char *user, ch
                         * server to terminate the listing of modules.
                         * We don't want to go on and transfer
                         * anything; just exit. */
@@ -147,7 +147,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
                        exit(0);
                }
  
-@@ -201,6 +245,10 @@ int start_inband_exchange(char *user, ch
+@@ -206,6 +250,10 @@ int start_inband_exchange(char *user, ch
                        rprintf(FERROR, "%s\n", line);
                        /* This is always fatal; the server will now
                         * close the socket. */
@@ -158,7 +158,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
                        return -1;
                }
  
-@@ -716,6 +764,7 @@ static void send_listing(int fd)
+@@ -722,6 +770,7 @@ static void send_listing(int fd)
                io_printf(fd,"@RSYNCD: EXIT\n");
  }
  
@@ -166,7 +166,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
  /* this is called when a connection is established to a client
     and we want to start talking. The setup of the system is done from
     here */
-@@ -768,6 +817,9 @@ int start_daemon(int f_in, int f_out)
+@@ -778,6 +827,9 @@ int start_daemon(int f_in, int f_out)
        if (protocol_version > remote_protocol)
                protocol_version = remote_protocol;
  
@@ -176,7 +176,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        line[0] = 0;
        if (!read_line(f_in, line, sizeof line - 1))
                return -1;
-@@ -781,6 +833,20 @@ int start_daemon(int f_in, int f_out)
+@@ -789,6 +841,20 @@ int start_daemon(int f_in, int f_out)
                return -1;
        }
  
@@ -223,7 +223,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        *cygwin* ) AC_MSG_RESULT(yes)
 --- old/options.c
 +++ new/options.c
-@@ -168,6 +168,14 @@ int log_format_has_o_or_i = 0;
+@@ -167,6 +167,14 @@ int log_format_has_o_or_i = 0;
  int always_checksum = 0;
  int list_only = 0;
  
@@ -238,7 +238,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
  #define MAX_BATCH_NAME_LEN 256        /* Must be less than MAXPATHLEN-13 */
  char *batch_name = NULL;
  
-@@ -196,6 +204,7 @@ static void print_rsync_version(enum log
+@@ -195,6 +203,7 @@ static void print_rsync_version(enum log
        char const *hardlinks = "no ";
        char const *links = "no ";
        char const *ipv6 = "no ";
@@ -246,7 +246,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        STRUCT_STAT *dumstat;
  
  #ifdef HAVE_SOCKETPAIR
-@@ -218,6 +227,10 @@ static void print_rsync_version(enum log
+@@ -217,6 +226,10 @@ static void print_rsync_version(enum log
        ipv6 = "";
  #endif
  
@@ -257,7 +257,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        rprintf(f, "%s  version %s  protocol version %d\n",
                RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION);
        rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n");
-@@ -230,9 +243,9 @@ static void print_rsync_version(enum log
+@@ -229,9 +242,9 @@ static void print_rsync_version(enum log
        /* Note that this field may not have type ino_t.  It depends
         * on the complicated interaction between largefile feature
         * macros. */
@@ -269,7 +269,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
                (int) (sizeof dumstat->st_ino * 8),
                (int) (sizeof (int64) * 8));
  #ifdef MAINTAINER_MODE
-@@ -373,6 +386,13 @@ void usage(enum logcode F)
+@@ -371,6 +384,13 @@ void usage(enum logcode F)
    rprintf(F," -4, --ipv4                  prefer IPv4\n");
    rprintf(F," -6, --ipv6                  prefer IPv6\n");
  #endif
@@ -281,9 +281,9 @@ can't say if I've left any cleanup/compatibility errors in the code.
 +  rprintf(F,"     --ssl-ca-certs=FILE     path to trusted CA certificates\n");
 +#endif
    rprintf(F,"     --version               print version number\n");
-   rprintf(F,"     --help                  show this help screen\n");
+   rprintf(F,"(-h) --help                  show this help (-h works with no other options)\n");
  
-@@ -385,7 +405,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
+@@ -383,7 +403,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
        OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP,
        OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
        OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
@@ -292,7 +292,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        OPT_SERVER, OPT_REFUSED_BASE = 9000};
  
  static struct poptOption long_options[] = {
-@@ -523,6 +543,13 @@ static struct poptOption long_options[] 
+@@ -520,6 +540,13 @@ static struct poptOption long_options[] 
    {"checksum-seed",    0,  POPT_ARG_INT,    &checksum_seed, 0, 0, 0 },
    {"server",           0,  POPT_ARG_NONE,   0, OPT_SERVER, 0, 0 },
    {"sender",           0,  POPT_ARG_NONE,   0, OPT_SENDER, 0, 0 },
@@ -306,7 +306,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
    /* All the following options switch us into daemon-mode option-parsing. */
    {"config",           0,  POPT_ARG_STRING, 0, OPT_DAEMON, 0, 0 },
    {"daemon",           0,  POPT_ARG_NONE,   0, OPT_DAEMON, 0, 0 },
-@@ -1060,6 +1087,12 @@ int parse_arguments(int *argc, const cha
+@@ -1062,6 +1089,12 @@ int parse_arguments(int *argc, const cha
                        usage(FINFO);
                        exit_cleanup(0);
  
@@ -319,7 +319,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1337,6 +1370,17 @@ int parse_arguments(int *argc, const cha
+@@ -1340,6 +1373,17 @@ int parse_arguments(int *argc, const cha
        if (delay_updates && !partial_dir)
                partial_dir = tmp_partialdir;
  
@@ -337,7 +337,7 @@ can't say if I've left any cleanup/compatibility errors in the code.
        if (inplace) {
  #ifdef HAVE_FTRUNCATE
                if (partial_dir) {
-@@ -1748,11 +1792,28 @@ char *check_for_hostspec(char *s, char *
+@@ -1750,11 +1794,28 @@ char *check_for_hostspec(char *s, char *
  {
        char *p;
        int not_host;