aboutsummaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-07-26 17:15:18 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-07-26 17:15:18 +0000
commit793200e5e918a6e993ddf701967a8b6535a6828f (patch)
treee983c5b11c032a309edb230f8694225aef478d98 /util.h
parent6966768a554575ca329fbcd4aad0d4f21c702f9a (diff)
downloadbitcoin-793200e5e918a6e993ddf701967a8b6535a6828f.tar.xz
bitcoind now compiles without wxWidgets or wxBase
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@112 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'util.h')
-rw-r--r--util.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/util.h b/util.h
index 49e386308d..366c0e159e 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
+