Mercurial > hg > bitcoin
changeset 3177:e9e7e33d391f draft
Fix Qt build on OSX
Compiling boost::interprocess::message_queue against
boost 1.50 macports with -arch i386 (how releases are built,
for minimum download size and maximum compatibility) is failing:
src/qt/qtipcserver.cpp:37: error: no matching function for call to ‘boost::interprocess::message_queue_t<boost::interprocess::offset_ptr<void, int, long unsigned int, 0u> >::timed_receive(char (*)[257], long unsigned int, size_t&, unsigned int&, boost::posix_time::ptime&)’
This is probably a boost or macports bug, but since interprocess::message_queue
is only used for URI support, which isn't implemented on OSX anyway, I fixed
the build by #ifdef'ing out that code.
author | Gavin Andresen <gavinandresen@gmail.com> |
---|---|
date | Mon, 09 Jul 2012 11:03:38 -0400 |
parents | 7d395f223d33 |
children | b79553e5f935 8fe9e4fc1152 |
files | src/qt/bitcoin.cpp src/qt/qtipcserver.cpp |
diffstat | 2 files changed, 16 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -116,6 +116,8 @@ #ifndef BITCOIN_QT_TEST int main(int argc, char *argv[]) { +// TODO: implement URI support on the Mac. +#if !defined(MAC_OSX) // Do this early as we don't want to bother initializing if we are just calling IPC for (int i = 1; i < argc; i++) { @@ -134,6 +136,7 @@ } } } +#endif // Internal string conversion is all UTF-8 QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); @@ -258,6 +261,8 @@ { window.show(); } +// TODO: implement URI support on the Mac. +#if !defined(MAC_OSX) // Place this here as guiref has to be defined if we dont want to lose URIs ipcInit(); @@ -276,7 +281,7 @@ } } } - +#endif app.exec(); window.hide();
--- a/src/qt/qtipcserver.cpp +++ b/src/qt/qtipcserver.cpp @@ -20,6 +20,14 @@ using namespace boost; using namespace std; +#ifdef MAC_OSX +// URI handling not implemented on OSX yet + +void ipcInit() { } +void ipcShutdown() { } + +#else + void ipcShutdown() { message_queue::remove(BITCOINURI_QUEUE_NAME); @@ -50,11 +58,6 @@ void ipcInit() { -#ifdef MAC_OSX - // TODO: implement bitcoin: URI handling the Mac Way - return; -#endif - message_queue* mq; char strBuf[257]; size_t nSize; @@ -86,3 +89,5 @@ delete mq; } } + +#endif