[Pkg-shadow-commits] r2298 - in upstream/trunk: . libmisc
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Sat Aug 30 18:31:22 UTC 2008
Author: nekral-guest
Date: 2008-08-30 18:31:21 +0000 (Sat, 30 Aug 2008)
New Revision: 2298
Modified:
upstream/trunk/ChangeLog
upstream/trunk/libmisc/copydir.c
Log:
* configure.in: Check if the stat structure has a st_atim or
st_atimensec field.
* libmisc/copydir.c: Conditionally use the stat's st_atim and
st_atimensec fields.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-08-30 18:30:58 UTC (rev 2297)
+++ upstream/trunk/ChangeLog 2008-08-30 18:31:21 UTC (rev 2298)
@@ -12,6 +12,10 @@
for the definition of uid_t and gid_t.
* lib/pwmem.c: do not include <pwd.h>, "pwio.h" is sufficient
here.
+ * configure.in: Check if the stat structure has a st_atim or
+ st_atimensec field.
+ * libmisc/copydir.c: Conditionally use the stat's st_atim and
+ st_atimensec fields.
2008-08-26 Nicolas François <nicolas.francois at centraliens.net>
Modified: upstream/trunk/libmisc/copydir.c
===================================================================
--- upstream/trunk/libmisc/copydir.c 2008-08-30 18:30:58 UTC (rev 2297)
+++ upstream/trunk/libmisc/copydir.c 2008-08-30 18:31:21 UTC (rev 2298)
@@ -288,17 +288,22 @@
if (LSTAT (src, &sb) == -1) {
/* If we cannot stat the file, do not care. */
} else {
-#if defined(_BSD_SOURCE) || defined(_SVID_SOURCE)
+#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;
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;
- mt[1].tv_sec = sb.st_mtime;
mt[1].tv_usec = sb.st_mtimensec / 1000;
+#else
+ mt[0].tv_usec = 0;
+ mt[1].tv_usec = 0;
#endif
+#endif
if (S_ISDIR (sb.st_mode)) {
err = copy_dir (src, dst, &sb, mt, uid, gid);
More information about the Pkg-shadow-commits
mailing list