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
Make all the rsync objects dependent on all the header files except the
[rsync/rsync.git]
/
syscall.c
diff --git
a/syscall.c
b/syscall.c
index
a8470e1
..
d5b567f
100644
(file)
--- a/
syscall.c
+++ b/
syscall.c
@@
-24,8
+24,9
@@
extern int dry_run;
extern int read_only;
extern int dry_run;
extern int read_only;
+extern int list_only;
-#define CHECK_RO if (read_only) {errno = EROFS; return -1;}
+#define CHECK_RO if (read_only
|| list_only
) {errno = EROFS; return -1;}
int do_unlink(char *fname)
{
int do_unlink(char *fname)
{
@@
-75,8
+76,14
@@
int do_rmdir(char *pathname)
int do_open(char *pathname, int flags, mode_t mode)
{
int do_open(char *pathname, int flags, mode_t mode)
{
- if (dry_run) return -1;
- CHECK_RO
+ if (flags != O_RDONLY) {
+ if (dry_run) return -1;
+ CHECK_RO
+ }
+#ifdef O_BINARY
+ /* for Windows */
+ flags |= O_BINARY;
+#endif
return open(pathname, flags, mode);
}
return open(pathname, flags, mode);
}
@@
-149,7
+156,7
@@
OFF_T do_lseek(int fd, OFF_T offset, int whence)
#endif
}
#endif
}
-#if
HAV
E_MMAP
+#if
def US
E_MMAP
void *do_mmap(void *start, int len, int prot, int flags, int fd, OFF_T offset)
{
#if HAVE_OFF64_T
void *do_mmap(void *start, int len, int prot, int flags, int fd, OFF_T offset)
{
#if HAVE_OFF64_T