X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/158595849728f923445b7f3920e9d2776ac116f8..bec617b934dc2ef90b7acd1c7ef4b5db74821e91:/rsync.h diff --git a/rsync.h b/rsync.h index 49034ac5..e079a653 100644 --- a/rsync.h +++ b/rsync.h @@ -58,10 +58,12 @@ /* These flags are used in the live flist data. */ #define FLAG_TOP_DIR (1<<0) -#define FLAG_HLINK_EOL (1<<1) /* generator only */ -#define FLAG_MOUNT_POINT (1<<2) /* sender only */ -#define FLAG_NO_FUZZY (1<<2) /* generator only */ +#define FLAG_HLINK_EOL (1<<1) /* receiver/generator */ +#define FLAG_MOUNT_POINT (1<<2) /* sender */ +#define FLAG_NO_FUZZY (1<<2) /* generator */ #define FLAG_DEL_HERE (1<<3) /* receiver/generator */ +#define FLAG_SENT (1<<3) /* sender */ +#define FLAG_HLINK_TOL (1<<4) /* receiver/generator */ /* update this if you make incompatible changes */ #define PROTOCOL_VERSION 29 @@ -98,10 +100,11 @@ #define IOERR_GENERAL (1<<0) /* For backward compatibility, this must == 1 */ #define IOERR_VANISHED (1<<1) +#define IOERR_DEL_LIMIT (1<<2) #define MAX_ARGS 1000 - #define MAX_BASIS_DIRS 20 +#define MAX_SERVER_ARGS (MAX_BASIS_DIRS*2 + 100) #define MPLEX_BASE 7 @@ -131,23 +134,46 @@ #define FNAMECMP_FUZZY 0x83 /* For calling delete_file() */ -#define DEL_DIR (1<<0) #define DEL_NO_RECURSE (1<<1) #define DEL_FORCE_RECURSE (1<<2) /* recurse even w/o --force */ #define DEL_TERSE (1<<3) - -/* Log-message categories. FLOG is only used on the daemon side to - * output messages to the log file. */ -enum logcode { FERROR=1, FINFO=2, FLOG=3 }; +/* For use by the itemize_changes code */ +#define ITEM_REPORT_CHECKSUM (1<<1) +#define ITEM_REPORT_SIZE (1<<2) +#define ITEM_REPORT_TIME (1<<3) +#define ITEM_REPORT_PERMS (1<<4) +#define ITEM_REPORT_OWNER (1<<5) +#define ITEM_REPORT_GROUP (1<<6) +#define ITEM_REPORT_XATTRS (1<<7) +#define ITEM_BASIS_TYPE_FOLLOWS (1<<11) +#define ITEM_XNAME_FOLLOWS (1<<12) +#define ITEM_IS_NEW (1<<13) +#define ITEM_LOCAL_CHANGE (1<<14) +#define ITEM_TRANSFER (1<<15) +/* These are outside the range of the transmitted flags. */ +#define ITEM_NO_DEST_AND_NO_UPDATE (1<<16) /* used by itemize() */ +#define ITEM_MISSING_DATA (1<<16) /* used by log_formatted() */ +#define ITEM_DELETED (1<<17) /* used by log_formatted() */ + +#define SIGNIFICANT_ITEM_FLAGS (~(\ + ITEM_BASIS_TYPE_FOLLOWS | ITEM_XNAME_FOLLOWS | ITEM_LOCAL_CHANGE)) + + +/* Log-message categories. FLOG and FCLIENT are only used on the daemon + * side for custom logging -- they don't get sent over the socket. */ +enum logcode { FERROR=1, FINFO=2, FLOG=3, FCLIENT=4 }; /* Messages types that are sent over the message channel. The logcode * values must all be present here with identical numbers. */ enum msgcode { - MSG_DONE=5, /* current phase is done */ - MSG_REDO=4, /* reprocess indicated flist index */ - MSG_ERROR=FERROR, MSG_INFO=FINFO, MSG_LOG=FLOG, /* remote logging */ - MSG_DATA=0 /* raw data on the multiplexed stream */ + MSG_DATA=0, /* raw data on the multiplexed stream */ + MSG_ERROR=FERROR, MSG_INFO=FINFO, /* remote logging */ + MSG_LOG=FLOG, MSG_FCLIENT=FCLIENT, /* sibling logging */ + MSG_REDO=9, /* reprocess indicated flist index */ + MSG_SUCCESS=100,/* successfully updated indicated flist index */ + MSG_DELETED=101,/* successfully deleted a file on receiving side */ + MSG_DONE=86 /* current phase is done */ }; #include "errcode.h" @@ -282,7 +308,7 @@ enum msgcode { #ifdef MAJOR_IN_MKDEV #include -# if !defined makedev && defined mkdev +# if !defined makedev && (defined mkdev || defined _WIN32 || defined __WIN32__) # define makedev mkdev # endif #elif defined MAJOR_IN_SYSMACROS @@ -455,7 +481,7 @@ struct idev { #define HL_SKIP 1 struct hlink { - struct file_struct *next; + int next; int hlindex; }; @@ -648,8 +674,12 @@ extern char *sys_errlist[]; extern int errno; #endif -#define SUPPORT_LINKS HAVE_READLINK -#define SUPPORT_HARD_LINKS HAVE_LINK +#ifdef HAVE_READLINK +#define SUPPORT_LINKS 1 +#endif +#ifdef HAVE_LINK +#define SUPPORT_HARD_LINKS 1 +#endif #define SIGNAL_CAST (RETSIGTYPE (*)()) @@ -758,7 +788,7 @@ extern int errno; /* handler for null strings in printf format */ #define NS(s) ((s)?safe_fname(s):"") -#if !defined __GNUC__ || defined APPLE +#if !defined __GNUC__ || defined __APPLE__ /* Apparently the OS X port of gcc gags on __attribute__. * * */