* lib/copy-file.h (xcopy_file_preserving): New declaration.
(copy_file_preserving): Mark deprecated.
* lib/copy-file.c (xcopy_file_preserving): Renamed from
copy_file_preserving.
(copy_file_preserving): New function.
* tests/test-copy-file.c (main): Test xcopy_file_preserving instead of
copy_file_preserving.
2024-08-24 Bruno Haible <bruno@clisp.org>
+ copy-file: First step towards more consistent function names.
+ * lib/copy-file.h (xcopy_file_preserving): New declaration.
+ (copy_file_preserving): Mark deprecated.
+ * lib/copy-file.c (xcopy_file_preserving): Renamed from
+ copy_file_preserving.
+ (copy_file_preserving): New function.
+ * tests/test-copy-file.c (main): Test xcopy_file_preserving instead of
+ copy_file_preserving.
+
acl: First step towards more consistent function names.
* lib/acl.h (xset_acl): New declaration.
(set_acl): Mark deprecated.
}
void
-copy_file_preserving (const char *src_filename, const char *dest_filename)
+xcopy_file_preserving (const char *src_filename, const char *dest_filename)
{
switch (qcopy_file_preserving (src_filename, dest_filename))
{
abort ();
}
}
+
+void
+copy_file_preserving (const char *src_filename, const char *dest_filename)
+{
+ xcopy_file_preserving (src_filename, dest_filename);
+}
along with this program. If not, see <https://www.gnu.org/licenses/>. */
+/* This file uses _GL_ATTRIBUTE_DEPRECATED. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
Modification times, owner, group and access permissions are preserved as
far as possible.
Exit upon failure. */
-extern void copy_file_preserving (const char *src_filename, const char *dest_filename);
+extern void xcopy_file_preserving (const char *src_filename, const char *dest_filename);
+
+/* Old name of xcopy_file_preserving. */
+_GL_ATTRIBUTE_DEPRECATED void copy_file_preserving (const char *src_filename, const char *dest_filename);
#ifdef __cplusplus
if (null_stderr)
ASSERT (qcopy_file_preserving (file1, file2) == 0);
else
- copy_file_preserving (file1, file2);
+ xcopy_file_preserving (file1, file2);
return test_exit_status;
}