From 48038e4c2b8be0133a5bf7d26c427bbe8c871640 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Tue, 16 Jan 2018 00:11:25 +0000 Subject: [PATCH] =?utf8?q?main.c:=20assume=20we=20have=20rename(3)=20as=20?= =?utf8?q?it=E2=80=99s=20standard=20since=20C89?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In fact, since my recent changes, HAVE_RENAME was not being defined, so rename was not used! --- src/main.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/main.c b/src/main.c index b161726..9a264c7 100644 --- a/src/main.c +++ b/src/main.c @@ -882,17 +882,9 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"), if (chmod (output_name, file_stat.st_mode & 07777) < 0) error (EXIT_FAILURE, errno, "chmod (%s)", output_name); -#if HAVE_RENAME if (rename (output_name, input_name) < 0) error (EXIT_FAILURE, errno, "rename (%s, %s)", output_name, input_name); -#else - if (link (output_name, input_name) < 0) - error (EXIT_FAILURE, errno, "link (%s, %s)", - output_name, input_name); - if (unlink (output_name) < 0) - error (EXIT_FAILURE, errno, "unlink (%s)", output_name); -#endif /* Adjust the time stamp for the new file. */ -- 2.40.0