We now compile when UF_NOUNLINK and/or SF_NOUNLINK are undefined.
authorWayne Davison <wayned@samba.org>
Sat, 31 Mar 2007 03:23:58 +0000 (03:23 +0000)
committerWayne Davison <wayned@samba.org>
Sat, 31 Mar 2007 03:23:58 +0000 (03:23 +0000)
flags.diff

index 3730263..da91f40 100644 (file)
@@ -367,16 +367,24 @@ TODO: fix --delete-delay to work with --flags option.
  extern int preserve_executability;
  extern int preserve_times;
  extern int omit_dir_times;
-@@ -53,6 +54,8 @@ extern int make_backups;
+@@ -53,6 +54,16 @@ extern int make_backups;
  extern struct file_list *cur_flist, *first_flist, *dir_flist;
  extern struct chmod_mode_struct *daemon_chmod_modes;
  
++#ifdef SUPPORT_FLAGS
++#ifndef UF_NOUNLINK
++#define UF_NOUNLINK 0
++#endif
++#ifndef SF_NOUNLINK
++#define SF_NOUNLINK 0
++#endif
 +#define NOCHANGE_FLAGS (UF_IMMUTABLE|UF_APPEND|UF_NOUNLINK|SF_IMMUTABLE|SF_APPEND|SF_NOUNLINK)
++#endif
 +
  #if defined HAVE_ICONV_OPEN && defined HAVE_ICONV_H
  iconv_t ic_chck = (iconv_t)-1;
  
-@@ -228,6 +231,41 @@ mode_t dest_mode(mode_t flist_mode, mode
+@@ -228,6 +239,41 @@ mode_t dest_mode(mode_t flist_mode, mode
        return new_mode;
  }
  
@@ -418,7 +426,7 @@ TODO: fix --delete-delay to work with --flags option.
  int set_file_attrs(char *fname, struct file_struct *file, statx *sxp,
                   int flags)
  {
-@@ -346,6 +384,15 @@ int set_file_attrs(char *fname, struct f
+@@ -346,6 +392,15 @@ int set_file_attrs(char *fname, struct f
        }
  #endif
  
@@ -434,7 +442,7 @@ TODO: fix --delete-delay to work with --flags option.
        if (verbose > 1 && flags & ATTRS_REPORT) {
                if (updated)
                        rprintf(FCLIENT, "%s\n", fname);
-@@ -398,6 +445,9 @@ void finish_transfer(char *fname, char *
+@@ -398,6 +453,9 @@ void finish_transfer(char *fname, char *
        set_file_attrs(fnametmp, file, NULL,
                       ok_to_set_time ? 0 : ATTRS_SKIP_MTIME);
  
@@ -444,7 +452,7 @@ TODO: fix --delete-delay to work with --flags option.
        /* move tmp file over real file */
        if (verbose > 2)
                rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);
-@@ -412,6 +462,9 @@ void finish_transfer(char *fname, char *
+@@ -412,6 +470,9 @@ void finish_transfer(char *fname, char *
        }
        if (ret == 0) {
                /* The file was moved into place (not copied), so it's done. */