summaryrefslogtreecommitdiff
path: root/src/lib/safe_stringstream.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-08-19 21:01:28 +0100
committerCarl Hetherington <cth@carlh.net>2014-08-19 21:01:28 +0100
commit9a2b45caa81d8fb056802dfe3c25f214e808ffdf (patch)
tree1cead4781d2a8546c3ba8b8f936d18bf8e8a6403 /src/lib/safe_stringstream.cc
parentaa3565457977dabb658f41c71e14151473b91f07 (diff)
Use SafeStringStream instead of std::stringstream to try to fix random crashes on OS X.
Diffstat (limited to 'src/lib/safe_stringstream.cc')
-rw-r--r--src/lib/safe_stringstream.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/lib/safe_stringstream.cc b/src/lib/safe_stringstream.cc
new file mode 100644
index 000000000..01d545045
--- /dev/null
+++ b/src/lib/safe_stringstream.cc
@@ -0,0 +1,23 @@
+/*
+ Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <boost/thread/mutex.hpp>
+#include "safe_stringstream.h"
+
+boost::mutex SafeStringStream::_mutex;