[Mesa-dev] [PATCH 03/25] threads: update for late C11 changes
Emil Velikov
emil.l.velikov at gmail.com
Tue Oct 24 17:21:24 UTC 2017
On 23 October 2017 at 12:20, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
>>> -#ifndef _MSC_VER
>>> -struct xtime {
>>> - time_t sec;
>>> - long nsec;
>>> -};
>>> -typedef struct xtime xtime;
>>> -#endif
>>> -
>>
>>
>> We don't have a fall-back declaration of the struct, yet we use it
>> below and provide a timespec_get() implementation.
>> I'd imagine you haven't tested this on Windows (hence Jose in CC)?
>
>
> Right on both counts, as I don't really have a way of testing on Windows.
>
There's an Appveyour integration similar to Travis. One should be able
to select the MSVC/toolchain version, but I'm not versed enough for
examples :-\
Let's see what Jose will say on the topic.
>
>> Quick search suggests that MSVC 2015 was the first one that introduces
>> the struct and timespec_get.
>>
>> If we're safe as-is, please add a comment with some details - I'd
>> imagine Jose had better knowledge in the area.
>>
>>
>>> /*-------------------- 7.25.7 Time functions --------------------*/
>>> // 7.25.6.1
>>> +#if 0
>>
>> I'd just drop the hunk mentioning that timespec_get() is part of time.h
>
>
> I wasn't sure when timespec_get was introduced, so I thought it safer to
> keep it around for a while in case we run into systems where time.h doesn't
> provide it.
>
> I can add a comment, or remove it entirely if you think that's not a
> concern.
>
Valid point - I'd assumed it was available everywhere (tm). I'd leave
it for now, thus we can toggle based on $heuristics if applicable.
-Emil
More information about the mesa-dev
mailing list