* There are two possible explanations for the limit at thirty: either
* to allow new major-rev versions that do not interoperate with us,
* and (more likely) so that we can detect an attempt to connect rsync
* to a non-rsync server, which is unlikely to begin by sending a byte
* between 15 and 30. */
#define MIN_PROTOCOL_VERSION 15
* There are two possible explanations for the limit at thirty: either
* to allow new major-rev versions that do not interoperate with us,
* and (more likely) so that we can detect an attempt to connect rsync
* to a non-rsync server, which is unlikely to begin by sending a byte
* between 15 and 30. */
#define MIN_PROTOCOL_VERSION 15
-#if HAVE_REMSH
-#define RSYNC_RSH "remsh"
-#else
-#define RSYNC_RSH "rsh"
-#endif
+/* The default RSYNC_RSH is always set in config.h, either to "remsh",
+ * "rsh", or otherwise something specified by the user. HAVE_REMSH
+ * controls parameter munging for HP/UX, etc. */
+#if (SIZEOF_LONG == 8)
+#define uint64 unsigned long
+#elif (SIZEOF_INT == 8)
+#define uint64 unsigned int
+#elif HAVE_LONGLONG
+#define uint64 unsigned long long
+#else
+/* As long as it gets... */
+#define uint64 unsigned off_t
+#endif
+
/* Starting from protocol version 26, we always use 64-bit
* ino_t and dev_t internally, even if this platform does not
* allow files to have 64-bit inums. That's because the
/* Starting from protocol version 26, we always use 64-bit
* ino_t and dev_t internally, even if this platform does not
* allow files to have 64-bit inums. That's because the
* major/minor, and transfer the two parts as 32-bit ints. That gives
* you somewhat more of a chance that they'll come from a big machine
* to a little one in a useful way.
* major/minor, and transfer the two parts as 32-bit ints. That gives
* you somewhat more of a chance that they'll come from a big machine
* to a little one in a useful way.
- OFF_T offset; /* offset in file of this chunk */
- int len; /* length of chunk of file */
- int i; /* index of this chunk */
- uint32 sum1; /* simple checksum */
- char sum2[SUM_LENGTH]; /* checksum */
+ OFF_T offset; /**< offset in file of this chunk */
+ int len; /**< length of chunk of file */
+ int i; /**< index of this chunk */
+ uint32 sum1; /**< simple checksum */
+ char sum2[SUM_LENGTH]; /**< checksum */
- OFF_T flength; /* total file length */
- size_t count; /* how many chunks */
- size_t remainder; /* flength % block_length */
- size_t n; /* block_length */
- struct sum_buf *sums; /* points to info for each chunk */
+ OFF_T flength; /**< total file length */
+ size_t count; /**< how many chunks */
+ size_t remainder; /**< flength % block_length */
+ size_t n; /**< block_length */
+ struct sum_buf *sums; /**< points to info for each chunk */
/* We have replacement versions of these if they're missing. */
#ifndef HAVE_ASPRINTF
int asprintf(char **ptr, const char *format, ...);
/* We have replacement versions of these if they're missing. */
#ifndef HAVE_ASPRINTF
int asprintf(char **ptr, const char *format, ...);
/* Initial mask on permissions given to temporary files. Mask off setuid
bits and group access because of potential race-condition security
holes, and mask other access because mode 707 is bizarre */
/* Initial mask on permissions given to temporary files. Mask off setuid
bits and group access because of potential race-condition security
holes, and mask other access because mode 707 is bizarre */
/* use magic gcc attributes to catch format errors */
void rprintf(enum logcode , const char *, ...)
/* use magic gcc attributes to catch format errors */
void rprintf(enum logcode , const char *, ...)
;
/* This is just like rprintf, but it also tries to print some
* representation of the error code. Normally errcode = errno. */
void rsyserr(enum logcode, int, const char *, ...)
;
/* This is just like rprintf, but it also tries to print some
* representation of the error code. Normally errcode = errno. */
void rsyserr(enum logcode, int, const char *, ...)