- Simplified the whole-file option handling.
[rsync/rsync.git] / rsync.h
diff --git a/rsync.h b/rsync.h
index 0477a4c..317c545 100644 (file)
--- a/rsync.h
+++ b/rsync.h
@@ -497,6 +497,16 @@ extern int errno;
 #define S_IWUSR 0200
 #endif
 
+#ifndef ACCESSPERMS
+#define ACCESSPERMS 0777
+#endif
+
+#ifndef S_ISVTX
+#define S_ISVTX 0
+#endif
+
+#define CHMOD_BITS (S_ISUID | S_ISGID | S_ISVTX | ACCESSPERMS)
+
 #ifndef _S_IFMT
 #define _S_IFMT        0170000
 #endif
@@ -560,9 +570,6 @@ extern int errno;
 
 #define IS_DEVICE(mode) (S_ISCHR(mode) || S_ISBLK(mode) || S_ISSOCK(mode) || S_ISFIFO(mode))
 
-#ifndef ACCESSPERMS
-#define ACCESSPERMS 0777
-#endif
 /* Initial mask on permissions given to temporary files.  Mask off setuid
      bits and group access because of potential race-condition security
      holes, and mask other access because mode 707 is bizarre */
@@ -595,20 +602,6 @@ void rsyserr(enum logcode, int, const char *, ...)
 #define inet_ntoa rep_inet_ntoa
 #endif
 
-/* Compatibility defines so that platforms that don't distinguish between
- * text and binary files (like Cygwin does) can use the same code. */
-#ifndef O_TEXT
-#define O_TEXT 0
-#define O_TEXT_STR ""
-#else
-#define O_TEXT_STR "t"
-#endif
-#ifndef O_BINARY
-#define O_BINARY 0
-#define O_BINARY_STR ""
-#else
-#define O_BINARY_STR "b"
-#endif
 
 #ifndef HAVE_STRLCPY
 size_t strlcpy(char *d, const char *s, size_t bufsize);