mirror of https://git.tukaani.org/xz.git
Windows: Fix mythread_once() macro with Vista threads.
Don't call InitOnceComplete() if initialization was already done. So far mythread_once() has been needed only when building with --enable-small. windows/build.bash does this together with --disable-threads so the Vista-specific mythread_once() is never needed by those builds. VS project files or CMake-builds don't support HAVE_SMALL builds at all.
This commit is contained in:
parent
48dde3bab9
commit
e53e0e2186
|
@ -370,10 +370,11 @@ typedef struct {
|
||||||
BOOL pending_; \
|
BOOL pending_; \
|
||||||
if (!InitOnceBeginInitialize(&once_, 0, &pending_, NULL)) \
|
if (!InitOnceBeginInitialize(&once_, 0, &pending_, NULL)) \
|
||||||
abort(); \
|
abort(); \
|
||||||
if (pending_) \
|
if (pending_) { \
|
||||||
func(); \
|
func(); \
|
||||||
if (!InitOnceComplete(&once, 0, NULL)) \
|
if (!InitOnceComplete(&once, 0, NULL)) \
|
||||||
abort(); \
|
abort(); \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue