From 7b671f52e05b6845b934cef2eb0107f30a7677c7 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Mon, 21 May 2012 22:25:54 -0400 Subject: [PATCH] Define BOOST_SPIRIT_THREADSAFE in all makefiles rather than at each include site. Fixes #1371 --- bitcoin-qt.pro | 2 +- src/bitcoinrpc.h | 1 - src/makefile.linux-mingw | 2 +- src/makefile.mingw | 2 +- src/makefile.osx | 2 +- src/makefile.unix | 2 +- 6 files changed, 5 insertions(+), 6 deletions(-) diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro index ae4ef79cb..a47d66167 100644 --- a/bitcoin-qt.pro +++ b/bitcoin-qt.pro @@ -2,7 +2,7 @@ TEMPLATE = app TARGET = VERSION = 0.6.99 INCLUDEPATH += src src/json src/qt -DEFINES += QT_GUI BOOST_THREAD_USE_LIB USE_IPV6 +DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE USE_IPV6 CONFIG += no_include_pwd # for boost 1.37, add -mt to the boost libraries diff --git a/src/bitcoinrpc.h b/src/bitcoinrpc.h index 0df649581..8b2d90517 100644 --- a/src/bitcoinrpc.h +++ b/src/bitcoinrpc.h @@ -9,7 +9,6 @@ #include #include -#define BOOST_SPIRIT_THREADSAFE #include "json/json_spirit_reader_template.h" #include "json/json_spirit_writer_template.h" #include "json/json_spirit_utils.h" diff --git a/src/makefile.linux-mingw b/src/makefile.linux-mingw index 61b38a663..51f49bb3c 100644 --- a/src/makefile.linux-mingw +++ b/src/makefile.linux-mingw @@ -27,7 +27,7 @@ LIBS= \ -l ssl \ -l crypto -DEFS=-D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DUSE_IPV6 +DEFS=-D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DUSE_IPV6 DEBUGFLAGS=-g CFLAGS=-O2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) diff --git a/src/makefile.mingw b/src/makefile.mingw index 47bf8d530..577c77b7d 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -23,7 +23,7 @@ LIBS= \ -l ssl \ -l crypto -DEFS=-DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DUSE_IPV6 +DEFS=-DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DUSE_IPV6 DEBUGFLAGS=-g CFLAGS=-mthreads -O2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) diff --git a/src/makefile.osx b/src/makefile.osx index 227756f27..972873312 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -53,7 +53,7 @@ LIBS += \ TESTDEFS += -DBOOST_TEST_DYN_LINK endif -DEFS=-DMAC_OSX -DMSG_NOSIGNAL=0 -DUSE_IPV6 +DEFS=-DMAC_OSX -DMSG_NOSIGNAL=0 -DBOOST_SPIRIT_THREADSAFE -DUSE_IPV6 ifdef RELEASE # Compile for maximum compatibility and smallest size. diff --git a/src/makefile.unix b/src/makefile.unix index 04e17866e..9052891b4 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -4,7 +4,7 @@ USE_UPNP:=0 -DEFS=-DUSE_IPV6 +DEFS=-DUSE_IPV6 -DBOOST_SPIRIT_THREADSAFE 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))