-/*
- Copyright (C) Andrew Tridgell 1998
+/* -*- c-file-style: "linux" -*-
+
+ Copyright (C) 1998-2000 by Andrew Tridgell
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
struct in_addr socket_address = {INADDR_ANY};
+
+static void print_rsync_version(void)
+{
+ char const *got_socketpair = "no ";
+
+#ifdef HAVE_SOCKETPAIR
+ got_socketpair = "";
+#endif
+
+ rprintf(FINFO, "rsync version %s protocol version %d\n",
+ VERSION, PROTOCOL_VERSION);
+ rprintf(FINFO, "Configuration: %d-bit files, %ssocketpairs\n\n",
+ sizeof(int64) * 8,
+ got_socketpair);
+ rprintf(FINFO, "Written by Andrew Tridgell and Paul Mackerras "
+ "<http://rsync.samba.org/>\n\n");
+#ifdef NO_INT64
+ rprintf(FINFO, "WARNING: no 64-bit integers on this platform!\n");
+#endif
+}
+
+
void usage(enum logcode F)
{
rprintf(F,"rsync version %s Copyright Andrew Tridgell and Paul Mackerras\n\n",
VERSION);
+#ifdef NO_INT64
+ rprintf(F, "WARNING: no 64-bit integers on this platform!\n");
+#endif
rprintf(F,"rsync is a file transfer program capable of efficient remote update\nvia a fast differencing algorithm.\n\n");
switch (opt) {
case OPT_VERSION:
- rprintf(FINFO,"rsync version %s protocol version %d\n\n",
- VERSION,PROTOCOL_VERSION);
- rprintf(FINFO,"Written by Andrew Tridgell and Paul Mackerras\n");
+ print_rsync_version();
exit_cleanup(0);
case OPT_SUFFIX:
break;
default:
+ /* FIXME: This can be confusing when the error message
+ * is coming from a remote server which has an older
+ * rsync version than the local version. The user
+ * sees the option documented in the local --help, but
+ * then the program seems to refuse to execute it. So
+ * perhaps the message should give the hostname or
+ * something.
+ *
+ * In rsync 3.x, it might be nice if options which
+ * only affect one end didn't have to bother the
+ * remote end. */
slprintf(err_buf,sizeof(err_buf),"unrecognised option\n");
return 0;
}