qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	"patches@linaro.org" <patches@linaro.org>,
	Brad Smith <brad@comstyle.com>, Kamil Rytarowski <n54@gmx.com>
Subject: Re: [Qemu-devel] [PATCH for-2.11?] osdep.h: Make TIME_MAX handle different time_t types
Date: Fri, 24 Nov 2017 15:13:07 +0000	[thread overview]
Message-ID: <CAFEAcA9304UPDvL2MeQUUomFJFG9BB4SohxOgxJ7wsc2nk-sgQ@mail.gmail.com> (raw)
In-Reply-To: <bdbc6042-bbae-b057-c9ee-769c6d7e8345@redhat.com>

On 23 November 2017 at 16:00, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 23/11/2017 16:56, Peter Maydell wrote:
>> In our various supported host OSes, the time_t type may be either 32
>> or 64 bit, and could in theory also be either signed or unsigned.
>> Notably, in OpenBSD time_t is a 64 bit type even if 'long' is 32
>> bits, so using LONG_MAX for TIME_MAX is incorrect.
>>
>> Use an approach suggested by Paolo Bonzini which calculates
>> the maximum value of the type rather than hardcoding it;
>> to do this we use the TYPE_MAXIMUM macro from Gnulib.
>>
>> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---

> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

Thanks; applied to master.

-- PMM

      reply	other threads:[~2017-11-24 15:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-23 15:56 [Qemu-devel] [PATCH for-2.11?] osdep.h: Make TIME_MAX handle different time_t types Peter Maydell
2017-11-23 15:59 ` no-reply
2017-11-23 16:00 ` Paolo Bonzini
2017-11-24 15:13   ` Peter Maydell [this message]

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=CAFEAcA9304UPDvL2MeQUUomFJFG9BB4SohxOgxJ7wsc2nk-sgQ@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=brad@comstyle.com \
    --cc=n54@gmx.com \
    --cc=patches@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 NNTP newsgroup(s).