X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Futil.h;h=e609eebf2500ffc2002cfe88fde25aeecd509993;hb=b76dbc1806483254e6092e25a8d61069905b9ff1;hp=467b4178aa1d87dca9b7c0443f1c0235cc038493;hpb=167517ffee2ac1111d2a492fd0c68a011e9f0c97;p=novacoin.git diff --git a/src/util.h b/src/util.h index 467b417..e609eeb 100644 --- a/src/util.h +++ b/src/util.h @@ -644,9 +644,9 @@ public: // Note: It turns out we might have been able to use boost::thread // by using TerminateThread(boost::thread.native_handle(), 0); #ifdef WIN32 -typedef HANDLE pthread_t; +typedef HANDLE bitcoin_pthread_t; -inline pthread_t CreateThread(void(*pfn)(void*), void* parg, bool fWantHandle=false) +inline bitcoin_pthread_t CreateThread(void(*pfn)(void*), void* parg, bool fWantHandle=false) { DWORD nUnused = 0; HANDLE hthread = @@ -660,12 +660,12 @@ inline pthread_t CreateThread(void(*pfn)(void*), void* parg, bool fWantHandle=fa if (hthread == NULL) { printf("Error: CreateThread() returned %d\n", GetLastError()); - return (pthread_t)0; + return (bitcoin_pthread_t)0; } if (!fWantHandle) { CloseHandle(hthread); - return (pthread_t)-1; + return (bitcoin_pthread_t)-1; } return hthread; }