In remake.c, f_mtime() calls ar_member_date() to obtain the mtime on a archive
member.
ar_member_date() returns (time_t)-1 if the member is not found.
The result is then passed to the FILE_TIMESTAMP_FROM_S_AND_NS() macro to create
a FILE_TIMESTAMP.
The resulting FILE_TIMESTAMP is later compared to (FILE_TIMESTAMP)-1 to determin
if an error occurred.

If FILE_TIMESTAMP is of type "unsigned long long"
AND
if ST_MTIME_NSEC is defined

the result of FILE_TIMESTAMP_FROM_S_AND_NS( -1, 0 ) is not equal to
(FILE_TIMESTAMP)-1
and the member is reported as having a bogus future date.

Here's the pacth to fix it:

diff -c make-3.79/remake.c.~1~ make-3.79/remake.c
*** make-3.79/remake.c.~1~    Mon Apr  3 01:46:08 2000
--- make-3.79/remake.c   Thu Jun 22 17:29:19 2000
***************
*** 1097,1103 ****
     /* The archive doesn't exist, so it's members don't exist either.  */
     return (FILE_TIMESTAMP) -1;

!       mtime = FILE_TIMESTAMP_FROM_S_AND_NS (ar_member_date (file->hname), 0);
      }
    else
  #endif
--- 1097,1114 ----
     /* The archive doesn't exist, so it's members don't exist either.  */
     return (FILE_TIMESTAMP) -1;

!       {
!      time_t memdate = ar_member_date (file->hname);
!
!      if (memdate == (time_t)-1)
!      {
!          mtime = (FILE_TIMESTAMP)-1;
!      }
!      else
!      {
!          mtime = FILE_TIMESTAMP_FROM_S_AND_NS (memdate, 0);
!      }
!       }
      }
    else
  #endif

Devon
--
Devon Miller <[EMAIL PROTECTED]>


Reply via email to