X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/22b193328754701c37942f4776116ada880efaef..27d3cdbc943a57d64f4f2a35a4f1e1b15d9ca41f:/rsync.h diff --git a/rsync.h b/rsync.h index deb20a23..dc2988a3 100644 --- a/rsync.h +++ b/rsync.h @@ -59,6 +59,7 @@ #define MPLEX_BASE 7 #define FERROR 1 #define FINFO 2 +#define FLOG 3 #include "config.h" @@ -69,6 +70,13 @@ #endif #include + +#ifdef HAVE_GETOPT_LONG +#include +#else +#include "lib/getopt.h" +#endif + #ifdef HAVE_UNISTD_H #include #endif @@ -162,13 +170,7 @@ #include "lib/fnmatch.h" #endif -#ifdef HAVE_GETOPT_LONG -#include -#else -#include "lib/getopt.h" -#endif - -#ifdef HAVE_GLOB +#ifdef HAVE_GLOB_H #include #endif @@ -203,14 +205,6 @@ #endif -#ifndef S_IFLNK -#define S_IFLNK 0120000 -#endif - -#ifndef S_ISLNK -#define S_ISLNK(mode) (((mode) & S_IFLNK) == S_IFLNK) -#endif - #define BOOL int #ifndef uchar @@ -258,6 +252,12 @@ #define NO_INT64 #endif +#if HAVE_SHORT_INO_T +#define INO_T uint32 +#else +#define INO_T ino_t +#endif + #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) #endif @@ -283,7 +283,7 @@ struct file_struct { time_t modtime; OFF_T length; mode_t mode; - ino_t inode; + INO_T inode; dev_t dev; dev_t rdev; uid_t uid; @@ -302,11 +302,11 @@ struct file_list { }; struct sum_buf { - 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 */ }; struct sum_struct { @@ -402,6 +402,18 @@ extern int errno; #define S_IWUSR 0200 #endif +#ifndef _S_IFMT +#define _S_IFMT 0170000 +#endif + +#ifndef _S_IFLNK +#define _S_IFLNK 0120000 +#endif + +#ifndef S_ISLNK +#define S_ISLNK(mode) (((mode) & (_S_IFMT)) == (_S_IFLNK)) +#endif + #ifndef S_ISBLK #define S_ISBLK(mode) (((mode) & (_S_IFMT)) == (_S_IFBLK)) #endif