OSDN Git Service

c11/threads: Include thr/xtimec.h for xtime definition when building with MSVC.
authorJose Fonseca <jfonseca@vmware.com>
Tue, 28 Mar 2017 10:25:04 +0000 (11:25 +0100)
committerAndres Gomez <agomez@igalia.com>
Thu, 30 Mar 2017 13:32:40 +0000 (16:32 +0300)
commit3d59fd83ed128d48c15b4e0f2c7a9bcf6d6f6566
tree57f6e8ef4ee587efe248f31d5302786ba951c540
parent9caf60b3a2c25d46c78c9cdba36e663b687ffd50
c11/threads: Include thr/xtimec.h for xtime definition when building with MSVC.

MSVC has been including a xtime definition in thr/xtimec.h ever since
MSVC 2013 (which is the minimum we require for building Mesa), and
including it prevents duplicate definitions when it gets included by
LLVM.

In fact, it looks that MSVC has been including a partial C11 threads
implementation too for some time, which we should consider migrating to
once we eliminate the use of _MTX_INITIALIZER_NP in our tree.

Thanks to the anonymous helper from
https://bugs.freedesktop.org/show_bug.cgi?id=100201#c4 for spotting
this.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100201
CC: "17.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit ecfafdcbf51d8919e219539b57ffbd9cd3f8557a)
include/c11/threads.h