]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
[RENAME_TRAILING_SLASH_BUG]: Use the rename wrapper.
authorJim Meyering <jim@meyering.net>
Sun, 14 Jan 2001 11:04:47 +0000 (11:04 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 14 Jan 2001 11:04:47 +0000 (11:04 +0000)
src/copy.h

index e5a35cd6d8b5e1173d98a61755465ae8257636fb..9cc4e4cd3e25d497eb1ee095f60b86493b8eccb3 100644 (file)
@@ -142,6 +142,17 @@ int rpl_lstat PARAMS((const char *, struct stat *));
 #  define lstat rpl_lstat
 # endif
 
+int rename ();
+
+/* Arrange to make rename calls go through the wrapper function
+   on systems with a rename function that fails for a source path
+   specified with a trailing slash.  */
+# if RENAME_TRAILING_SLASH_BUG
+int rpl_rename PARAMS((const char *, const char *));
+#  undef rename
+#  define rename rpl_rename
+# endif
+
 int
 copy PARAMS ((const char *src_path, const char *dst_path,
              int nonexistent_dst, const struct cp_options *options,