summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-07-24 21:43:05 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-07-24 21:43:05 +0000
commit1cdf02ae2f3515857880c45be3e22274d281c2cf (patch)
treeb39682a801c37aa76c2e0771078aa759709af354
parente284a533492de02366f70e608b8dfbd04a3dbcaf (diff)
remove use of boost::thread/boost::mutex; bump glibmm requirement to 2.30 in order to pick up Glib::Threads::Mutex which can be used statically, use that to replace boost::mutex; add required inclusion of <cerrno> in a couple of places
git-svn-id: svn://localhost/ardour2/branches/3.0@13076 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/ardour/export_profile_manager.cc1
-rw-r--r--libs/ardour/session_directory.cc2
-rw-r--r--libs/pbd/pbd/signals.h14
-rw-r--r--libs/pbd/pbd/signals.py12
-rw-r--r--libs/pbd/signals.cc4
-rw-r--r--wscript2
6 files changed, 19 insertions, 16 deletions
diff --git a/libs/ardour/export_profile_manager.cc b/libs/ardour/export_profile_manager.cc
index 4d9413cbce..af7f6a73f8 100644
--- a/libs/ardour/export_profile_manager.cc
+++ b/libs/ardour/export_profile_manager.cc
@@ -20,6 +20,7 @@
#include <cassert>
#include <stdexcept>
+#include <cerrno>
#include <glib.h>
#include <glib/gstdio.h>
diff --git a/libs/ardour/session_directory.cc b/libs/ardour/session_directory.cc
index 5f3e984955..ec4fded685 100644
--- a/libs/ardour/session_directory.cc
+++ b/libs/ardour/session_directory.cc
@@ -16,6 +16,8 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <cerrno>
+
#include <glibmm/fileutils.h>
#include <glibmm/miscutils.h>
diff --git a/libs/pbd/pbd/signals.h b/libs/pbd/pbd/signals.h
index dc53b31f94..69c52f57cf 100644
--- a/libs/pbd/pbd/signals.h
+++ b/libs/pbd/pbd/signals.h
@@ -21,13 +21,13 @@
#define __pbd_signals_h__
#include <list>
-#include <glibmm/thread.h>
+#include <map>
+#include <glibmm/threads.h>
#include <boost/noncopyable.hpp>
#include <boost/bind.hpp>
#include <boost/bind/protect.hpp>
#include <boost/function.hpp>
-#include <boost/thread/mutex.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/optional.hpp>
@@ -44,7 +44,7 @@ public:
virtual void disconnect (boost::shared_ptr<Connection>) = 0;
protected:
- boost::mutex _mutex;
+ Glib::Threads::Mutex _mutex;
};
class Connection : public boost::enable_shared_from_this<Connection>
@@ -54,7 +54,7 @@ public:
void disconnect ()
{
- boost::mutex::scoped_lock lm (_mutex);
+ Glib::Threads::Mutex::Lock lm (_mutex);
if (_signal) {
_signal->disconnect (shared_from_this ());
_signal = 0;
@@ -63,12 +63,12 @@ public:
void signal_going_away ()
{
- boost::mutex::scoped_lock lm (_mutex);
+ Glib::Threads::Mutex::Lock lm (_mutex);
_signal = 0;
}
private:
- boost::mutex _mutex;
+ Glib::Threads::Mutex _mutex;
SignalBase* _signal;
};
@@ -147,7 +147,7 @@ class ScopedConnectionList : public boost::noncopyable
one from another.
*/
- Glib::Mutex _lock;
+ Glib::Threads::Mutex _lock;
typedef std::list<ScopedConnection*> ConnectionList;
ConnectionList _list;
diff --git a/libs/pbd/pbd/signals.py b/libs/pbd/pbd/signals.py
index f3dfd05d82..24640fca72 100644
--- a/libs/pbd/pbd/signals.py
+++ b/libs/pbd/pbd/signals.py
@@ -110,7 +110,7 @@ def signal(f, n, v):
print("", file=f)
print("\t~Signal%d () {" % n, file=f)
- print("\t\tboost::mutex::scoped_lock lm (_mutex);", file=f)
+ print("\t\tGlib::Threads::Mutex::Lock lm (_mutex);", file=f)
print("\t\t/* Tell our connection objects that we are going away, so they don't try to call us */", file=f)
print("\t\tfor (%sSlots::iterator i = _slots.begin(); i != _slots.end(); ++i) {" % typename, file=f)
@@ -234,7 +234,7 @@ def signal(f, n, v):
print("", file=f)
print("\t\tSlots s;", file=f)
print("\t\t{", file=f)
- print("\t\t\tboost::mutex::scoped_lock lm (_mutex);", file=f)
+ print("\t\t\tGlib::Threads::Mutex::Lock lm (_mutex);", file=f)
print("\t\t\ts = _slots;", file=f)
print("\t\t}", file=f)
print("", file=f)
@@ -249,7 +249,7 @@ def signal(f, n, v):
*/
bool still_there = false;
{
- boost::mutex::scoped_lock lm (_mutex);
+ Glib::Threads::Mutex::Lock lm (_mutex);
still_there = _slots.find (i->first) != _slots.end ();
}
@@ -269,7 +269,7 @@ def signal(f, n, v):
print("""
bool empty () {
- boost::mutex::scoped_lock lm (_mutex);
+ Glib::Threads::Mutex::Lock lm (_mutex);
return _slots.empty ();
}
""", file=f)
@@ -287,7 +287,7 @@ def signal(f, n, v):
boost::shared_ptr<Connection> _connect (slot_function_type f)
{
boost::shared_ptr<Connection> c (new Connection (this));
- boost::mutex::scoped_lock lm (_mutex);
+ Glib::Threads::Mutex::Lock lm (_mutex);
_slots[c] = f;
return c;
}""", file=f)
@@ -295,7 +295,7 @@ def signal(f, n, v):
print("""
void disconnect (boost::shared_ptr<Connection> c)
{
- boost::mutex::scoped_lock lm (_mutex);
+ Glib::Threads::Mutex::Lock lm (_mutex);
_slots.erase (c);
}
};
diff --git a/libs/pbd/signals.cc b/libs/pbd/signals.cc
index cafb98f6bf..ff535603ef 100644
--- a/libs/pbd/signals.cc
+++ b/libs/pbd/signals.cc
@@ -34,14 +34,14 @@ ScopedConnectionList::~ScopedConnectionList()
void
ScopedConnectionList::add_connection (const UnscopedConnection& c)
{
- Glib::Mutex::Lock lm (_lock);
+ Glib::Threads::Mutex::Lock lm (_lock);
_list.push_back (new ScopedConnection (c));
}
void
ScopedConnectionList::drop_connections ()
{
- Glib::Mutex::Lock lm (_lock);
+ Glib::Threads::Mutex::Lock lm (_lock);
for (ConnectionList::iterator i = _list.begin(); i != _list.end(); ++i) {
delete *i;
diff --git a/wscript b/wscript
index 3cc7b90dd9..e311e3ddcc 100644
--- a/wscript
+++ b/wscript
@@ -561,7 +561,7 @@ def configure(conf):
autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2')
autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD', atleast_version='2.2')
- autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0')
+ autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.30.0')
autowaf.check_pkg(conf, 'sndfile', uselib_store='SNDFILE', atleast_version='1.0.18')
autowaf.check_pkg(conf, 'giomm-2.4', uselib_store='GIOMM', atleast_version='2.2')
autowaf.check_pkg(conf, 'libcurl', uselib_store='CURL', atleast_version='7.0.0')