* 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 (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
- 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 */
/* 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 *, ...)
-#ifdef __GNUC__
-# define UNUSED(x) x __attribute__((__unused__))
-#else
-# define UNUSED(x) x
-#endif /* ndef __GNUC__ */
+#ifdef MAINTAINER_MODE
+const char *get_panic_action(void);
+#endif
+
+#define UNUSED(x) x __attribute__((__unused__))
+
+extern const char *io_write_phase, *io_read_phase;