From b6dc3b517b74ef2baa0e707f837a65b4ff5a6f2e Mon Sep 17 00:00:00 2001 From: Satoshi Nakamoto Date: Mon, 26 Jul 2010 17:44:51 +0000 Subject: bitcoind now compiles without wxWidgets or wxBase --- util.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'util.h') diff --git a/util.h b/util.h index 6f90c18e3c..d05ab695cd 100644 --- a/util.h +++ b/util.h @@ -55,7 +55,6 @@ inline T& REF(const T& val) } #ifdef __WXMSW__ -static const bool fWindows = true; #define MSG_NOSIGNAL 0 #define MSG_DONTWAIT 0 #ifndef UINT64_MAX @@ -70,7 +69,6 @@ static const bool fWindows = true; #define unlink _unlink typedef int socklen_t; #else -static const bool fWindows = false; #define WSAGetLastError() errno #define WSAEWOULDBLOCK EWOULDBLOCK #define WSAEMSGSIZE EMSGSIZE @@ -84,10 +82,12 @@ typedef u_int SOCKET; #define _vsnprintf(a,b,c,d) vsnprintf(a,b,c,d) #define strlwr(psz) to_lower(psz) #define _strlwr(psz) to_lower(psz) -#define _mkdir(psz) filesystem::create_directory(psz) #define MAX_PATH 1024 -#define Sleep(n) wxMilliSleep(n) #define Beep(n1,n2) (0) +inline void Sleep(int64 n) +{ + boost::thread::sleep(boost::get_system_time() + boost::posix_time::milliseconds(n)); +} #endif inline int myclosesocket(SOCKET& hSocket) @@ -104,6 +104,13 @@ inline int myclosesocket(SOCKET& hSocket) } #define closesocket(s) myclosesocket(s) +#ifndef GUI +inline const char* _(const char* psz) +{ + return psz; +} +#endif + -- cgit v1.2.3