From: Andreas Schwab <schwab@suse.de>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Ulrich Drepper <drepper@redhat.com>,
Glibc hackers <libc-hacker@sources.redhat.com>
Subject: Re: [PATCH] Fix ftime
Date: Mon, 04 Mar 2002 07:57:00 -0000 [thread overview]
Message-ID: <je664ciawa.fsf@sykes.suse.de> (raw)
In-Reply-To: <20020304164541.Q2204@sunsite.ms.mff.cuni.cz> (Jakub Jelinek's message of "Mon, 4 Mar 2002 16:45:41 +0100")
Jakub Jelinek <jakub@redhat.com> writes:
|> Hi!
|>
|> I couldn't find anything which would mandate this, but at least it is very
|> weird to have millitm = 1000 returned (in 0.0999% of cases) when it is supposed
|> to mean millisecond part of the time.
|>
|> 2002-03-04 Jakub Jelinek <jakub@redhat.com>
|>
|> * sysdeps/unix/bsd/ftime.c (ftime): Don't return 1000 in millitm.
|>
|> --- libc/sysdeps/unix/bsd/ftime.c.jj Thu Aug 23 18:50:29 2001
|> +++ libc/sysdeps/unix/bsd/ftime.c Mon Mar 4 16:47:20 2002
|> @@ -1,4 +1,4 @@
|> -/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
|> +/* Copyright (C) 1994, 1997, 2002 Free Software Foundation, Inc.
|> This file is part of the GNU C Library.
|>
|> The GNU C Library is free software; you can redistribute it and/or
|> @@ -33,5 +33,10 @@ ftime (timebuf)
|> timebuf->millitm = (tv.tv_usec + 999) / 1000;
Perhaps we should actually truncate here instead of rounding up.
|> timebuf->timezone = tz.tz_minuteswest;
|> timebuf->dstflag = tz.tz_dsttime;
|> + if (timebuf->millitm == 1000)
|> + {
|> + timebuf->time++;
|> + timebuf->millitm = 0;
|> + }
|> return 0;
|> }
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2002-03-04 15:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-04 7:45 Jakub Jelinek
2002-03-04 7:57 ` Andreas Schwab [this message]
2002-03-11 13:21 ` Ulrich Drepper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=je664ciawa.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=drepper@redhat.com \
--cc=jakub@redhat.com \
--cc=libc-hacker@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).