X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/e1fe1d55c4b9a8d45d9c640cefe45a345371f9d5..b223d96bf0d040cfa445a45213fc517ab8389785:/rsync.h diff --git a/rsync.h b/rsync.h index ed600053..99c7d6c4 100644 --- a/rsync.h +++ b/rsync.h @@ -103,7 +103,7 @@ /* This is used when working on a new protocol version in CVS, and should * be a new non-zero value for each CVS change that affects the protocol. * It must ALWAYS be 0 when the protocol goes final (and NEVER before)! */ -#define SUBPROTOCOL_VERSION 12 +#define SUBPROTOCOL_VERSION 13 /* We refuse to interoperate with versions that are not in this range. * Note that we assume we'll work with later versions: the onus is on @@ -665,6 +665,21 @@ struct ht_int64_node { #define ACLS_NEED_MASK 1 #endif +#if defined HAVE_FALLOCATE || HAVE_SYS_FALLOCATE +#include +#ifdef FALLOC_FL_KEEP_SIZE +#define SUPPORT_PREALLOCATION 1 +#elif defined HAVE_FTRUNCATE +#define SUPPORT_PREALLOCATION 1 +#define PREALLOCATE_NEEDS_TRUNCATE 1 +#endif +#else /* !fallocate */ +#if defined HAVE_EFFICIENT_POSIX_FALLOCATE && defined HAVE_FTRUNCATE +#define SUPPORT_PREALLOCATION 1 +#define PREALLOCATE_NEEDS_TRUNCATE 1 +#endif +#endif + union file_extras { int32 num; uint32 unum;