Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Renamed flist_dir to pathname to avoid confusion with dir_flist var.
[rsync/rsync.git]
/
rsync.h
diff --git
a/rsync.h
b/rsync.h
index
6b25e6c
..
53989bd
100644
(file)
--- a/
rsync.h
+++ b/
rsync.h
@@
-83,6
+83,11
@@
/* update this if you make incompatible changes */
#define PROTOCOL_VERSION 30
/* update this if you make incompatible changes */
#define PROTOCOL_VERSION 30
+/* 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! */
+#define SUBPROTOCOL_VERSION 2
+
/* 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
* people writing them to make sure that they don't send us anything
/* 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
* people writing them to make sure that they don't send us anything
@@
-779,6
+784,7
@@
typedef struct {
#ifndef __GNUC__
#define __attribute__(x)
#ifndef __GNUC__
#define __attribute__(x)
+#else
# if __GNUC__ <= 2
# define NORETURN
# endif
# if __GNUC__ <= 2
# define NORETURN
# endif
@@
-805,6
+811,12
@@
typedef struct {
#include "proto.h"
#include "proto.h"
+#ifndef SUPPORT_XATTRS
+#define x_stat(fn,fst,xst) do_stat(fn,fst)
+#define x_lstat(fn,fst,xst) do_lstat(fn,fst)
+#define x_fstat(fd,fst,xst) do_fstat(fd,fst)
+#endif
+
/* We have replacement versions of these if they're missing. */
#ifndef HAVE_ASPRINTF
int asprintf(char **ptr, const char *format, ...);
/* We have replacement versions of these if they're missing. */
#ifndef HAVE_ASPRINTF
int asprintf(char **ptr, const char *format, ...);
@@
-1023,6
+1035,26
@@
int inet_pton(int af, const char *src, void *dst);
const char *get_panic_action(void);
#endif
const char *get_panic_action(void);
#endif
+static inline int to_wire_mode(mode_t mode)
+{
+#ifdef SUPPORT_LINKS
+#if _S_IFLNK != 0120000
+ if (S_ISLNK(mode))
+ return (mode & ~(_S_IFMT)) | 0120000;
+#endif
+#endif
+ return mode;
+}
+
+static inline mode_t from_wire_mode(int mode)
+{
+#if _S_IFLNK != 0120000
+ if ((mode & (_S_IFMT)) == 0120000)
+ return (mode & ~(_S_IFMT)) | _S_IFLNK;
+#endif
+ return mode;
+}
+
static inline int
isDigit(const char *ptr)
{
static inline int
isDigit(const char *ptr)
{