Merge pull request #2618 from fcicq/solaris-support

Partial solaris support
This commit is contained in:
Jeff Garzik 2013-08-24 20:19:24 -07:00
commit 3d86e7cd48
6 changed files with 25 additions and 8 deletions

View File

@ -368,6 +368,11 @@ bool AppInit2(boost::thread_group& threadGroup)
sigemptyset(&sa_hup.sa_mask); sigemptyset(&sa_hup.sa_mask);
sa_hup.sa_flags = 0; sa_hup.sa_flags = 0;
sigaction(SIGHUP, &sa_hup, NULL); sigaction(SIGHUP, &sa_hup, NULL);
#if defined (__SVR4) && defined (__sun)
// ignore SIGPIPE on Solaris
signal(SIGPIPE, SIG_IGN);
#endif
#endif #endif
// ********************************************************* Step 2: parameter interactions // ********************************************************* Step 2: parameter interactions

View File

@ -13,7 +13,7 @@ USE_IPV6:=1
LINK:=$(CXX) 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)) 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)) LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH))

View File

@ -15,6 +15,10 @@
#include <string.h> #include <string.h>
#endif #endif
#ifndef WIN32
#include <fcntl.h>
#endif
#ifdef USE_UPNP #ifdef USE_UPNP
#include <miniupnpc/miniwget.h> #include <miniupnpc/miniwget.h>
#include <miniupnpc/miniupnpc.h> #include <miniupnpc/miniupnpc.h>

View File

@ -9,7 +9,7 @@
#include "hash.h" #include "hash.h"
#ifndef WIN32 #ifndef WIN32
#include <sys/fcntl.h> #include <fcntl.h>
#endif #endif
#include <boost/algorithm/string/case_conv.hpp> // for to_lower() #include <boost/algorithm/string/case_conv.hpp> // for to_lower()

View File

@ -2,12 +2,6 @@
// Copyright (c) 2009-2012 The Bitcoin developers // Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying // Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/foreach.hpp>
#include <boost/tuple/tuple.hpp>
using namespace std;
using namespace boost;
#include "script.h" #include "script.h"
#include "core.h" #include "core.h"
#include "keystore.h" #include "keystore.h"
@ -16,6 +10,12 @@ using namespace boost;
#include "sync.h" #include "sync.h"
#include "util.h" #include "util.h"
#include <boost/foreach.hpp>
#include <boost/tuple/tuple.hpp>
using namespace std;
using namespace boost;
bool CheckSig(vector<unsigned char> vchSig, const vector<unsigned char> &vchPubKey, const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, int flags); bool CheckSig(vector<unsigned char> vchSig, const vector<unsigned char> &vchPubKey, const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, int flags);

View File

@ -101,6 +101,10 @@ T* alignup(T* p)
#else #else
#define MAX_PATH 1024 #define MAX_PATH 1024
#endif #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) inline void MilliSleep(int64 n)
{ {
@ -515,6 +519,10 @@ inline void SetThreadPriority(int nPriority)
} }
#else #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_LOWEST PRIO_MAX
#define THREAD_PRIORITY_BELOW_NORMAL 2 #define THREAD_PRIORITY_BELOW_NORMAL 2
#define THREAD_PRIORITY_NORMAL 0 #define THREAD_PRIORITY_NORMAL 0