Skip to content
This repository was archived by the owner on Oct 31, 2018. It is now read-only.

Commit c36cba8

Browse files
modify for mac
1 parent 293b053 commit c36cba8

25 files changed

Lines changed: 251 additions & 118 deletions

Bitblocks-qt.pro

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ greaterThan(QT_MAJOR_VERSION, 4) {
1212
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
1313
}
1414

15+
macx {
16+
#
17+
BOOST_INCLUDE_PATH=/usr/local/opt/boost162/include
18+
BOOST_LIB_PATH=/usr/local/opt/boost162/lib
19+
BDB_INCLUDE_PATH=/usr/local/opt/berkeley-db@4/include
20+
BDB_LIB_PATH=/usr/local/opt/berkeley-db@4/lib
21+
OPENSSL_INCLUDE_PATH=/usr/local/opt/openssl/include
22+
OPENSSL_LIB_PATH=/usr/local/opt/openssl/lib
23+
MINIUPNPC_INCLUDE_PATH=/usr/local/opt/miniupnpc/include
24+
MINIUPNPC_LIB_PATH=/usr/local/opt/miniupnpc/lib
25+
26+
}
1527
# for boost 1.37, add -mt to the boost libraries
1628
# use: qmake BOOST_LIB_SUFFIX=-mt
1729
# for boost thread win32 with _win32 sufix

src/alert.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ std::string CUnsignedAlert::ToString() const
5656
return strprintf(
5757
"CAlert(\n"
5858
" nVersion = %d\n"
59-
" nRelayUntil = %"PRId64"\n"
60-
" nExpiration = %"PRId64"\n"
59+
" nRelayUntil = %" PRId64"\n"
60+
" nExpiration = %" PRId64"\n"
6161
" nID = %d\n"
6262
" nCancel = %d\n"
6363
" setCancel = %s\n"

src/bitcoinrpc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ static string HTTPReply(int nStatus, const string& strMsg, bool keepalive)
383383
"HTTP/1.1 %d %s\r\n"
384384
"Date: %s\r\n"
385385
"Connection: %s\r\n"
386-
"Content-Length: %"PRIszu"\r\n"
386+
"Content-Length: %" PRIszu"\r\n"
387387
"Content-Type: application/json\r\n"
388388
"Server: bitblocks-json-rpc/%s\r\n"
389389
"\r\n"

src/db.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ void CDBEnv::Flush(bool fShutdown)
464464
else
465465
mi++;
466466
}
467-
printf("DBFlush(%s)%s ended %15"PRId64"ms\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " db not started", GetTimeMillis() - nStart);
467+
printf("DBFlush(%s)%s ended %15" PRId64"ms\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " db not started", GetTimeMillis() - nStart);
468468
if (fShutdown)
469469
{
470470
char** listp;

src/init.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ bool AppInit2()
726726
printf("Shutdown requested. Exiting.\n");
727727
return false;
728728
}
729-
printf(" block index %15"PRId64"ms\n", GetTimeMillis() - nStart);
729+
printf(" block index %15" PRId64"ms\n", GetTimeMillis() - nStart);
730730

731731
if (GetBoolArg("-printblockindex") || GetBoolArg("-printblocktree"))
732732
{
@@ -827,7 +827,7 @@ bool AppInit2()
827827
}
828828

829829
printf("%s", strErrors.str().c_str());
830-
printf(" wallet %15"PRId64"ms\n", GetTimeMillis() - nStart);
830+
printf(" wallet %15" PRId64"ms\n", GetTimeMillis() - nStart);
831831

832832
RegisterWallet(pwalletMain);
833833

@@ -847,7 +847,7 @@ bool AppInit2()
847847
printf("Rescanning last %i blocks (from block %i)...\n", pindexBest->nHeight - pindexRescan->nHeight, pindexRescan->nHeight);
848848
nStart = GetTimeMillis();
849849
pwalletMain->ScanForWalletTransactions(pindexRescan, true);
850-
printf(" rescan %15"PRId64"ms\n", GetTimeMillis() - nStart);
850+
printf(" rescan %15" PRId64"ms\n", GetTimeMillis() - nStart);
851851
}
852852

853853
// ********************************************************* Step 9: import blocks
@@ -889,7 +889,7 @@ bool AppInit2()
889889
printf("Invalid or missing peers.dat; recreating\n");
890890
}
891891

