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
Changed F_ROOTDIR() to F_PATHNAME().
[rsync/rsync.git]
/
rsync.h
diff --git
a/rsync.h
b/rsync.h
index
4717e35
..
c3ab588
100644
(file)
--- a/
rsync.h
+++ b/
rsync.h
@@
-599,7
+599,7
@@
extern int preserve_xattrs;
#define F_SYMLINK(f) ((f)->basename + strlen((f)->basename) + 1)
/* The sending side always has this available: */
#define F_SYMLINK(f) ((f)->basename + strlen((f)->basename) + 1)
/* The sending side always has this available: */
-#define F_
ROOTDIR
(f) (*(const char**)REQ_EXTRA(f, PTR_EXTRA_LEN))
+#define F_
PATHNAME
(f) (*(const char**)REQ_EXTRA(f, PTR_EXTRA_LEN))
/* The receiving side always has this available: */
#define F_DEPTH(f) REQ_EXTRA(f, 1)->num
/* The receiving side always has this available: */
#define F_DEPTH(f) REQ_EXTRA(f, 1)->num
@@
-811,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, ...);
@@
-1029,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)
{