+/* core functions for copying files and directories
+ Copyright (C) 89, 90, 91, 1995-2005 Free Software Foundation.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Extracted from cp.c and librarified by Jim Meyering. */
+
#ifndef COPY_H
# define COPY_H
If that fails, then resort to copying. */
bool move_mode;
- /* This process's effective user ID. */
- uid_t myeuid;
+ /* Whether this process has appropriate privileges to chown a file
+ whose owner is not the effective user ID. */
+ bool chown_privileges;
/* If true, when copying recursively, skip any subdirectories that are
on different file systems from the one we started on. */
# define rename rpl_rename
# endif
-bool
-copy (const char *src_path, const char *dst_path,
- bool nonexistent_dst, const struct cp_options *options,
- bool *copy_into_self, bool *rename_succeeded);
+bool copy (const char *src_path, const char *dst_path,
+ bool nonexistent_dst, const struct cp_options *options,
+ bool *copy_into_self, bool *rename_succeeded);
+
+void dest_info_init (struct cp_options *);
+void src_info_init (struct cp_options *);
-void
-dest_info_init (struct cp_options *);
-void
-src_info_init (struct cp_options *);
+bool chown_privileges (void);
+bool chown_failure_ok (struct cp_options const *);
#endif