// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "util.h"
+#include "interface.h"
#include "sync.h"
#include "version.h"
-#include "interface.h"
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/case_conv.hpp> // for to_lower()
#include <io.h> /* for _commit */
#include "shlobj.h"
#elif defined(__linux__)
-# include <sys/prctl.h>
+#include <sys/prctl.h>
#endif
#if !defined(WIN32) && !defined(ANDROID)
return static_cast<int>(GetRand(nMax));
}
-uint256 GetRandHash()
-{
- uint256 hash;
- RAND_bytes((unsigned char*)&hash, sizeof(hash));
- return hash;
-}
-
-
-
-
-
-
static FILE* fileout = NULL;
inline int OutputDebugStringF(const char* pszFormat, ...)
// Since the order of destruction of static/global objects is undefined,
// allocate mutexDebugLog on the heap the first time this routine
// is called to avoid crashes during shutdown.
- static boost::mutex* mutexDebugLog = NULL;
- if (mutexDebugLog == NULL) mutexDebugLog = new boost::mutex();
- boost::mutex::scoped_lock scoped_lock(*mutexDebugLog);
+ static std::mutex* mutexDebugLog = nullptr;
+ if (mutexDebugLog == nullptr) mutexDebugLog = new std::mutex();
+ std::scoped_lock scoped_lock(*mutexDebugLog);
// reopen the log file, if requested
if (fReopenDebugLog) {