On 23 October 2017 at 12:20, Nicolai Hähnle <nhaeh...@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 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev