Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] mtime preservation
Date: Thu, 26 Nov 2009 08:00:01
Message-Id: 19214.13680.288961.629420@a1i15.kph.uni-mainz.de
In Reply to: Re: [gentoo-dev] mtime preservation by Zac Medico
1 >>>>> On Wed, 25 Nov 2009, Zac Medico wrote:
2
3 >> Not non-preservation. Partial and inconsistent corruption.
4
5 > Wouldn't "loss of precision" be a more accurate description?
6
7 Yes. Or even "rounding".
8
9 > Of the known packages which require timestamp preservation, do any
10 > of them use sub-second precision in their timestamp comparisons?
11
12 I can speak for Emacs only, where the comparison code (in fileio.c) is
13 as follows:
14
15 if (stat (SDATA (absname1), &st) < 0)
16 return Qnil;
17
18 mtime1 = st.st_mtime;
19
20 if (stat (SDATA (absname2), &st) < 0)
21 return Qt;
22
23 return (mtime1 > st.st_mtime) ? Qt : Qnil;
24
25 It uses stat(2), therefore nanoseconds are ignored.
26
27 Ulrich

Replies

Subject Author
Re: [gentoo-dev] mtime preservation Ulrich Mueller <ulm@g.o>
Re: [gentoo-dev] mtime preservation "Łukasz Michalik" <bronksos@×××××.com>
Re: [gentoo-dev] mtime preservation Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>