From 265dcc7e227581180487d4a34aaca2c9a82d0db0 Mon Sep 17 00:00:00 2001 From: Julian Yap Date: Wed, 12 Feb 2014 17:58:31 -1000 Subject: [PATCH] Integrate various fixes so Novacoin builds on OSX --- src/makefile.osx | 4 +++- src/net.cpp | 2 +- src/serialize.h | 12 ------------ 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/makefile.osx b/src/makefile.osx index abead78..8559cdf 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -63,6 +63,7 @@ CFLAGS += -Wall -Wextra -Wformat -Wno-ignored-qualifiers -Wformat-security -Wno- $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) OBJS= \ + leveldb/libleveldb.a \ obj/alert.o \ obj/version.o \ obj/checkpoints.o \ @@ -130,7 +131,7 @@ DEFS += $(addprefix -I,$(CURDIR)/leveldb/include) DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers) OBJS += obj/txdb-leveldb.o leveldb/libleveldb.a: - @echo "Building LevelDB ..."; cd leveldb; make; cd .. + @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(CFLAGS)" libleveldb.a libmemenv.a && cd .. obj/txdb-leveldb.o: leveldb/libleveldb.a # auto-generated dependencies: @@ -171,5 +172,6 @@ clean: -rm -f obj/*.P -rm -f obj/zerocoin/*.P -rm -f obj/build.h + -cd leveldb && $(MAKE) clean || true FORCE: diff --git a/src/net.cpp b/src/net.cpp index 027a1ef..d6b3118 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -57,7 +57,7 @@ static bool vfLimited[NET_MAX] = {}; static CNode* pnodeLocalHost = NULL; CAddress addrSeenByPeer(CService("0.0.0.0", 0), nLocalServices); uint64 nLocalHostNonce = 0; -array vnThreadsRunning; +boost::array vnThreadsRunning; static std::vector vhListenSocket; CAddrMan addrman; diff --git a/src/serialize.h b/src/serialize.h index 3b3dcd4..44eb4f5 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -824,18 +824,6 @@ public: vch.insert(it, first, last); } - void insert(iterator it, std::vector::const_iterator first, std::vector::const_iterator last) - { - assert(last - first >= 0); - if (it == vch.begin() + nReadPos && (unsigned int)(last - first) <= nReadPos) - { - // special case for inserting at the front when there's room - nReadPos -= (last - first); - memcpy(&vch[nReadPos], &first[0], last - first); - } - else - vch.insert(it, first, last); - } #if !defined(_MSC_VER) || _MSC_VER >= 1300 void insert(iterator it, const char* first, const char* last) -- 1.7.1