From: "Vance Shipley" <[EMAIL PROTECTED]>
   Date: Thu, 23 Mar 2000 14:24:37 -0500

   The next problem is that, on Unixware v7.1, tv_sec is also
   moved into the st__tim structure:

           union {
               time_t      st__sec; /* compatible: time in seconds */
               timestruc_t st__tim; /* secs+nanosecs; first is time_t */
           }       st_atim,        /* time of last access */
                   st_mtim,        /* time of last data modification */
                   st_ctim;        /* time of last file status change */

   ... I patched it as:

   # define FILE_TIMESTAMP_STAT_MODTIME(st) \
       FILE_TIMESTAMP_FROM_S_AND_NS ((st).st_mtim.st__tim.tv_sec, \
                                     (st).st_mtim.ST_MTIM_NSEC)

Thanks for the report.  Unfortunately I don't think that patch will
work on Solaris, as they use a different scheme.  Can you please try
the following fix instead?  It should be more portable.

2000-03-23  Paul Eggert  <[EMAIL PROTECTED]>

        * filedef.h (FILE_TIMESTAMP_STAT_MODTIME): Don't use
        st_mtim.tv_sec; this doesn't work on Unixware.

===================================================================
RCS file: filedef.h,v
retrieving revision 3.78.1.1
retrieving revision 3.78.1.2
diff -pu -r3.78.1.1 -r3.78.1.2
--- filedef.h   2000/03/23 05:26:50     3.78.1.1
+++ filedef.h   2000/03/23 22:27:00     3.78.1.2
@@ -121,7 +121,7 @@ extern void notice_finished_file PARAMS 
 
 #ifdef ST_MTIM_NSEC
 # define FILE_TIMESTAMP_STAT_MODTIME(st) \
-    FILE_TIMESTAMP_FROM_S_AND_NS ((st).st_mtim.tv_sec, \
+    FILE_TIMESTAMP_FROM_S_AND_NS ((st).st_mtime, \
                                   (st).st_mtim.ST_MTIM_NSEC)
 # define FILE_TIMESTAMPS_PER_S \
     MIN ((FILE_TIMESTAMP) 1000000000, \

Reply via email to