Thu Jul 25 08:51:00 GMT 2002
On Wed, Jul 24, 2002 at 01:33:34AM -0400, Christopher Faylor wrote:
> On Tue, Jul 23, 2002 at 10:34:02PM -0700, David MacMahon wrote:
> >(sorry, I didn't do a Changelog >entry).
I was a little bit rushed (OK, lazy) at the time. Below is a better
submission. Do you prefer these to be inline (as below) or as
attachments (or both)?
2002-07-24 David MacMahon <firstname.lastname@example.org>
* times.cc (to_time_t): Always round time_t down to nearest second.
RCS file: /cvs/src/src/winsup/cygwin/times.cc,v
retrieving revision 1.38
diff -u -r1.38 times.cc
--- src/winsup/cygwin/times.cc 8 Jun 2002 01:24:58 -0000 1.38
+++ src/winsup/cygwin/times.cc 25 Jul 2002 00:09:08 -0000
@@ -212,7 +212,6 @@
stuffed into two long words.
A time_t is the number of seconds since jan 1 1970. */
- long rem;
long long x = ((long long) ptr->dwHighDateTime << 32) + ((unsigned)ptr->dwLowDateTime);
/* pass "no time" as epoch */
@@ -220,10 +219,7 @@
x -= FACTOR; /* number of 100ns between 1601 and 1970 */
- rem = x % ((long long)NSPERSEC);
- rem += (NSPERSEC / 2);
x /= (long long) NSPERSEC; /* number of 100ns in a second */
- x += (long long) (rem / NSPERSEC);
David MacMahon, President
Smart Software Consulting
More information about the Cygwin-patches