Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daemon wouldn't start until LOCK added like QT Wallet uses #52

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void CDBEnv::EnvShutdown()
if (ret != 0)
printf("EnvShutdown exception: %s (%d)\n", DbEnv::strerror(ret), ret);
if (!fMockDb)
DbEnv(0).remove(strPath.c_str(), 0);
DbEnv((u_int32_t)0).remove(strPath.c_str(), 0);
}

CDBEnv::CDBEnv() : dbenv(DB_CXX_NO_EXCEPTIONS)
Expand Down
3 changes: 2 additions & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ bool AppInit2()

uiInterface.InitMessage(_("Verifying database integrity..."));

LOCK(bitdb.cs_db);
if (!bitdb.Open(GetDataDir()))
{
string msg = strprintf(_("Error initializing database environment %s!"
Expand Down Expand Up @@ -917,7 +918,7 @@ std::string LicenseInfo(bool f1, bool f2)
strprintf(_("Please contribute if you find %s useful. Visit %s for further information about the software. "), PACKAGE_NAME,URL_WEBSITE.c_str()) +
"\n\n" +
strprintf(_("Source code: %s"), URL_SOURCE_CODE.c_str()) + "\n" +
strprintf(_("Dowloand wallet: %s"), "<http://m-core.org/bin>") + "\n" +
strprintf(_("Download wallet: %s"), "<http://m-core.org/bin>") + "\n" +
strprintf(_("Block-Chain: %s"), "<http://m-core.org/bin/block-chain>") + "\n" +
strprintf(_("Roadmap: %s"), "<http://m-core.org/resources/roadmap>") + "\n" +
"\n" +
Expand Down
53 changes: 34 additions & 19 deletions src/makefile.osx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

CXX=llvm-g++

# macports
#DEPSDIR=/opt/local

#homebrew
DEPSDIR=/usr/local/Cellar

# :=0 --> UPnP support turned off by default at runtime
# :=1 --> UPnP support turned on by default at runtime
# :=- --> No UPnP support - miniupnp not required
Expand All @@ -20,33 +25,43 @@ INCLUDEPATHS= \
-I"$(CURDIR)" \
-I"$(CURDIR)"/obj \
-I"$(DEPSDIR)/include" \
-I"$(DEPSDIR)/include/db48"
-I"$(DEPSDIR)/berkeley-db@4/4.8.30/include" \
-I"$(DEPSDIR)/openssl/1.0.2o_2/include"

LIBPATHS= \
-L"$(DEPSDIR)/lib" \
-L"$(DEPSDIR)/lib/db48"
-L"$(DEPSDIR)" \
-L"$(DEPSDIR)/berkeley-db@4/4.8.30/lib" \
-L"$(DEPSDIR)/leveldb/1.20_2/lib"

LIBS = -dead_strip

TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)
BOOST_LIB_SUFFIX=-mt-s

ifdef STATIC
# was mt-s (doesn't exist in macport install today)
BOOST_LIB_SUFFIX=-mt

#ifdef STATIC
# Build STATIC if you are redistributing the binary
#DEPSDIR=/opt/crypt
TESTLIBS += \
$(DEPSDIR)/lib/libboost_unit_test_framework-mt.a
LIBS += \
$(DEPSDIR)/lib/libdb_cxx-4.8.a \
$(DEPSDIR)/lib/libboost_system$(BOOST_LIB_SUFFIX).a \
$(DEPSDIR)/lib/libboost_filesystem$(BOOST_LIB_SUFFIX).a \
$(DEPSDIR)/lib/libboost_program_options$(BOOST_LIB_SUFFIX).a \
$(DEPSDIR)/lib/libboost_thread$(BOOST_LIB_SUFFIX).a \
$(DEPSDIR)/lib/libssl.a \
$(DEPSDIR)/lib/libgmp.a \
$(DEPSDIR)/lib/libcrypto.a \
-lz
else

# NOTE: File library (.a) does not exist
#TESTLIBS += \
# $(DEPSDIR)/lib/libboost_unit_test_framework-mt.a

#LIBS += \
# $(DEPSDIR)/lib/libdb_cxx-4.8.a \
# $(DEPSDIR)/lib/libboost_system$(BOOST_LIB_SUFFIX).a \
# $(DEPSDIR)/lib/libboost_filesystem$(BOOST_LIB_SUFFIX).a \
# $(DEPSDIR)/lib/libboost_program_options$(BOOST_LIB_SUFFIX).a \
# $(DEPSDIR)/lib/libboost_thread$(BOOST_LIB_SUFFIX).a \
# $(DEPSDIR)/lib/libssl.a \
# $(DEPSDIR)/lib/libgmp.a \
# $(DEPSDIR)/lib/libcrypto.a \
# -lz \
# -lssl \
# -lcrypto \
# -lgmp
#else
TESTLIBS += \
-lboost_unit_test_framework$(BOOST_LIB_SUFFIX)
LIBS += \
Expand All @@ -60,7 +75,7 @@ LIBS += \
-lcrypto \
-lz
TESTDEFS += -DBOOST_TEST_DYN_LINK
endif
#endif

DEFS=-DMAC_OSX -DMSG_NOSIGNAL=0 -DBOOST_SPIRIT_THREADSAFE

Expand Down
2 changes: 2 additions & 0 deletions src/serialize.h
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,7 @@ class CDataStream
iterator insert(iterator it, const char& x=char()) { return vch.insert(it, x); }
void insert(iterator it, size_type n, const char& x) { vch.insert(it, n, x); }

/*
void insert(iterator it, const_iterator first, const_iterator last)
{
assert(last - first >= 0);
Expand All @@ -823,6 +824,7 @@ class CDataStream
else
vch.insert(it, first, last);
}
*/

void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const_iterator last)
{
Expand Down