Define MSG_NOSIGNAL to 0 on platforms where it is unavailable.
[novacoin.git] / src / util.h
index 1e4ceb2..4a68051 100644 (file)
@@ -67,14 +67,6 @@ typedef unsigned long long  uint64;
 // This is needed because the foreach macro can't get over the comma in pair<t1, t2>
 #define PAIRTYPE(t1, t2)    pair<t1, t2>
 
-// Used to bypass the rule against non-const reference to temporary
-// where it makes sense with wrappers such as CFlatData or CTxDB
-template<typename T>
-inline T& REF(const T& val)
-{
-    return (T&)val;
-}
-
 // Align by increasing pointer, must have extra space at end of buffer
 template <size_t nBytes, typename T>
 T* alignup(T* p)
@@ -89,8 +81,10 @@ T* alignup(T* p)
     return u.ptr;
 }
 
-#ifdef __WXMSW__
+#ifndef MSG_NOSIGNAL
 #define MSG_NOSIGNAL        0
+#endif
+#ifdef __WXMSW__
 #define MSG_DONTWAIT        0
 #ifndef UINT64_MAX
 #define UINT64_MAX          _UI64_MAX