From eb8397a03e7f68db1c4505c865516979c0e2e29f Mon Sep 17 00:00:00 2001 From: fcicq Date: Sun, 5 May 2013 13:32:30 +0800 Subject: [PATCH 1/5] Disable variadic template support in C++11 --- src/makefile.unix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/makefile.unix b/src/makefile.unix index f17de05cb..ed05491b6 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -13,7 +13,7 @@ USE_IPV6:=1 LINK:=$(CXX) -DEFS=-DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 +DEFS=-DBOOST_SPIRIT_THREADSAFE -DBOOST_NO_CXX11_VARIADIC_TEMPLATES -D_FILE_OFFSET_BITS=64 DEFS += $(addprefix -I,$(CURDIR) $(CURDIR)/obj $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH)) LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH)) From c391f9a47be89235488104d1ec30ae5bc403f84a Mon Sep 17 00:00:00 2001 From: fcicq Date: Sun, 5 May 2013 13:35:51 +0800 Subject: [PATCH 2/5] Fix boost uint type bug by reordering the includes --- src/script.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/script.cpp b/src/script.cpp index 14fe80e20..19d046a6a 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -2,12 +2,6 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include -#include - -using namespace std; -using namespace boost; - #include "script.h" #include "core.h" #include "keystore.h" @@ -16,6 +10,12 @@ using namespace boost; #include "sync.h" #include "util.h" +#include +#include + +using namespace std; +using namespace boost; + bool CheckSig(vector vchSig, const vector &vchPubKey, const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, int flags); From 9371403993eabc013c15971f13a90dc3c80bbc8e Mon Sep 17 00:00:00 2001 From: fcicq Date: Sun, 5 May 2013 13:36:42 +0800 Subject: [PATCH 3/5] Add missing constant for solaris --- src/util.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/util.h b/src/util.h index bee2749c1..3540cf512 100644 --- a/src/util.h +++ b/src/util.h @@ -102,6 +102,10 @@ T* alignup(T* p) #else #define MAX_PATH 1024 #endif +// As Solaris does not have the MSG_NOSIGNAL flag for send(2) syscall, it is defined as 0 +#ifndef MSG_NOSIGNAL +#define MSG_NOSIGNAL 0 +#endif inline void MilliSleep(int64 n) { @@ -499,6 +503,10 @@ inline void SetThreadPriority(int nPriority) } #else +// PRIO_MAX is not defined on Solaris +#ifndef PRIO_MAX + #define PRIO_MAX 20 +#endif #define THREAD_PRIORITY_LOWEST PRIO_MAX #define THREAD_PRIORITY_BELOW_NORMAL 2 #define THREAD_PRIORITY_NORMAL 0 From b34255b758cdde06b88ba619e6502d6ce6bc3ebb Mon Sep 17 00:00:00 2001 From: fcicq Date: Sun, 5 May 2013 13:37:03 +0800 Subject: [PATCH 4/5] Ignore SIGPIPE signal on Solaris --- src/init.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/init.cpp b/src/init.cpp index f6b2c91b4..bf312acd1 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -365,6 +365,11 @@ bool AppInit2(boost::thread_group& threadGroup) sigemptyset(&sa_hup.sa_mask); sa_hup.sa_flags = 0; sigaction(SIGHUP, &sa_hup, NULL); + +#if defined (__SVR4) && defined (__sun) + // ignore SIGPIPE on Solaris + signal(SIGPIPE, SIG_IGN); +#endif #endif // ********************************************************* Step 2: parameter interactions From 98148a713e6e671f1d993ce4dc7aa4654b4beaff Mon Sep 17 00:00:00 2001 From: fcicq Date: Wed, 17 Jul 2013 16:51:40 +0800 Subject: [PATCH 5/5] Fix fcntl include in net.cpp & netbase.cpp --- src/net.cpp | 4 ++++ src/netbase.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/net.cpp b/src/net.cpp index 5418c3de4..0a71e758b 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -15,6 +15,10 @@ #include #endif +#ifndef WIN32 +#include +#endif + #ifdef USE_UPNP #include #include diff --git a/src/netbase.cpp b/src/netbase.cpp index 08d133740..348771375 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -9,7 +9,7 @@ #include "hash.h" #ifndef WIN32 -#include +#include #endif #include // for to_lower()