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.
BOOL pending_; \
if (!InitOnceBeginInitialize(&once_, 0, &pending_, NULL)) \
abort(); \
- if (pending_) \
+ if (pending_) { \
func(); \
- if (!InitOnceComplete(&once, 0, NULL)) \
- abort(); \
+ if (!InitOnceComplete(&once, 0, NULL)) \
+ abort(); \
+ } \
} while (0)
#endif