[Pkg-shadow-commits] r2364 - in upstream/trunk: . libmisc

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Sun Sep 7 00:05:42 UTC 2008


Author: nekral-guest
Date: 2008-09-07 00:05:38 +0000 (Sun, 07 Sep 2008)
New Revision: 2364

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/configure.in
   upstream/trunk/libmisc/copydir.c
Log:
	* libmisc/copydir.c, configure.in: Check for the presence of
	st_mtim and st_mtimensec, as for st_atim and st_atimensec.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2008-09-06 23:46:44 UTC (rev 2363)
+++ upstream/trunk/ChangeLog	2008-09-07 00:05:38 UTC (rev 2364)
@@ -1,5 +1,10 @@
 2008-09-07  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* libmisc/copydir.c, configure.in: Check for the presence of
+	st_mtim and st_mtimensec, as for st_atim and st_atimensec.
+
+2008-09-07  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* src/gpasswd.c: Document the long options in the usage.
 
 2008-09-06  Nicolas François  <nicolas.francois at centraliens.net>

Modified: upstream/trunk/configure.in
===================================================================
--- upstream/trunk/configure.in	2008-09-06 23:46:44 UTC (rev 2363)
+++ upstream/trunk/configure.in	2008-09-07 00:05:38 UTC (rev 2364)
@@ -54,6 +54,8 @@
 AC_CHECK_MEMBERS([struct stat.st_rdev])
 AC_CHECK_MEMBERS([struct stat.st_atim])
 AC_CHECK_MEMBERS([struct stat.st_atimensec])
+AC_CHECK_MEMBERS([struct stat.st_mtim])
+AC_CHECK_MEMBERS([struct stat.st_mtimensec])
 AC_HEADER_TIME
 AC_STRUCT_TM
 

Modified: upstream/trunk/libmisc/copydir.c
===================================================================
--- upstream/trunk/libmisc/copydir.c	2008-09-06 23:46:44 UTC (rev 2363)
+++ upstream/trunk/libmisc/copydir.c	2008-09-07 00:05:38 UTC (rev 2364)
@@ -288,19 +288,26 @@
 	if (LSTAT (src, &sb) == -1) {
 		/* If we cannot stat the file, do not care. */
 	} else {
-#ifdef	HAVE_STRUCT_STAT_ST_ATIM
+#ifdef HAVE_STRUCT_STAT_ST_ATIM
 		mt[0].tv_sec  = sb.st_atim.tv_sec;
 		mt[0].tv_usec = sb.st_atim.tv_nsec / 1000;
+#else
+		mt[0].tv_sec  = sb.st_atime;
+#ifdef HAVE_STRUCT_STAT_ST_ATIMENSEC
+		mt[0].tv_usec = sb.st_atimensec / 1000;
+#else
+		mt[0].tv_usec = 0;
+#endif
+#endif
+
+#ifdef HAVE_STRUCT_STAT_ST_MTIM
 		mt[1].tv_sec  = sb.st_mtim.tv_sec;
 		mt[1].tv_usec = sb.st_mtim.tv_nsec / 1000;
 #else
-		mt[0].tv_sec  = sb.st_atime;
 		mt[1].tv_sec  = sb.st_mtime;
-#ifdef HAVE_STRUCT_STAT_ST_ATIMENSEC
-		mt[0].tv_usec = sb.st_atimensec / 1000;
+#ifdef HAVE_STRUCT_STAT_ST_MTIMENSEC
 		mt[1].tv_usec = sb.st_mtimensec / 1000;
 #else
-		mt[0].tv_usec = 0;
 		mt[1].tv_usec = 0;
 #endif
 #endif




More information about the Pkg-shadow-commits mailing list