892-
printf("Loaded %i addresses from peers.dat %"PRId64"ms\n",
892+
printf("Loaded %i addresses from peers.dat %" PRId64"ms\n",
893893
addrman.size(), GetTimeMillis() - nStart);
894894

895895
// ********************************************************* Step 11: start node
@@ -900,11 +900,11 @@ bool AppInit2()
900900
RandAddSeedPerfmon();
901901

902902
//// debug print
903-
printf("mapBlockIndex.size() = %"PRIszu"\n", mapBlockIndex.size());
903+
printf("mapBlockIndex.size() = %" PRIszu"\n", mapBlockIndex.size());
904904
printf("nBestHeight = %d\n", nBestHeight);
905-
printf("setKeyPool.size() = %"PRIszu"\n", pwalletMain->setKeyPool.size());
906-
printf("mapWallet.size() = %"PRIszu"\n", pwalletMain->mapWallet.size());
907-
printf("mapAddressBook.size() = %"PRIszu"\n", pwalletMain->mapAddressBook.size());
905+
printf("setKeyPool.size() = %" PRIszu"\n", pwalletMain->setKeyPool.size());
906+
printf("mapWallet.size() = %" PRIszu"\n", pwalletMain->mapWallet.size());
907+
printf("mapAddressBook.size() = %" PRIszu"\n", pwalletMain->mapAddressBook.size());
908908

909909
if (!NewThread(StartNode, NULL))
910910
InitError(_("Error: could not start node"));

src/irc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ void ThreadIRCSeed2(void* parg)
260260
if (!fNoListen && GetLocal(addrLocal, &addrIPv4) && nNameRetry<3)
261261
strMyName = EncodeAddress(GetLocalAddress(&addrConnect));
262262
if (strMyName == "")
263-
strMyName = strprintf("x%"PRIu64"", GetRand(1000000000));
263+
strMyName = strprintf("x%" PRIu64"", GetRand(1000000000));
264264

265265
Send(hSocket, strprintf("NICK %s\r", strMyName.c_str()).c_str());
266266
Send(hSocket, strprintf("USER %s 8 * : %s\r", strMyName.c_str(), strMyName.c_str()).c_str());

src/kernel.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ bool ComputeNextStakeModifier(const CBlockIndex* pindexPrev, uint64_t& nStakeMod
137137
return error("ComputeNextStakeModifier: unable to get last modifier");
138138
if (fDebug)
139139
{
140-
printf("ComputeNextStakeModifier: prev modifier=0x%016"PRIx64" time=%s\n", nStakeModifier, DateTimeStrFormat(nModifierTime).c_str());
140+
printf("ComputeNextStakeModifier: prev modifier=0x%016" PRIx64" time=%s\n", nStakeModifier, DateTimeStrFormat(nModifierTime).c_str());
141141
}
142142
if (nModifierTime / nModifierInterval >= pindexPrev->GetBlockTime() / nModifierInterval)
143143
return true;
@@ -200,7 +200,7 @@ bool ComputeNextStakeModifier(const CBlockIndex* pindexPrev, uint64_t& nStakeMod
200200
}
201201
if (fDebug)
202202
{
203-
printf("ComputeNextStakeModifier: new modifier=0x%016"PRIx64" time=%s\n", nStakeModifierNew, DateTimeStrFormat(pindexPrev->GetBlockTime()).c_str());
203+
printf("ComputeNextStakeModifier: new modifier=0x%016" PRIx64" time=%s\n", nStakeModifierNew, DateTimeStrFormat(pindexPrev->GetBlockTime()).c_str());
204204
}
205205

206206
nStakeModifier = nStakeModifierNew;
@@ -295,12 +295,12 @@ bool CheckStakeKernelHash(unsigned int nBits, const CBlock& blockFrom, unsigned
295295
hashProofOfStake = Hash(ss.begin(), ss.end());
296296
if (fPrintProofOfStake)
297297
{
298-
printf("CheckStakeKernelHash() : using modifier 0x%016"PRIx64" at height=%d timestamp=%s for block from height=%d timestamp=%s\n",
298+
printf("CheckStakeKernelHash() : using modifier 0x%016" PRIx64" at height=%d timestamp=%s for block from height=%d timestamp=%s\n",
299299
nStakeModifier, nStakeModifierHeight,
300300
DateTimeStrFormat(nStakeModifierTime).c_str(),
301301
mapBlockIndex[hashBlockFrom]->nHeight,
302302
DateTimeStrFormat(blockFrom.GetBlockTime()).c_str());
303-
printf("CheckStakeKernelHash() : check modifier=0x%016"PRIx64" nTimeBlockFrom=%u nTxPrevOffset=%u nTimeTxPrev=%u nPrevout=%u nTimeTx=%u hashProof=%s\n",
303+
printf("CheckStakeKernelHash() : check modifier=0x%016" PRIx64" nTimeBlockFrom=%u nTxPrevOffset=%u nTimeTxPrev=%u nPrevout=%u nTimeTx=%u hashProof=%s\n",
304304
nStakeModifier,
305305
nTimeBlockFrom, nTxPrevOffset, txPrev.nTime, prevout.n, nTimeTx,
306306
hashProofOfStake.ToString().c_str());
@@ -311,12 +311,12 @@ bool CheckStakeKernelHash(unsigned int nBits, const CBlock& blockFrom, unsigned
311311
return false;
312312
if (fDebug && !fPrintProofOfStake)
313313
{
314-
printf("CheckStakeKernelHash() : using modifier 0x%016"PRIx64" at height=%d timestamp=%s for block from height=%d timestamp=%s\n",
314+
printf("CheckStakeKernelHash() : using modifier 0x%016" PRIx64" at height=%d timestamp=%s for block from height=%d timestamp=%s\n",
315315
nStakeModifier, nStakeModifierHeight,
316316
DateTimeStrFormat(nStakeModifierTime).c_str(),
317317
mapBlockIndex[hashBlockFrom]->nHeight,
318318
DateTimeStrFormat(blockFrom.GetBlockTime()).c_str());
319-
printf("CheckStakeKernelHash() : pass modifier=0x%016"PRIx64" nTimeBlockFrom=%u nTxPrevOffset=%u nTimeTxPrev=%u nPrevout=%u nTimeTx=%u hashProof=%s\n",
319+
printf("CheckStakeKernelHash() : pass modifier=0x%016" PRIx64" nTimeBlockFrom=%u nTxPrevOffset=%u nTimeTxPrev=%u nPrevout=%u nTimeTx=%u hashProof=%s\n",
320320
nStakeModifier,
321321
nTimeBlockFrom, nTxPrevOffset, txPrev.nTime, prevout.n, nTimeTx,
322322
hashProofOfStake.ToString().c_str());

0 commit comments

Comments
 (0)