Before compiling, be sure to run "make proto".
---- orig/generator.c 2004-11-03 20:30:45
+--- orig/generator.c 2004-11-11 22:13:09
+++ generator.c 2004-11-03 22:47:23
-@@ -45,7 +45,7 @@ extern int io_timeout;
+@@ -46,7 +46,7 @@ extern int io_timeout;
extern int protocol_version;
extern int always_checksum;
extern char *partial_dir;
extern int link_dest;
extern int whole_file;
extern int local_server;
-@@ -424,11 +424,19 @@ static void recv_generator(char *fname,
+@@ -429,11 +429,19 @@ static void recv_generator(char *fname,
fnamecmp = fname;
fnamecmp_type = FNAMECMP_FNAME;
#if HAVE_LINK
if (link_dest && !dry_run) {
if (do_link(fnamecmpbuf, fname) < 0) {
-@@ -439,15 +447,14 @@ static void recv_generator(char *fname,
+@@ -444,15 +452,14 @@ static void recv_generator(char *fname,
safe_fname(fname));
}
fnamecmp = fnamecmpbuf;
/* The receiving side mustn't obey this, or an existing symlink that
* points to an identical file won't be replaced by the referent. */
---- orig/options.c 2004-10-14 17:11:40
-+++ options.c 2004-10-14 17:13:57
-@@ -114,12 +114,13 @@ int write_batch = 0;
+--- orig/options.c 2004-11-11 22:13:09
++++ options.c 2004-11-11 22:14:34
+@@ -115,12 +115,13 @@ int write_batch = 0;
int read_batch = 0;
int backup_dir_len = 0;
int backup_suffix_len;
char *config_file = NULL;
char *shell_cmd = NULL;
char *log_format = NULL;
-@@ -140,6 +141,7 @@ char *batch_name = NULL;
+@@ -141,6 +142,7 @@ char *batch_name = NULL;
static int daemon_opt; /* sets am_daemon after option error-reporting */
static int modify_window_set;
+static int saw_compare_dest = 0;
+ static char *max_size_arg;
/** Local address to bind. As a character string because it's
- * interpreted by the IPv6 layer: should be a numeric IP4 or IP6
-@@ -310,7 +312,7 @@ void usage(enum logcode F)
+@@ -313,7 +315,7 @@ void usage(enum logcode F)
}
enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
- OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_LINK_DEST,
+ OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_COMPARE_DEST, OPT_LINK_DEST,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
- OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT,
+ OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE,
OPT_REFUSED_BASE = 9000};
-@@ -369,8 +371,8 @@ static struct poptOption long_options[]
- {"max-delete", 0, POPT_ARG_INT, &max_delete, 0, 0, 0 },
+@@ -373,8 +375,8 @@ static struct poptOption long_options[]
+ {"max-size", 0, POPT_ARG_STRING, &max_size_arg, OPT_MAX_SIZE, 0, 0 },
{"timeout", 0, POPT_ARG_INT, &io_timeout, OPT_TIMEOUT, 0, 0 },
{"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
- {"compare-dest", 0, POPT_ARG_STRING, &compare_dest, 0, 0, 0 },
/* TODO: Should this take an optional int giving the compression level? */
{"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 },
{"stats", 0, POPT_ARG_NONE, &do_stats, 0, 0, 0 },
-@@ -672,8 +674,28 @@ int parse_arguments(int *argc, const cha
+@@ -705,8 +707,28 @@ int parse_arguments(int *argc, const cha
select_timeout = io_timeout;
break;
link_dest = 1;
break;
#else
-@@ -765,6 +787,11 @@ int parse_arguments(int *argc, const cha
+@@ -798,6 +820,11 @@ int parse_arguments(int *argc, const cha
return 0;
}
if (archive_mode) {
if (!files_from)
recurse = 1;
-@@ -792,8 +819,6 @@ int parse_arguments(int *argc, const cha
+@@ -825,8 +852,6 @@ int parse_arguments(int *argc, const cha
tmpdir = sanitize_path(NULL, tmpdir, NULL, 0);
if (partial_dir)
partial_dir = sanitize_path(NULL, partial_dir, NULL, 0);
if (backup_dir)
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0);
if (files_from)
-@@ -801,6 +826,7 @@ int parse_arguments(int *argc, const cha
+@@ -834,6 +859,7 @@ int parse_arguments(int *argc, const cha
}
if (server_exclude_list.head && !am_sender) {
struct exclude_list_struct *elp = &server_exclude_list;
if (tmpdir) {
clean_fname(tmpdir, 1);
if (check_exclude(elp, tmpdir, 1) < 0)
-@@ -811,9 +837,9 @@ int parse_arguments(int *argc, const cha
+@@ -844,9 +870,9 @@ int parse_arguments(int *argc, const cha
if (check_exclude(elp, partial_dir, 1) < 0)
goto options_rejected;
}
goto options_rejected;
}
if (backup_dir) {
-@@ -884,7 +910,7 @@ int parse_arguments(int *argc, const cha
+@@ -917,7 +943,7 @@ int parse_arguments(int *argc, const cha
am_server ? "server" : "client");
return 0;
#endif
snprintf(err_buf, sizeof err_buf,
"--inplace does not yet work with %s\n",
link_dest ? "--link-dest" : "--compare-dest");
-@@ -951,8 +977,8 @@ int parse_arguments(int *argc, const cha
+@@ -984,8 +1010,8 @@ int parse_arguments(int *argc, const cha
**/
void server_options(char **args,int *argc)
{
char *arg;
int i, x;
-@@ -1135,13 +1161,16 @@ void server_options(char **args,int *arg
+@@ -1173,13 +1199,16 @@ void server_options(char **args,int *arg
args[ac++] = tmpdir;
}