I have found that there is at least one case where the macro FILE_TIMESTAMP_FROM_S_AND_NS in filedef.h is given a -1 in its first  argument, such as when the archive member is not found (around line 1100 in remake.c).  This macro simply multiplies -1 * 1000000000 in environments that support nano-second time stamps (e.g., Solaris 2.7).  This obviously does not retain the -1 value in the result, which is what the following code wants.  Instead, the macro reports a 2/22/2020 modification date, which causes the "clock skew" error.

I have a fix which seemed to work, simply special casing negative values.
Perhaps there's a better one?

- Jim

*** Ofiledef.h  Wed Sep  6 18:24:15 2000
--- filedef.h   Wed Sep  6 22:03:03 2000
***************
*** 131,137 ****
  #endif
 
  #define FILE_TIMESTAMP_FROM_S_AND_NS(s, ns) \
!     ((s) * FILE_TIMESTAMPS_PER_S \
       + (ns) * FILE_TIMESTAMPS_PER_S / 1000000000)
  #define FILE_TIMESTAMP_DIV(a, b) ((a)/(b) - ((a)%(b) < 0))
  #define FILE_TIMESTAMP_MOD(a, b) ((a)%(b) + ((a)%(b) < 0) * (b))
--- 131,137 ----
  #endif
 
  #define FILE_TIMESTAMP_FROM_S_AND_NS(s, ns) \
!     ((s) < 0 ? (FILE_TIMESTAMP)(s) : (s) * FILE_TIMESTAMPS_PER_S \
       + (ns) * FILE_TIMESTAMPS_PER_S / 1000000000)
  #define FILE_TIMESTAMP_DIV(a, b) ((a)/(b) - ((a)%(b) < 0))
  #define FILE_TIMESTAMP_MOD(a, b) ((a)%(b) + ((a)%(b) < 0) * (b))

-- --
Jim Campbell
E-mail: [EMAIL PROTECTED]
Web:    http://home.rochester.rr.com/jic
 
 

Reply via email to