qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] osdep: Deal with TIME_MAX and OpenBSD 64-bit ti


From: Kamil Rytarowski
Subject: Re: [Qemu-devel] [PATCH] osdep: Deal with TIME_MAX and OpenBSD 64-bit time_t
Date: Mon, 6 Nov 2017 18:21:45 +0100
User-agent: Mozilla/5.0 (X11; NetBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

On 06.11.2017 11:51, Peter Maydell wrote:
> On 6 November 2017 at 00:56, Brad Smith <address@hidden> wrote:
>> Define TIME_MAX to LLONG_MAX for OpenBSD since OpenBSD uses 64-bit time_t.
>>
>> Signed-off-by: Brad Smith <address@hidden>
>>
>>
>> diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
>> index 6855b94bbf..824714049b 100644
>> --- a/include/qemu/osdep.h
>> +++ b/include/qemu/osdep.h
>> @@ -132,8 +132,12 @@ extern int daemon(int, int);
>>  #define ESHUTDOWN 4099
>>  #endif
>>  #ifndef TIME_MAX
>> +#ifdef __OpenBSD__
>> +#define TIME_MAX LLONG_MAX
>> +#else
>>  #define TIME_MAX LONG_MAX
>>  #endif
>> +#endif
> 
> I'm not really a fan of adding new OS-specific #ifdefs --
> what if one of the other BSDs uses or switches to 64-bit
> time_t for 32-bit platforms? Is there some way we can detect
> this generically at compile time (possibly in configure) ?
> 

NetBSD 32-bit ports switched to 64-bit in 2009. There are no longer
supported releases with 32-bit time_t.

> thanks
> -- PMM
> 


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]