OutputDebugStringF code cleanup

Initialize the OutputDebugStringF mutex and file pointer using
boost::call_once, to be thread-safe.
Make the return value of OutputDebugStringF really be the number of
characters written (*printf() semantics).
Declare the fReopenDebugLog flag volatile, since it is changed from
a signal handler.
And don't declare OutputDebugStringF() as inline.
This commit is contained in:
Gavin Andresen
2013-01-01 17:12:30 -05:00
parent 3f964b3c50
commit ee3374234c
2 changed files with 57 additions and 42 deletions

View File

@@ -138,7 +138,7 @@ extern std::string strMiscWarning;
extern bool fTestNet;
extern bool fNoListen;
extern bool fLogTimestamps;
extern bool fReopenDebugLog;
extern volatile bool fReopenDebugLog;
void RandAddSeed();
void RandAddSeedPerfmon();