X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/743348e848915aa1217d970bd5673364345174e0..b223d96bf0d040cfa445a45213fc517ab8389785:/rsync.h diff --git a/rsync.h b/rsync.h index 1b73031b..99c7d6c4 100644 --- a/rsync.h +++ b/rsync.h @@ -60,12 +60,13 @@ #define XMIT_RDEV_MINOR_8_pre30 (1<<11) /* protocols 28 - 29 */ #define XMIT_GROUP_NAME_FOLLOWS (1<<11) /* protocols 30 - now */ #define XMIT_HLINK_FIRST (1<<12) /* protocols 30 - now (HLINKED files only) */ -#define XMIT_IO_ERROR_ENDLIST (1<<12) /* protocols 31 - now (w/XMIT_EXTENDED_FLAGS) */ +#define XMIT_IO_ERROR_ENDLIST (1<<12) /* protocols 31*- now (w/XMIT_EXTENDED_FLAGS) (also protocol 30 w/'f' compat flag) */ #define XMIT_MOD_NSEC (1<<13) /* protocols 31 - now */ /* These flags are used in the live flist data. */ #define FLAG_TOP_DIR (1<<0) /* sender/receiver/generator */ +#define FLAG_OWNED_BY_US (1<<0) /* generator: set by make_file() for aux flists only */ #define FLAG_FILE_SENT (1<<1) /* sender/receiver/generator */ #define FLAG_DIR_CREATED (1<<1) /* generator */ #define FLAG_CONTENT_DIR (1<<2) /* sender/receiver/generator */ @@ -85,8 +86,12 @@ /* These flags are passed to functions but not stored. */ -#define FLAG_DIVERT_DIRS (1<<16)/* sender */ +#define FLAG_DIVERT_DIRS (1<<16) /* sender, but must be unique */ +/* These flags are for get_dirlist(). */ +#define GDL_IGNORE_FILTER_RULES (1<<0) + +/* Some helper macros for matching bits. */ #define BITS_SET(val,bits) (((val) & (bits)) == (bits)) #define BITS_SETnUNSET(val,onbits,offbits) (((val) & ((onbits)|(offbits))) == (onbits)) #define BITS_EQUAL(b1,b2,mask) (((unsigned)(b1) & (unsigned)(mask)) \ @@ -98,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 @@ -660,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;