summaryrefslogtreecommitdiff
path: root/libs/pbd
diff options
context:
space:
mode:
Diffstat (limited to 'libs/pbd')
-rw-r--r--libs/pbd/SConscript3
-rw-r--r--libs/pbd/pathscanner.cc6
-rw-r--r--libs/pbd/pthread_utils.cc14
3 files changed, 19 insertions, 4 deletions
diff --git a/libs/pbd/SConscript b/libs/pbd/SConscript
index 5a395641ca..51a852fd44 100644
--- a/libs/pbd/SConscript
+++ b/libs/pbd/SConscript
@@ -65,6 +65,9 @@ pbd.Merge ([ libraries['sigc2'],
libraries['glib2'],
libraries['boost'] ])
+if pbd['VST']:
+ pbd.Append(CCFLAGS="-DWINE_THREAD_SUPPORT", CPPPATH="#libs/fst")
+
pbd.VersionBuild(['version.cc','pbd/version.h'], [])
libpbd = pbd.SharedLibrary('pbd', pbd_files)
diff --git a/libs/pbd/pathscanner.cc b/libs/pbd/pathscanner.cc
index 8f37477147..9b41de9544 100644
--- a/libs/pbd/pathscanner.cc
+++ b/libs/pbd/pathscanner.cc
@@ -26,9 +26,9 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <pbd/error.h>
-#include <pbd/pathscanner.h>
-#include <pbd/stl_delete.h>
+#include "pbd/error.h"
+#include "pbd/pathscanner.h"
+#include "pbd/stl_delete.h"
using namespace PBD;
diff --git a/libs/pbd/pthread_utils.cc b/libs/pbd/pthread_utils.cc
index 8274223487..69270a767b 100644
--- a/libs/pbd/pthread_utils.cc
+++ b/libs/pbd/pthread_utils.cc
@@ -24,6 +24,9 @@
#include <stdint.h>
#include "pbd/pthread_utils.h"
+#ifdef WINE_THREAD_SUPPORT
+#include <fst.h>
+#endif
using namespace std;
@@ -39,6 +42,15 @@ namespace PBD {
using namespace PBD;
+static int thread_creator (pthread_t* thread_id, const pthread_attr_t* attr, void *(*function)(void*), void* arg)
+{
+#ifdef WINE_THREAD_SUPPORT
+ return wine_pthread_create (thread_id, attr, function, arg);
+#else
+ return pthread_create (thread_id, attr, function, arg);
+#endif
+}
+
void
PBD::notify_gui_about_thread_creation (pthread_t thread, std::string str, int request_count)
{
@@ -70,7 +82,7 @@ pthread_create_and_store (string name, pthread_t *thread, pthread_attr_t *attr,
attr = &default_attr;
}
- if ((ret = pthread_create (thread, attr, start_routine, arg)) == 0) {
+ if ((ret = thread_creator (thread, attr, start_routine, arg)) == 0) {
std::pair<string,pthread_t> newpair;
newpair.first = name;
newpair.second = *thread;