summaryrefslogtreecommitdiff
path: root/commands.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2000-06-13 05:22:52 +0000
committerPaul Smith <psmith@gnu.org>2000-06-13 05:22:52 +0000
commit4972b017b63f3ce324bfa65a1b46a2a173baf463 (patch)
treed4bac994ae10ea2290d195dfe12978a8bfcda2ea /commands.c
parent4a5550c8225d762f684d4047e20cc45274b6a785 (diff)
downloadgunmake-4972b017b63f3ce324bfa65a1b46a2a173baf463.tar.gz
* Some timestamp fixes from Paul Eggert.
* Fix compilation on Linux; use libintl.h and not gettext.h when using the system gettext.
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/commands.c b/commands.c
index df4a447..156fe06 100644
--- a/commands.c
+++ b/commands.c
@@ -477,7 +477,10 @@ delete_target (file, on_behalf_of)
#ifndef NO_ARCHIVES
if (ar_name (file->name))
{
- if (ar_member_date (file->name) != FILE_TIMESTAMP_S (file->last_mtime))
+ time_t file_date = (file->last_mtime == NONEXISTENT_MTIME
+ ? (time_t) -1
+ : (time_t) FILE_TIMESTAMP_S (file->last_mtime));
+ if (ar_member_date (file->name) != file_date)
{
if (on_behalf_of)
error (NILF, _("*** [%s] Archive member `%s' may be bogus; not deleted"),
@@ -492,7 +495,7 @@ delete_target (file, on_behalf_of)
if (stat (file->name, &st) == 0
&& S_ISREG (st.st_mode)
- && FILE_TIMESTAMP_STAT_MODTIME (st) != file->last_mtime)
+ && FILE_TIMESTAMP_STAT_MODTIME (file->name, st) != file->last_mtime)
{
if (on_behalf_of)
error (NILF, _("*** [%s] Deleting file `%s'"), on_behalf_of, file->name);